n0stalghia / Sunless_Skies_Save_Editor

Python-based save editor for Sunless Skies
GNU General Public License v3.0
13 stars 2 forks source link

Editing locomotives #1

Open mmiszczyk opened 5 years ago

mmiszczyk commented 5 years ago

I don't feel comfortable with QT UI stuff so I won't do implementation myself, but I reverse engineered (ILSpy + buying things in-game + some trial and error) IDs related to different locomotive types, allowing us to modify those. It can be found in the QualitiesPossessed array, and has the id of 132796 and a structure more or less like this (after pretty-printing):

    "QualitiesPossessedList": [
        //...
        {
            "AssociatedQuality": {
                "Id": 132796,
                "Tag": ""
            },
            "EffectiveLevel": 1,
            "EquippedPossession": {
                "AssociatedQuality": {
                    "Id": EDIT THIS,
                    "Tag": ""
                },
                "EffectiveLevel": 1,
                "Level": 1,
                "Name": "Your Locomotive Name"
            },
            "Level": 1
        },

In EDIT THIS, we put the ID of locomotive we want. The ones I found are:

n0stalghia commented 5 years ago

Will be added in the next release, thanks for finding this.