Page 8 of 12 FirstFirst 123456789101112 LastLast
Results 141 to 160 of 227

Thread: [question] How to change a faction's starting provinces?

  1. #141
    Caki's Avatar First Consul of Thera
    Join Date
    May 2007
    Location
    Negotin, Serbia
    Posts
    655

    Default Re: [question] How to change a faction's starting provinces?

    I tried that Dresden but whit no luck. But I'll find a way :-)
    Proud To Be Under The Patronage Of TheFirstONeill
    Proud team member of Thera, A New Beginning

  2. #142

    Default Re: [question] How to change a faction's starting provinces?

    I was able to remove phantom construction (and the other obvious AI bugs that popped up when changing region ownership) with the help of the new EditSF version. The CAI section of startpos needs to be changed in [at least] four directories:

    1 CAI_WORLD_FACTIONS - contains three int arrays per faction referring to each entry owned by the faction in these three directories:
    2 CAI_WORLD_SETTLEMENTS (references the world\regions array entries) - also refers back to owning faction (1)
    3 CAI_FACTION_PROVINCES (references world\province manager entries) - also refers back to owning faction (1)
    4 CAI_FACTION_SEA_REGIONS (references world\sea region manager entries) - also refers back to owning faction (1)

    Note that these directories have their own reference. BDI_COMPONENT usually identifies an entry. Also saving changes in the CAI directory to disk takes several minutes.

    Changing the owning faction of an entry in CAI_WORLD_SETTLEMENTS, CAI_FACTION_PROVINCES and CAI_FACTION_SEA_REGIONS isn't enough to make the AI construct or recruit stuff in it's proper settlements... as noted earlier. But with the new EditSF version we can see that each entry in CAI_WORLD_FACTIONS also contains three int arrays that contain references to every entry owned by that faction in directories 1-3. Changing those arrays fixed the issue, and it's possible that changing 1-3 is unnecessary as I haven't tested that solution yet.

    Anyway I made the usual "simple" switch of Brundisium and Cosentia from Rome to Epirus in this way (simple because one only has to change the ownership of a faction manager entry). With the edits above Epirus' AI constructs buildings and recruits armies and fleets in Magna Graecia just as it's supposed to. Rome's AI also acts properly and attempts no construction in MG. The only issue now seems to be the garrisons, but they are reset by turn 2 anyway.

    Also, I assume that cleaning out all these CAI references will be necessary if we wish to remove faction manager objects (to properly change province ownership).

  3. #143

    Default Re: [question] How to change a faction's starting provinces?

    Bah, it only worked until Epirus lost Appolonia so Sparta, then a repeated hard crash. Guess it could be related to sea region ownership hmm...

  4. #144

    Default Re: [question] How to change a faction's starting provinces?

    What scares me the most - it is so complicated to change and they are patching regularly. It doesn't sound fun to have to update this weekly.

    Also, I really wish they had given the same region numbers in CAI as they did in WORLD.

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

  5. #145

    Default Re: [question] How to change a faction's starting provinces?

    Yes.. first of all it's great that you were able to dig deeper and got us a little bit more understanding on how it works. But I really wonder if it's possible to do stable changes when there are so many places which have to be altered (all this back referencing stuff and differing IDs). Especially, when we think of a global scale which means changing regions for almost any faction for a mod which introduced new/other factions.
    What do you think are the chances that CA will offer some sort of tool to do what we are trying?

  6. #146
    Caki's Avatar First Consul of Thera
    Join Date
    May 2007
    Location
    Negotin, Serbia
    Posts
    655

    Default Re: [question] How to change a faction's starting provinces?

    Maybe they will if we cry hard enough :-D
    PS
    I managed to convert esf to xml last night :-D
    Proud To Be Under The Patronage Of TheFirstONeill
    Proud team member of Thera, A New Beginning

  7. #147

    Default Re: [question] How to change a faction's starting provinces?

    This is somewhat related.

    But I have a question regarding culture buildings.

    I changed Odryssian Kingdoms culture in the db/faction_tables to greek/hellenistic. This worked, and they able to build the town buildings in other settlements. However in the starting province they no longer have the town buildings and port, nothing can be built in the slots. Cant even click on these slots.

    What do I have to change?
    Supporter of Facial Hair for extra Manliness.



  8. #148

    Default Re: [question] How to change a faction's starting provinces?

    Quote Originally Posted by Caki View Post
    Maybe they will if we cry hard enough :-D
    PS
    I managed to convert esf to xml last night :-D
    Meddling tool creator? Ehem....... modding tool creator. You could ask http://www.twcenter.net/forums/membe...4956-husserlTW to take a look.

    I think he enjoys the tool making.

    'trix

  9. #149
    Caki's Avatar First Consul of Thera
    Join Date
    May 2007
    Location
    Negotin, Serbia
    Posts
    655

    Default Re: [question] How to change a faction's starting provinces?

    OK, I think this will work try this http://www.megafileupload.com/en/fil...rtpos-esf.html and tell me how it works.
    This is for those who want to have a big fat Carthage
    Proud To Be Under The Patronage Of TheFirstONeill
    Proud team member of Thera, A New Beginning

  10. #150

    Default Re: [question] How to change a faction's starting provinces?

    Sounds great. I'll test it. Would you mind sharing with us where you did what changes to make it work?

  11. #151
    Greve Af Göteborg's Avatar Protector Domesticus
    Join Date
    Oct 2007
    Location
    Sweden
    Posts
    4,558

    Default Re: [question] How to change a faction's starting provinces?

    Interesting, I'll try it.
    Edit: Everything seems to work just fine, haven't played for very long but it's very promising.

    I wonder if this could be done for the seleucids & ptolemies as well. Then we'd have some big factions right at the start of the game.
    Last edited by Greve Af Göteborg; October 16, 2013 at 01:27 PM.

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

    Default Re: [question] How to change a faction's starting provinces?

    I do not wish to hijack this thread, but I feel my question is somewhat related. Especially as you just mentioned Carthage.
    In several campaigns Carthage is overrun and it takes some of the feel for campaign away.
    So is it possible to edit save game and give Carthage back to Carthage? Thank you

  13. #153

    Default Re: [question] How to change a faction's starting provinces?

    Wow, great job Caki. I tested it and it seems to work. I can issue edicts and there is no phantom building.

    I would like to make a couple of these for my Qart-Hadast mod that gives you the option of just having NC or Libya. I think I may wait for patch 5 to delve in, since it may change the startpos yet again.

    Did you edit the region values in WORLD and CAI files? Did you do anything extra?

    @Basileos The startpos that Caki posted above gives Carthage's client states to Carthage.

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

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

    Default Re: [question] How to change a faction's starting provinces?

    Thank you I will give that a go

  15. #155
    Mary The Quene's Avatar Praeses
    Join Date
    May 2013
    Location
    Hatfield House
    Posts
    8,123

    Default Re: [question] How to change a faction's starting provinces?

    Caki can you do this for Egypt and The Seleucids?
    Veritas Temporis Filia

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

    Default Re: [question] How to change a faction's starting provinces?

    Quote Originally Posted by Aphrodite View Post
    Caki can you do this for Egypt and The Seleucids?
    I second that, or explain how it's done please

  17. #157
    Caki's Avatar First Consul of Thera
    Join Date
    May 2007
    Location
    Negotin, Serbia
    Posts
    655

    Default Re: [question] How to change a faction's starting provinces?

    I'm sorry for not replaying last night but my girlfriend hijacked my pc so... :-D. I will explain how I did it tonight when I get back from work.
    Proud To Be Under The Patronage Of TheFirstONeill
    Proud team member of Thera, A New Beginning

  18. #158

    Default Re: [question] How to change a faction's starting provinces?

    Quote Originally Posted by Caki View Post
    I'm sorry for not replaying last night but my girlfriend hijacked my pc so... :-D. I will explain how I did it tonight when I get back from work.
    This (or maybe a whole tutorial "How to change ragion's ownership") would be absolutely fantastic!

  19. #159
    Caki's Avatar First Consul of Thera
    Join Date
    May 2007
    Location
    Negotin, Serbia
    Posts
    655

    Default Re: [question] How to change a faction's starting provinces?

    OK let's get started . This won't be a tutorial because it's not something special (your gonna laugh when you read what I have done). Basically I have made a confederation of Carthage, NC and Libya then saved the game (Dresdens mod gave me the idea http://www.twcenter.net/forums/showt...-4-13%29/page4). Now you have to unpack the original startpos and your saved game (this is the esf to xml unpacking and here is the tutorial http://www.twcenter.net/forums/showt...tions-Tutorial ). There are two great powershell script written by Styrry (UnpackESF.ps1 which is on the 7th page of this thread post 122 and PackESF.ps1 which is on 6th page of this thread post 117) THANK YOU Styrry for the scripts and for helping me whit nokogiri +rep When you unpack the startpos you give that folder a name startpos and your save game lets say carthage. In the startpos folder you will finde 3 folders (compressed_data, preopen_map_info and save_game_header) and one file esf.xml. In carthage folder you will have 2 folders (compressed_data and save_game_header) and one file also esf.xml. Next go to the carthage/compressed_data folder and you will finde 32 folders and 1 file also called esf.xml. carthage\compressed_data\save_game_header folder and open it. The first 13 lines should look like this: rom_carthage UI\Portraits\portrait_PH.png 1 481 Spring data\ui\flags\Carthage 1 0 0 481 rom_politics_carthage_barcid main_rome_map Now you should edit them to this: rom_rome UI\Portraits\portrait_PH.png 1 481 Spring data\ui\flags\Rome 1 0 0 481 main_rome_map This step is maybe not needed but I still haven't tested it. Next go back to carthage/compressed_data folder and copy all folders except the esf.xml file. After this you should open the startpos/compressed_data folder and paste your copied folders. When this is done you should rename back the startpos folder to xml folder and then use the powershell script PackESF.ps1 to pack the folder back to esf format. I know this is not what you expected because there is no real editing but for now this is all we got. And yes this can be done for Seleucids also but you have to make them playable so you can manage the confederations.
    Proud To Be Under The Patronage Of TheFirstONeill
    Proud team member of Thera, A New Beginning

  20. #160

    Default Re: [question] How to change a faction's starting provinces?

    Very clever, doesn't solve the root issue but at least its a start. Thanks for explaining!

    Edit: I am going to use this process to make some Carthage options but will give you full credit. If that is okay?
    Last edited by Dresden; October 17, 2013 at 01:35 PM.

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

Posting Permissions

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