Results 1 to 12 of 12

Thread: [Advanced] How to make complicated startpos changes – hyprid method limitations – God Startpos

  1. #1

    Default [Advanced] How to make complicated startpos changes – hyprid method limitations – God Startpos

    How to make complicated startpos changes – hyprid method limitations – God Startpos

    * This tutorial is for helping advanced Empire modders to make advanced changes in starting position and create a stable campaign. It demands a good knowledge in Empire modding and in using hybrid startpos.

    It is known that the Empire map is not moddable, the campaign still has many modding limitations and only certain changes are able to be done. With hybrid startpos I’ve tried to expand further those limitations and in some cases this was achieved. However hybrid method has its own limitations and if they are not taken in mind, they produce buggy startpos with CTDs during campaign or -more often- with corrupted produced save games. The usual cause is what I call a cross hybrid: we make changes as the faction X, save create hybrid, then make changes as the faction Y, save and create final hybrid. That seems to be the main limitation in using the hybrid method: we cannot make cross hybrid! But then how we can make changes in 2 factions if we cannot make a cross hybrid?

    After many months of working with hybrids and launchers in popular mods, I have concluded that hybrid startpos is stable only in one faction mods (e.g. Greek Mod). In this case, all changes included in the final hybrid, will have been created by the save(s) of the same faction. If there are changes that require adding the save of another faction then hybrid is not good, at least in its known use. In those cases, where we need to make changes in more than one faction and these changes can be made only by using hybrid, we have to create a… God Startpos as I like to call it. God Startpos is actually a set of hybrid startpos files, where the starting position has been drawn almost on a blank from factions map. We still cannot change the map and region borders but we can make large scale changes rearranging the factions and regions and create a new starting position e.g. for another era mod.
    Spoiler Alert, click show to read: 
    Here is a WW1 starting position:



    Let’s move on the real stuff. I’ll show you how I make stable startpos using hybrid in one basic and in one complex case, where cross hybrid is inevitable:

    1st case: 2 different emergent present in the start of the campaign.

    Let’s say that we want to have Ireland and Scotland present on the map in the starting of the game. Normally we should use a cross hybrid:

    1. Start game as Ireland, emerge it , save, make hybrid.
    2. Using hybrid, start the game as Scotland, emerge it, save, make hybrid.

    As I noted a startpos like this will create CTDs or corrupted saved games, sooner or later in campaign, because of cross hybrid. To make a stable file we have to avoid cross hybrid. To succeed this, more work is demanded, following the rule of making all the changes from the starting faction perspective. At the end the final hybrid should always have saves of the same faction:

    1. Start game as Ireland with plenty of cash, emerge it, 2. then emerge Scotland, save, make final hybrid.

    Now you have added both Ireland and Scotland on the map but if you want to have a rock stable campaign you should use this file only to play as Ireland. If you start as any other faction you’ll have the cross hybrid problems, because in the first turn the game will make the auto save which actually will be a cross hybrid.

    If you are making a mod and you want to make another faction playable, e.g. Scotland, you should keep the file you made for Ireland and using the original starting startpos, you should start as Scotland and create a new hybrid emerging Scotland and then Ireland. This file should be used only to play as Scotland! If you want to have Britain as playable, you should repeat using the original starting startpos, starting the game as Great Britain, emerge Ireland and Scotland, save make hybrid and use this startpos for playing as Great Britain.

    That means, unfortunately, we need one startpos for every playable faction and that is the other side of cross hybrid limitation: If you have to do a hybrid change in your startpos, then you have to make and use a different startpos for every playable faction, to avoid the cross hybrid by making all changes from the same faction perspective. In other words you make the same changes in every startpos so all hybrids have the same world. You can make as many hybrids until the final, as far as you follow the above rule, thus use the saves of the same faction.

    It is more complicated, it needs more work but there are some tricks that make the things look a little better. For example most of the changes do not require hybrid and they can be done first in the original file you will use every time to produce your hybrid(s). For example you can have the victory conditions for both Ireland and Scotland added to the original startpos so when you make the 2 different final hybrids the same changes will have been passed in every one of them.

    2nd case: God Startpos

    Let’s say that we want to make a mod about English civil war and you want Ireland and Scotland present in the start but also the rest of the world rearranged to the closest look of that era. That means that you have to rearrange borders, region ownerships, make new factions, remove some of the vanilla that did not exist yet in 16th century, etc. The best way to achieve that is to make a new rearrangement on an almost blank from factions map and re-define all the factions and their regions from the beginning (God Startpos).

    Supposing that we have a specific map in our mind, we note down the factions that we will add, their capitol region and the rest regions that will have (all regions must be assigned either to a faction or to the rebels). If we are going to make new faction(s), we choose the existing faction that will be replaced. We cannot have more factions than vanilla has already (52 if I recall correctly for grand campaign) and only the existing regions (about 134). But we can have as less factions present as we like, leaving the rest as emergent.

    Tip: If you want an emergent to stay like this and never emerge in whole campaign, just replace its name from the REGION record(s) in startpos where it is assigned to be emerged, with some rebels. Also, the same way we can replace a faction to introduce a new one, we can do for an emergent. For example you can have Soviet Russia as an emerging faction in Moscow and St. Petersburg in a mod about the early 20th cent (e.g. WWI).

    (Before we continue I suggest you to adjust your game graphic options in window mode so you can minimize it easily in task bar during the procedure. Startpos and scripting.lua editing do not require the game to restart as it happens with pack files.)

    1. First, make a basic mod pack containing the mod folder script, and a couple of basic db vanilla tables like factions tables, preferably as a “movie” type to make things simpler. Do not use any other mod packs except the basic during the whole process (like units, etc.)! Though it is not necessary it would be good to have as well a basic loc file with the right names of your new factions.

    2. Then you pick a fresh vanilla good startpos and you place it in your mod folder in your game’s campaigns directory. Make the necessary changes for mod foldering.

    3. After you have tested that mod foldering is working, you can make the changes that do not need hybrid in your new startpos. Proceed with date, victory conditions, government types, treasuries, unit region resources (it requires an updated region_unit_resources_tables to be added in your mod pack), faction leader, families etc. You can also add new slots in cities if you like. You can prepare the db factions table as well, where you can do the necessary changes for language, flags path, colors, military groups (it requires an updated groupings_military_tables to be added in your mod pack), etc. We shall not use it yet, so keep safe your new factions TSV and keep vanilla factions table for the moment in the mod pack.

    When all the common changes - that do not require hybrid-, have been added it is time to proceed. First play a couple of turns to see if your changes are good and then keep a backup of your startpos because you will need to use it many times. Generally keep always plenty of backups when you edit startpos or saves.

    *About faction leader: You can edit the Families and the faction leader only in PREOPEN_MAP_INFO. Characters will be deleted and recreated so there is no point on make changes in CHARACTERS record even for the faction leader.

    *About armies and fleets: They will also be deleted, so there is no reason to make any changes there like unit types.

    Tip: If you use a large scale date counter (e.g. 12 turns per year) you should go in all factions that will be a republic and increase the next election time or you will suffer the miss of opposition bug (CTD because of the opposition absence).

    4. The first startpos will be for the first playable faction you like to have in your mod. Let’s say that this will be Britain. More or less Britain will be present in all cases either as England or as Great Britain so it should be playable anyway (you are free to select any other faction). Place the attached scripting.lua in your mod folder. It has the scripting commands so on campaign start all the factions will hand over to Britain and they will become emergent (if you choose another faction to start with change the scripting.lua accordingly).

    Start the game as Britain. You will see the entire world in... red, belonging to you! Ignore the win message and continue. You cannot do much now because all factions are missing from all panels, so just Save. We have to be able to communicate with all the factions we want according the scenario so we can “wake them up” by simply emerging some (or all) of them. Since all regions belong to you, you will give to each one the regions that every faction has to have in the starting position. Do not worry, all these will be done live in game, using the diplomacy panel.

    Spoiler Alert, click show to read: 


    5. Now it is time to add the new factions table in our mod pack so exit game. Open the mod pack and update vanilla factions_table with your new factions TSV prepared in step 3. Also remove the scripting.lua from your mod folder we do not need any more hand overs for Britain.

    Tip: if you are planning to use a faction for adding a new one with different culture (e.g. native for a new European, or a European for a Spanish language faction) the necessary changes in db factions table will save you much work. For example if you want to use Huron to make Brazil, then you should already have made changes in db factions table assigning the Portuguese language to Huron faction. In this way when it will be emerged and the game engine creates the government, it will use Portuguese names saving you the trouble. Also the new characters will have a new birth date according the new starting date you might have already changed. Unfortunately families do not change so the Huron family will still have native names. This change should have been done already manually in the original starting file so it would be done only once.

    6. There is no need to create so soon a hybrid so we shall work a little on the save (keep backups…), so open it with EsfEditor and make the necessary changes to make playable all the factions that you want your map to have (remember they are all emergent now, except Britain). In your first experiments fix one or two factions. Follow the tutorial but make only the changes in FACTION record (enter the capitol id twice and turn yes to no in Is emergent? line). Remember that IDs change in every save so make sure that you use always the right one.

    7. Start your game, load your Save and go in diplomacy panel (if it fails to start then some change in your mod pack is wrong or missing). Now you should be able to see all the factions you want there. Pick the first one, e.g. France, and emerge it by offering only the capitol region. You can use any region as starting capitol region as long as you have updated FACTION record of the Save in previous step with the new region capitol ID. Repeat offering the rest regions that France will have in the starting position. If the faction has many regions do not offer them in one negotiation, offering no more than 3-4 at a time. Save. Play a turn to see that everything is ok.

    Tip: You can also have a different historical capitol region (the second id entry). In this case when the faction conquers the historical capitol, the current capitol will be transferred there aromatically and the relative message will pop up.

    8. Reload the last Save and repeat the procedure of emerging the rest factions you want present, until the new map is completed with all the factions in their starting position. After 2-3 factions you add, always save the game. Sometimes the troop retreat fails and may receive a CTD so you won’t lose much of your work.

    Now that your troops have retreated it is easy to delete them. Remember all factions will have no armies or fleets since they have been demoted to emergent. To disband characters attach them in an army or fleet and then disband them all together. Maybe some agents are far from the nearest army or troop so perhaps it is better to do it in a previous step, before start emerging.

    9. When you are done save the game. Play a couple of turns to be sure that everything is o.k. Then it is time for the first hybrid. Use the startpos in modfolder and your last Save and create it. This will be your sartpos for playing as Britain! Perhaps there are some changes you want to add, like the faction leader’s localization in CHARACTERS records.

    10. For making the rest playable factions you should repeat the steps 4-8 for each one of them, starting always with the original startpos where you have made the changes that do not require hybrid. For example if you want to have France playable, edit and use again the scripting.lua so the hand over comes to France now (be careful if you just replace britain with france using find and replace, a handover from france to.. france (the former Britain) will have been created among the commands and the script will break on execution. Just replace there the right france with britain so britain goes to france with the hand over). Now start over the procedure and create the same world for France as you did for Britain. When you are done make your final hybrid that will be used if the player selects to play as France. Continue with the rest plyabke factions you want to have. At the end you will have a bunch of hybrid startpos which will have the same starting position. Make a folder and program your launcher to copy in mod folder the right startpos, depending on the player’s faction choice.

    If you experience any CTD during procedure most likely there is a problem with your mod pack. It would be better not to make many playable factions. After you make the first one, complete the changes so you can be sure that there are not more common changes that you might have forgotten (usually there is…). If there is, it is better to update the original file and start over. When you have made the first most important factions, according your scenario, you can proceed to add the rest of your mod packs to complete it and then release it. Later you can offer add on to add more playable factions.

    If you want the AI to produce many armies and fleets, change the treasuries of the AI factions, adding no less of 300.000. AI will start recruitment in the first 2-3 turns.

    This method produces stable files and campaigns. I’ve tried it in all Empire maps (Rti, early-late grand campaigns) and some popular mods use it already for months with no problems. It looks a little complicated but it is the only known way to make large scale changes on the starting position.
    Last edited by husserlTW; October 25, 2012 at 04:12 PM.




  2. #2

    Default Re: [Advanced] How to make complicated startpos changes – hyprid method limitations – God Startpos

    Thanks for taking the time to write this. +rep
    "What? Men dodging this way for single bullets? What will you do when they open fire along the whole line? I am ashamed of you. They couldn't hit an elephant at this distance. " - John Sedgewick, Union General, his last words before being killed by a sniper.

  3. #3

    Default Re: [Advanced] How to make complicated startpos changes – hyprid method limitations – God Startpos

    Hi!

    Thank you for the information. I have just started to prepare my basic startpos to build up the different startpos for the different factions in my mod 1800. Don't you think that a reference or link to this thread should be made in the orginal startpos modding thread of yours? Apart from the one in you signature.

  4. #4

    Default Re: [Advanced] How to make complicated startpos changes – hyprid method limitations – God Startpos

    Glad to here it. It will take you some time but believe me it worth the effort. The most important is to make all the non hybrid changes to the basic file. Also keep the last save for every faction which you will use for the final hybrid. If you decide to offer an extra version, with more units per army than default 20 you will need them. If you need a launcher you know where... to find me...

    Btw I've added a link in startpos thread from the first day of this tutorial (Level 5 God Startpos).




  5. #5

    Default Re: [Advanced] How to make complicated startpos changes – hyprid method limitations – God Startpos

    Quote Originally Posted by husserlTW View Post
    If you need a launcher you know where... to find me...

    Btw I've added a link in startpos thread from the first day of this tutorial (Level 5 God Startpos).
    Thank you very much for your offer to make the launcher, I take it very seriously.

    About the link, if the link is the text that says:


    Edit: working now, excelent thank you.
    Last edited by Bethencourt; November 04, 2012 at 05:02 AM.

  6. #6

    Default Re: [Advanced] How to make complicated startpos changes – hyprid method limitations – God Startpos

    Ooops! You are right, I fixed it. Launcher is my most favourite modding so I should gladly make one for you. Just complete the mod files and send me a note.




  7. #7

    Default Re: [Advanced] How to make complicated startpos changes – hyprid method limitations – God Startpos

    I am planning the work needed, and I have just stopped in the republics issue when the turns per year are increased. I wonder if this also happens with contitutional monarchies and also if once the game has started if there is a change of goverment type if the game will crash because of this issue.

  8. #8

    Default Re: [Advanced] How to make complicated startpos changes – hyprid method limitations – God Startpos

    Quote Originally Posted by Bethencourt View Post
    I wonder if this also happens with contitutional monarchies
    Yes, there as well.

    and also if once the game has started if there is a change of goverment type if the game will crash because of this issue.
    Good point. However in mods with 12 turns/year and 24 turns/year (TCW, ACW) such an issue has never been reported.




  9. #9

    Default Re: [Advanced] How to make complicated startpos changes – hyprid method limitations – God Startpos

    I must say, I'm quite surprised with you reporting cross hybrid problems. I made most emergents playable on a single startpos, but found out no problem so far. Well, sometimes, gotta do it twice to get a new one emerged, but I believe it's when one step is done incorrectly. Out of that, in-game stability is fine. I thought I'd do it to unlock all minor as well... Would it be that of a bad idea?

  10. #10

    Default Re: [Advanced] How to make complicated startpos changes – hyprid method limitations – God Startpos

    Maybe the problem of the hybrid startpos is not affecting the emergent to playable changes. I have had the hybrid save games problems but in more complicated startpos changes affecting several things.

  11. #11

    Default Re: [Advanced] How to make complicated startpos changes – hyprid method limitations – God Startpos

    Is there a way to change a generals name?

  12. #12

    Default Re: [Advanced] How to make complicated startpos changes – hyprid method limitations – God Startpos

    Hi!

    I have attached a scripting lua file with the lines that allows you to give all the factions to britain. If you want to work with other factions just replace britain with the name of the faction you want.

    The following lines to those are lines that allow you to give starting treasury to the factions. Again, change the ones provided by the ones you want.
    Attached Files Attached Files
    Last edited by Bethencourt; July 14, 2015 at 12:03 PM.

Posting Permissions

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