Jump to content
Sign in to follow this  

[ETW] - STARTPOS.ESF analysis and modifications. HYBRID startpos.esf

Recommended Posts

Originally written by HusserlTW @ Total War Center forum

“Decoding†crucial files like startpos.esf that are needed for minor or major modifications is a long proses due to lack of CA's modding tools. I've decided to make this tutorial with all the informations I've found so far. Also there are many pieces of informations in several posts around. I've included just some of these but there more that need to be gathered. And that is the ambitious objective of this tutorial: to become a place where will be gathered several already known futures of these files and to be provoked further improvement in modding them. Any contributions in theoretical or practical ideas, successful tests experiments and modifications are needed. In the other hand questions are added in several threads about changes in startpos. In this case a guide is needed and this tutorial/research will try to help in this direction, revealing some of the roots in startpos.esf labyrinth.







Please note that I cannot answer any question you may have about this tutorial, so I suggest that you post your questions here.  Also all downloads (attachments, mods, tools etc) on TWC requires registration except for external links e.g Mediafire.
All pictures in this tutorial can be viewed in this tutorial gallery.


Due to different forum software e.g copying content from vBulletin to IP.Board I cannot repost the original OP, so that's why the whole tutorial needs several posts than one *LONG* post.

Share this post

Link to post
Share on other sites


As it's name says startpos is the starting position of the game. It's database includes all the elements of the game and the way they are connected. Maps, theatres, factions, regions, armies, trading roots and posts, governments, families, even the roots of the horse wagons that carry commodities are included.
This file includes the positions and the roots on the campaign. Demis14 connects it also with the positions of buildings in battle map.


