Results 1 to 18 of 18

Thread: [Tutorial] How to edit the AOR (Area of Recruitment) of units

  1. #1

    Default [Tutorial] How to edit the AOR (Area of Recruitment) of units

    First of all a huge thanks to PowerWizard, MrThib and The Phenom for their tutorials on how to create units. Their tutorials can be found here, here and here respectively. My tutorial is just a small addition to what they have already achieved.

    For the sake of this tutorial I am going to make Prussian Line Infantry only recruitable in East Prussia and only 10 are available at any one time.

    1. Extract the region_unit_resources table from main.pack with Pack File Manager.
    Spoiler Alert, click show to read: 


    2. Then create a new pack and add the db directory to the pack.

    3. Then add east_prussia to the region_unit_resourcestable. Save the pack as a mod, in my case I saved it as mod_regions. Don't forget to add it to your scripts file. This table does not include the actual regions on the campaign map, but instead 'umbrella' regions that can control AOR over many regions on the map. For example if you give your unit (in the unit_tables) the 'europe' region that will allow you to recruit that unit anywhere in Europe assuming you have the correct tech and buildings.
    Spoiler Alert, click show to read: 


    4. Then set the Prussian line infantry to only be recruited in east_prussia in the units_tables and a maximum of 10 units from that region. (I am editing the slow mod pack file but the table to edit will still be under units_tables).
    Spoiler Alert, click show to read: 


    5. Now that means nothing yet as it has not been tied to the actual region on the map. Here is how to do that:

    Open the startpos.esf with the esf editor. Navigate to main\startps.esf\CAMPAIGN_STARTPOS\CAMPAIGN_ENV\CAMPAIGN_MODEL\WORLD\REGION_MANAGER\REGIONS_ARRAY

    Now you will see a series of entries for each region. Expand the entry on level and click REGION to find out what region this refers to on the campaign map. In my case I found prussia (see what I mean - CA is not very good at naming so this confused me at first - Prussia is actually East Prussia in game).

    6. Now expand REGION\RESOURCES_ARRAY\
    Clone one of the entries and rename the value to the region you created in the region_unit_resources. I should also mention that you can add your 'region' to any number or regions in the .esf and the unit will be recruitable there too. An example here again is 'europe' in the region_unit_resources. You will notice that every 'european' province will have a 'europe' entry.
    Spoiler Alert, click show to read: 

    Save the .esf and you are done. The Prussian line infantry will now only be available in East Prussia and only 10 at once. AOR units

    I was look for this because I want to limit how many units of each type can be recruited in a region. The only problem I can see is if you want to limit a specific unit on a regional basis you would have to create a new unit for every region.
    Last edited by Tharros; April 01, 2009 at 08:05 PM.

  2. #2
    joedreck's Avatar Artifex
    Join Date
    Jan 2007
    Location
    Frankfurt am Main
    Posts
    2,009

    Default Re: [Tutorial] AOR - only allow certain units to be trained in certain regions

    Thats really cool. Thanks. I've made 2 different hussars for austria (at the moment) and I want to recruit them not in one region. The german will be recruitable in Vienna and the hungary hussars in Hungary.


    Is it possible to make units not recruitable in a region? For balance it's better, if it's not possible to recruit standard hussars in Vienna and Hungary; only in other provinces. I hope I must not make every unit as special unit.
    Edictum mod adds new edicts to Rome II. http://www.twcenter.net / YouTube: Edictum Mod / Click here for Edictum Mod on steam
    Vote Brain Slug for president.

  3. #3

    Default Re: [Tutorial] How to make AOR units (WIP)

    Yes you could just make a new AOR region like in the tutorial - one for the Vienna hussars and one for the Hungarian hussars.
    Make a new region in the region_unit_resourcestable for each of those units - it can be called anything you want (say veinna_hussars and hungary_hussars).
    Chang your units to be only recruitable in those regions eg. so you would set the Vienna hussars Region IDref to veinna_hussars.
    Then add those region to the associated region in the .esf. So to recruit the Vienna hussar only in Veinna you would add their associated Region IDref under 'austria', in their case 'veinna_hussars'.

    Similarly for the Hungarian hussars.
    Last edited by Tharros; April 01, 2009 at 08:07 PM.

  4. #4

    Default Re: [Tutorial] How to make AOR units

    Thanks for the tutorial, Tharros, it's very useful actually.

  5. #5

    Default Re: [Tutorial] How to make AOR units

    Thanks PowerWizard! I hope you don't mind but could you add a link to this in you awesome tutorial? I would be most flattered

    Also I changed the name of the tutorial to make it less ambiguous - It is not a tutorial on how to make units. I also cleared up a few descriptions during the tutorial.
    Last edited by Tharros; April 01, 2009 at 02:13 AM.

  6. #6
    joedreck's Avatar Artifex
    Join Date
    Jan 2007
    Location
    Frankfurt am Main
    Posts
    2,009

    Default Re: [Tutorial] How to edit the AOR of units

    Edit: Ok, I'm found. Hmmm.
    Edictum mod adds new edicts to Rome II. http://www.twcenter.net / YouTube: Edictum Mod / Click here for Edictum Mod on steam
    Vote Brain Slug for president.

  7. #7

    Default Re: [Tutorial] How to edit the AOR (Area of Recruitment) of units

    Did some clarifying of descriptions - hopefully the difference bettween the AOR regions (in region_unit_resources) and regions actully on the campaign map (in the .esf) has been defined better.

  8. #8

    Default Re: [Tutorial] How to edit the AOR (Area of Recruitment) of units

    right on, this works perfectly for my mod, Props to you my friend.

  9. #9

    Default Re: [Tutorial] How to edit the AOR (Area of Recruitment) of units

    No way to get it done without modding the esf, huh? I was hoping to make Popehat work with all of the other mods...

  10. #10

    Default Re: [Tutorial] How to edit the AOR (Area of Recruitment) of units

    Quote Originally Posted by Lord Nickster View Post
    right on, this works perfectly for my mod, Props to you my friend.
    Thank you kind sir!

    Quote Originally Posted by Iceciro View Post
    No way to get it done without modding the esf, huh? I was hoping to make Popehat work with all of the other mods...
    Yes unfortunately. I was thinking it may be possible just to place the startpos.esf in a pack file of type movie (since they are loaded last) to avoid having to edit the original. That what you should do with the localisation.loc when naming units so it may work for the startpos.esf too

    I will try this out later.

  11. #11

    Default Re: [Tutorial] How to edit the AOR (Area of Recruitment) of units

    Quote Originally Posted by Tharros View Post
    Thank you kind sir!



    Yes unfortunately. I was thinking it may be possible just to place the startpos.esf in a pack file of type movie (since they are loaded last) to avoid having to edit the original. That what you should do with the localisation.loc when naming units so it may work for the startpos.esf too

    I will try this out later.
    Let me know how that works out! I'm interested in a way to make things like that behave.

  12. #12

    Default Re: [Tutorial] How to edit the AOR (Area of Recruitment) of units

    Thats really cool. Thanks. I've made 1 different hussars for AMERICA = =.
    A world project (Excellent)

  13. #13
    klesh's Avatar Senator
    Join Date
    Mar 2009
    Location
    Massachusetts, USA
    Posts
    1,341

    Icon5 Re: [Tutorial] How to edit the AOR (Area of Recruitment) of units

    Tharros,

    What can be done (if anything) when the region you want to limit a unit to is not listed in "region_unit_resources"? I'm looking to limit a unit to the province named "The Confederation of New England" on the Campaign Map. I presume just making it up and calling it "new_england" wont work... or would it?

    Would creating an entry to actually define it work, making this the sole line in my mod.pack's "region_unit_resources"?

    Code:
    "Region ID Ref"                     "Screen Name"
      new_england            The Confederation of New England


    Edit: I was just looking in "main.pack\db\groupings_region_junct" and there are these entries. Could "new_england" be a real possibility?

    Last edited by klesh; April 15, 2009 at 10:34 PM.
    Still playing Napoleon:TW

  14. #14
    No, that isn't a banana
    Join Date
    Aug 2004
    Location
    Ontario, Canada
    Posts
    5,216

    Default Re: [Tutorial] How to edit the AOR (Area of Recruitment) of units

    Why not try it with "n_england" instead?

  15. #15

    Default Re: [Tutorial] How to edit the AOR (Area of Recruitment) of units

    Quote Originally Posted by klesh View Post
    Tharros,

    What can be done (if anything) when the region you want to limit a unit to is not listed in "region_unit_resources"? I'm looking to limit a unit to the province named "The Confederation of New England" on the Campaign Map. I presume just making it up and calling it "new_england" wont work... or would it?

    Would creating an entry to actually define it work, making this the sole line in my mod.pack's "region_unit_resources"?

    Code:
    "Region ID Ref"                     "Screen Name"
      new_england            The Confederation of New England
    Edit: I was just looking in "main.pack\db\groupings_region_junct" and there are these entries. Could "new_england" be a real possibility?

    I don't really understand the problem.

    The region in the tutorial did not exist (East Prussia) until I created it in the region_units_resources - it is the same thing is it not?

    As for the groupings_region_junct I am not sure. I don't really have much time at the moment. Try it out and let me know how you go

  16. #16

    Default Re: [Tutorial] How to edit the AOR (Area of Recruitment) of units

    Hopefully this thread is still alive and I'll save the forum from another AoE thread..


    I have been trying to figure out if there's any easy way to see which specific regions are including in the Region ID 'groups' (or "umbrellas" as Tharros calls them) but have come up empty.

    It seems the only way to tell if a region is part of an existing 'umbralla / group' is to examine the "Resources_Array" for each individual listing (e.i. All campaign regions ..yikes!).


    I was hoping I could extract a simple list with the pre-made Region groups...anyone aware of a possible solution to this?


    P.S.) or does anyone know how to make a unit recruitable in ALL of the americas? (North, Latin and West Indies)

  17. #17
    alpaca's Avatar Harbinger of saliva
    Join Date
    Sep 2005
    Location
    Germany
    Posts
    4,811

    Default Re: [Tutorial] How to edit the AOR (Area of Recruitment) of units

    Quote Originally Posted by Ragnorr View Post
    Hopefully this thread is still alive and I'll save the forum from another AoE thread..


    I have been trying to figure out if there's any easy way to see which specific regions are including in the Region ID 'groups' (or "umbrellas" as Tharros calls them) but have come up empty.

    It seems the only way to tell if a region is part of an existing 'umbralla / group' is to examine the "Resources_Array" for each individual listing (e.i. All campaign regions ..yikes!).


    I was hoping I could extract a simple list with the pre-made Region groups...anyone aware of a possible solution to this?


    P.S.) or does anyone know how to make a unit recruitable in ALL of the americas? (North, Latin and West Indies)
    If I were you I'd write a small python script or something to paint this on a map.

    No thing is everything. Every thing is nothing.

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

    Default Re: [Tutorial] How to edit the AOR (Area of Recruitment) of units

    Made all changes, but i cant save the file... does anyone why??

Tags for this Thread

Posting Permissions

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