Results 1 to 12 of 12

Thread: How to add completely new Armys to the Campaign Map!

  1. #1

    Default How to add completely new Armys to the Campaign Map!

    Ok, so this tops on the How to change starting units in startpos.esf tutorial. Basically what I finally got done is adding completely new armys to the campaign map. Please first try to manage the starting units tutorial before getting your hands on this one, because it adds a whole new level of editing complexity.

    First, you'll need to accomplish the following things, if you do not understand those points refer to the tutorial linked upside:

    - Completed the "How to change starting units in startpos.esf" tutorial
    - What is PFM Editor, how to install and use it
    - What is ESF Editor, how to install and use it
    - What is the startpos.esf, where to find and how to backup and edit it
    - How to navigate to FACTION_ARRAY inside the startpos.esf

    Ok, so if you got all this done shall we beginn? In this tutorial you are going to build a new army for the Etruscans which is stationed in Ariminum. The Army will have 1 General, 6 Spearmen and 2 Levy Skrimishers. Its General will be 31 years old, have 7 authority, 2 zeal and 5 supterfuge. The Army will be founded in -276 BC.

    Before I describe the different steps in creating a new army, you'll need to understand how Generals and Armys are working, and how they interact with the game enviroment and together. Generals are always family members and they are part of the general unit inside an army. Armys will always have a General unit that is led by this particular family member. You can not have Armys without Generals aka Family members and vice versa. An exception is mad for garrison armys which are usually led by a Colonel. But one advice on this info, do never try to edit or add new garrison armys as they are directly tied to citys and the building inside the citys, which actually define how many units are inside a city. Editing any garrison army will certainly crash your game. Adding new Garrison Armys or editing existing Garrisons might be tought in a third tutorial. Ok, so lets start (note that this tutorial will only 100% work for you if you already set up a bigger army for the Etruscans in the last tutorial):

    Before you start to edit, remind one thing though. It's better to type the letters and not simply copy/paste them with CTRL-C&CTRL-V as this often will mess up the whole strin, integer or float you're editing.

    Building the General Character:

    Spoiler Alert, click show to read: 
    1. Inside the FACTION_ARRAY navigate to FACTION_ARRAY_24 (Etruscans) and open up the CHARACTER_ARRAY and ARMY_ARRAY; this will be the two sections you will work for now. So if I'm telling you to go to or expand something it always happens inside those two Arrays.
    2. Now open CHARACTER_ARRAY -> CHARACTER_ARRAY_0 and click on CHARACTER...see how it says "General" in the second row? Now, also see how it says 61,32 and 158 in the first, third and fourth row. Thoose are the IDs for the General Character, the Army he's leading if he has any, and the General Unit the General Character is based inside.
    3. Now duplicate the CHARACTER_ARRAY_0...the result will replace the default CHARACTER_ARRAY_1 which is ok.
    4. Now open the newly created CHARACTER_ARRAY_1 and click onCHARACTER concentrating on the the first three rows.
    5. Change the ID in the first row from 61 to 150000, inthe third row from 32 to 150001 and in the fourth row from 158 to 150002. What you did now was giving this new character a unique ID (150000) , a unique ID for the Army (150001) you will later add to this character, and a unique ID for the unit (150002) the General will be based in.
    6. Ok, now expand CHARACTER and click on LOCOMOTABLE. This is the place to tell where your character/army will be. The first three rows set coordinates. We want our units to be based in Ariminum. To achieve this we'll need to copy variabls from the garriosn that is tationed in Ariminum.
    7. Expand the CHARACTER_ARRAY_5 and click on its LOCOMOTABLE to copy paste the first three rows to the LOCOMOTABLE from CHARACTER_ARRAY_1.
    8. Now click on CHARACTER_DETAILS of CHARACTER_ARRAY_1. See how there's still a 61 in the third row? Change it to 150000.
    9. Now expand the CHARACTER_DETAILS to find the CAMPAIGN_LOCALISATION of NAME_BLOCK_0. This is where you want to give this Character a unique name.
    10. Now use the PFM Editor to find the Names.loc inside the local_en_rome2.pack and find the variable you can see in the previously opened CAMPAIGN_LOCALISATION. What you can do now is add any name variable from inside this Names.loc to your CAMPAIGN_LOCALISATION, or, if you know how to add new lines via PFM, create a completely new and unique name. I'm going to pick the name Aurelius for my General which has the variable names_name_2147319561. Copy/Paste this variable to your CAMPAIGN_LOCALISATION.
    11. Now see the first Date beneath the NAMES_BLOCK_3? Click on it and change its number 441 (which is -753 (CA's year 0) - -441 = -312 - -272 (Campaign Starting Date) = 40) to 451, which effectively makes this character 30 years old.
    12. Now go to PORTRAIT_DETAILS and change all instances of 000 to 001 to gives this General a different look from the one you copied the variables.
    13. Now expand AGENT_ATTRBIUTES and edit the authority, supterfuge and zeal to have 7, 2, 5. I assume now you should already understand how to expand rows and find the variables I'm talking of, so I don't need to continously exactly describe where to find those. With the latest change you've made this General a very ambitious, strong but not very discrete person.
    14. Now go to CHARACTER_DETAILS_ART_SET_INFO and change the 06 to 07 in the Italian General String.


    Ok, so now you've set up your character, it's a good time to save your work!!!...lets continue shall we? Keep anything expanded so you don't have to continously fuddle around with expanding rows in case you want to have a further look to something.

    From here on I assume you already made the first tutorial and have an Etruscan Army with 1 General, 6 Spearmen and 2 Levi Skirmishers in ARMY_ARRAY-0. If not, you'll first need to add them. Refer to the first tutorial for this. Ok, lets get it on!

    Building the Army for your previously made General Character:

    Spoiler Alert, click show to read: 
    1. Duplicate the ARMY_ARRAY-0 and expand the copy which was effectively replacing Array-1.
    2. Now click on MILITARY_FORCE...see the numbers 32 and 61? Remember what those two ID numbers were doing? Ok, change them accordignly to the numbers which you previously set up inside the General character. 32 = 150001, 62 = 150000.
    3. Now expand MILITARY_FORCE_LEGACY and click on CAMPAIGN_LOCALISATION. Here you're going to set up or replace the armys name. Refer to the military_force_legacy_names inside the local_en_rome2.pack. I'm going to pick the name "The Spears of Laran". To achieve this simply change sethlans_hammerssc to laran_spearssc.
    4. Now open the DATE in the next expandable and change the 477 to 474. This sets the creation of that army to the year -279, 1 year after the war with Phyrrus started.
    5. Now comes a crucial part...expand the NAMES_BLOCK-0 inside the CHARACTER_NAME. There you want to add exactly the same variabel that you previously added to the General Characters name block. It was names_name_2147319561.6. Nowfind the CAMPAIGN_LOCALISATION inside the CHARACTER_NAME.Noticethat this is not the same as in step 5. You want to change the spawn area name here, not the actual name of the General Character. Change where it says rom_italia_etruria:velathri to rom_italia_picenum:ariminum. The reference to this name can be found inside the local_en.pack.
    7. Now open service and change the Date from 477 to 474 like previously. The first one in step 4 sets when the General was assigned to the army. This one over here sets when the army was build.
    8. Now open commanders. In here you will again find a NAMES_BLOCK. You know what to set up here? Yes, that's right, the name of the General which was names_name_2147319561. Also change the DATE further down to the age of the General which had the number 451.
    9. So ok, there are two last things to do which have to do with setting up the actual units inside the armys. First expand all instances of UNITS_ARRAY inside the UNIT_CONTAINER. Then click on the UNIT inside the UNITS_ARRAY-0. This is the General unit which contains the General Character. See the numbers 158 (first row) and 61 (fifth row)? You should already know what to do with the 61, correct? Yes, the unique ID of the leading General inside this unit...it's the 150000. The first number is the unique ID of this particular unit. So change the 158 to something we had before, remember? Yes, the 150002 General unit number. Ok, now do this for every instance of UNIT in the UNITS_ARRAY, I'd recommend continuing on the 150000 series, so the next would be 150003 etc. etc. etc.. Notice that only the first unit has the number 61 set up, the others are set to 0 because they do not have any character assigned. Do not change those 0, just leave them as they are. You should finally end up with the ID 150010.
    10. Now the last part includes changing all the NAMES_BLOCKS inside the UNIT to the name you gave to your General, which was names_name_2147319561. Do this and your finally done and save.


    Now copy the startpos.esf to its place and start a new campaign as the Romans. Once loaded navigate your Spy to northeastern city of Ariminum and end the round. The result you get should be similar to this:

    Spoiler Alert, click show to read: 


    And if you're lucky and enjoy masochistic games like me, you'll eventually get this one round later...

    Spoiler Alert, click show to read: 


    To test if you get anything correctly just attack the new army and do auto result, if it crashes you did something wrong, if not, you're golden...

    Notice there's still some unanswered quirks, like what to do with different locationed games names (German etc.) or the coordinates which I did not manage to completely decipher. I'D appreciate any input on this...
    Last edited by Darth Salat; October 03, 2013 at 07:28 AM.

  2. #2

    Default Re: How to add completely new Armys to the Campaign Map!

    I have an update. Under certain circumstances crahes will happen, most notebly when playing the Iceni and Pontus. This happens because the Name localisation of NAMES_BLOCK-0 inside UNIT has to have a unique names_name_xxx number. Another crash can be caused because units are not build in a row. To fix this second issue, go to your UNIT and see the eleventh row. The ID number over there has to be exactly one less then the ID in the first row...so if you have a 104 in the first row, you'll want to put a 103 in the elventh row. This should fix any crashes to desktop. If you're uncertain, or if you created new IDs simply put a 0 into this eleventh row.

  3. #3

    Default Re: How to add completely new Armys to the Campaign Map!

    Has anyone been successful with adding new units to existing armies at the start of a campaign? I have duplicated the Units, created their own ID (150001+), changed the Unit commander names, etc. But, it crashes when I go to auto resolve a battle. I have tried both putting the previous value (150001 if the Unit Id is 150002) in the 11th Row and also 0.

    ----> Website -- Patreon -- Steam -- Forums -- Youtube -- Facebook <----

  4. #4
    Antiokhos Euergetes's Avatar Protector Domesticus
    Join Date
    Sep 2011
    Location
    Antiokheia
    Posts
    4,026

    Default Re: How to add completely new Armys to the Campaign Map!

    Quote Originally Posted by Dresden View Post
    Has anyone been successful with adding new units to existing armies at the start of a campaign? I have duplicated the Units, created their own ID (150001+), changed the Unit commander names, etc. But, it crashes when I go to auto resolve a battle. I have tried both putting the previous value (150001 if the Unit Id is 150002) in the 11th Row and also 0.
    Yes I would like to know this I want to give all factions decent starting armies

  5. #5

    Default Re: How to add completely new Armys to the Campaign Map!

    to Dresden's question yes I have added units to the start up, one thing to mention however is that the units that I gave to myself at start up can't be upgraded later in the game they are functional in every other way except for being able to be upgraded or dismissed I know I have most likely missed something as I'm new to modding and learning by mostly trial and error and occasionally finding a real good tutorial that go's into real detail about the workings of the files, well and also reverse engineering others work to see what they did to make things work. but basically yes you can add units through the start.pos there is a tut on how to do customize a start unit and with that you get the basics on how to add units. Hope this helps you.

  6. #6

    Default Re: How to add completely new Armys to the Campaign Map!

    Thanks, I was able to add units. However, when I try to disband them the game crashes. It seems to be problematic at the moment.

    ----> Website -- Patreon -- Steam -- Forums -- Youtube -- Facebook <----

  7. #7

    Default Re: How to add completely new Armys to the Campaign Map!

    I'm glad to see you were able to add units Dresden that's a start anyways, I don't seem to have the crashing game problem when disbanding units, it simply blinks and the units are gone for a second and then when I click on the army again the units are back in the army and at that point they can't be disbanded nor upgraded in anyway. So I was looking deeper into what might be doing it and well I don't know really what I'm doing other than trial and error till I hit the right thing LOL...but anyways I saw that under each unit array there is a commander details/character name/names block, and I think if I'm right as I was looking at these files I think you have to add units here like you did under the unit section but I have to try and see if this does work because what each of these have in this section is a name that is a number and the numbers for each don't exactly follow any inline numbering they jump around so if you look at these you will see what I'm talking about. but please if anyone out there knows what to do please chime out cause I could really use some help in figuring out what happens to these unit once I get into the game and I find I can't do anything with these units I create at the start up units.

  8. #8

    Default Re: How to add completely new Armys to the Campaign Map!

    hi guys
    what can you tell me about slave faction. in character_array and army_array there is no further options. why?

    Click image for larger version. 

Name:	14.png 
Views:	308 
Size:	289.8 KB 
ID:	311835

  9. #9

    Default Re: How to add completely new Armys to the Campaign Map!

    Because they start with no characters or army on the map, those are generated during the game.

  10. #10
    LestaT's Avatar Artifex
    Join Date
    Jun 2005
    Location
    Campus Martius
    Posts
    3,877

    Default Re: How to add completely new Armys to the Campaign Map!

    I have enable pro_rom_rebel which is slave/rebel faction for prologue into the main campaign. It's pretty much easy to edit startpos with assembly kit. I suggest you try.
    Everything we hear is an opinion, not a fact. Everything we see is a perspective, not the truth. - Marcus Aurelius


  11. #11

    Default Re: How to add completely new Armys to the Campaign Map!

    Same for attila!
    ----------------------
    Dear dresden,
    I tried to replicate your steps for an TW Attila Save Game. The structure is mainly the same. But when I wanted to modify the postition of the army the table is different! Instead of an simple entry in the first row I got a tuple(!!?) of the following type:



    System.Tuple`2[System.Single,System.Single].
    Any Ideas?


    Attached Thumbnails Attached Thumbnails example.png  

  12. #12

    Default Re: How to add completely new Armys to the Campaign Map!

    any body know how to delete a faction without the assembly kit ?

Posting Permissions

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