strange info in "Shipdata structure" (wiki)

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

strange info in "Shipdata structure" (wiki)

Post by Commander McLane »

Surfing the wiki a little bit I came across the Shipdata structure document and was hit by its second sentence:
Do not use '-'(minus symbol) in the entity title.
which is there since the document was brought up.

Any idea why? Because it's obviously wrong. The built-in shipdata.plist uses entity titles like "cobra3-player" all the time.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

I suspect it could be related to some old limitations in gnustep (a library used in the windows & linux versions of oolite)

One thing that was happening before 1.70, was that trying to give 'gem-stones' to the player would actually try to give non-existent 'gem' items, which would then default to 'food' (in windows & linux, but would work correctly on macs)

From 1.70+, Oolite doesn't seem to have any problems with it, but the windows & linux versions of 1.65 could still get confused by the '-' character. In other words, if you plan for 1.65 compatibility & don't have a non-mac 1.65 to test the oxp with, the safest thing to do would be to avoid '-' altogether...
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

I know about the gem-stones issue, but they are not a ship entity.

And a lot of OXPs, (and the game itself!) have usually used entity identifiers with '-' since 1.65 and even before that without any problem.

(If there would have been a problem on windows/linux, then no windows/linux player would ever have been able to even start the game in 1.65, because right from the start he himself is an entity with the identifier 'whatever-player'.)
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Ok, I probably didn't explain myself well enough: the '-' blindness (as per gem/gem-stones) was caused by some code inside gnustep when accessing plists.

The one and only library used for accessing all plists in windows and linux is gnustep, and there were still some issues with it in 1.65.

Maybe that wiki snippet is from before 1.65 where the plists/gnustep problem was more widespread.

Again, it's just a guess as to why it was there. As for the the whole plist/gnustep issue, it looks like it has been resolved now.

Of course you might get some unexpected behaviour on a different platform, and if you do, it might be due to something as trivial as having a '-' when oolite win/linux don't expect it. The gemstones/food thing was around for about 2 years before anyone figured out why!!! :D
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Post Reply