Someone else has already mentioned that custom units can get duplicated when saving changes to them.
I’ve checked the directories in which units are saved, and noticed a few things…
I see units saved in two locations:
- \data\sampleunits; and
- \Documents\My Games\GratuitousTankBattles\player_units.
The first time I save a custom unit, sometimes it is saved in one directory, sometimes in the other. I haven’t noticed anything that affects which directory it uses first.
If I later save changes to the same unit, it seems to correctly overwrite if the unit is in the player_units directory.
However, if it was only in the sampleunits directory, then the next save always goes to the player_units directory. The original version in sampleunits is untouched.
From this point on, the unit list shows two of the same unit name.
Deleting the one in sampleunits removes the duplicate and allows subsequent saves to just overwrite the one in player_units.
I’m not certain, but all the times I’ve noticed it have happened after I had loaded a sample unit at some point before closing the Unit Designer. I could click on Change Hull, design a new unit, and then save it, or I could load one of my own custom units (after having loaded a sample unit), modified it, and then saved it. I’m pretty sure I’ve had a duplicate (with one in the player custom units folder and a duplicate in the sample units folder) from both of the above scenarios. Unfortunately, it most definitely doesn’t happen every time.
I’ve also noticed that sometimes it not only creates a duplicate, it’s overwrites one of the sample units, so that it’s gone. My solution for now was to reinstall the game and put a copy of all the sample units into a zip file for storage. That way I have easy access to the originals if one gets messed up or simply vanishes.
the patch I just released (copies should autoupdate over the next 24 hours) may well fix all this.
edit:… and just found that some of this was a different bug, which will be fixed in 1.003