I'm working on modifying the weapons inventory for my game save. Through much trial and error I've been able to modify the weapons that already exist in a limited fashion. But I can't seem to add new data.
Basically, I've got two save file's I'm comparing, one without a 3rd weapon, and one with. Therefore I can evaluate the changes made to the save that determine a 3rd weapon in the 0-based byte-array. I would post the hex but it is fairly large.. The problem is that if I take the game save without #3, and attempt to affix properly the new weapon, the game won't load.
By properly I mean:
- correct position
- inserted not disturbing pre(prev weapon) & post(next weap) contents
- start & end location are absolutely accurate for the weapon definition (ie. no corruption)
- byte that specifies primary weapon inventory length set accurately (incremented by 1).
So investigating further I've found that there seems to be some kind of change (single decrement / increment) to MANY locations far below the weapon & armor definitions -- past the 150kb range in a 254kb file. Over 1000 of these, either a single [+] or single [-] to multiple byte values spanning multiple offsets(eg. [ce] = [cd] , [6a]= ), with similar structure and offset amount - certainly a pattern present. I'm unsure if these are some kind of checksum validation? There are no other alterations in the save, and in this range there are not any ASCII strings present. So that must be the case?
Of course the merchant data, and certain statistics (game elapsed time, etc) also change -- which is not important per this case. So I assume these single +/- changes to byte values are of significance? They seem to occur with or without the addition of a new primary weapon. So the game crash is a bit confusing. Perhaps it will not be [easily] possible to add/remove weapons at will?
Not sure if anyone has been able to add(insert) a weapon yet...?
The weapon definitions themselves (near ASCII "PrimaryWeapon") are quite simple, with level, stats, and attributes following. So there must be something I'm missing, because an absolute copy (dupe) of an existing weapon cannot be inserted without a game crash...