Sorry that the first thing I have to say here is a critisism.
Lestradae wrote:* The standard equipment a ship is bought with isn`t always awarded by the game as it should. This is not a Realistic Shipyards - specific bug, it seems to be a problem of the core game.
I am pretty sure that this
is a
Realistic Shipyards-bug.
The
shipyard.plist-documentation in the wiki explains how the
optional_equipment-array and the
standard_equipment-array work.
standard_equipment will be present in
each and every ship of this type that is for sale anywhere. That's precisely the meaning of "standard". The standard equipment is not even noted on the shipyard-screen. You see it only if you have bought the ship. Therefore on the shipyard it says "Standard customer model." It's standard. So if you choose to put each and every item of equipment in the
standard_equipment-array, then the "Standard customer model" will come with each and every piece of equipment pre-installed. The game-engine will
not adjust the ship-price accordingly. All standard equipment comes free with the ship! And no need to buy anything anymore on the equipment-screen.
optional_equipment, however, is optional. This is the list Oolite chooses from, in order to give some extra equipment to the ship in the shipyard, above the standard. This is the equipment that is mentioned in the shipyard descriptions, like "plus Fuel Scoops. Forward weapon upgraded to military laser". The game-engine adds the prices of these items of equipment to the final price of the ship. Which of the items in the
optional_equipment-array is chosen, depends on random. So in the same shipyard there may be some ships without any optional equipment, some have an upgraded laser, some have a Fuel Scoop or an Extra Energy Unit, some have both, and so on. The chance of having optional equipment installed is governed by the
chance-key, which also governs the overall availability of the ship.
It is very clear from this, that it makes no sense at all to have the same equipment-item in both the
standard_equipment and the
optional_equipment-array! You buy a ship that is pre-equipped with a Fuel Scoop (standard, and for free), and then you get randomly another Fuel Scoop on top of that (optional, and with a cost). Not only does this make no sense, it is
a bug. A bug, scripted by the negligent (or ignorant) author of the shipyard.plist. Oolite is not the least little bit to blame for it!
Now I open the shipyard.plist of Realistic_Shipyards.oxp (1.07, I haven't yet downloaded the new one). I just look at the very first entry, Condor-player. Here it is:
Code: Select all
<key>Condor-player</key>
<dict>
<key>chance</key>
<real>1</real>
<key>conditions</key>
<array>
<string>legalStatus_number equal 0</string>
<string>score_number greaterthan 6399</string>
</array>
<key>optional_equipment</key>
<array>
<string>EQ_ECM</string>
<string>EQ_CARGO_BAY</string>
!*!*!* <string>EQ_FUEL_SCOOPS</string>
<string>EQ_ESCAPE_POD</string>
<string>EQ_ENERGY_BOMB</string>
<string>EQ_ENERGY_UNIT</string>
<string>EQ_NAVAL_ENERGY_UNIT</string>
!*!*!* <string>EQ_DOCK_COMP</string>
<string>EQ_WEAPON_PULSE_LASER</string>
<string>EQ_WEAPON_BEAM_LASER</string>
<string>EQ_WEAPON_MINING_LASER</string>
<string>EQ_WEAPON_MILITARY_LASER</string>
<string>EQ_WEAPON_TWIN_PLASMA_CANNON</string>
<string>EQ_FUEL_INJECTION</string>
!*!*!* <string>EQ_SCANNER_SHOW_MISSILE_TARGET</string>
!*!*!* <string>EQ_MULTI_TARGET</string>
!*!*!* <string>EQ_TARGET_MEMORY</string>
<string>EQ_GAL_DRIVE</string>
!*!*!* <string>EQ_ADVANCED_COMPASS</string>
!*!*!* <string>EQ_SHIELD_BOOSTER</string>
<string>EQ_NAVAL_SHIELD_BOOSTER</string>
!*!*!* <string>EQ_HEAT_SHIELD</string>
</array>
<key>price</key>
<integer>15417000</integer>
<key>standard_equipment</key>
<dict>
<key>extras</key>
<array>
!*!*!* <string>EQ_FUEL_SCOOPS</string>
!*!*!* <string>EQ_DOCK_COMP</string>
<string>EQ_ECM</string>
!*!*!* <string>EQ_SCANNER_SHOW_MISSILE_TARGET</string>
!*!*!* <string>EQ_MULTI_TARGET</string>
!*!*!* <string>EQ_TARGET_MEMORY</string>
!*!*!* <string>EQ_ADVANCED_COMPASS</string>
!*!*!* <string>EQ_SHIELD_BOOSTER</string>
!*!*!* <string>EQ_HEAT_SHIELD</string>
</array>
<key>forward_weapon_type</key>
<string>EQ_WEAPON_BEAM_LASER</string>
</dict>
<key>techlevel</key>
<integer>13</integer>
<key>weapon_facings</key>
<integer>15</integer>
I have marked all lines that are present in both the
standard_equipment and the
optional_equipment-arrays with a "!*!*!*". Each of these doublettes is
a bug in your OXP! That makes eight bugs in the very first ship alone.
Condor-player is already an example of the worst case, because its
chance is 1. This means that each and every Condor for sale with have
all optional equipment items (and - not to forget -
all standard items). So each and every Condor for sale has
two Fuel Scoops,
two Docking Computers,
two Scanner Enhancements,
two Multi Targetting Systems,
two Target Memory Expansions,
two Advanced Space Compasses,
two Shield Boosters, and
two Heat Shields (each time one of them - the standard one - for free, and the other for a price)! Of course it can only hold one of the respective items, not two. So these bugs will result in unexpected behaviour.
I'm very sorry that this is again a "blunt" criticism. But I
do think that the explanation in the wiki is
so clear that an idiot would understand it, and not make the mistakes that you have spread all over your OXP. And even if it is actually not your mistakes and bugs, but of those people whose shipyard.plists you probably just copied, it would have been your job as publisher of this OXP to eliminate these bugs.
And don't blame Oolite (the "core game") for your sloppy scripting.