Page 6 of 12 FirstFirst 123456789101112 LastLast
Results 101 to 120 of 227

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

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

    Quote Originally Posted by Lord Mongsworth View Post
    Yes you have changed the faction number but you HAVEN'T changed the actual system byte entry... it's still left there saying that the province is essentially split in two and therefore one faction does not own it and cannot issue edicts.

    General WVPM if you manage to change the system byte entry in the startpos file and nothing changes then i'll believe you. Until then we're all just making educated guesses. You can't definitively say that the system__byte entry should NOT be the problem. Unless you know something we don't?

    You'll notice under Egypt's entry that the system byte number corresponds correctly and there is only ONE faction entry for the province, hence edicts can be issued.

    Take Africa for example. If you could delete Libya's entry and change Carthage's system byte entry to 4 instead of 1 I would be interested to see the result.

    There is also an entry in the faction array corresponding to the total amount of provinces owned by the faction and another specifying the capital. Sadly changing them has no effect...
    you could try to give a whole province to a faction, but it would require the province to be unified at start, like egypt.
    the problem with egypt is that they have their capital there and that results in problems....
    PS: deleting armies=CTD

  2. #2

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

    the system_byte should NOT be the problem.
    I've given all of nova carthagian mauritiania to carthage and changed the ownership of the system byte to carthage, still didnt work.

  3. #3

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

    Quote Originally Posted by General WVPM View Post
    the system_byte should NOT be the problem.
    I've given all of nova carthagian mauritiania to carthage and changed the ownership of the system byte to carthage, still didnt work.
    So there is another value governing ownership. Maybe some trial and error changing the various values under world/faction array/faction? There are a ton of numbers and true/false entries there with no explanation of what they are. For example, one of the numbers designates the faction as a client state to another faction.

  4. #4
    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?

    Nice, seems like you're making some progress.

  5. #5

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

    So it looks like in patch 4 beta they gave Carthage the Balearic Isles. I wonder if we can see what values they changed to get an idea on what we are missing.

    Edit: I was wrong, they didn't give them the Balearics. It just looks like Carthage starts with the islands on the faction select screen...weird.
    Last edited by Dresden; October 04, 2013 at 01:12 PM.

  6. #6
    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?

    For now the only way to give some provinces is via confederation
    Proud To Be Under The Patronage Of TheFirstONeill
    Proud team member of Thera, A New Beginning

  7. #7

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

    To create an alternative scenario the confederation solution won't really work. How can we proceed in this matter? Do we need to wait until the System.Byte arrays can be edited with EditSF?

  8. #8

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

    For whatever reason I cannot edit my post - so sorry for this follow-up.

    From my side, I claim the garrison army is not the issue:
    I saved the game on the first turn and checked the Army Array of the faction whose region I took -> All Garrison Army Arrays are moved from the faction I took the region to my own Army Array.

    My status:
    - I do not experience ghost AI buidings
    - I am not able to raise forces in the regions i "took"
    - I am not able to start edicts in provinces I control due to "taking" of regions

  9. #9

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

    Ok guys... I'm one step further I guess.
    I'm trying to give Italia to Rome from the Etruscans (Velathri + Ariminum). I changed the regions owner ID from 26 (etrus) to 2 (rome) and got the region. There are 2 faction_province_manager: one with 2 and one with 26 (each with System.Byte[2]). I changed the 26 to a 2 here as well.
    However, for me this doesn't allow any recruiting of armies.

    Now I checked a savegame where I took Velathri with my army. Now if you look at the faction_province_manager you see
    1) faction_province_manager with rome's ID (2) has a System.Byte[3]
    2) faction_province_manager with rome's ID (26) has a System.Byte[1]

    So now as we know that System.Byte[x] is a byte array with x entries, my conclusion is that in this byte array the entries are region numbers. Telling whose faction's province manager may recruit/manage a region.

    Conclusions:
    1) If we delete a faction_province_manager we CTD -> makes sense since there is only one province_manager having to regions - game "wonders" where the other 2 regions are and crashes
    2) If we change the owner of one faction_province_manager to such that both have the same ID the game doesn't crash but anyway we are in a state that in normal cases would never happen (if all regions are owned by one faction only one faction manager with System.Byte[4] will be in the province)
    3) Ultimate Conclusion:
    - Until EditSF allows to look into System.Byte[x] and allows us to change the entries and their sizes we can't solve this issue
    - as soon as we can edit the System.Byte[x] we can delete one province manager, make a System.Byte[4] in the other and add the region's IDs in there

  10. #10

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

    I can switch the provinces, but I still get phantom building from the previous faction and can't issue edicts.

    Someone said they got the phantom building to stop, but I am not sure how.

  11. #11

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

    I am able to raise forces, but I still get the AI ghost building. I can't figure out how to stop that. I edited the various values in Region array, the building manager values, the province manager and even the sea province ownership values.

  12. #12

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

    That's really strange. I wonder which is the trigger to raise the forces. However, there might be differences in all out results (I for example don't experience the ghost AI) because we put the game into a state that usually doesn't exist. If you look in your savegames where you have conquered provinces during your gameplay, you will always only find one faction_province_manager. So I assume having two with the same faction ID (what we are forcing) should never happen.

  13. #13

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

    Hey there,
    thanks to daniu, who pointed me to a esf2xml converter in which I am able to look into the System.Byte[x] I was able to confirm my assumptions!!
    I converted the vanilla startpos.esf to xml and checked the faction_province_manager
    PHP Code:
    <rec type="PROVINCE_ARRAY">
        <
    asc>rome_main_italia</asc>
        <
    rec type="PROVINCE" version="2">
         <
    u>8</u>
         <
    ary type="FACTION_PROVINCE_MANAGER_ARRAY">
          <
    rec type="FACTION_PROVINCE_MANAGER_ARRAY">
           <
    rec type="FACTION_PROVINCE_MANAGER" version="6">
            <
    u>19</u>
            <
    u>2</u>
            <
    u4_ary>1 92</u4_ary>
            <
    rec type="RECRUITMENT_MANAGER" version="1">
             <
    u>19</u>
             <
    ary type="RECRUITMENT_ITEM_ARRAY"/>
            </
    rec>
            <
    rec type="FACTION_PROVINCE_PUBLIC_ORDER" version="1">
             <
    rec type="FACTION_PROVINCE_PUBLIC_ORDER_FACTORS" version="2">
              <
    i>0</i>
              <
    i>0</i>
              <
    i>0</i>
              <
    i>0</i>
              <
    i>0</i>
             </
    rec>
             <
    rec type="FACTION_PROVINCE_PUBLIC_ORDER_INFO">
              <
    i>0</i>
              <
    i>0</i>
              <
    i>0</i>
              <
    i>0</i>
              <
    i>100</i>
              <
    i>-100</i>
              <
    i>3</i>
              <
    i>0</i>
             </
    rec>
             <
    i>0</i>
             <
    asc/>
             <
    asc/>
            </
    rec>
            <
    rec type="PROVINCE_DEVELOPMENT" version="1">
             <
    u>5</u>
             <
    u>0</u>
            </
    rec>
            <
    no/>
            <
    rec type="CAMPAIGN_EFFECT_BUNDLES" version="1">
             <
    ary type="EFFECT_BUNDLE_BLOCK"/>
            </
    rec>
            <
    asc/>
            <
    asc/>
           </
    rec>
          </
    rec>
          <
    rec type="FACTION_PROVINCE_MANAGER_ARRAY">
           <
    rec type="FACTION_PROVINCE_MANAGER" version="6">
            <
    u>20</u>
            <
    u>26</u>
            <
    u4_ary>166 132</u4_ary>
            <
    rec type="RECRUITMENT_MANAGER" version="1">
             <
    u>20</u>
             <
    ary type="RECRUITMENT_ITEM_ARRAY"/>
            </
    rec>
            <
    rec type="FACTION_PROVINCE_PUBLIC_ORDER" version="1">
             <
    rec type="FACTION_PROVINCE_PUBLIC_ORDER_FACTORS" version="2">
              <
    i>0</i>
              <
    i>0</i>
              <
    i>0</i>
              <
    i>0</i>
              <
    i>0</i>
             </
    rec>
             <
    rec type="FACTION_PROVINCE_PUBLIC_ORDER_INFO">
              <
    i>0</i>
              <
    i>0</i>
              <
    i>0</i>
              <
    i>0</i>
              <
    i>100</i>
              <
    i>-100</i>
              <
    i>3</i>
              <
    i>0</i>
             </
    rec>
             <
    i>0</i>
             <
    asc/>
             <
    asc/>
            </
    rec>
            <
    rec type="PROVINCE_DEVELOPMENT" version="1">
             <
    u>2</u>
             <
    u>0</u>
            </
    rec>
            <
    no/>
            <
    rec type="CAMPAIGN_EFFECT_BUNDLES" version="1">
             <
    ary type="EFFECT_BUNDLE_BLOCK"/>
            </
    rec>
            <
    asc/>
            <
    asc/>
           </
    rec>
          </
    rec>
         </
    ary>
         <
    rec type="PROVINCE_MERCENARY_POOL" version="1">
          <
    rec type="MERCENARY_POOL" version="1">
           <
    ary type="MERCENARY_POOL_UNIT_ARRAY">
            <
    rec type="MERCENARY_POOL_UNIT_ARRAY">
             <
    asc>Mer_Ill_Heavy_Galley</asc>
             <
    u>0</u>
             <
    flt>0.1</flt>
             <
    u>1</u>
             <
    u>1</u>
            </
    rec>
            <
    rec type="MERCENARY_POOL_UNIT_ARRAY">
             <
    asc>Mer_Ita_Cav</asc>
             <
    u>0</u>
             <
    flt>0.05</flt>
             <
    u>2</u>
             <
    u>1</u>
            </
    rec>
            <
    rec type="MERCENARY_POOL_UNIT_ARRAY">
             <
    asc>Mer_Ita_Spear</asc>
             <
    u>1</u>
             <
    flt>0.1</flt>
             <
    u>3</u>
             <
    u>1</u>
            </
    rec>
           </
    ary>
          </
    rec>
         </
    rec>
         <
    ary type="FACTION_PROVINCE_MANAGER_INFO_ARRAY"/>
        </
    rec>
       </
    rec>
       <
    rec type="PROVINCE_ARRAY"
    If you look at the u4_ary for each faction_province_managers you can see for
    ROME
    <u>2</u>
    <
    u4_ary>1 92</u4_ary>

    where when looking at the region arrays: 1=rom_italia_latium and 92=rom_italia_samnium
    ETRUSC
    <u>26</u>
    <
    u4_ary>166 132</u4_ary>

    where 166=rom_italia_picenum and 132=rom_italia_etruria

    After looking into it I'm 99% sure that we can change region ownership properly when we edit the System.Byte[x] in the correct way. However, editing the XML compressing back and so on is too cumbersome for me, so I will wait until the feature is available in EditSF. If some of you guys are diligent, feel free to to try it out and let us know. The tool required can be found here: https://github.com/taw/etwng/tree/master/esfxml

  14. #14

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

    Where you able to follow the procedure in http://www.twcenter.net/forums/showt...tions-Tutorial?

  15. #15

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

    I'm currently working on it. As posted above I'm able to decode the esf with the tools mentioned. Even though I think I'm rather near to the goal I find using "esf2xml -> unpack compressed file -> esf2xml -> change stuff -> xml2esf -> pack -> xml2esf" not very appealing as I expect I will go through quite a few iteration of changes.
    As daniu seems to be very close to a EditSF allowing the editing of System.Bytes[], I will wait for the release of the new version. If this would delay for any reason however, I'd write a script doing the previously mentioned procedure of decoding/unpacking/... for me on the weekend to go forth in this matter.

  16. #16

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

    It will be interesting to pursue this however this mod effectively bypasses the issue - http://www.twcenter.net/forums/showt...pdated-10-4-13)
    I have used it on patch 3.

  17. #17

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

    Quote Originally Posted by trk View Post
    It will be interesting to pursue this however this mod effectively bypasses the issue - http://www.twcenter.net/forums/showt...pdated-10-4-13)
    I have used it on patch 3.
    My mod bypasses it only if you are playing as Carthage. The AI won't really take advantage of it.

    Hopefully someone will figure out this process because many overhaul mods in the future will require this change.

  18. #18

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

    Sounds like you are getting close! Awesome work.

    The only problem is with CA patching constantly right now, keeping the startpos up to date is going to be a pain in the rear.

  19. #19

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

    I created two PowerShell scripts to help us do the unpacking and repacking until the new EditSF version is available:

    UnpackESF.ps1
    Code:
    $esfdir = "d:\modding\ESFviaXML"
    $esfname = "\startpos_remove_etrus.esf"
    $esfxmldir = "d:\modding\ESFviaXML\etwng-master\esfxml"
    $tempdir = "d:\modding\ESFviaXML\temp"
    
    $currpwd = pwd
    cd $esfxmldir
    
    jruby --server $esfxmldir/esf2xml $esfdir/startpos_remove_etrus.esf $tempdir/xml
    ./lzma d $tempdir/xml/compressed_data.esf.xz $tempdir/xml/compressed_data.esf
    rm $tempdir/xml/compressed_data.esf.xz
    jruby --server ./esf2xml $tempdir/xml/compressed_data.esf $tempdir/xml/compressed_data
    rm $tempdir/xml/compressed_data.esf
    
    cd $currpwd
    PackEST.ps1
    Code:
    $esfdir = "d:\modding\ESFviaXML"
    $esfname = "\startpos_repack.esf"
    $esfxmldir = "d:\modding\ESFviaXML\etwng-master\esfxml"
    $tempdir = "d:\modding\ESFviaXML\temp"
    
    $currpwd = pwd
    cd $esfxmldir
    
    cp -r $tempdir\xml $tempdir\packdir
    jruby --server .\xml2esf $tempdir\packdir\compressed_data $tempdir\packdir\compressed_data.esf
    rm -r $tempdir\packdir\compressed_data\
    .\lzma e $tempdir\packdir\compressed_data.esf $tempdir\packdir\compressed_data.esf.xz 
    rm $tempdir\packdir\compressed_data.esf
    jruby --server .\xml2esf $tempdir\packdir $esfdir$esfname
    rm -r $tempdir\packdir
    
    cd $currpwd
    When you installed the toolchain from http://www.twcenter.net/forums/showt...tions-Tutorial you can use UnpackESF.ps1 to extract the xml files from the specified .esf. After that, edit the xml as desired and use PackESF.ps1 to create a .esf of your altered files.
    Sadly slow as hell, but should do the trick for now .

    Didn't have time to mess around the factions yet but will continue tomorrow.

  20. #20
    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?

    Could you please tell me how to install nokogiri
    Proud To Be Under The Patronage Of TheFirstONeill
    Proud team member of Thera, A New Beginning

Posting Permissions

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