Shipyards.plist: Something is broken in the core game

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Shipyards.plist: Something is broken in the core game

Post by Lestradae »

Hye,

While working on the next version of my shipyards oxp I have found a few glitches that, after a lot of testing and tweaking, I am now sure have to do with things that don`t work in the core game.

1. The command:

Code: Select all

<key>standard_equipment</key>
                <dict>
                        <key>extras</key>
                        <array>
                        <string>EQ_FUEL_SCOOPS</string>
                        <string>EQ_FUEL_INJECTION</string>
                        </array>
                        <key>missiles</key>
                        <integer>0</integer>
                </dict>
... only works with some pieces of equipment and not with others. If some sorts of equipment are demanded as standard, the game simply doesn`t award any standard equipment, except laser and missiles. I have not extensively tested which pieces of equipment cause this bug yet.

2. After giving ships a tech level SPAN in which they appear (say, 5-9, instead of only a MINIMUM 5) I noticed that the game always seems to choose shipyard ships from the lowest possible rank, so that higher level ships no longer appear.

In a shipyard of TL 5, for example, the game consistently chooses by far most ships from the 2-5 (minimum 2) span, a few from the 3-6 span and if you are lucky one from the 4-7 span. It NEVER chooses a ship that`s actually TL 5 minimum in that case.

That contradicts the formula I was told was used to choose ships - that ships would be preferred close to the minimum tech level. If that is what is intended by the core game, that`s broken.

3. As a consequence of 2., ships with a minimum of tech level 15 (highest) to appear actually NEVER, EVER appear. (And yes, the tech level in the shipyard.plist is one lower - i.e. 14 in case of in-game 15, so that`s already factored in). This also seems to be a bug.

4. The game does not wipe its memory of shipyards from savegame to savegame:

For example, I test-started the game at unmodified Lave (tech level 5) with the new version of the Realistic Shipyards in, meaning ships with spans from 2-5 to 5-8 should appear. Ships from that lower end range appeared.

Then I loaded a save game at Ersoonve (galaxy 2, tech level 15 with ramaza missions oxp in). In the shipyard, ships from the TL range 12+ appeared as they should, but not a single one, as usual, from TL 15 minimum itself.

OK. I press F2, choose "Start New Game". I go to the Lave shipyard, TL 5. There I find all the ships from the first gamestart AND all the ships from the Ersoonvian shipyard together! :shock:

So,it seems the game doesn`t wipe the shipyard memory between savegames & new gamestarts! Could this even be one of the memory overrun bugs still not found?

I would really need the help of someone with the capability to look into the code of Oolite itself to find out what`s going wrong here. Not only will I be unable to go on developing my oxp with those bugs (into which I already invested a considerable amount of time), but many other oxps will be hit by this. For example, if you need a ship with specific standard equipment scripted in, or want to make something available only at a certain tech level, and where does all the memory go used to keep up shipyard information from three games past at least?

Please; help!

L

EDIT: Concerning points 2. and 3.; after much testing now 100% sure that ...

Code: Select all

<key>techlevel</key>
 <integer>4</integer>
... does not work as intended (aka as it says in the Wiki)! :shock:

The actual minimum tech level is not one, but TWO tech levels higher in-game! Could it be that a "greaterthan" has made its way somewhere where it should have said "equals"?

This has two serious consequences for shipyard.plist`s: First, a minimum TL of 1 (in-game) can`t be defined because "-1" doesn`t work in the shipyard.plist (tried that) and all ships defined as ...

Code: Select all

<key>techlevel</key>
 <integer>14</integer>
... will actually never appear in a normal shipyard because its in-game tech level would have to be 16 :? ...
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 »

Do let us know if you've got a 'non-working example' for the standard_equipment key. Anyways, I'll see what I can do.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

.

Post by Lestradae »

I will attempt to pinpoint which items of equipment skip the standard item distribution in-game when I find the time (next days look not so good), but I will try to get a repeatable erratic behaviour.

And, as always, thanks for your work! :)

L
Post Reply