[1.08] Ship creation. Ship Design not found.


#1

I have found a strange bug that makes it impossible to create new a new ship design. I used an old design A (I’ll give the loadouts below), and updated this to design B. When I try to save, under a new name, I get the following error message:

Error message:
Ship Design not found -> C:\Documents and settings\Soyweiser\My Documents/My Games/GratuitousSpaceBattles/ships/escort panther2.txt:…\src\SIM_ShipDesign.cpp 529

The file is still there, but somehow it crashes the game. I tried giving it an other name. But that also didn’t work.

But I can still design other ships. I can make other new ones, update these and nothing happens. Only this configuration crashes my game. (So far).

Loadout A:
[config]
name = quantum panther
guiname = Quantum Panther
hull = Federation Panther Cruiser hull
cost = 2146

[modules]
0 = cruiser_defence laser,
1 = cruiser_quantumblaster,
2 = cruiser_quantumblaster,
3 = cruiser_quantumblaster,
4 = cruiser shield II,
5 = cruiser crew II,
6 = cruiser_targetpainter,
7 = cruiser_pointdefence,
8 = cruiser_pdscanner,
9 = cruiser_engine III,
10 = cruiser_engine III,
11 = cruiser power,
12 = cruiser power,
13 = cruiser_defence laser,
14 = cruiser_defence laser,

Loadout B:
[config]
name = escort panther 2
guiname = Escort Panther 2
hull = Federation Panther Cruiser hull
cost = 2263

[modules]
0 = cruiser_defence laser,
1 = cruiser_pointdefence,
2 = cruiser_defence laser,
3 = cruiser_defence laser,
4 = cruiser shield II,
5 = cruiser crew II,
6 = cruiser_targetpainter,
7 = cruiser_pointdefence,
8 = cruiser_pdscanner,
9 = cruiser_engine III,
10 = cruiser_engine III,
11 = cruiser power,
12 = cruiser power,
13 = cruiser_defence laser,
14 = cruiser_defence laser,


#2

Create it again from scratch.
Patches sometimes invalidate old designs.


#3

This problem also happened before the 1.08 update.

Edit:
Redid from scratch, also crashes.

Loadout I build this time:
[config]
name = escort panther 3
guiname = Escort Panther 3
hull = Federation Panther Cruiser hull
cost = 2251

[modules]
0 = cruiser_defence laser,
1 = cruiser_pointdefence,
2 = cruiser_defence laser,
3 = cruiser_defence laser,
4 = cruiser crew II,
5 = cruiser shield II,
6 = cruiser_pointdefence,
7 = cruiser_targetpainter,
8 = cruiser_pdscanner,
9 = cruiser_engine III,
10 = cruiser_engine III,
11 = cruiser power,
12 = cruiser power,
13 = cruiser_defence laser,
14 = cruiser_defence laser,


#4

I have hit this bug twice today in 1.08 (I have not encountered it in earlier versions). The first time it hit was when I tried to load an old design that I had created in a previous version. Since there have been lots of changes since then I didn’t think much of it and simply created new designs.

A playing for a while I hit the bug again. This time it hit when saving an edited design (one that I had earlier created in 1.08). After swapping a target painter for a Cruiser PD turret, I attempted to save the design with the same name and got the error when I chose to overwrite the old file. The file mentioned in the error message does exist on my system and has the contents of the new version of the design (so the error crashed the game only after it saved).

Edit:
Here is the ship design I hit this bug with. I can consistently reproduce the crash by attempting to load the file from the ship design screen. This ship has only been used in version 1.08.

[code][config]
name = rebel lighting
guiname = Rebel Lighting
hull = Rebel Valhalla Cruiser
cost = 3139

[modules]
0 = cruiser_laser,
1 = cruiser_laser,
2 = cruiser_pointdefence,
3 = cruiser_laser,
4 = cruiser_laser,
5 = cruiser_engine V,
6 = cruiser_engine V,
7 = cruiser_engine VI,
8 = cruiser_engine VI,
9 = cruiser_engine V,
10 = cruiser power II,
11 = cruiser power II,
12 = cruiser shield II,
13 = cruiser shield fastrecharge,
14 = cruiser powered armor,
15 = cruiser powered armor,
16 = cruiser crew IV,
[/code]


#5

After some fiddling around I believe I know what is causing this bug.

When you add the module “Cruiser Point Defense System” you actually get the “Hi-Speed Point Defense” module instead (after saving and reloading the design). This is because the file “data\modules\cruiser_point_defense_II.txt” in the install folder has the “name” attribute of “cruiser_pointdefense”, which is the same as the one used in the file “data\modules\cruiser_point_defense.txt”.

I suspect the crash has something to do with the design becoming invalid, due to the extra half point of power that is consumed by the hi-speed version of the PD turret, which my design can not afford (it has only 0.2 power left over).


#6

Yeah, updating one of the powergenerators 2 to a powergenenrator 3 fixed my design. Thanks.