Berserker, I don't get the idea. Is there any advantage of saving to ini instead of w51-w100? Ah, maybe it's better, since sometimes the player is too exciting and close the game after victory.
But still, timing issue. When would you suggest for saving data to in?
________
Thanks
Berserker for discussing on Discord.
Here I need some more help with the script.
My plan is to save data of heroes from all heroes that are controlled by the current player and write down the player colour with them.
The reason for saving with player colour is:
Some campaigns are inconsistent. Data is required to save cross over more than 1 zone. For example, in Zone 1 you start with Inferno, Zone 2 with Dungeon, and in Zone 3 you got to choose either Inferno or Dungeon from Zone 1/2. The Player's colour helps you distinguish them as it's possible for you to have the same hero from both Zone 1/2.
I decide to pop up a msg asking whether loading data from ini for every single map, a check of player colour would be handy -> If the heroes owned by the current player as no data stored in ini, then such question would be completely skipped.
But still, I need to figure out the timing for clearing all the variables from ini. I will make it manually asking for each time starting a map (same with asking whether loading henchman data).
OK
here comes the question: is there a good way to remove all data from ini? Do I have to loop through all colours/heroes and write data to reset?
________
Edit: I get new idea about the implementation. I will probably just create a menu when hotkey, in this menu, the player gets to choose from Saving henchman data/Loading henchman data and delete henchman data. After selecting any option, it leads to slot 1/slot 2/slot 3 for further operation. Looks like this is more reliable.