I need to change perk choice for any soldier (in save data or just undo all selections to make them in game again). To add this function as a mod, that will be useful for IronMan games.
There is "m_arrRandomPerks" in "m_kSoldier" struct. But I can't find perk choice data in plain format. May be it is stored in m_arrRandomPerks elements order, but I can't find correct algorithm. (Elements 0 1 2 are not first positions in perk tree row or column, and 1 2 3 are not too.)
Other possible locations are "aUpgrades" and "aAbilities". In this case I can't even make any guess.
You should write a PM to AzXeus or ask on his RoulettePlus site on nexusmods. He has full knowledge of perk related staff. And there is a good chance that your problem has already been solved in NewRoulettePlus :)
Where selected Perks (Abilities) are stored in LongWar? (3 comments)
There is "m_arrRandomPerks" in "m_kSoldier" struct.
But I can't find perk choice data in plain format. May be it is stored in m_arrRandomPerks elements order, but I can't find correct algorithm. (Elements 0 1 2 are not first positions in perk tree row or column, and 1 2 3 are not too.)
Other possible locations are "aUpgrades" and "aAbilities". In this case I can't even make any guess.