Posted by: nakorkren
« on: Today at 08:11:45 AM »I started getting error "2.5.1 Function #1500: constraint failed UNIQUE constraint failed: FCT_ShipDesignComponents.SDComponentID" every time I save. Doesn't seem to harm anything, although I haven't since tried closing the game and loading the save, as I'm afraid it might not actually be saving or might be corrupting the save.
That sounds like you somehow have two components with the same ID, which shouldn't happen. Unfortunately, if that happens it prevents that table being saved at all. If you have only saved once or twice, you can go back to the one of the auto-backup saves.
Unfortunately I've saved at least two dozen times since then across several in-game years of gameplay. Is there anything I can do to save (literally and figuratively) the game? I'm reasonably comfortable with DB editing from past experience updating the DB to implement "pre-release" changes of prior changelogs.
I hadn't edited this DB at all, so I'm not sure how I wound up with this error. Could it be caused by creating and deleting an identical component and deleting it, either before or after researching? I think I may have done that with a Particle Beam 6 component. Would it be possible to guess which units/ships have the component, delete all of those units, and save again, to see if that solves the problem?