CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
In this official tutorial I want to say how we can change a settlement position & move a settlement to another position in campaign map.
Needed tools:
1. ESFXML packer/unpacker by dear taw & good description of dear Dresden. This codding tool is needed to unpack startpos.esf details to separated parts in .xml format that is so easier to edit by notepad++ freeware. Follow the descriptions of Dresden to unpack the startposes to xmls
2. SAVEPARSER, this tool in spite of its name can parse also startpos.esf by switch it to it via file part of the tool although can't do this for Shogun2TW. This tool allows you to find correct & accurate coordinates position in campaign map.
3. ESF EDITOR v1.1.1. This tool is needed if you don't want to use esf unpacker to edit the values.
that's all.
START
now imagine we want to take (Siraf) city in Attila TW to (Gor) city position in Rome II TW.
To do this, first we should unpack both of startposes or open them in esf editor, now go here if you unpack them:
startposunpacked\xmla\compressed_data\region_slot\settlement-att_reg_persis_siraf.xml
open the xml file you now see all of the values are parsed by tool & easy to edit them, but if you dont use unpacker & use esf editor should go here:
compressed_data/campaign_env/campaign_model/world/region_manager/regions_array/regions_array/region/settlement/settlement_expansion_manager/settlement_expansion_map_data
Siraf in Attila startpos is REGIONS_ARRAY - 0 & Gor in Rome II is REGIONS_ARRAY - 56, you could find array indexes easily via Saveparser tool.
Now, if you use esf unpacker you should copy & paste all of Gor values matched with Siraf parameters definition, if you want to copy whole of the values &
paste them with Siraf values make sure that you fix all versions, because Attila esf has different version from Rome II so you should put correct versions in xml unless the tool can't create the esf, but if you use esf editor you should copy & paste all of the values from Gor to Siraf one by one.
The sprwals are so many in spite of Warhammer & they are related to type of settlement building slots, so if the settlement is a province capital so the sprwals are more & the more slots, the more sprwals, so if the sprawls aren't matched or you want to increase the building slots you could add more sprawls by right click & duplicate it & add your ideal coordinates or copy a sprawl in unpacker & paste a new one
Now when you changed the values & coordinates & save your work, you need to edit also map_data.esf to change also the settlement info which is appeared on the settlements.
To this you need go here for Attila: data.pack\campaign_maps\main_attila_map\map_data.esf.
The unpacker can't parse this type of esf, it could only work on startposes, so you need the esfeditor to do this part. Now go here in the file:
REGIONS_DATA\REGIONS_BLOCK\REGIONS_BLOCK - 142(for Siraf only)\REGION_DATA\SETTLEMENT_INFO\SLOT_ARRAY_BLOCK
Now you should go here for Rome II:
data_rome2.pack\campaign_maps\main_rome_map\map_data.esf
now here:
REGIONS_DATA\REGIONS_BLOCK\REGIONS_BLOCK - 135(for Gor only)\REGION_DATA\SETTLEMENT_INFO\SLOT_ARRAY_BLOCK
You could find these parameter definitions easily because they are arrayed like Alphabet according to provinces name.
You need to copy & paste all values in SLOT_ARRAY_BLOCK, when finished you should remove the both PORT_POSITIONS_BLOCK & PORT_AREA_BLOCK, because Siraf want to be like Gor which hasn't any port, now save you changes.
Then you should use unpacker to remove the port building of Siraf by deleting all of the definitions for it in parsed esf to this you should go to att_reg_persis_siraf-1.xml file included in region_slot in parsed files of Attila & copy & paste all needed definitions in att_reg_persis_siraf-3.xml which is a blank slot of the settlement:
NEEDED DEFINITIONS TO BLANK THE SLOT |
<rec type="REGION_BUILDING_MANAGER" version="3">
<u>4</u>
<no/>
<asc/>
<u>0</u>
<no/>
<no/>
<no/>
</rec>
<asc>att_reg_persis_siraf:3</asc>
<asc>att_minor_dyes</asc>
<asc>secondary</asc>
<v2 x="0.0" y="0.0"/>
<u2>0</u2>
<u2>0</u2>
<v2 x="0.0" y="0.0"/>
<u2>0</u2>
<u2>0</u2>
<i>0</i>
<i>3</i>
<no/>
<i>-1</i>
<i>1</i>
<u>4294967295</u>
<u>0</u>
<no/>
<no/>
<no/>
</rec>
</rec>
|
or delete the file & edit the blank slot file number to be matched to other slot numbers, or put a new non-port building if you use esfeditor in its above address in startpos.esf REGION_SLOT_MANAGER\REGION_SLOT_ARRAY\REGION_SLOT_ARRAY - 1\REGION_SLOT (here you should change the rom_minor_port to rom_minor_secondary & port to secondary only & in REGION_BUILDING_MANAGER\BUILDING_BASE change the port building to something like att_bld_all_agriculture_generic_1 building & then save the changes & pack the esf.
If the new esf created by unpacker is bigger or smaller than previous one it is due to compression process, so don't worry.
That's all!
I hope more improvements for campaign map modding & CA gives campaign map designers raw files of map like Shogun 2 TW to have many better mods
Re: CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
Fantastic tutorial! I'll +rep you tomorrow when my counter resets. :thumbsup2
Re: CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
You sir are a madman. Good stuff.
Re: CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
Amazing, thanks for the tutorial.
Re: CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
THANKS A THOUSAND TIMES for this +rep
Re: CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
Awesome! Now we have to solve the other mysteries: adding/removing cities, changing borders, adding/removing regions, adding/changing music and sounds, and how to get the stupid custom winter terrain textures to work.
Re: CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
Quote:
Originally Posted by
Slytacular
Awesome! Now we have to solve the other mysteries: adding/removing cities, changing borders, adding/removing regions, adding/changing music and sounds, and how to get the stupid custom winter terrain textures to work.
So changing borders: I almost believe it is changeable only in a file with .pbd format (campaign_maps\display\borders\borders.pbd) it is a compiled file by CA's BoB & needs decompiling, I believe it was in cs2 format like Shogun2 campaign map files in its assembly kit which are changed to rigid_spline by BoB, but CA did another work for Rome2/Attila which seems the cs2 file changed to a pbd file & compiled. Any idea to open & edit that file?? I tried so much but couldn't do then.
So add/remove cities/regions becomes possible when we could solve the mystery of region borders!
Re: CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
This is wonderful - Do you know if you can change a city, to a port? We may use this for the Ancient Empires mod.
Re: CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
Quote:
Originally Posted by
Slytacular
and how to get the stupid custom winter terrain textures to work.
The guy behind this mod might know. http://steamcommunity.com/sharedfile...?id=1278672341
Re: CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
I was under the impression that the AI does not see the new settlement location? Basically you can't edit the underlying hardcoded AI logic for the campaign map as far as I understood the situation.
Re: CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
Quote:
Originally Posted by
Dresden
I was under the impression that the AI does not see the new settlement location? Basically you can't edit the underlying hardcoded AI logic for the campaign map as far as I understood the situation.
That was a concern of mine as well. Like, will this work with the AI, or trade routes, etc.? It's a cool first step though.
Re: CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
Quote:
Originally Posted by
UMCenturion
This is wonderful - Do you know if you can change a city, to a port? We may use this for the Ancient Empires mod.
Yeah u could use it bro, yea i can change, it is so much easy to me then.
Quote:
Originally Posted by
Dresden
I was under the impression that the AI does not see the new settlement location? Basically you can't edit the underlying hardcoded AI logic for the campaign map as far as I understood the situation.
So actually there is another edit in startpos.esf makes AI could find better the new position, a special easy edit for AI, I'll update the post soon then, but basically it can find new position, but about the roads, seem not to have impossible modding, although we have a trade routes definition in startpos.esf & another in campaign maps.
Re: CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
Quote:
Originally Posted by
asadyan
So changing borders: I almost believe it is changeable only in a file with .pbd format (campaign_maps\display\borders\borders.pbd) it is a compiled file by CA's BoB & needs decompiling, I believe it was in cs2 format like Shogun2 campaign map files in its assembly kit which are changed to rigid_spline by BoB, but CA did another work for Rome2/Attila which seems the cs2 file changed to a pbd file & compiled. Any idea to open & edit that file?? I tried so much but couldn't do then.
So add/remove cities/regions becomes possible when we could solve the mystery of region borders!
Awesome work - now to figure out what the heck is going on with the borders!
Re: CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
This definitely deserves a front page announcement.
Re: CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
Post it here and it'll be spread to like 20 different forums, and a front page announcement eventually. Or just do a front page announcement here.
Re: CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
Re: CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
Quote:
Originally Posted by
Malcolm
Awesome work - now to figure out what the heck is going on with the borders!
Just reposted:
Quote:
Originally Posted by
asadyan
So changing borders: I almost believe it is changeable only in a file with .pbd format (campaign_maps\display\borders\borders.pbd) it is a compiled file by CA's BoB & needs decompiling, I believe it was in cs2 format like Shogun2 campaign map files in its assembly kit which are changed to rigid_spline by BoB, but CA did another work for Rome2/Attila which seems the cs2 file changed to a pbd file & compiled. Any idea to open & edit that file?? I tried so much but couldn't do then.
So add/remove cities/regions becomes possible when we could solve the mystery of region borders!
Re: CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
The FPA is now up. Prepare to become famous.
Re: CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
If adding/removing cities and changing of borders becomes possible, I will probably mod this game.
Re: CHANGE SETTLEMENT POSITION (by asadyan/son of persia)
This is awesome news, good job