Results 1 to 1 of 1

Thread: [Modding] ETW: How to change region ownerships + enable emergent factions to be played

  1. #1
    Kátz's Avatar Senator
    Join Date
    Aug 2008
    Location
    Jakarta, Indonesia
    Posts
    1,249

    Default [Modding] ETW: How to change region ownerships + enable emergent factions to be played


    Author : GeorgiaPeanuts
    Original Thread : How to change region ownerships + enable emergent factions to be played


    How to change region ownerships + enable emergent factions to be playedHello,

    In this tutorial I will show you how you can give a region to another faction as well as making an emergent playable in the same process.

    First make a backup of your startpos.esf in the data/campaigns/main/ folder

    Next you will need to download this program http://www.twcenter.net/forums/showthread.php?t=242353 and open up your startpos.esf with it.

    I will start with making a emergent faction playable because it will in the end have the same process that is gone through as you would with adding a region to any faction whether it was already in the game.

    The first section we will be editing is known as the CAMPAIGN_PREOPEN_MAP_INFO as the name suggests this is what the game reads in when you are at the grand campaign start area so it can populate the menu with who can be played and what regions they own.

    We first want to edit CAMPAIGN_PLAYERS_SETUP. Find the emergent faction you wish to play.

    Under its CAMPAIGN_PLAYER_SETUP section you will see the faction's name and then three booleans. By setting the second boolean to True you will allow that faction to be chosen at the menu.

    Next find your faction in FACTION_INFOS and set the last integer to 1 or if you plan to give your faction multiple regions, then just put the number of regions you plan to give. This step may not be completely necessary because I notice for the faction I stole the regions from they automatically updated to reflect correctly in the start game screen.

    Next we have REGION_OWNERSHIPS_BY_THEATRE. Each subsection is for a specific theatre, India, America, Europe. So find the theater for your region and then find the specific region entry and change the faction name to the name of the Emergent faction you want to play.

    Now we are moving on to the CAMPAIGN_ENV section. This defines the bulk of the campaign state at the start of the first turn.

    Under CAMPAIGN_PLAYERS_SETUP you will do the same process as in the prior section where the second boolean needs to be set to True.

    Next we will move to CAMPAIGN_MODEL/WORLD.

    Under this section you will see a FACTION_ARRAY and a REGION_MANAGER. These are the two final areas we will be editing.

    Firstly go into the FACTION_ARRAY and find the Faction you want to be emergent or the faction you want to give a region to.

    When you have found him you will see a lot of data variables for the faction at its FACTION section level. Here is what some of them do:

    1. faction_id - int
    2. faction_db_name - uft16
    3. faction_display_name - utf16
    4. unknown - Boolean
    5. unknown - Boolean
    6. Is Major Faction? - Boolean
    7. unknown - Binary Data
    8. Official Religion - utf16
    9. unknown - Boolean
    10. capitol_region_id - Int
    11. capitol_region_id - Int
    12. unknown - Boolean
    13. Is Emergent? - Boolean
    14. unknown -Uint
    15. unknown - Binary Data
    16. unknown - int
    17. unknown - int
    18. Main AI mode - utf16 (FULL or MAINTAINANCE)
    19. AI Personality - utf16
    20. protector faction_id - int


    For Emergent factions to be playable you need to set Is Emergent? to False. (sorry forgot this step )

    So I suggest to write down the Faction ID# for your faction.

    Next we will go into the REGION_MANAGER and you will need to find the entry for your Region which may take some time as there are 205 regions to find it through.

    At the REGION section level you will see a large set of data for each region here is explained some of what they are:

    1. region_db_name - utf16
    2. region_id - int
    3. (skip past 13 unknowns)
    4. owner faction_id - uint
    5. owner theater_id - uint
    6. theater_name - utf16
    7. main_rebels - uft16 (Can be any Faction or just a rebels type)
    8. base rebels type - utf16 (This can only be a rebels type of faction)
    9. coastal climate? - utf16


    So first we want to take the faction_id of our faction and set the owner faction_id to this value.

    If you are using an emergent faction we will also need to go back to our faction section and change the capitol_region_ids to point to this region.

    Next we must proceed further into the region and edit parts of the REGION_SLOT_MANAGER and the SETTLEMENT sections.

    Proceed as far in as you can for each element in REGION_SLOT_MANAGER to if you can reach a BUILDING section which inside will have who owns the building and also the gov_type. You must edit each building to have your faction's name and government type.

    Furthermore for each REGION_SLOT you need to edit SEIGABLE_GARRISON_RESIDENCE/GARRISON_RESIDENCE. In there is a single Uint that holds the ID to the owner faction of this region. (These same things also get done for the region_slots inside of the Road and Fort Slots.

    Also do the same thing under SETTLEMENT for the SEIGABLE_GARRISON_RESIDENCE/GARRISON_RESIDENCE.

    If you followed all the steps correctly this region should now be properly owned by the faction you chose.

    If you were unlocking a emergent faction please note that you can only play as that emergent faction because the AI definitions for the emergent probably are not there so other factions crash on load.

    Also for emergent faction if you want to get all your government people to generate you will need to capture a region and then instantly the game will generate a Faction Leader and ministers for your faction. (It is hard with some factions who cannot build stuff like Scotland, but with USA I tested this).

    Here are two esfs as an example. (You can only play the specific emergent faction for each esf since AI setups have not been developed into them for the emergents so playing anybody else caused crashes)
    startpos_us.esf gives the USA Virginia to start off. Once you capture another region everything should be working as normal, till then you cannot manage taxes you will have no faction leader or ministers. When I tested I just made 4 Minutemen and quickly attacked the region above me and then it was business as usual. Also in this file I made Portugal a Major faction with FULL AI just as a test.

    scotty_startpos.esf is a Scotland version. This one is near useless because as Scotland it would not let me build any building or any units so I was stuck with a city with just the garrison I think something in the db files could fix this maybe.

    http://rapidshare.com/files/213902506/main.zip.html

Posting Permissions

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