OpenXcom Forum

Contributions => Programming => Topic started by: Darkercloud on December 27, 2015, 04:20:25 am

Title: Question about editing saved games
Post by: Darkercloud on December 27, 2015, 04:20:25 am
Is it possible to edit a soldiers inventory that has already started a mission?
Title: Re: Question about editing saved games
Post by: Warboy1982 on December 27, 2015, 06:38:29 pm
yes, but i wouldn't say it's easy
Title: Re: Question about editing saved games
Post by: Darkercloud on December 28, 2015, 07:08:38 am
Hex editing?
Title: Re: Question about editing saved games
Post by: Hobbes on December 28, 2015, 05:51:32 pm
Hex editing?

Easier than that: you can open and edit a saved game with Notepad++ or any other text editor.
Title: Re: Question about editing saved games
Post by: Darkercloud on December 28, 2015, 06:26:28 pm
Easier than that: you can open and edit a saved game with Notepad++ or any other text editor.

From what i've messed around with in the save file it only edits your loadout, Not during the current battle. For example I want to freshen one of my soldiers grenade supply.
Title: Re: Question about editing saved games
Post by: Hobbes on December 29, 2015, 12:43:58 am
From what i've messed around with in the save file it only edits your loadout, Not during the current battle. For example I want to freshen one of my soldiers grenade supply.

I'd think that if you save the tactical game on turn 10 it would save the current inventory of the soldiers, not their initial loadout, but I may be wrong.
Title: Re: Question about editing saved games
Post by: Warboy1982 on December 29, 2015, 05:18:16 am
saved soldiers come in two flavours. the ones at the base, and the ones in the battle.

the saved loadouts are on the ones in the base. search for the battle section, it has all the tiles (saved in binary), all the items, and all the units in the battle. honestly though, manipulating that data is not recommended unless you know _exactly_ what you're doing.

i'd suggest instead, simply bump up the unit in question's time units and energy to an absurd level so that they can go pick up whatever item it is and get back in position, let the engine handle it, then re-edit the time units back to their original values. much less margin for error that way.
Title: Re: Question about editing saved games
Post by: Darkercloud on December 29, 2015, 06:06:49 pm
saved soldiers come in two flavours. the ones at the base, and the ones in the battle.

the saved loadouts are on the ones in the base. search for the battle section, it has all the tiles (saved in binary), all the items, and all the units in the battle. honestly though, manipulating that data is not recommended unless you know _exactly_ what you're doing.

i'd suggest instead, simply bump up the unit in question's time units and energy to an absurd level so that they can go pick up whatever item it is and get back in position, let the engine handle it, then re-edit the time units back to their original values. much less margin for error that way.

Damn, I was wanting a way to stack grenades and repleneshing them by save editing was my last hope. Thanks for the help.