Results 1 to 4 of 4

Thread: Portugal: Make Knights Templar playable

  1. #1

    Default Portugal: Make Knights Templar playable

    Hi guys,

    amazing community here. Thanks so much for the great work.

    I recently discovered that there is Linux support for M2TW. So I bought it (again) and installed. All works fine. Amazing!

    Question: The Knights Templar are not playable for Portugal. What I have to edit to make them playable (in the big campaign) just as they are for most of the other factions? (So just let the guild house event happen.)

    Thanks!

  2. #2

    Default Re: Portugal: Make Knights Templar playable

    First thing you will need to do, if you haven't already, is unpack the game so you have access to the files you need to edit.

    It sounds like you're trying to make the Knights Templar unit available to the Portugal faction in the vanilla grand campaign. To do this, open export_descr_units with a suitable text editor (Notepad++, Programmer's Notepad, etc., don't use regular Notepad if you have that installed on Linux for some reason), and find the Knights Templar entry. On the 'ownership' line, add portugal to the list.

    Code:
    ownership        england, scotland, france, denmark, milan, venice, papal_states, sicily, poland, hungary, portugal
    Then, looking at the line, armour_ug_models, we see that the unit has two visual appearances: Knights_Templar and Knights_Templar_ug1. We also check if the unit has any officers and we see that it does not. Now we need to search for these entries in battle_models.modeldb and add texture references for portugal so the unit won't look like silver surfers for Portugal. It will be easier to edit this file if you use the formatted version.

    Add texture references for the body and attachments sections for both entries, remember to increment the number of entries in all sections by +1. It looks like this unit uses different textures for different factions (which is not uncommon in vanilla). I have simply used Sicily's textures for Portugal here. If you want to make your own Portugal textures for this unit, you will need Modeler's Toolbox to convert .dds to .texture and a suitable image editor such as Gimp or Photoshop, but that is the subject of a whole tutorial. For now, we'll just use Sicily's textures.

    Spoiler Alert, click show to read: 

    Code:
    15 knights_templar 
    1 4 
    59 unit_models/_Units/EN_Lmail_Hmail/knights_templar_lod0.mesh 121 
    59 unit_models/_Units/EN_Lmail_Hmail/knights_templar_lod1.mesh 900 
    59 unit_models/_Units/EN_Lmail_Hmail/knights_templar_lod2.mesh 2500 
    59 unit_models/_Units/EN_Lmail_Hmail/knights_templar_lod3.mesh 6400 
    11
    8 portugal
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    46 unit_sprites/sicily_Knights_Templar_sprite.spr 
    7 england 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    47 unit_sprites/england_Knights_Templar_sprite.spr 
    8 scotland 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    48 unit_sprites/scotland_Knights_Templar_sprite.spr 
    6 france 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    46 unit_sprites/france_Knights_Templar_sprite.spr 
    7 denmark 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    47 unit_sprites/denmark_Knights_Templar_sprite.spr 
    5 milan 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    45 unit_sprites/milan_Knights_Templar_sprite.spr 
    6 venice 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    46 unit_sprites/venice_Knights_Templar_sprite.spr 
    12 papal_states 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    52 unit_sprites/papal_states_Knights_Templar_sprite.spr 
    6 sicily 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    46 unit_sprites/sicily_Knights_Templar_sprite.spr 
    6 poland 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    46 unit_sprites/poland_Knights_Templar_sprite.spr 
    7 hungary 
    73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_templar.texture 
    81 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_crusader_normal.texture 
    47 unit_sprites/hungary_Knights_Templar_sprite.spr 
    11
    8 portugal
    67 unit_models/AttachmentSets/Final Heater Special_sicily_diff.texture
    67 unit_models/AttachmentSets/Final Heater Special_sicily_norm.texture 0
    7 england 
    68 unit_models/AttachmentSets/Final Heater Special_england_diff.texture 
    68 unit_models/AttachmentSets/Final Heater Special_england_norm.texture 0  
    8 scotland 
    69 unit_models/AttachmentSets/Final Heater Special_scotland_diff.texture 
    69 unit_models/AttachmentSets/Final Heater Special_scotland_norm.texture 0  
    6 france 
    67 unit_models/AttachmentSets/Final Heater Special_france_diff.texture 
    67 unit_models/AttachmentSets/Final Heater Special_france_norm.texture 0  
    7 denmark 
    68 unit_models/AttachmentSets/Final Heater Special_denmark_diff.texture 
    68 unit_models/AttachmentSets/Final Heater Special_denmark_norm.texture 0  
    5 milan 
    66 unit_models/AttachmentSets/Final Heater Special_milan_diff.texture 
    66 unit_models/AttachmentSets/Final Heater Special_milan_norm.texture 0  
    6 venice 
    67 unit_models/AttachmentSets/Final Heater Special_venice_diff.texture 
    67 unit_models/AttachmentSets/Final Heater Special_venice_norm.texture 0  
    12 papal_states 
    73 unit_models/AttachmentSets/Final Heater Special_papal_states_diff.texture 
    73 unit_models/AttachmentSets/Final Heater Special_papal_states_norm.texture 0  
    6 sicily 
    67 unit_models/AttachmentSets/Final Heater Special_sicily_diff.texture 
    67 unit_models/AttachmentSets/Final Heater Special_sicily_norm.texture 0  
    6 poland 
    67 unit_models/AttachmentSets/Final Heater Special_poland_diff.texture 
    67 unit_models/AttachmentSets/Final Heater Special_poland_norm.texture 0  
    7 hungary 
    68 unit_models/AttachmentSets/Final Heater Special_hungary_diff.texture 
    68 unit_models/AttachmentSets/Final Heater Special_hungary_norm.texture 0  
    1 
    5 Horse 
    13 MTW2_HR_Lance 
    13 MTW2_HR_Sword 2 
    21 MTW2_HR_Lance_Primary 
    14 fs_test_shield 2 
    18 MTW2_Sword_Primary 
    14 fs_test_shield 
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002 
    19 knights_templar_ug1 
    1 3 
    64 unit_models/_Units/EN_Pplate_Plate/knights_templar_ug1_lod0.mesh 121 
    64 unit_models/_Units/EN_Pplate_Plate/knights_templar_ug1_lod1.mesh 1225 
    64 unit_models/_Units/EN_Pplate_Plate/knights_templar_ug1_lod2.mesh 6400 
    11
    8 portugal 
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_sicily.texture 
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture 
    50 unit_sprites/sicily_Knights_Templar_ug1_sprite.spr 
    7 england 
    74 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_england.texture 
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture 
    51 unit_sprites/england_Knights_Templar_ug1_sprite.spr 
    8 scotland 
    75 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_scotland.texture 
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture 
    52 unit_sprites/scotland_Knights_Templar_ug1_sprite.spr 
    6 france 
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_france.texture 
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture 
    50 unit_sprites/france_Knights_Templar_ug1_sprite.spr 
    7 denmark 
    74 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_denmark.texture 
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture 
    51 unit_sprites/denmark_Knights_Templar_ug1_sprite.spr 
    5 milan 
    72 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_milan.texture 
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture 
    49 unit_sprites/milan_Knights_Templar_ug1_sprite.spr 
    6 venice 
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_venice.texture 
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture 
    50 unit_sprites/venice_Knights_Templar_ug1_sprite.spr 
    12 papal_states 
    79 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_papal_states.texture 
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture 
    56 unit_sprites/papal_states_Knights_Templar_ug1_sprite.spr 
    6 sicily 
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_sicily.texture 
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture 
    50 unit_sprites/sicily_Knights_Templar_ug1_sprite.spr 
    6 poland 
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_poland.texture 
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture 
    50 unit_sprites/poland_Knights_Templar_ug1_sprite.spr 
    7 hungary 
    74 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_hungary.texture 
    73 unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture 
    51 unit_sprites/hungary_Knights_Templar_ug1_sprite.spr 
    11
    8 portugal
    67 unit_models/AttachmentSets/Final Heater Special_sicily_diff.texture 
    67 unit_models/AttachmentSets/Final Heater Special_sicily_norm.texture 0  
    7 england 
    68 unit_models/AttachmentSets/Final Heater Special_england_diff.texture 
    68 unit_models/AttachmentSets/Final Heater Special_england_norm.texture 0  
    8 scotland 
    69 unit_models/AttachmentSets/Final Heater Special_scotland_diff.texture 
    69 unit_models/AttachmentSets/Final Heater Special_scotland_norm.texture 0  
    6 france 
    67 unit_models/AttachmentSets/Final Heater Special_france_diff.texture 
    67 unit_models/AttachmentSets/Final Heater Special_france_norm.texture 0  
    7 denmark 
    68 unit_models/AttachmentSets/Final Heater Special_denmark_diff.texture 
    68 unit_models/AttachmentSets/Final Heater Special_denmark_norm.texture 0  
    5 milan 
    66 unit_models/AttachmentSets/Final Heater Special_milan_diff.texture 
    66 unit_models/AttachmentSets/Final Heater Special_milan_norm.texture 0  
    6 venice 
    67 unit_models/AttachmentSets/Final Heater Special_venice_diff.texture 
    67 unit_models/AttachmentSets/Final Heater Special_venice_norm.texture 0  
    12 papal_states 
    73 unit_models/AttachmentSets/Final Heater Special_papal_states_diff.texture 
    73 unit_models/AttachmentSets/Final Heater Special_papal_states_norm.texture 0  
    6 sicily 
    67 unit_models/AttachmentSets/Final Heater Special_sicily_diff.texture 
    67 unit_models/AttachmentSets/Final Heater Special_sicily_norm.texture 0  
    6 poland 
    67 unit_models/AttachmentSets/Final Heater Special_poland_diff.texture 
    67 unit_models/AttachmentSets/Final Heater Special_poland_norm.texture 0  
    7 hungary 
    68 unit_models/AttachmentSets/Final Heater Special_hungary_diff.texture 
    68 unit_models/AttachmentSets/Final Heater Special_hungary_norm.texture 0  
    1 
    5 Horse 
    13 MTW2_HR_Lance 
    13 MTW2_HR_Sword 2 
    21 MTW2_HR_Lance_Primary 
    14 fs_test_shield 2 
    18 MTW2_Sword_Primary 
    14 fs_test_shield 
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002


    We also need to add UI (cards and info images) for portugal for this unit. This is linked using the dictionary name in export_descr_units: Knights_Templar. Searching this in the unpacked ui/unit_info and ui/units folders gives the files knights_templar_info.tga (info image) and #knights_templar.tga (card). Again, I would just take the images from sicily's folders for now and copy/paste them into portugal's folders so you don't get the Roman peasant.

    Now we need to make the unit trainable from the guild for portugal, so open export_descr_buildings.txt and search for all instances of "Knights Templar" (the unit type name from export_descr_units). There should only be 3, all in the guild_templars_chapter_house building. We need to portugal as a required faction for all three lines:

    Code:
    recruit_pool "Knights Templar"  1   0.4   3  0  requires factions { england, scotland, france, denmark, milan, venice, papal_states, sicily, poland, hungary, portugal, }
    We can also add portugal to the required factions for the guild building itself, but since it's a guild, I'm not sure this is necessary - but probably good to do anyway. Again, do this for all three levels of the guild:

    Code:
    templars_minor_ch  requires factions { england, france, scotland, denmark, hungary, poland, papal_states, milan, sicily, venice, portugal, }
    The southern_european culture should already have UI set up for the chapter house building so you probably don't need to worry about that.

    So far, we've done all the steps normally required for unlocking a unit (and building) for another faction. Now all that's left is setting up the guild. Open export_descr_guilds.txt and search for the building name from export_descr_buildings: guild_templars_chapter_house. We see that this building entry is being used by the guild type: templars_chapter_house. Searching this in the rest of the file shows that there are no faction, culture, or religion specific triggers for adding guild points, so portugal should already be able to get this guild and you should be good to go.

  3. #3

    Default Re: Portugal: Make Knights Templar playable

    Thank you so much for your help. I read and tried a lot but always had some errors and crashes. Now it seems to work. Great!

    Is there a possibility to test this? I spawned 2 units in the campaign and the models are ok now and the UI (cards and info images) too.

    But how could I test the guild event? You can play a lot of campaigns with other factions that are able to get the templars without getting the templars guild. So I tried to force the templar guild event and tried to spawn me the chapter house but nothing worked.

    I also tried to add a chapter house to one of my cities in descr_strat but no success. Because I didn’t found any examples of chapter houses in the files I tried my own syntax...

  4. #4

    Default Re: Portugal: Make Knights Templar playable

    As far as I can tell, the only thing that makes these guilds available to certain factions and not others is the required factions line in export_descr_buildings. If you've added portugal to that line, it should become available. You can add the building in descr_strat using:

    Code:
        building
        {
            type guild_templars_chapter_house templars_minor_ch
        }
    Note that the min settlement level this building requires in EDB is city. I don't remember what happens when you try to add a building in descr_strat or campaign_script to a settlement with a lower level. It's possible that it just doesn't show up. Best bet is to add it to a city or larger.

Posting Permissions

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