Hi,
I was just curious about this thing. I was wondering how to edit starting armies in custom battles. I got thru data.pack/db and I found these 2 tables: battle_type_faction_presets and battle_type_unit_to faction_presets. The reason, why I wrote just these 2 tables is that I think they are linked somehow. When I look at battle_type_unit_to faction_presets I see, that there are Unit IDrefs and each one of them is assigned to 2 numbers (first one unique, second one partially repeating). And when I look in battle_type_faction_presets I see, that each faction armies is starting with number 28 (I take a quick look at previous table and 28 is a bunch of austrian units!! So I think its the starting army. The proof of this is also in game, when I counted every unit and compare it. But what about others? Lets take Austria: second number is 2, I take a look at previous table and I see that number two is assigned to whole austrian army in the second column (partially repeating numbers)!! Whoah! I got it. So we decoded the first two numbers. But what about the other numbers in battle_type_faction_presets? When we take a closer look we see that the numbers in the first column are same for every faction! These are 28 (starting Austrian army), 62, 63. 88, 89, 90, stand for navy fleets (custom battle). I dont understand numbers 148-150. So what we will be inspecting is the third column that is in Britain +1 from Austria and in Denmark +2 from Austria - so linear succession. It means the armies differ from nation to nation (no same navy fleets like in second column)...
So long story short, to sum it up:
If you want to edit starting army (field battle, naval battle) just edit the units in battle_type_unit_to_faction_presets. But the reason I wanted to edit this of course was not to edit starting armies in custom battle, but to get over one thing in my upcoming mod. I added a new faction to the game - regions, flag, units everything, but I was not able to hire army in custom battles (only when I click on cross to delete the current army, btw good trick). And the reason why this happens is that my faction was not intended to by in custom battles (and so that has no army). So I think this will be come in handy for those who are making their own faction mods. Their faction now can have its preset army in custom battle like other major factions do. (and you dont have to tell users to click on "cross" to hire their army)
So finally, If you have a new faction (your mod), which was not in custom battles, just add your army in third column in battle_type_unit_to_faction_presets adding it one unique number in second column. This number should be then placed in battle_type_faction_presets next to the name of your faction. If you are adding new units dont forget to give them unique number in the first column of battle_type_unit_to_faction_presets. Beware of adding the number which was already set to another faction army (in the second column), the game will freeze.
Credits:
Vicar, Erasmus777 and HusserlTW for releasing the NAP-PFM
Edit: Now I am stuck in battle_type_faction_presets to get it working for new factions armies. I was trying it only for existing armies. So when I ll find a solution I ll write it here. If not i ll change the name of the thread on how to edit preset armies.