Results 1 to 12 of 12

Thread: How to add starting armies in custom battles for newly added factions

  1. #1
    fingon's Avatar Tiro
    Join Date
    Jul 2005
    Location
    Czech Republic, Brno
    Posts
    288

    Default How to add starting armies in custom battles for newly added factions

    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.
    Last edited by fingon; March 11, 2010 at 02:49 PM.

  2. #2

    Default Re: How to add starting armies in custom battles for other factions

    In db/factions table if you enter playable in Type column and True in Early and Late Availability you have your faction available in custom battles.




  3. #3
    fingon's Avatar Tiro
    Join Date
    Jul 2005
    Location
    Czech Republic, Brno
    Posts
    288

    Default Re: How to add starting armies in custom battles for other factions

    Quote Originally Posted by husserlTW View Post
    In db/factions table if you enter playable in Type column and True in Early and Late Availability you have your faction available in custom battles.
    I know that of course. This tutorial is on how to add a starting army to the faction, that was already added to custom battles.
    Last edited by fingon; March 11, 2010 at 01:12 PM.

  4. #4

    Default Re: How to add starting armies in custom battles for other factions

    Quote Originally Posted by fingon View Post
    I know that of course. This tutorial is on how to add a starting army to the faction, that was already added to custom battles.
    Can you please explain and maybe give a screenshot because I had a lot of CTD today trying to solve the game menu UI and my speed is too slow?




  5. #5
    fingon's Avatar Tiro
    Join Date
    Jul 2005
    Location
    Czech Republic, Brno
    Posts
    288

    Default Re: How to add starting armies in custom battles for other factions

    Quote Originally Posted by husserlTW View Post
    Can you please explain and maybe give a screenshot because I had a lot of CTD today trying to solve the game menu UI and my speed is too slow?
    LOL! hahaa, good luck on that! Well its pretty simple, its described in "tutorial". I added a faction to be playable in custom battles (adding true true in db factions as you mentioned in your previous post), enable for it some units (its my own faction, which replaced some other from the game) and now when I click on it in the custom battle menu I have no army and cannot add any units because of 40 gold only. The reason for it is of course, that my faction (in fact every faction that was not present by defaut in custom battles) has no preset armies and so that I must click on "red cross" to "delete" the "invisible army" and then I am able to add my units (first general and then others). In this tutorial I tried to explain how to add a preset army to newly added faction (to custom battles), so that this "bug" is gone. But as you see my theory is not working so far, I gotta try and try as you do.

    Edit: I think I ll leave it, because its not worth this kind of effort, when it can be easily bypassed by one click in the menu. :-P I removed tutorial prefix despite my post brings improvements in understanding custom battle tables. But it needs further studying.
    Last edited by fingon; March 11, 2010 at 02:51 PM.

  6. #6

    Default Re: How to add starting armies in custom battles for newly added factions

    I know that the Vicar knew how to do that in ETW.


  7. #7

    Default Re: How to add starting armies in custom battles for newly added factions

    Great advice, cause in my mod, I unlocked factions aswell! ANd no start up army, thanks for the tips!
    Formally known as 'Marshal Beale' - The Creator the Napoleon TW mods - 'Napoleon Order of War' and 'Revolution Order of War'

  8. #8
    ♔Icebear77♔'s Avatar Biarchus
    Join Date
    Jan 2009
    Location
    Switzerland and Germany
    Posts
    673

    Default Re: How to add starting armies in custom battles for newly added factions

    Quote Originally Posted by Marshal Beale View Post
    Great advice, cause in my mod, I unlocked factions aswell! ANd no start up army, thanks for the tips!
    What have you exactly done that it works for existing factions?

  9. #9
    fingon's Avatar Tiro
    Join Date
    Jul 2005
    Location
    Czech Republic, Brno
    Posts
    288

    Default Re: How to add starting armies in custom battles for newly added factions

    Quote Originally Posted by Icebear77 View Post
    What have you exactly done that it works for existing factions?
    What exactly you want to edit?

  10. #10
    ♔Icebear77♔'s Avatar Biarchus
    Join Date
    Jan 2009
    Location
    Switzerland and Germany
    Posts
    673

    Default Re: How to add starting armies in custom battles for newly added factions

    I just wanted to know, if he has found a solution for this issue. For me, ive understod like this...

  11. #11
    fingon's Avatar Tiro
    Join Date
    Jul 2005
    Location
    Czech Republic, Brno
    Posts
    288

    Default Re: How to add starting armies in custom battles for newly added factions

    Quote Originally Posted by Icebear77 View Post
    I just wanted to know, if he has found a solution for this issue. For me, ive understod like this...
    What issue? Existing armies can easily be edited according to tutorial. Armies for newly added factions, there may be a workaround for this (replacement of some other faction).

  12. #12

    Default Re: How to add starting armies in custom battles for newly added factions

    I still have to clic on the red cross to see my units
    What is wrong with my setting ??


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •