Page 1 of 11 12345678910 ... LastLast
Results 1 to 20 of 217

Thread: How to add a new faction replacing an existing one

  1. #1

    Default How to add a new faction replacing an existing one

    How to add a new faction replacing an existing one

    After some requests I've decided to make this tutorial on " How to add a new faction replacing an existing one". As you might know it is not possible yet to add new elements such as factions, regions, cities, etc. But we can replace them making some more interesting starting positions.
    As an example I am going to use Finland that was replaced Saxony in my mod Sturm und Drang. The necessary tools for the modifications are:

    1. EsfEditor 1.4.5

    2.
    PFM

    3.
    OpenOficce spreadsheet

    4.
    Gimp

    Other needed modifications that are included and more references about startpos.esf can be found here . Since changes in startpos are always dangerous for errors I don't type the changes but I copy/paste them from a spread sheet that I have opened side by side with the editor, but that's me...

    1. Preparing startpos.esf

    First you have to choose which faction is going to be replaced by the new one. Some good choices are minor factions which will not be so unhistorical if their regions are given to the proper nearby major faction. Here I choose Saxony and first thing is give to it the region of Finland. This can be done in two ways:

    a. The hard one is to edit the startpos and change Finland's region ownership from Sweden to Saxony following the proper modification (see STARTPOS ESF thread).

    b. The easy one is making hybrid startpos which I'll follow. To make hybrid we need the original startpos and a saved game. For more details see in STARTPOS ESF thread. Here are the steps: Start the game as Sweden (owner of Finland), offer Finland to Saxony, save, exit, make hybrid. This is going to be the new startpos until a new hybrid is made.

    c. Whatever way you choose open (new or modded) startpos with the editor go to REGION Saxony, note the region's Id then go in FACTION Saxony and make it faction's capital (see how to in STARTPOS ESF thread).

    d. Saxony has a starting army and two characters (gentleman and rake), all stationed in city capital. We have to remove them in Finland region. See "how to" in STARTPOS ESF thread. Here I'll repeat some important things about it, since I often receive messages about it. Moving an army to a new place means that we have to change the coordinates for the army and the leading character (general or colonel, sometimes both). The same stands for gentlemen and rakes who have an army record too. Character's position is found in startpos [...]CAMPAIGN_ENV/CAMPAIN_MODEL/WORLD/FACTION_ARRAY/FACTION/CAHARCTER_ARRAY/CHARACTER/LOCOMOTABLE where there are two pairs of grids in the first 4 lines. Armies position is in [...]CAMPAIGN_ENV/CAMPAIN_MODEL/CAI_INTERFACE/CAI_WORLD/CAI_WORLD_RESOURCE_MOBILES/CAI_SITUATED where in two first lines are the coordination and in third the CAI_REGION id. So if we want to change an army's position we have to enter new coordinates in the places I've noted above and the new CAI_REGION Id. Note that every sea has a CAI_REGION Id so removing navies is exactly the same. Another important thing is that if a character or army is stationed in a city there are some other entries that need to be changed in WORLD and CAI_WORLD fields but we shall avoid these to make things easier. There is one more serious reason that I will do this, which is that I've never managed to remove stationed characters like gentlemen or rakes in a new place.

    So let's put all things together: in order to move the army plus general, gentleman and rake from Saxony to Finland I have to have available 3 new pairs of coordinates. Then I'll need to make the changes to startpos. Here is how I am doing these:

    d1. I start the game (using your new startpos) as Saxony and I move the army, character and rake out of the city. I save the game giving the name "hybrid" to saved_game but do not exit. I go in Finland (it already belongs to Saxony) and I recruit three units. Play the turn and move the new units in three deferent positions near the city. I save the game giving the name" grids" and exit. The hybrid saved game is going to be used for making hybrid startpos and grids saved_game to take the needed new coordinates.

    Important Note: If gentleman and rake were not present I could simply disband the army here and save my time (and my nerves) from the next complex d2 step and d3. But since there is not a way to disband this kind of characters I have to go on d2, d3.

    EDIT: After I've finished this tutorial I saw some new ideas about deleting characters. So if next steps are too complex for you take a look here and here. If these ideas are working go straight to e. When you are in game delete army and characters and continue the tutorial. If you want to keep starting army and characters then proceed to next step d2.

    d2. Before go on I need to have available the three CAI_ARMY Id's (CAI_WORLD_RESOURCE_MOBILES). This is a little tricky so here it is in details. I go first in [...]WORLD/FACTION_ARRAY/FACTION/CAHARCTER_ARRAY/CHARACTER and note the Id (first line) for every character. Then I go in CAI_WORLD/ CAI_WORLD_REGIONS to find Saxony's and Finland's record. The only tip I can give for an easy spotting of these CAI records is to open regions.esf (!!!) and count in what place in root/region_data/region list are these regions. Then count the list CAI_WORLD/ CAI_WORLD_REGIONS and spot them checking the name in CAI_WORLD_REGIONS/CAI_REGION. From Finland I need the CAI_REGION Id which is the number of the record and I note it down. From Saxony I want something else. I go in CAI_WORLD_REGIONS/CAI_REGION and I note the CAI_SETTLEMENT Id in 3rd line. Then I use it to find Saxony's CAI_SETTLEMENT record in CAI_WORLD_ SETTLEMENTS and go further in CAI_WORLD_ SETTLEMENTS/CAI_GARISSONABLE. In first line there is CAI_ARMY Id! This is the first sight of Ithaca but the Odyssey is not over yet. Using this I spot the CAI_WORLD_RESOURCE_MOBILES record of the army. I go there and in CAI_WORLD_RESOURCE_MOBILES/ CAI_RESOURCE_MOBILE I note the CAI_CHARACTER's Id in 1st line (this is for general). Although the nearby records are the other two cai armies needed there is only one way to be sure, since characters like gentlemen and rakes have not simple army Id to confirm it. Go in CAI_WORLD_ CHARACTERS/CAI_ CHARACTERS using the Id found for the general and spot it. Checking the nearby records using the characters Id's I've noted down from [...]WORLD/FACTION_ARRAY/FACTION/CAHARCTER_ARRAY/CHARACTER (9 digits, it should appear in CAI_WORLD_ CHARACTERS/CAI_ CHARACTERS 4th line) I can spot the records for gentleman and rake. In CAI_WORLD_ CHARACTERS/CAI_ CHARACTERS 1st line is the CAI_ARMY I am looking for so I note them down making sure to also note which cai army Id belongs to whom.

    d3. Now the last thing I have to note are the new coordinates. I open the grids saved_game, go on WORLD/FACTION_ARRAY/FACTION(saxony)/CAHARCTER_ARRAY/CHARACTER and I spot the three colonels records which belong to the three new units I've made in the game at Finland region. In LOCOMOTABLE I find the new coordinates and note them down deciding which I'll give to whom.

    d4. Using startpos and hybrid saved game I make a new hybrid startpos. I open it and go in Saxony's [...]WORLD/FACTION_ARRAY/FACTION/CAHARCTER_ARRAY/CHARACTER and I enter the new coordinates I've noted before (double enter in the first four lines). Then I go in CAI_WORLD_RESOURCE_MOBILES record for every character using the CAI_RESOURCE_MOBILE Id I've already found and in CAI_SITUATED I enter the new coordinates (checking to be the same that I've entered in CHARACTER's record) in the first 2 lines and in third the CAI_REGION Id for Finland which I've already found in step d2. Save and exit.

    e. Start the game as Saxony and if everything is o.k. now I should have: Saxony faction owning two regions (Saxony and Finland), Finland as capital region, characters and army placed in Finland. I give Saxony region to Prussia, save and exit. I make the last hybrid startpos and I open it for the last couple but easy modifications. I go in [...]CAMPAIGN_PREOPEN_MAP_INFO/REGION_OWNERSHIP_BY_THEATRE and I change the owner for Finland from Sweden to Saxony, and for Saxony from Saxony to Prussia. Then I go in [...]WORLD/FACTION_ARRAY/FACTION(saxony)/FACTION_FLAG_AND_COLOURS and I change the R,G,B colors which the game will use on the map, in tooltips, e.t.c. You can open a program like paint.net (free) and in colors select the color that suits to your new faction and copy the R,G,B numbers. I picked a light blue (86, 173, 255). These numbers will be used also in mod.pack/db/faction_tables.

    2. Preparing mod pack file.

    Make a new folder and name it as you like e.g. mymod. Open patch.pack with PFM and extract db/factions_table and after that export as a TSV, pointing as destination for both mymod folder. Do the same for units_to_exclusive_faction_permissions, warscape_rigid_lod_tables and warscape_rigid_tables, extracting and exporting as TSV each table. Then open models.pack and extract rigidmodels/ campaignbuildings/campaignagenticons, flags/textures and naval/textures. Last open ui.pack and extract flags/saxony (in my case the old faction).

    a. Open factions.TSV using a spreadsheet and go in the row with the faction. Live first two cells unchanged where the faction name and code are (Faction Id and Id2). In Category enter the proper entry using one of another faction with the same or similar culture with the new one. Here I use some of the entries for Sweden. In Type, Nation, Nationality enter the proper entries. Not all of these entries affect the game and many of them are just for info use. In Names enter the name_group for your new faction. If your new faction has names that there are not available (as it happened with me for Finland) then you have to make major changes in localisation.loc. Anyway here you should enter an existing group name since I haven't find a way to mod names_group table and add new groups. But in most case you'll find a suitable one. Change also Sounds with an appropriate entry, Icons for the units, in R1, G1, B1, ..., repeat the color numbers you've already used for startpos. In Group is determined the type of units the new faction will have. Names 1 live it as names_english and in Names 2 repeat the entry of Names. When you've done delete all factions rows except the one you've modded. Exit and save changes in TSV.

    b. units_to_exclusive_faction_permissions.TSV. For Finland I've entered in faction table to use sweden_denmark_group units. But in Swedish army there are units that only Sweden can use. Also there is one that is Finnish. So in Unit Id ref column I keep only the specific Swedish units (e.g euro_dragoons_sweden, euro_heavy_cavalry_sweden, etc.) and the Swedish unit hakkapeliitat and delete all the rest. Using saxony/true I assign these units to be available also for Saxony. For hakkapelitat I make a second row using sweden/false so only Finland(Saxony) will have this unit. Exit and save changes in TSV.

    c. warscape_rigid_lod_tables.TSV . Open it and short it in alphabetical order for easy control. Delete all rows and keep only the one that will have your old faction's agent model, in my case RigidModels/CampaignBuildings/CampaignAgentIcons/agent_ID_saxony.rigid_model. Exit and save changes in TSV.

    d. warscape_rigid_tables.TSV. Repeat the same keeping only the agent texture, in my case agent_ID_saxony.

    e. There are two ways making the flags files. One is to make new one, the second that I'll follow is changing the existing one. In mymod folder go in ui/flags and delete all folders except the old faction, in my case saxony. Here are all the flags that are used in game (campaign map, hud, menu, etc.). You have to make new tga's in the same dimensions and names as the existing, for your new faction's flag, using a program like gimp (free). All the animation flags (11 pieces) can be the same just with deferent name. This is made for the effect of the waving flag in faction selection menu and in Ai turn. There is no point to waste your time make it like this (if you can) just use the same 200 X 100 tga. On campaign and battle map flags will be waving in the wind. The only difficult are the these for hud and portraits. All the other are the same in deferent dimensions and names. So make first large.tga in 512X256 from an image of the flag you should have already and proceed with the rest.

    g. In rigidmodels/ campaignbuildings/campaignagenticons folder delete all but the old faction agent model, in my case agent_id_saxony.rigid_model. In texture folder keep only the agent's dds, in my case agent_id_saxony_diffuse.dds. Open it with gimp and change the flag colors (copy a circle from one of your flags you've made already). This is for the flag on top of the agent on campaign map. In flags/textures keep only the files flags.tai, flags0.dds, 1,2,3, naval_id.tai and naval_id0.dds. Find in which flagsX.dds is the old faction's flag. Then copy over it the latge.tga (512X256) you've already made. In naval_id0.dds replace the circle flag that will be shown on top of the ships. In naval/textures keep only faction's dds in my case ensign_saxony_diffuse.dds. Change this also using the large.tga and remaking the side long triangle flags.

    h. Now we have everything we need to make the mod.pack file. Open PFM and make new pack file, pointing mymod folder. Choose a Pack Action/Change pack type and mark mod. Save the file as the name you like but you have to save it in mymod folder and do not exit. Right click on pack file and add directory. Add all folders that there are in mymod folder. Save. Expand db and go in db/factions table, import TSV and point factions.TSV file. Repeat with all db tables. Save. Open again db and rename every table. For example call my_factions, factions table, etc. Do this for all (and only) db tables. Save the file.

    3. Preparing localisation.loc

    Open patch_en.pack with PFM extract localisation_loc in mymod folder and also export as TSV. Close PFM and open localisation.TSV. Sort it in alphabetical order. Then find the entries factions_screen_adjective_xxxxxx and factions_screen_name_xxxxxx and enter in column B the appropriate names for your new faction. Exit and save TSV. Open PFM and make a new pack file of type movie this time. Save it is as the name you like but in mymod folder. Then add directory text and then import localisation.TSV in text/localisation_loc table..
    Now you are ready to see your new faction. Place the two pack files you make in ETW/data folder. Start the game with Mod Manager marking your new mod to be activated. Enjoy your new faction with the proper name, flag and colors.

    Other changes.

    There are some other changes that have to be done in some cases. If your new faction uses deferent group names than the old then the existing characters will still have the old names. To correct that you have to edit startpos and change all names in FAMILY and CHARACTERS using new names from localisation.loc. Another element might be religion. Here you have to change the religion in FACTION record, in FAMILY records and in the REGION/POPULATION record of the new faction. Also the same maybe is needed to be done about type of government, diplomatic relations, etc. Most of these changes are in startpos FACTION record. In my mod Sturm und Drang you can see in the pack file the structure of it. There I've added three new faction until now and I've just changed some elements of three existing Italian faction as well.

    If you successfully make your mod introducing a new faction. please compress the mod files and upload them here. It will be made a good data base with the new factions playable.

    CREDITS

    Lt Chabers for PFM
    Just for EsfEditor
    Koras321, alpaca, erasmus777 for later development of these tools.
    Last edited by husserlTW; December 19, 2009 at 07:31 AM.




  2. #2

    Default Re: How to add a new faction replacing an existing one

    Im just after noticing not one ungrateful sinner has posted here so far

    Well I for one am grateful
    +rep for another excellent tutorial
    My Tools, Tutorials and Resources

    Was running out of space, so see the full list here!

    Consider the postage stamp: its usefulness consists in the ability to stick to one thing till it gets there.- Josh Billings
    The creatures outside looked from pig to man, and from man to pig, and from pig to man again; but already it was impossible to say which was which.- George Orwell

  3. #3

    Default Re: How to add a new faction replacing an existing one

    Hey Im having some trouble exporting as a TSV can you help me with that??

  4. #4

    Default Re: How to add a new faction replacing an existing one

    Quote Originally Posted by OSUfan View Post
    Hey Im having some trouble exporting as a TSV can you help me with that??
    If you tell me what is exactly the problem, I will.




  5. #5

    Default Re: How to add a new faction replacing an existing one

    OK well I can't find the controls on the file pack manager to export as TSV and when I click on file its say it has superseded by BDE editor and won't open it.

  6. #6

    Default Re: How to add a new faction replacing an existing one

    Quote Originally Posted by OSUfan View Post
    OK well I can't find the controls on the file pack manager to export as TSV and when I click on file its say it has superseded by BDE editor and won't open it.
    It is in the right window on top. Use this version of FPM.
    Last edited by husserlTW; November 12, 2009 at 10:17 AM.




  7. #7

    Default Re: How to add a new faction replacing an existing one

    Thank you i just downloaded it and I will try it when i get back from class. Also can i use Louisanna instead of the KoSJ and creating my faction?
    Also this is the flag http://en.wikipedia.org/wiki/File:Fl..._Jerusalem.svg and Is it possible for the faction to be named Kingdom of Jerusalem? And thank you in advance for all your help

  8. #8

    Default Re: How to add a new faction replacing an existing one

    Quote Originally Posted by OSUfan View Post
    Thank you i just downloaded it and I will try it when i get back from class. Also can i use Louisanna instead of the KoSJ and creating my faction?
    Also this is the flag http://en.wikipedia.org/wiki/File:Fl..._Jerusalem.svg and Is it possible for the faction to be named Kingdom of Jerusalem? And thank you in advance for all your help
    I shouldn't recommend that since you have to give regions back and transfer characters. It is easier to change persons names if this is the reason you want Louisiana.




  9. #9

    Default Re: How to add a new faction replacing an existing one

    Well I was thinking louisanna because they already have the colors I like and they are a french faction and the kingdom of Jerusalem had a big population of franks. Would it be possible to add jerusalem to louisanna and basically sacrifice all agents and armies in new orleans to the conguering Indian Tribes and just rebuild them in Jerusalem?

  10. #10

    Default Re: How to add a new faction replacing an existing one

    Quote Originally Posted by OSUfan View Post
    Well I was thinking louisanna because they already have the colors I like and they are a french faction and the kingdom of Jerusalem had a big population of franks. Would it be possible to add jerusalem to louisanna and basically sacrifice all agents and armies in new orleans to the conguering Indian Tribes and just rebuild them in Jerusalem?
    Yes you can do that. In this case when you've done with startpos as I said in my PM (replacing KoSJ with Louisiana), start the game as Louisiana and give the american regions wherever you like. Before that if you have any armies just disband them. Also if you add the characters in your army, after disbanding you will get rid of them too. Save, exit and make hybrid again.




  11. #11

    Default Re: How to add a new faction replacing an existing one

    OK thank you for your help Im pretty sure I have it all set so far And will that flag work?

  12. #12

    Default Re: How to add a new faction replacing an existing one

    Its working
    Next I plan to add period portraits and edit in Victor Amadeus II of Sardinia to be king and thanks in advance for helping me by doing the flags and putting the faction name in the game

  13. #13
    Taxandrius's Avatar Praeses
    Join Date
    Jan 2008
    Location
    Vlaanderen
    Posts
    7,767

    Default Re: How to add a new faction replacing an existing one

    Is it possible too to create a new emerging facton by deleting another emerging faction ?
    I would love to see Flemish rebs trying to get rid of the Spanish/Austrians/French/Dutch

  14. #14

    Default Re: How to add a new faction replacing an existing one

    Quote Originally Posted by Taxandrius View Post
    Is it possible too to create a new emerging facton by deleting another emerging faction ?
    I would love to see Flemish rebs trying to get rid of the Spanish/Austrians/French/Dutch
    You can replace an existing emergent with a new one.




  15. #15
    Taxandrius's Avatar Praeses
    Join Date
    Jan 2008
    Location
    Vlaanderen
    Posts
    7,767

    Default Re: How to add a new faction replacing an existing one

    You can replace an existing emergent with a new one.
    is this done the same way as your brilliant tutorial (but in another map etc) ?

  16. #16

    Default Re: How to add a new faction replacing an existing one

    Quote Originally Posted by Taxandrius View Post
    is this done the same way as your brilliant tutorial (but in another map etc) ?
    It is exactly the same and in the same map (we cannot create new ones). Also you can choose any faction to be replaced, even it is not emergent. Then you can make it an emergent by giving it's regions to another faction (tutorials in STATPOS ESF thread).




  17. #17

    Default Re: How to add a new faction replacing an existing one

    Hi

    Straight to question...

    I want to make a special unit,which can be recrutable only in specific region(like new DLC units in America)...What is the thing in startposition.esf that I must change to succeed?...How is db\region_unit_resources_tables\region_unit_resources related to file startposition.esf?

    Thank's

  18. #18

    Default Re: How to add a new faction replacing an existing one

    Quote Originally Posted by Oby View Post
    Hi

    Straight to question...

    I want to make a special unit,which can be recrutable only in specific region(like new DLC units in America)...What is the thing in startposition.esf that I must change to succeed?...How is db\region_unit_resources_tables\region_unit_resources related to file startposition.esf?

    Thank's
    In [...]CAMPAIGN_MODEL/WORLD/REGION_MANAGER/REGION_ARRAYS find the region(s) you want and add in RESOURCES your new resource. This resource must be also in db\region_unit_resources_tables\region_unit_resources and in db/units_table/units for the unit you want to be recruited in that region(s).




  19. #19
    Hrobatos's Avatar Praeses
    Join Date
    Dec 2009
    Location
    Berlin, Germany
    Posts
    7,786

    Default Re: How to add a new faction replacing an existing one

    thanks for guide i made croatia playable as a faction instead saxony everything works now i need to make new units for croatia like Trenk pandurs who were true elite in austrian army 119 battles 119 victories baron Trenk was in 102 duels and was wounded 14 times (in battle as well in duel)

  20. #20
    Hrobatos's Avatar Praeses
    Join Date
    Dec 2009
    Location
    Berlin, Germany
    Posts
    7,786

    Default Re: How to add a new faction replacing an existing one

    i have a problem in custom battle all factions have black flag while in campaign only austria as i sad before i made croatia from saxony what might me problem?

Page 1 of 11 12345678910 ... LastLast

Posting Permissions

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