How to Add Red Brick castles to a faction both in strat and battle maps
After a lot of searching i was unable to find a complete thread which allowed a m2tw modder to add teutonic type (red bricked and cone shaped) castles in both strat and battle maps to all the east european factions so i started gathering bits and pieces for fiddling with battle building models and finally in late December, 2009, i was able to incorporate this feature in my mod.
I was unable to find any tutorial which showed clearly how to do this so i thought this tutorial would serve as a worthy addition in our Mod Workshop.
So lets get down to business straightaway.
Now comes the hard part, this part of the tutorial may be difficult for novices who are not familiar with a lot of modding but i will try my best to explain it thoroughly.
The first step is easy it involves inserting of the red brick textures of the castle walls etc for the battle map, to do that go to this path:
Now make 3 more copies of the same folder and rename all the 4 folders to russia, poland, hungary & lithuania.
This is the tricky one guys but stay with me and read and understand the steps carefully and it won't be a problem at all. This step puts the new castle models for your east european factions.
1) First go the following folder of your extracted teutonic campaign:
2) Copy all the 4 folders to the following path of your mod:
:your mod\data\settlements\north_european\castles
3) In this step we learn how edit the values in ".worldpkgdesc" files. After copying the folders in your settlements\north_european\castles folder.
First open the "castle" folder in it there is a file called "tc_castle_a.worldpkgdesc" file since there are 4 east euro factions so create 3 more copies of "tc_castle_a.worldpkgdesc" file and rename the files to:
tc_castle_a.worldpkgdesc ( for poland)
tc_castle_b.worldpkgdesc ( for russia)
tc_castle_c.worldpkgdesc ( for lithuania)
tc_castle_d.worldpkgdesc ( for hungary)
Now open the "tc_castle_a.worldpkgdesc" with the xvi32(Click to Download) which is a hex editor program (to download xvi32 see the attachments). Now see the pic 1 i have attached in this thread i have marked the value
"teutonic_order" on the right hand side in red outlines replace this with "poland" and del the "ic_order" values. Now see the left hand side you will see "0E" marked in green outlines as we can see "teutonic_order" comprises of 14 characters so it understood by comman knowledge that 0E is a hex value for 14 (Decimal Form). Now the word "poland" has 6 characters so hex value for 6 is "06" thus replace 0E with 06 it is imperative that you make the changes absolutely correct otherwise you will get a CTD(crash to desktop).
Pic 1
Now open the "tc_castle_b.worldpkgdesc" with the xvi32 program. It has the same drill as mentioned above with a slight change replace teutonic_order in red with russia and replace 0E on the left hand side with 06 hex value as russia has 6 characters. Also the file name is "tc_castle_b.worldpkgdesc" don't forget to change the value from A to B (marked in dark brown in pic 2) in the TC_Castle_ line on the top right hand side. See pic 2 for russia and save changes.
Pic 2
Now open the "tc_castle_c.worldpkgdesc" with the xvi32 program. Replace teutonic_order in red with lithuania and replace 0E on the left hand side with 09 hex value as lithuania has 9 characters. Also the file name is "tc_castle_c.worldpkgdesc" don't forget to change the value from A to C (marked in yellow in pic 3) in the TC_Castle_ line on the top right hand side. See pic 3 for lithuania and save changes.
Pic 3
Now open the "tc_castle_d.worldpkgdesc" with the xvi32 program. Replace teutonic_order in red with hungary and replace 0E on the left hand side with 07 hex value as hungary has 7 characters. Also the file name is "tc_castle_d.worldpkgdesc" don't forget to change the value from A to D (marked in yellow in pic 4) in the TC_Castle_ line on the top right hand side. See pic 4 for hungary and save changes.
Pic 4
The tasks in castle folder is over now open the folder named fortress its location is:
In it there is a file called "tc_fortress_a.worldpkgdesc" since there are 4 east euro factions so create 3 more copies of "tc_fortress_a.worldpkgdesc" file and rename the files to
tc_fortress_a.worldpkgdesc ( for poland)
tc_fortress_b.worldpkgdesc ( for russia)
tc_fortress_c.worldpkgdesc ( for lithuania)
tc_fortress_d.worldpkgdesc ( for hungary)
Now open and edit all these 4 files as mentioned above by replacing teutonic_order with poland, russia, lithuania and hungary, there hex values from 0E to 06,06,09,07 respectively and don't forget to change the value TC_Fortress_A to B, C, D for russia, lithuania and hungary respectively. See pic 5 for more details.
Pic 5
The tasks in fortress folder is over now open the folder named large_castle its location is:
Same drill as above, In it there is a file called "tc_large_castle_a.worldpkgdesc" since there are 4 east euro factions so create 3 more copies of "tc_large_castle_a.worldpkgdesc" file and rename the files to:
tc_large_castle_a.worldpkgdesc ( for poland)
tc_large_castle_b.worldpkgdesc ( for russia)
tc_large_castle_c.worldpkgdesc ( for lithuania)
tc_large_castle_d.worldpkgdesc ( for hungary)
Now open and edit all these 4 files by replacing teutonic_order with poland, russia, lithuania and hungary, there hex values from 0E to 06,06,09,07 respectively and don't forget to change the value TC_Large_Castle_A to B, C, D for russia, lithuania and hungary respectively. Save changes to all the 4 edited files.
The tasks in large_castle folder is over now open the folder named stone_keep its location is:
Now this is last folder remaining do the same drill as before, In it there is a file called "tc_stone_keep_a.worldpkgdesc" since there are 4 east euro factions so create 3 more copies of "tc_stone_keep_a.worldpkgdesc" file and rename the files to:
tc_stone_keep_a.worldpkgdesc ( for poland)
tc_stone_keep_b.worldpkgdesc ( for russia)
tc_stone_keep_c.worldpkgdesc ( for lithuania)
tc_stone_keep_d.worldpkgdesc ( for hungary)
Now open and edit all these 4 files by replacing teutonic_order with poland, russia, lithuania and hungary, there hex values from 0E to 06,06,09,07 respectively and don't forget to change the value
TC_Stone_Keep_A to B, C, D for russia, lithuania and hungary respectively. Save changes to all the 4 edited files.
And we are done so to summarize the Point 3 of Step II what we have done is that we had four folders in the path "your mod\data\settlements\north_european\castles" namely castle, fortress, large_castle and stone keep. All the four folders contained 1 ".worldpkgdesc" file we created 3 more in each 4 folders i.e for four east euro factions and we edited these 16 ".worldpkgdesc" files in total so that every east euro faction had its teutonic shaped castles.
For example hungary has a total of 4 edited ".worldpkgdesc" files namely "tc_stone_keep_d.worldpkgdesc" (for a new teutonic wooden castle), "tc_castle_d.worldpkgdesc" (for a new teutonic castle ), "tc_large_castle_d.worldpkgdesc" (for a new teutonic fortress ) and "tc_fortress_d.worldpkgdesc" (for a new teutonic citadel).
Now all you have do is copy the file called "packagedb.txt" which is responsible for picking up new battle models placed inside your mod.
Copy this from this location "extracted medieval 2\teutonic\data" to "mods\your mod\data" and you are done Enjoy.
Final Result
If anyone have problems in understanding this tutorial or employing this feature in your mod feel free to ask\nag anytime.
Last edited by Ishan; August 17, 2011 at 10:51 PM.
Re: How to add teutonic castles to all the east european factions both in strat and battle maps.
could you essentially just do this for the eastern_european culture? as opposed to doing it for individual nations?
NO not for eastern_european culture.Why?It isn't possible i suppose.
It is possible for middle_eastern and south_european.
The Eastern European factions are the strangest one when it comes to modding their battle models buildings.
Because if look at the extracted vanilla or teutonic campaign and go through the folder called settlements inside data directory you will surprisingly find that only 3 folders exists i.e. south_european, north _european and middle_eastern. There is no separate folder for eastern european culture. It uses the same folder and entries given inside north_european culture.
Now i presume u have played SS mod so in it i went to this path
Stainless_Steel_6\data\settlements\north_european\castles\castle
and edited tc_castle_a.worldpkgdesc file to this
Spoiler Alert, click show to read:
And still when i loaded a campaign battle over hungary which is east_euro faction via poland the castle remained northern euro type.
So to conclude u have to do it manually for each faction explained above.
Also if you saw my pictures above in the first post u will notice that for poland for example the entry in it shows culture type northern_european which is false i know but thats the way it works. Also if for poland or any other east euro faction u change the entry in .worldpkgdesc file to eastern_european the game won't show the new castle it has to be northern_european.
Last edited by Ishan; August 26, 2010 at 03:33 AM.
Re: How to add teutonic castles to all the east european factions both in strat and battle maps.
Originally Posted by ishan6457
NO not for eastern_european culture.Why?It isn't possible i suppose.
It is possible for middle_eastern and south_european.
The Eastern European factions are the strangest one when it comes to modding their battle models buildings.
Because if look at the extracted vanilla or teutonic campaign and go through the folder called settlements inside data directory you will surprisingly find that only 3 folders exists i.e. south_european, north _european and middle_eastern. There is no separate folder for eastern european culture. It uses the same folder and entries given inside north_european culture.
Now i presume u have played SS mod so in it i went to this path
Stainless_Steel_6\data\settlements\north_european\castles\castle
and edited tc_castle_a.worldpkgdesc file to this
Spoiler Alert, click show to read:
And still when i loaded a campaign battle over hungary which is east_euro faction via poland the castle remained northern euro type.
So to conclude u have to do it manually for each faction explained above.
Also if you saw my pictures above in the first post u will notice that for poland for example the entry in it shows culture type northern_european which is false i know but thats the way it works. Also if for poland or any other east euro faction u change the entry in .worldpkgdesc file to eastern_european the game won't show the new castle it has to be northern_european.
Nice work on your part + rep, I have SS 6.2 so the factions are a little different. They have east europe with the redbrick strat models, but the battle models are still north european. Its not a large enough of an annoyance for me, to go through that hex editting, I hate hex editting. If there was a submod for SS 6.2 Id prolly DL it (hint, hint ), my fortay in modding is more focused on skins/unit battle models/scripting.
On another note I wasnt too lazy to do it. If you have SS 6.2 all the files from the teutonic campaign are already in place. (and the strat map building styles are already done). All you need to do is:
data\blockset\textures\faction_variations
copy the already present teuton faction variant for as many factions as you want.
Then copy/edit the worldpkgdesc in the settlements/northern_european folder for each added faction castletype.
I just added hungary, and it took about 5 minutes to do. EDIT: just finished for all eastern european factions. For those of you that want to add the kievan_rus the hex value for 10 is 0A.
EDIT 2: I just created a submod for SS 6.2 uploading now.
Re: How to add teutonic castles to all the east european factions both in strat and battle maps.
Well it's an honor to be of a little service to all my twcenter family members. Thank you TSD for your taking out ur valuable time and for gracious response to this post.
Edit 1 Hey TSD just checked out your link http://www.twcenter.net/forums/showthread.php?t=365340
for the SSmod really cool i'm glad that coz of my lil' tut the red castles are really on fire out there in the eastern europe .
I wish you all the best with your sub mod for the SS. It would be a great delight if this feature gets included in the future release of the SS.
Re: How to add teutonic castles to all the east european factions both in strat and battle maps.
Originally Posted by Ishan
Well it's an honor to be of a little service to all my twcenter family members. Thank you TSD for your taking out ur valuable time and for gracious response to this post.
Edit 1 Hey TSD just checked out your link http://www.twcenter.net/forums/showthread.php?t=365340
for the SSmod really cool i'm glad that coz of my lil' tut the red castles are really on fire out there in the eastern europe .
I wish you all the best with your sub mod for the SS. It would be a great delight if this feature gets included in the future release of the SS.
Didn't even think of that, I'll put a note that they can just use it in future releases.
Re: How to add teutonic castles to all the east european factions both in strat and battle maps.
This Method is not culture specific but faction specific and If u want this specifically for Norway then yes it can be done and every set of faction takes 1Kb of memory so your mod will not get heavy.
Re: How to add teutonic castles to all the east european factions both in strat and battle maps.
Well done.
"If ye love wealth greater than liberty,
the tranquility of servitude greater than
the animating contest for freedom, go
home from us in peace. We seek not
your counsel, nor your arms. Crouch
down and lick the hand that feeds you,
and may posterity forget that ye were
our countrymen."
Re: How to Add Red Brick castles to a faction both in strat and battle maps
thanks for taking the time to make this tutorial, i shall be following this latter!
i have a question first, in order to have the hre benefit from these teutonic models, is it just a case of changing them from northern european, to eastern european, in the descr_sm_factions.txt?
Re: How to Add Red Brick castles to a faction both in strat and battle maps
Ishan,
very good job. +rep
I'm brand new in modding and at present, I'm gathering as much information as I can for a project to customize some settlements.
The problem I have is that if I want to create a customised settlemernt for a specific location, then all settlement of this faction will look the same (if they have the same "nature" like small town for example). As far as I understand the problem, this is due to the worldpkgdesc file which gives the path to the settlement by faction and not by location. Anyway, while reading your tutorial, I was wondering how you found the meaning of the hex values in the worldpkgdesc file? I can't find any thread about that subject. Many thanks for your input.
Re: How to Add Red Brick castles to a faction both in strat and battle maps
Thanks mate.
And the credit for teaching me this goes to Makanyane and Mythic Commodore. I learned this when i made this thread, it has all the links and such you need.
And settlements are either based on culture or faction type. While it is possible to modify ground tiles as per locations via battle editor but that tile can't be modified if settlement is on it iirc.
Re: How to Add Red Brick castles to a faction both in strat and battle maps
Originally Posted by Lifthrasir
I'm brand new in modding and at present, I'm gathering as much information as I can for a project to customize some settlements.
The problem I have is that if I want to create a customised settlemernt for a specific location, then all settlement of this faction will look the same (if they have the same "nature" like small town for example). As far as I understand the problem, this is due to the worldpkgdesc file which gives the path to the settlement by faction and not by location. Anyway, while reading your tutorial, I was wondering how you found the meaning of the hex values in the worldpkgdesc file? I can't find any thread about that subject. Many thanks for your input.
IWTE tool supports editing the worldpkgdesc file without the need for hex editing (though it is a pretty simple file)
Re: How to Add Red Brick castles to a faction both in strat and battle maps
excellent tutorial, highly recommended, it took me about 20 minutes to get it fully working thanks to this easy to follow tutorial!
i've checked all the settlements, wooden castle, castle, fortress and the citadel, they're all good, but they have no buildings in them! Like in vanilla you get some houses and a bowyer etc, but in these teutonic ones there' nothing apart from paving, are they supposed to be like this, or are there extra files for this?
Re: How to Add Red Brick castles to a faction both in strat and battle maps
thanks! i must admit that although i've had the kingdoms expansion since it was released, i've never played the teutonic campaign or any of the others!