Page 1 of 2 12 LastLast
Results 1 to 20 of 26

Thread: How to Add Red Brick castles to a faction both in strat and battle maps

  1. #1

    Default 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.


    Part I- Adding teutonic castles to east european factions in strat map of your grand campaign:
    Firstly i'm going to explain how to give all east european factions wooden castles, castles & citadels on strat\campaign maps which is very easy if you familiar with a little bit of modding.

    In M2TW East Europe comprises of factions named Russia, Poland, Hungary & Lithuania.

    For adding this feature in your mod you should first have an extracted copy teutonic kingdoms campaign.
    Now go open your extracted teutonic campaign and browse through this path:
    :extracted medieval 2\teutonic\data\models_strat\residences\faction_variants\teutonic_order

    In the given path you shall find 4 .cas model files namely
    1. northern_european_castle.cas (model for Wooden castle in strat map of your campaign)
    2. northern_european_fortress.cas (model for Citadel in strat map of your campaign)
    3. northern_european_large_castle.cas (model for Fortress in strat map of your campaign)
    4. northern_european_stone_keep.cas (model for wooden castle in strat map of your campaign)

    Also there will be a folder named "textures" in the very directory which contains 3 .tga files used by the above mentioned .cas files.
    1. ne_wood_castle.tga
    2. teutonic_stone_castle.tga
    3. teutonic_stone_fort.tga

    Now copy this entire 'teutonic_order' folder in your medieval 2 mod in the exact path given below:
    :your mod\data\models_strat\residences\faction_variants

    After that make 3 more copies of this folder (teutonic_order) which you just copied in the faction_variants folder of your mod and rename these folders to russia, poland, hungary & lithuania.

    Now start your grand campaign and you will see all the castles which have faction_creator a east european faction in the descr_strat.txt file will now all be teutonic castles which now has a more authentic east euro look.
    Result I



    Part II- Adding teutonic castles to east european factions in Battle maps of your grand campaign:
    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.

    Step-I 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:
    :extracted medieval 2\teutonic\data\blockset\textures\faction_variations
    In it you will see a folder called teutonic_order which is exactly we want. Inside the folder are the following 12 files and a folder named winter:
    1. ambient_limestone.texture
    2. ambient_limestone_normal.texture
    3. ambient_thatch.texture
    4. ambient_thatch_normal.texture
    5. ambient_tudor.texture
    6. ambient_tudor_normal.texture
    7. walls_castle_large_stone.texture
    8. walls_castle_large_stone_normal.texture
      Inside folder named winter are the following files:
    9. ambient_limestone.texture
    10. ambient_thatch.texture
    11. ambient_tudor.texture
    12. walls_castle_large_stone.texture


    Now copy this entire teutonic_order folder in your medieval 2 mod exactly mentioned in the path given below
    :your mod\data\blockset\textures\faction_variations

    Now make 3 more copies of the same folder and rename all the 4 folders to russia, poland, hungary & lithuania.

    Step-II 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:
    :extracted medieval 2\teutonic\data\settlements\north_european\castles
    It contains four folders namely
    • castle
    • fortress
    • large_castle
    • stone_keep


    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:
    :your mod\data\settlements\north_european\castles\fortress
    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:
    :your mod\data\settlements\north_european\castles\large_castle.
    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:
    :your mod\data\settlements\north_european\castles\stone_keep.

    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).


    Step III 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.

  2. #2
    TSD's Avatar Ordinarius
    Join Date
    May 2008
    Location
    Chicago, IL
    Posts
    725

    Default 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?

  3. #3

    Default 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.

  4. #4
    TSD's Avatar Ordinarius
    Join Date
    May 2008
    Location
    Chicago, IL
    Posts
    725

    Default Re: How to add teutonic castles to all the east european factions both in strat and battle maps.

    Quote Originally Posted by ishan6457 View Post
    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.

    http://www.twcenter.net/forums/showthread.php?t=365340

    I gave a shout out to your tutorial.


    Last edited by Ishan; August 16, 2011 at 11:31 PM. Reason: Added Spoiler

  5. #5

    Default 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.
    Last edited by Ishan; June 09, 2010 at 04:07 AM.

  6. #6
    TSD's Avatar Ordinarius
    Join Date
    May 2008
    Location
    Chicago, IL
    Posts
    725

    Default Re: How to add teutonic castles to all the east european factions both in strat and battle maps.

    Quote Originally Posted by Ishan View Post
    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.

  7. #7

    Default Re: How to add teutonic castles to all the east european factions both in strat and battle maps.

    Didn't even think of that, I'll put a note that they can just use it in future releases.
    That's one way to go bro.
    Good Luck

  8. #8
    Kahvipannu's Avatar Bring me Solo & wookie
    Join Date
    May 2009
    Location
    Finland
    Posts
    3,671

    Default Re: How to add teutonic castles to all the east european factions both in strat and battle maps.

    Hi, first of all, BIG thanks for this +rep
    But is there anyway to add these casstles to Nord_culture, for example norway?

  9. #9

    Default 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.

  10. #10
    Kahvipannu's Avatar Bring me Solo & wookie
    Join Date
    May 2009
    Location
    Finland
    Posts
    3,671

    Default Re: How to add teutonic castles to all the east european factions both in strat and battle maps.

    Hmm, for some reason it didn't work, but I'll try again, checking all changes again. Thanks, I'll report back

  11. #11
    Opifex
    Join Date
    Feb 2005
    Location
    New York, USA
    Posts
    15,154

    Default 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."
    -Samuel Adams

  12. #12

    Default Re: How to add teutonic castles to all the east european factions both in strat and battle maps.

    Thanks

  13. #13

    Default 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?

    thankyou!


  14. #14

    Default Re: How to Add Red Brick castles to a faction both in strat and battle maps

    This tutorial is based on faction variant factor in the pkg fies so it has nothing to do with the culture and descr_sm_factions.txt file.

  15. #15
    Lifthrasir's Avatar "Capre" Dunkerquois
    Patrician Moderator Emeritus

    Join Date
    Jan 2010
    Location
    City of Jan Baert
    Posts
    13,950
    Blog Entries
    4

    Default 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.

  16. #16

    Default 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.

  17. #17
    wilddog's Avatar Paintedwolves run free
    Join Date
    Jan 2005
    Location
    UK
    Posts
    2,337

    Default Re: How to Add Red Brick castles to a faction both in strat and battle maps

    Quote 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)

  18. #18

    Default 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?

    thankyou..


  19. #19

    Default Re: How to Add Red Brick castles to a faction both in strat and battle maps

    There are supposed to be like this, check the Teutonic campaign to confirm.

  20. #20

    Default 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!


Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

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