Page 1 of 1
strange info in "Shipdata structure" (wiki)
Posted: Tue May 13, 2008 12:28 pm
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.
Posted: Tue May 13, 2008 12:57 pm
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...
Posted: Wed May 14, 2008 8:17 am
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'.)
Posted: Wed May 14, 2008 9:19 am
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!!!