Results 1 to 9 of 9

Thread: How to add a Mangonel in your mod

  1. #1

    Default How to add a Mangonel in your mod

    How to add a mangonel in bare kingdoms or retofit mod.
    One day looking for a tutorial for adding a mangonel i couldn't find one but after lot of hit and trials i finally managed to get a mangonel in the grand campaign and i would like to share my experience with you guys as i have learned a lot from the mod workshop.

    Firstly before reading this tutorial you must read and understand these excellent tutorials.

    Adding a new unit.(Necessary for placing our new unit Mangonel in your mod.)
    http://www.twcenter.net/forums/showthread.php?t=281344

    Sound Text files uploaded by Caliban.(Necessary for inserting sounds for our Mangonel in your mod.)
    http://www.twcenter.net/forums/showthread.php?t=74106

    How to extract sounds.(Necessary for extracting sounds for our Mangonel from crusades\data\sounds folder for your mod.)
    http://www.twcenter.net/forums/showthread.php?t=67985

    How to insert own sound or music in M2TW.(Necessary for learning how sounds are inserted in your mod.)
    http://www.twcenter.net/forums/showthread.php?t=77905

    Also you should have a formatted version of battle_models.modeldb file to make things easier for your sake and a battle_models.modeldb formatter for battle_models.modeldb file inside the crusades\data\unitmodels folder i guess which can found under the first tutorial mentioned above.

    Now lets get to the fun part that is to add a mangonel you must have an extracted copy of crusades campaign on your hard drive.
    Now go the crusades\data folder and find and place all these file in the exact same locations in your mod\data folder.
    Files are as follows:-
    Step I
    Place these files given below in this path yourmod\data\animations\engine- folder.
    1. mangonel_destruction.cas
    2. mangonel_destruction.evt
    3. mangonel_destruction_def.cas
    4. mangonel_fire.cas
    5. mangonel_fire.evt
    6. mangonel_idle.cas


    Place these files given below in this path yourmod\data\models_effects\textures- folder.
    7. barrel.texture

    Place these files given below in this path yourmod\data\models_effects- folder.
    8. barrel.cas
    9. barrel_debris.cas


    Place these files given below in this path yourmod\data\siege_engines- folder.
    10. mangonel.mesh
    11. mangonel.modelreferencepoints
    12. mangonel.modeltraversablenetwork


    Place these files given below in this path yourmod\data\siege_engines\bonemaps- folder.
    13. mangonel.xml
    14. mangonel_die.xml


    Place these files given below in this path yourmod\data\siege_engines\collision_models- folder.
    15. mangonel_collision.cmi

    Place these files given below in this path yourmod\data\siege_engines\destroyed- folder.
    16. mangonel_destroyed.mesh
    17. mangonel_destroyed.modeltraversablenetwork
    18. mangonel_destruction.mesh
    19. mangonel_destruction.modeltraversablenetwork


    Place these files given below in this path yourmod\data\siege_engines\textures- folder.
    20. mangonel.texture
    21. mangonel_normal.texture
    22. mangonel_overlay.texture


    Place these files given below in this path yourmod\data- folder.
    23. descr_area_effects.xml
    24. descr_arrow_trail_effects.txt
    25. descr_effect_impacts.txt
    26. descr_effects.txt
    27. descr_engine_skeleton.txt
    28. descr_engines.txt
    29. descr_event_effects.txt
    30. descr_flaming_projectiles.txt
    31. descr_projectile.txt
    32. descr_skeleton.txt


    Step II
    Now after picking up files from the respective folders of crusades campaign and placing them in the exact same way in your mod let us continue further.
    There are 3 same units of mangonel with different names inside M2TW-kingdoms namely Mangonel, Greek_mangonel, ME_mangonel.
    We will be placing Greek_Mangonel for the Byzantium Empire.
    Firstly go to crusades\data\unit_models folder and open battle_models.modeldb(using formatted version would be nice) and copy this entry given below.
    Code:
    19 greek_mangonel_crew 
    1 4 
    69 unit_models/_Units/ES_Greek_Greek_Heavy/greek_mangonel_crew_lod0.mesh 121 
    69 unit_models/_Units/ES_Greek_Greek_Heavy/greek_mangonel_crew_lod1.mesh 900 
    69 unit_models/_Units/ES_Greek_Greek_Heavy/greek_mangonel_crew_lod2.mesh 2500 
    69 unit_models/_Units/ES_Greek_Greek_Heavy/greek_mangonel_crew_lod3.mesh 6400 
    1 
    9 byzantium 
    80 unit_models/_Units/ES_Greek_Greek_Heavy/textures/mtw2_es_greek_byzantium.texture 
    77 unit_models/_Units/ES_Greek_Greek_Heavy/textures/mtw2_es_greek_normal.texture 
    53 unit_sprites/byzantium_Greek_Ballista_Crew_sprite.spr 
    1 
    9 byzantium 
    70 unit_models/AttachmentSets/Final European Light_byzantium_diff.texture 
    70 unit_models/AttachmentSets/Final European Light_byzantium_norm.texture 0  
    1 
    4 None 
    13 MTW2_Mangonel 0  1 
    18 MTW2_Knife_Primary 0 
    16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
    now place this entry for mangonel in your mod's\data\unit_models\battle_models.modeldb -file
    now as we can see above from the entry we must place all files given in this entry above to the exact location of your mod otherwise you will get a CTD. Don't forget to place the sprites files in your mod\data\unit_sprites folder.

    Step III
    Now add the EDU entry from the crusades EDU file into your mod's EDU file. EDU stands for export_descr_unit.txt file which is found in your main data folder.
    Code:
    type             Greek Mangonel
    dictionary       Greek_Mangonel      ; Mangonel
    category         siege
    class            missile
    voice_type       Heavy
    banner faction   main_missile
    banner holy      crusade
    soldier          Greek_Mangonel_Crew, 16, 2, 1
    engine           mangonel
    attributes       sea_faring, hardy, can_withdraw, artillery
    formation        1.5, 1.5, 3, 3, 3, square
    stat_health      1, 0
    stat_pri         7, 3, no, 0, 0, melee, artillery_gunpowder, piercing, knife, 25, 1.8
    ;stat_pri_ex      0, 0, 0
    stat_pri_attr    no
    stat_sec         65, 3, mangonel_shot, 250, 10, siege_missile, artillery_gunpowder, blunt, none, 26, 1
    ;stat_sec_ex      0, 0, 0
    stat_sec_attr    ap, launching
    stat_pri_armour  2, 5, 0, leather
    ;stat_armour_ex   2, 0, 0, 0, 5, 0, 0, leather
    stat_sec_armour  0, 0, flesh
    stat_heat        1
    stat_ground      0, 0, 0, 0
    stat_mental      9, disciplined, highly_trained
    stat_charge_dist 15
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        1, 590, 200, 30, 75, 590, 1, 170
    armour_ug_levels 1
    armour_ug_models greek_mangonel_crew
    ownership        byzantium
    era 1            byzantium
    recruit_priority_offset    -15
    Save it and you're done.

    Now go to the crusades\data\ui\ folder and copy these 2 files to your mod
    a. greek_mangonel_info.tga( Location-Medieval 2 Total War\mods\Crusades\data\ui\unit_info\byzantium.)
    b. #greek_mangonel.tga( Location-Medieval 2 Total War\mods\Crusades\data\ui\units\byzantium.)
    These are the files for viewing unit info in grand campaign and viewing unit card of your mangonel unit respectively.

    Now go and open the crusades\data\text\export_units.txt file and copy this entry given below and place it in your mod\data\text\export_units.txt file. Remember to put this entry in alphabetical order.
    Code:
    {Greek_Mangonel}Mangonel
    {Greek_Mangonel_descr}The original Mangonel was first used in roman times to fling large rocks at enemies.  This Mangonel, though bearing some resemblance to its forebear, is far larger than its roman counterparts.  One other surprising addition is that this Mangonel throws burning barrels of oil! These barrels often explode in mid air, unleashing a torrent of fire down on its poor victims below. 
    {Greek_Mangonel_descr_short}Great siege engine capable of throwing exploding barrels of oil.
    Step IV
    Now we are basically all done here but wait what of the sounds for the mangonel we just incorporated in your mod. Well this is a hectic part but if you have read the tutorials given above in the starting then it won't be a problem.
    Firstly you to extract SFX or sound effects for your mangonel from the crusades\data\sounds folder using vercingetorix xidi extractor which can be found in the above tutorials links.
    After successfully extracting sounds from crusades\data\sounds folder go and pick up the following files and place them in the exact same locations in your mod\data\sounds\SFX as in crusades\data\sounds\SFX folder . The SFX folder will be created automatically in crusades campaign by using Vercingetorix's XIDX-extractor or download my attachment it will only extract SFX that you need (one more alternative download link).
    Place them in this path only yourmod\data\sounds\SFX\Individual\mangonel.
    1. barrel_appear_01.wav
    2. barrel_appear_02.wav
    3. barrel_explode_in_air.wav
    4. barrel_fly.wav
    5. barrel_projectile_explode_01.wav
    6. barrel_projectile_explode_02.wav
    7. barrel_projectile_fly_01.wav
    8. barrel_projectile_fly_02.wav
    9. mangonel_barrel_hit_ground.wav
    10. mangonel_destroyed.wav
    11. mangonel_fire.wav
    12. mangonel_projectile_burn.wav
    13. Mangonel_wind_01.wav
    14. Mangonel_wind_02.wav
    15. Mangonel_wind_03.wav


    Step V
    After that use Caliban's downloaded sound txt files and place these 39 files in yourmod\data folder and place these entries as mentioned below in the respective files only for acquiring mangonel sounds.
    1. descr_sounds_engine.txt (necessary for sound that we will hear when mangonel moves to take a position.)
    you will find a entry like this in it
    Code:
    ;;;;;;;;;;;;;;;;;
    ;;;;  TOWER ;;;;;
    ;;;;;;;;;;;;;;;;;
    
        class tower, trebuchet
                season summer
    just edit it to this
    Code:
    ;;;;;;;;;;;;;;;;;
    ;;;;  TOWER ;;;;;
    ;;;;;;;;;;;;;;;;;
    
        class tower, trebuchet, mangonel
                season summer

    2.descr_sounds_generic.txt (necessary for sound that we will hear when mangonel operates.)
    Place this entry in it seperately at the last
    Code:
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    ;;;;;;  MANGONEL                 ;;;;;;;;;;;;
    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    
    
    event MANGONEL_WIND mindist 3 priority 160 volume 0 delay 0 randomdelay 0 probability 1 minPitch .9 maxPitch 1.1 
            folder data/sounds/SFX/Individual/mangonel
                Mangonel_wind_01
                Mangonel_wind_02
                Mangonel_wind_03
    end
    
    
    
    event MANGONEL_FIRE mindist 11 priority 190 volume 0 delay 0 randomdelay 0 probability 1 minPitch .9 maxPitch 1.1 
            folder data/sounds/SFX/Individual/mangonel
                mangonel_fire
                    
    end
    
    
    
    event MANGONEL_DESTROYED mindist 7 priority 190 volume 0 delay 0 randomdelay 0 probability 1 minPitch .9 maxPitch 1.1 
            folder data/sounds/SFX/Individual/mangonel
                mangonel_destroyed
                    
    end
    
    
    
    
    event MANGONEL_BARREL_APPEAR mindist 3 priority 180 volume -15 delay 0 randomdelay 0 probability 1 minPitch .9 maxPitch 1.1 
            folder data/sounds/SFX/Individual/mangonel
                barrel_appear_01
                barrel_appear_02
            
    end
    
    
    
    event MANGONEL_BARREL_EXPLODE mindist 17 priority 190 volume 0 delay 0 randomdelay 0 probability 1 minPitch .9 maxPitch 1.1 
            folder data/sounds/SFX/Individual/mangonel
                barrel_explode_in_air
            
    end
    
    
    
    event MANGONEL_BARREL_FLY  mindist 6 priority 170 volume -15 delay 0 randomdelay 0 probability 1 minPitch 1 maxPitch 1 fadein 1 fadeout 1
            folder data/sounds/SFX/Individual/mangonel
                barrel_fly
                    
    end
    
    
    
    event MANGONEL_BARREL_PROJECTILE_EXPLODE  mindist 8 priority 175 volume -15 delay 0 randomdelay 0 probability 1 minPitch .9 maxPitch 1.1 
            folder data/sounds/SFX/Individual/mangonel
                barrel_projectile_explode_01
                barrel_projectile_explode_02
                    
    end
    
    
    event MANGONEL_BARREL_PROJECTILE_FLY  mindist 5 priority 170 volume -15 delay 1 randomdelay 0 probability 1 minPitch .9 maxPitch 1.1 fadein 0.5 fadeout 1 
            folder data/sounds/SFX/Individual/mangonel
                barrel_projectile_fly_01
                barrel_projectile_fly_02
                    
    end
    
    
    event MANGONEL_BARREL_HIT_GROUND  mindist 13 priority 170 volume 0 delay 0 randomdelay 0 probability 1 minPitch .9 maxPitch 1.1 
            folder data/sounds/SFX/Individual/mangonel
                mangonel_barrel_hit_ground
                
                    
    end
    
    
    event MANGONEL_PROJECTILE_BURN  mindist 2 priority 170 volume -30 delay 0 randomdelay 0 probability 1 minPitch .8 maxPitch 1.2 fadeout 1
            folder data/sounds/SFX/Individual/mangonel
                mangonel_projectile_burn
                
                
    end
    3. export_descr_sounds_units_voice.txt (necessary for sound that we'll hear when selecting the mangonel.)
    Place this entry in it under the Mediterranean accent, class heavy 'coz byzantium has a Mediterranean accent in M2TW.
    Code:
                                        unit Greek Mangonel
                                        event
                                                 folder data/sounds/Voice/Human/Localized/Battle_Map
                                                      Mediterranean_Heavy_Generic_Catapult_1.wav
                                                      Mediterranean_Heavy_Generic_Catapult_2.wav
                                        end
    Step VI
    Now all you have to do is delete these files (events.dat, events.idx, SFX.dat, SFX.idx, Voice.dat and Voice.idx) in the sounds folder of your mod and launch the game through your mod then as soon as the game launches information will be gathered and the deleted files will be created again placing the new sound entries for your mangonel.

    Now go in custom battle and select byzantium and select the mangonel unit you just inserted and see the wonders that you have done.
    Did you get it right.
    Voila
    screenshots






    If this tutorial is any worthwhile then i would like to hear some responses as well or if anyone thinks that i have missed some part then plz post here in this thread so that it can be dealt with.
    Bye,
    Ishan
    Last edited by Ishan; November 14, 2013 at 03:27 PM.

  2. #2
    IZob's Avatar Citizen
    Join Date
    Aug 2009
    Location
    Australia
    Posts
    9,829

    Default Re: How to add a mangonel to retrofit or bare kingdoms mod.

    Very nice. I shall be looking into this and using it, very soon.
    Contact me on Steam: steamcommunity.com/id/IZob/ or send a PM.

  3. #3

    Default Re: How to add a mangonel to retrofit or bare kingdoms mod.

    Good do let me know when ur done addin' the mangonel. If u need help just let me know

  4. #4
    leo.civil.uefs's Avatar É nóis que vôa bruxão!
    Join Date
    Sep 2010
    Location
    Brazil
    Posts
    3,135

    Default Re: How to add a Mangonel in your mod

    I stopped at step IV.

    The download limk does not work.

    Also, until there, some quoted files were actually not present in the data folder from cruzades, here they are:

    unit_models/AttachmentSets/Final European Light_byzantium_norm.texture


    unit_sprites/byzantium_Greek_Ballista_Crew_sprite.spr


    unit_models/_Units/ES_Greek_Greek_Heavy/textures/mtw2_es_greek_byzantium.texture


    unit_models/_Units/ES_Greek_Greek_Heavy/textures/mtw2_es_greek_normal.texture


    crusades\data\text\export_units.txt



    Correct me if Im wrong.


    PS: Im trying to implement the mangonel for dwarves in TATW, some of the files quoted here were already in TATW vanilla, including the images for the unit, so I guess King Kong has already tryed to implement it.

    If there is any other way to do this please tell me, this tutorial is good, but complex.

  5. #5

    Default Re: How to add a Mangonel in your mod

    This is the only way to make it happen. I have upload the alternative download link for the SFX extractor:
    http://ge.tt/5eJzGbv/v/0
    So that you may continue forward. The old link most likely died when we switched to the new forum software.

    And not sure what you're talking about quoted files. Whatever i have mentioned is pin point accurate. if you can't find any files mentioned in my tutorial and then make sure you have unpacked the game correctly and fully. you can also use the specific unpack tutorial of mine to extract only the files you want.

    If you run into trouble then post on my profile and let me know, i would be glad to help.

    Cheers!

  6. #6
    leo.civil.uefs's Avatar É nóis que vôa bruxão!
    Join Date
    Sep 2010
    Location
    Brazil
    Posts
    3,135

    Default Re: How to add a Mangonel in your mod

    I did the extraction for the cruzades, 2 times, and still can'ts find the files.

  7. #7

    Default Re: How to add a Mangonel in your mod

    Oh i read the filenames now. If you notice these are from the vanilla game, and if there's something in the default packs, then it's not put in the expansion packs due to the repetitive nature. You can find these files in the original vanilla extracted game.

  8. #8
    leo.civil.uefs's Avatar É nóis que vôa bruxão!
    Join Date
    Sep 2010
    Location
    Brazil
    Posts
    3,135

    Default Re: How to add a Mangonel in your mod

    Excuse me but, in case I want to add it for dwarves in TATW, its just about making the procedure you decribe here or would I need to mod the unit itself in order to get the mangonel pulled by dwarven men?

  9. #9

    Default Re: How to add a Mangonel in your mod

    I'm not entirely sure about that. But most likely it should work. IIRC, the crew used here are the crew used for all the siege type weapons. These guys have only one primary weapon which is a dagger in case they get into melee. Besides that i don't remember if there's some setting mentioned in the .mesh model of these crewmen. If dwarves are working on trebuchets or any other siege weapon then obviously they can be put with mangonels as well without a hitch.

    Btw you have to test what you're working on in custom battle both when they're firing their shots and when this dwarven crew get into melee, when they will trigger their animations. Any glitch or negligence might result in CTD and the modder would be scratching his head in battle map thinking what had gone wrong if playing a battle in his campaign, so don't forget to test it.
    Last edited by Ishan; October 23, 2013 at 10:12 AM.

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
  •