EsfEditor (l.v.
Thanks to Just there is EsfEditor that has been improved by koras31 and alpaca. It can handle multiply .esf files like startpos, regions and saved_games. This is the basic interface:
Here you can see the database tree and the informations that can be displayed. Except Values and Types has also 2 very helpful columns. In Description can be noted by the user general descriptions of the values which are known. (Here you can find Lazy Knights NodesDescriptions file with many useful descriptions. Just replace the one in EsfEditor's installed directory). When you change a value -and until save it- the original remains in Original Value until you save it.
Links for more info:
Esf Editor
Esf Editor1.4.3
Esf Editor1.4.5
Alpaca's ESFResearcher_19_07_09

startpos.esf catelog
Erasmus777, based on the relations among the basic coordinates of a settlement and the coordinates of her building slots, has made a very useful spreadsheet that calculates new coordinates when building slots are added or disabled.
Link: spreadsheet


Alpaca: Replacing the grand campaign
Vicar: How to Enable Unique Regiment Names

Erasmus777: How to remove the Fog of War Bug from Minor Factions
Snapshot: How to Change/add Victory Conditions
Alex1987: Diplomacy editing
HusserlTW: How to activate an emerged port or town

HusserlTW: How to convert a minor city to a major one

More "How to" in the Modifications section at the end of the tutorial.

Share this post

Link to post
Share on other sites


EDIT: Most of the images are from v. 1.2 startpos. Some of the difference from the startpos.esf v. 1.4.0 build, is that Ids numbers have changed in the field of WORLD. In CAI, the records have their Id's been increased by 2. Note that main_2 startpos (RTI_4 or Late Campaign) uses different CAI id's. To find them easily go in CAI_WORLD_REGIONS find the region's record that settlement belongs to, and there you'll see settlement CAI Id.
Trying to present known elements of startpos.esf and regions.esf, I am going to follow the root of the known connections inside these files. To do that I will follow Portugal in the labyrinth of the vanilla startpos.esf. Although this presentation follows linear the database tree, as it is shown in the left window of the editor, working in startpos.esf usually it is not like this. Searching or heading to a record following the shortest root through the connections among them is often the quicker way. Since starting points often is a name (faction, region, etc.) and the long lists of the records are not in alphabetical order, it is helpful to be advised by lists that are made in the forum, with useful connections. Some of them are included in the tutorial. Especially entering CAI_INTERFACE most common way is through CAI_BUILDING_SLOTS ID's using the BUILDING_SLOT ID.1


Faction: Portugal

Status: minor, not playable

Regions: portugal, curacao

Capitol: Lisbon

Government: Absolute monarchy


The first data about Portugal are met in CAMPAIGN_PLAYERS_SETUP/PLAYERS_ARRAY/PLAYERS_ARRAY/:


Here are the factions with the relations to the player. In the table above there is a list with all the players_array and their position in the list:


The 27th record that belongs to portugal:



The second false value tells if portugal is playble (True) or non (False). There are other fields need to be changed for activating a non playable factions in next records.


These values are the same for all factions in PLAYERS_ARRΑY (factions) as those in CAMPAIGN_PLAYERS_SETUP_MODIFIABLES.

There is a list of the faction is in a different order. Portugal's VICTORY_CONDITION_OPTIONS:


VICTORY_CONDITION_OPTIONS of Portugal is divided by 4 VICTORY_CONDITION_BLOCK which include the preconditions for victory in every campaign scenario.



The CAMPAIGN_VICTORY_CONDITION of the first VICTORY_CONDITION_BLOCK is for campaign mod 0 (short), which ends in 1750 and the player must own 10 provinces:



Among them must be the regions that included in the the REGION_KEYS under VICTORY_CONDITION_BLOCK:


The rest three blocks has the preconditions for the campaign mod 1-long, 2-prestige, 3-world domination.

Here are the factions in the same order as in PLAYERS_ARRAY with basic information.



Portugal is the 27th record with info about portrait, description and the region that the faction owns. The entries in 3rd and 4th line are True/True for playable faction, False/False for unplayable and True/False in Mughal and US.

All the regions with the owner faction are grouped in the 3 theatres, europe, america, india.


Above the REGION_OWNERSHIPS malabar-portugal in indian theatre.








Unknown entries with 6th and 7th lines matching with 7th and 8th entry of next table.




(picture could not be found on TWC)

Here is one of the most interesting fields of startpos.esf -and area of many modifications-. where detailed settings and unique ID's are given to game elements.


In FACTION_ARRAY/FACTION we can see informations about Portugal. Some interesting are in line:
1st faction's ID.
6th False for minor, True for major.
8th, 10th True playable, False non. If True is placed here for a minor faction, even it is playable by modding, the game crashes.
11th , 12th Capitol region ID. Regions ID's are in a later record of WORLD.
13th Demis14 connects True/False with emergent/non emergent.
17th , 18th Usually is 0. Some of the major factions have numbers like France 4960/2150, Ottomans 3690/730, Austria 4570/0, etc.
19th The following strategy during the game. All the minor nations have MAINTANANCE and majors FULL.
20th Is something like special ability. Portugal's is maritime_repressive. The minors have usually default. Some of them like Morocco have no_europe but most of non europe factions have default. The values of the major factions are variable. Brtain maritime_progressive, France mixed_progressive, Austria continental_progressive, Netherlands trader, Spain maritime_repressive, etc. There are also major with default like Sweden and no_europe like Ottomans or Maratha.
23th - 26th All values are 0 for minor factions. Major have numbers (like 8, 10, 15, etc.).


(picture could not be found on TWC)

As in all minor factions, ENTRIES in Portugal are empty. In the above image is Britain with two ENTRIES: Ancillary_Government_Comptroller and Ancillary_Army_Merc_Artilleryman.






Staring money of Portugal.



Here are the relations between Portugal and the other factions. Above in DIPLOMACY_RELATIONSHIP Portugal is neutral to faction with ID 351568752 which is new_spain.


For the relation between Portugal and New Spain there are 22 DIPLOMACY_RELATIONSHIPS_ATTITUDES_ARRAY. Most of them have 0 values in 1, 2, 3, and 5th line. If a number appears in one of 1, 2, 3, then False in 4th line turns to True. Same thing happens in 5th and 6th line.

MORE INFO: Lazy Knight



ID an type of Portugal's government.



In Portugal's GOVERNMENT there are 9 CHARACTER_POST's. 7 are for the ministers and 2 governors for Europe and India. In every record are noted the government post ID, the type, the character ID and the government ID of Portugal.



Probably when the first revolution has occurred. Above, after 10 turns or years (?) a CONSTITUTIONAL_MONARCHY will be attempted (?).



In FAMILY are included the Monarch and his successors. The 5t line maybe is the turns or years that he will be replaced by his successor. CAMPAIN_LOCALISATION and PORTRAIT_DETAILS link to descriptions and details (loc files). The records of successors have 0/False values.

(picture could not be found on TWC)

Every MONARCH_INFO_CHARACTER seems to have a NAME_ALLOCATION_DETAILS record. One of them has in 1st line 0 (the others have numbers) and in second the number 4245029912. These type of 10 digit numbers are met also in the other records.
We have also meet CAMPAIGN_MODEL with 10 digit number and CAMPAIGN_MODEL/RandSeed with 11th digit number.



Here are registered the armies and navies of Portugal. Every army has it's ID, settlement ID (if it is inside settlement as in Lisbon). In MILITARY_FORCE the character leader's ID (general or captain) and in UNITS_ARRAY the units that this army has in the beginning of the game.


Thanks to Gerlandric here is an update list after 1.4 patch.


This is the REGION portugal and in line:
1 Region name.
2 Region ID
6-11 Demis14 connects these numbers with economic figures like starting wealth of productive facilities.
17 Controlling faction ID
18 Governorship ID
19 Theatre
20 Emerging nation
21 Region rebels
22 Region group. Bournoutfigs has modded this line so New Orleans get europe civilian buildings around city and not native american's (sc_european_americans).



Most of the regions have that record just after SETTLEMENT. All the QAD_TREE_BIT_ARRAY_NODE sub-records have no values.



These three numbers of population have nothing to do with the 3 classes. 1st and 3rd is very close to staring population.


In REGION_FACTORS 2nd line is the population number that you can see in the Lists of in game interface, regions tab, in Lisbon city. Maybe the fourth line is the population of all region.
REGION_FACTORS contains 3 population records for the 3 classes with the same values (0 most cases). RELIGION_BREAKTROUGH determines the religion of Portugal.


Above in rel_catholic table 2nd line is 1 and in all others religions 0.

Here are placed all the building slots of buildings, towns, ports, farms and mines for region portugal. Minor cities have only 1 building (minor_government), major 4 or 5.


Above is the table of Lisbon's army building:
1 REGION_ SLOT ID for army building.
2 Type of slot, settlement portugal.giflisbon:settlement_army-admin.

5, 6 The coordinates of its location in Lisbon settlement major city.
8 Type of civilian small buildings. Can be between 1-5 depending on the city growing. Here there are images of the 5 levels.
10, 11 Are connected with the type of slot as well as 7, 8.
12 The 10 digit number 4294967295 is shown in many occasions. Amazing coincidence (?) that is the same with highest value of turns per year in Just's tool.
REGION_ SLOT/BUILDING_MANAGER is True/False if the slot exists in the beginning and False/False if it is going to be spawned later in the campaign:

(picture could not be found on TWC)

If the slot is occupied by a building (True/False) then the sub-record BUILDING appears with the specific type and level of slot.


Above the army building of Lisbon in army_encampment level.

This record has to do with the city of Lisbon:


First line's value must be the same with 8th line of city's building slots. In 2nd and 4th the status of settlement portugal.giflisbon
and in 3rd the owner faction.



plus the basic coordinates of the settlement in lines 10, 11 and the ARMY ID that is stationed there in the beginning of the game. The same coordinates were met in the CHARACTERS that are in city. Also this ARMY ID is connected with the ARMY and the it's leader records in FACTION/ARMY_ARRAY and FACTION/CHARACTER_ARRAY.



Portugal owns a second region, Goa in India, which has it's own REGION records.
All the CAI records are connected among them and with the rest startpos file. Here are gathered all the elements by type and not by region or by faction. CAI uses it's own ID's. Portugal has a FACTION ID (352193016) and a CAI_FACTION_ID (1341).
CAI_WORLD/CAI_WORLD_FACTIONS.  The order is the usual by FACTION ID and Portugal is the 27th .
CAI_FACTION ID for Portugal can be found here in the 1st line of it's record. The record numbers are from 1263-1431. Not all the numbers between 1263-1431 are used. The unused numbers are not free but are used in other field of CAI. That's a rule in CAI records numbering.

(picture could not be found on TWC)

6th and the last line is CAI_REGION ID where the capitol is, that means region portugal. These are 0 in emerged factions.
7th is FACTION ID of Portugal as is registered in WORLD/FACTION _ARRAY.
10th is CAI_TECHNOLOGY_TREE ID of Portugal.

CAI_WORLD_REGIONS records are numbered in the area between 52-1261. It's easy to find portugal CAI_REGION since it's ID (629) is registered in CAI_FACTIONS.


CAI_REGION ID of portugal in 1st line, CAI_WORLD_TRADING_POST in 11th.

Here is registered the CAI_SETTLEMENT (Lisbon) ID.
CAI_REGION records are numbered in the area between 1439-3588.

(picture could not be found on TWC)

3rd line is CAI_SETTLEMENT (Lisbon) ID.
5th, 6th basic coordinates of Lisbon settlement and are the same with regions.esf/regions(portugal)/settlements_and_slots, 1st line.
11th the region name.

These records are numbered in the area between 1439-3588.
As registered in CAI_REGION, CAI_WORLD_SETTLEMENT of portugal (Lisbon) is 1752.


In the following list of settlement you can find the CAI_SETTLEMENT ID's. Using this list is very useful especially for the settlements that are not capitol's.Due to changes in startpos.esf (1.3.0 build), the right ID is this the list plus 1.




CAI needed information for the location of settlement Lisbon. The coordinates in 1sth and 2nd line are the basic coordinates of settlement Lisbon and are registered in portugal's region REGIONS_ARRAY/SETTLEMENT/SIEGABLE_GARRISON_RESIDENCE of WORLD/REGION_MANAGER/
In CAI_WORLD_SETTLEMENTS/CAI_GARRISONABLE first line there is CAI army ID which is our key to enter CAI armies later.



CAI_FACTION ID and SETTLEMENT ID. Only settlements who are the same time capitols have in the second line the CAI_FACTION ID. For the rest, the value is 0.

CAI_WORLD_BUILDING_SLOTS records are numbered in the area between 1433-3591. The quicker way to find a CAI_BUILDING_SLOT record is using the CAI_SETTLEMENT ID that belongs to. The records with numbers close to it are the CAI_BULDING_SLOTS records. To find settlement Lisbon's I am looking the records around 1752 checking the CAI_WORLD_BUILDING_SLOTS/CAI_BUILDING_SLOTS of every record.


In the third line is the CAI_SETTLEMENT ID settlement Lisbon's: 1752. In the first the BUILDING_SLOT ID that has been registered in REGION_SLOT_MANAGER of WORLD/REGION_MANAGER/REGIONS_ARRAY (portugal). Above is the CAI record 1745 of the army-admin building slot of Lisbon city. The second line is 0 for city building slots and 1 for road and fortifications. In this way can be found the records 1745, 1746, 1747, 1748, 1749, 1750, 1751 that belongs to the 5 buildings of the city (in minor 1), and to city's road and fortifications.
The rest CAI building slots (towns, ports, farms, mines, etc.) are the first records after 1742nd : 1754, 1756, 1758, 1760, 1762, 1764, 1766. They belong to 1 port, 4 towns, 1 wineries and 1 sheep farm, that exist in portugal region. As in city's building slot, in the first line of CAI_BUILDING_SLOT record is the BUILDING_SLOT ID. In second changes depending on the type: towns 2, ports 3, sheep farms, wineries, 5. In the third line there is a link that leads not to the CAI_SETTLEMENT ID as in city's building slot, but to a specific record in CAI_RIGION_SLOTS.

CAI_WORLD_REGIONS_SLOTS records are numbered in the area between 1441-3591. These are the “alter ego†of the CAI_BUILDING_SLOTS that are non city building slots and provide CAI with additional need informations. Next image belongs to Porto's CAI_REGION_SLOT ID.

(picture could not be found on TWC)

In CAI_SITUATED are the coordinates registered in building slot of REGIONS_ARRAY:


The second CAI_SITUATED record under CAI_REGION_SLOT appears only in ports. The coordinates are very close to those of it's place and maybe has to do with the position of ships recruitment. The number in 3rd line (170) is the CAI ID of the sea that is attached. Seas have their own CAI_REGION ID.
This is the list of the armies in the beginning of the game. The easiest way to get here is with CAI army ID in CAI_WORLD_SETTLEMENTS/CAI_GARRISONABLE.

(picture could not be found on TWC)

In the first 2 sub-records, information can be found about the owner CAI_FACTION, the CAI_REGION ID the army is stationed and the coordinates of its place.
In CAI_BDI_COMPONENT_BLOCKS_OWNS are probably connected with the green area in campaign map of army response.
In CAI_RESOURSE_MOBILE there is the CAI_CHARACTER ID that this army is being assigned to. In the second line is CAI_SETTLEMENT ID and in 10th line the army ID that was registered in WORLD/FACTIONS_ARRAY/FACTION/ARMY_ARRAY.


The next records in the list are for the rest armies and fleets of Portugal. Armies and fleets are organized by the game in groups registered to a character (general, admiral, etc.). If there is not general then one of the units becomes colonel and a new character record is created in FACTION/CHARACTERS.
Here are the units of the armies. Having in mind the numbering system that CAI uses, these ID's should be in the records closest to the number of CAI_ARMY ID.


In CAI_UNIT there is the CHARACTER ID in first line. This happens only to the units that belong to CHARACTERS, like body_guards to generals. The rest units of the army have in 1st line 0. The unit ID is registered in FACTION/ARMY_ARRAY. In 3rd line is the CAI_ARMY ID we saw previously.


Here are the CAI records of all characters that are registered in FACTION/CHARACTERS with the ID of the 4th line. In first and third lines are the CAI_ARMY ID or 0 if is a civilian (minister, priest, etc.). Gentlemen and Rakes have also CAI_ARMY ID but they luck CAI_UNIT ID so in second line is 0. For military CHARACTERS here is the basic CAI_UNIT he belongs (e.g. body_guards).


Typical CAI record about forts with basic information. CAI_FORT ID, coordination's of its place, CAI_REGION ID of the region it is settled and CAI_ARMY ID if one is stationed.

Share this post

Link to post
Share on other sites


Here are some modifications that can be made through startpos changes. You can check the ANALYSIS

section to find ID's or other proper entries that are not described in this section.
It will be very helpful to replace the NodesDescriptions file in the EsfEditor installed directory with this one for v. 1.3.4 or this for erasmus v. 1.4.5.

main/startpos.esf/CAMPAIGN_STARTPOS/ [..]

1. Minor faction playable

[..] CAMPAIGN_PREOPEN_MAP_INFO/PLAYERS_ARRAY/PLAYERS_ARRAY (non playable faction)/ middle False change to True

change to True

2. Starting treasury


3. Minor faction to major


change to True.

X-minor faction will be shown among the major factions in game menus (diplomacy, prestige, etc.) and news/events will be shown during the campaign (if the player is playing as another faction).

4. Starting date-Turns per year

[..] CAMPAIGN_PREOPEN_MAP_INFO/DATE, here you can change the date in menu factions info.

In CAMPAIGN_CALENDAR is determined the turns per year (1st line) and the turns that have past (2nd and 3rd lines in saved_games). The date has to do mainly for the victory conditions and the turns meter for the game AI calculations for all characters, units, ships, etc. who have a date of birth or recruitment. So, if you change the date, say 1900, you'll get a message that you've lost in the opening screen, but the game can be continued even your units are born in 17th cent.


5. Change faction's capitol

[..] CAMPAIGN_ENV/CAMPAIGN_MODEL/WORLD/FACTION_ARRAY/FACTION_ARRAY/FACTION place the new capitol-region ID in 11th and 12th entry.

6. Adding victory conditions

clone a VICTORY_CONDITIONS_OPTIONS record and change the faction name . In every VICTORYVICTORY_CONDITIONS_BLOCK (one for every scenario) edit the regions. One of them must be always the capitol region.

7. Starting technology


, 3rd the value of the technology cost in research points, which you can find in the patch.pack's "technologies_tables" (thanks to Lazy Knight's correction).

8. Change government type

See here.


1. Emergent to playable

Make the emergent (e.g. Scotland) playable as it was a minor (see LEVEL 1). Also in [..] CAMPAIGN_ENV/CAMPAIGN_MODEL/WORLD/FACTION_ARRAY/FACTION_ARRAY/FACTION IN 11th and 12th entries enter capitol region ID (scotland) and change the 14th True

to False.

Then add enough money in the emergent faction's treasury. Now you can start the game as the emergent (Scotland). Open diplomacy menu and buy the capitol region of the emergent faction (scotland) from the faction that owns it (Britain).

After buying is completed the emergent faction is fully unlocked and playable. Save the game and exit. Open saved_game and restore the treasuries of the two factions (see LEVEL 1). Using your original startpos.esf and the saved_game make a hybrid startpos by replacing the CAMPAIGN_MODEL of startpos with the one from the saved_game (see more in LEVEL 4). Now the saved_game has become a real startpos.esf where your emergent is playable.


2. Playable to emergent

Give all regions to another faction. Then in [..] CAMPAIGN_ENV/CAMPAIGN_MODEL/WORLD/FACTION_ARRAY/FACTION_ARRAY/FACTION 11th and 12th entries, enter 0 and change the 14th False

to True .

Then reverse the Minor faction playable procedure (LEVEL 1).


3. Active emerged facilities

See tutorial here.

4. Remove fog of war

See tutorial here.


5. Diplomacy manager

See tutorial here. Also, here, here and here

6. Protectorate playable

Follow minor faction playable (LEVEL 1) instructions and then:

1st way:

For erasing protectorate status you can follow two ways. The easiest way is to go in
FACTION_ARRAY/FACTION_ARRAY/FACTION/ of protectorate and enter 0 in 21st line replacing the patron faction Id. In this way you can have full diplomatic abilities in game. If you want to be independent just declare war to your patron faction. If you want from the beginning to be independent, follow the second way.

2nd way:


the RELATIONSHIP record with the patron faction using the FACTION ID (1st entry). Change the the relation from patron to neutral (4th entry) by copying/pasting the entries of another near by neutral status record. For further changes check previous topic (diplomacy manager).

Do the same in Diplomacy Manager of the patron FACTION where you'll make the changes in the protectorate RELATIONSHIP record, changing protectorate to neutral. In this way x-protectorate can make normal in game diplomacy relations.
Last thing go in protectorate FACTION and in 21st line enter 0 instead the patron faction Id.

To play with Louisiana, Thirteen Colonies or New Spain you will also need to remove the script that enables the handover missions (you have to remove the block at the very top of the scripting.lua). (thanks to Lazy Knight's correction).

Scripting.lua is in the same folder with startpos.esf.

7. Editing starting armies

See here.

8. How to establish Patron   Protectorate relations

See here.


1. Change region's ownership

In [..] CAMPAIGN_ENV/CAMPAIGN_MODEL/WORLD/REGIONS_ARRAY/REGIONS_ARRAY/ find a region that belongs to new owner faction. In 16th and 17th entries are the controlling faction's and governorships IDs. Enter them in region's entries that is going to be changed ownership.

Get further in REGION/REGION_SLOT_MANAGER/REGIONS_SLOT_ARRAY/REGIONS_SLOT_ARRAY/REGION_SLOT_SIEGEABLE_GARRISON_RESIDENCE/ GARRISON_RESIDENCE and enter the new owner faction's ID. Do the same for every building slot, plus road slot, fortification slot and SETTLEMENT. If the region is the only one for the former owner faction then you have to downgrade it as an emergent (see LEVEL 2).

Don't bother changing in BUILDING subrecord the faction's name and government type. This is needed only if this is the last and only region of the former owner faction.

2. Change ownership of characters

In campaign map check for the character's name and note it.

Find the character record in [..] CAMPAIGN_ENV/CAMPAIGN_MODEL/WORLD/FACTION_ARRAY/FACTION_ARRAY/FACTION/CHARACTER_ARRAY checking for his name in CAMPAIGN_LOCALISATON. Copy/paste CHARACTER_ARRAY record from old to new faction in and then delete it from old faction.

Get further in CHARACTER_ARRAY/CHARACTER/CHARACTER_DETAILS and change faction's name in 3rd line. In LOCOMOTABLE you can change it's position on the campaign map, in CAMPAIGN_LOCALISATON the name and in PORTARAIT_DETAILS his image (available names in localisaton_loc file, images in ui_portrait). Then get in [..] CAMPAIGN_ENV/CAMPAIGN_MODEL/CAI_INTERFACE/CAI_WORLD/CAI_CHARACTERS/CAI_CHARACTERS/OWNED_INDIRECT and change CAI_FACTION ID.

3. Change ownership of armies and fleets

Fleets is similar but simpler than army's change so here I describe only the army change case.

Every army/fleet have a leader character (general, admiral, colonel, captain, etc.) and units. In campaign map check for the leader character name and note it. Find the character record in CHARACTER_ARRAY checking for his name in CAMPAIGN_LOCALISATON. In the 3rd line of CHARACTER_ARRAY/CHARACTER is the ARMY ID entry. Using this get in ARMY_ARRAY and spot the army. In ARMY_ARRAY/ARMY 4th line is 0 or a settlement ID if the army is stationed inside a settlement. Since you probably want to change the position also, enter 0 or new settlement ID. Get further in UNITs records and in COMMANDER_DETAILS change the owner faction name. Repeat for every UNIT of the army.

Now get in [..] CAMPAIGN_ENV/CAMPAIGN_MODEL/CAI_INTERFACE/CAI_WORLD/CAI_WORLD_SETTLEMENTS and find the settlement cai record that the army is stationed in. In CAI_GARRISONABLE 1st entry is the CAI_ARMY ID. Write it down and enter 0. If the army is not inside a settlement you still need to do this in any settlement of the same faction that has an army stationed in. Write down the CAI_ARMY ID and leave it as it is.

Get in [..] CAMPAIGN_ENV/CAMPAIGN_MODEL/CAI_INTERFACE/CAI_WORLD/CAI_RESAURCE_MOBILES (these are the cai army/fleet records), and spot the record of the army using the CAI_ARMY ID you have already. If the army was not inside a settlement use the CAI_ARMY ID of the other army you found in previous step, search the nearby records checking CAI_RESAURCE_MOBILES/CAI_RESAURCE_MOBILE 10th entry which is the army ID (found in [..] CAMPAIGN_ENV/CAMPAIGN_MODEL/WORLD/FACTION_ARRAY/FACTION_ARRAY/FACTION/ARMY_ARRAY/ARMY_ARRAY/ARMY 3rd line).

When you find the right CAI_RESAURCE_MOBILES get in OWNED_DIRECT and enter CAI_FACTION ID of new faction. In CAI_SITUATED change both coordinates (1st and 2nd entries) and CAI_REGION ID for the new place of the army.

In CAI_RESAURCE_MOBILES/CAI_RESAURCE_MOBILE 2nd entry enter 0 or the new settlement CAI ID if you want to place it in a settlement. In that case you have to return in CAI_SETTLEMENT record and place the CAI_ARMY ID in CAI_GARRISONABLE 1st entry.


4. Convert minor to a major city

See tutorial here.

5. Enable Unique Regiment Names

See tutorial here.

6. How to relocate a whole army or an unit

See tutorial here.




(Use EasyEsf to make a Hybrid startpos easily)

Hybrid startpos is a modding technique I am testing for some time now with success. It is a starting position file, made from pieces of a startpos and a saved game. In this way modifications are made quickly and easy with the least changes in startpos.esf because most of the changes are made "live" in the game. Merging the save file after the in game changes with the original startpos.esf, is the way to create a hybrid startpos and a new modded starting position.

The basic action in hybrid startpos is the merging, in other words how to create a startpos form a saved a game:

Open startpos.esf and saved_game.esf in the same instance if EsfEditor.

1. Go in startpos.esf/CAMPAIGN_STARTPOS/CAMPAIGN_ENV/ right click on CAMPAIGN_MODEL and delete it.
2. Save it and open again in CAMPAIGN_ENV
3. In saved_game.esf/ CAMPAIGN_STARTPOS/CAMPAIGN_ENV/ right click on CAMPAIGN_MODEL and then click copy. Give sometime to the Editor to complete this and the following step since the amount of data is huge. In my machine with Intel Core 2 Quad Q 9550, 4 GB RAM and Windows 7 64-bit, it takes several seconds for every step, so be patient. Your Editor will stop responding but this is normal.
4. Right click on CAMPAIGN_ ENV of startpos.esf and paste.
5. Save the new hybrid startpos.esf.

That is the new modded startpos.esf. Starting a new game the campaign map will be as it was in the saved game file.
(The same way you can make all the startposes of RTI playable as a grand campaign).



Note:  Any attachment in the original thread can be downloaded on TWC and registration on TWC is required.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this