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.
Nice, seems like you're making some progress.
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.
For now the only way to give some provinces is via confederation
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?
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
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
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.
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.
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.
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
If you look at the u4_ary for each faction_province_managers you can see forPHP 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">
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
Where you able to follow the procedure in http://www.twcenter.net/forums/showt...tions-Tutorial?
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.
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.
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.![]()
I created two PowerShell scripts to help us do the unpacking and repacking until the new EditSF version is available:
UnpackESF.ps1
PackEST.ps1Code:$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
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.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
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.
Could you please tell me how to install nokogiri