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

Thread: A Guide on the Descr_Mount.txt

  1. #1
    Polycarpe's Avatar Back into action!
    Join Date
    Feb 2010
    Location
    Quebec, Canada
    Posts
    3,338

    Default A Guide on the Descr_Mount.txt

    Hi there, here's another tutorial that the Mod Workshop misses and some modders wonder how to really tweak mounts. From my personal tests, I'll enumerate and explain what each entry do as well creating a new mounts (coding speaking).

    What is the Descr_Mount.txt file?
    This file is an important one, it includes all the coding part (aside the battlemodel.db file) for the mounts. The file is located into your Data folder. Here's an entry sample.

    Spoiler Alert, click show to read: 
    type barded horse
    class horse
    model Mount_Barded_Horse
    radius 1.2
    x_radius 0.5
    y_offset 0.7
    height 2.5
    mass 3.0
    banner_height 0
    bouyancy_offset 1.8
    water_trail_effect horse_water_trail
    root_node_height 1.0
    ;rider_offset 0.0, 0.45, 0.35
    rider_offset 0.0, 0.38, 0.70


    Now I will explain you what each line does. Also to note, do not write in Capital letter when you had an entry.

    type barded horse

    This line is the name of the mount.

    class horse

    This is the mount type. There's three type of mounts in the game, you must choose from either Elephant, Camel or Horse. I have never tested it but it may be possible to add a fourth type but I'll need confirmation about it.

    model Mount_Barded_Horse

    This entry is the model of the mount. That name is located into your battlemodel.db file. The file is in Data/Unit_models. Basically, this is the code needed to make your mount into game(mesh speaking).

    radius 1.2

    This is the radius of the horse. The higher the number, the larger the distance between horsemen is high. That radius is "side-by-side" speaking.

    x_radius 0.8

    This one is a bit tricky, the higher the value is, the widen the axis of the unit is large. It makes weird results on high values (like 50) from the tests, the axis is simply splitted, forming 4 mini groups of horsemen that do not nothing and their pathfinding is really confused, I suggest to not really play with it, at least not with drastic value but slight difference may happens but almost not really visible. the best example would be the elephant, combined with the vanilla value of both x_radius and radius, it will gives the formation they do have.

    y_offset 0.7
    This line affect the "killing" radius of the rider. The higher it goes, more the "reach" of the horsemen will be large..And surrealistic. From the tests, I've put a value of 20.0 and the horsemen were killed or were killing before making a "real" contact with a unit. This entry doesn't need to be changed really.

    height 2.5

    This is the height of the mount. You can change it but you also need to change the scale size of the mount to really see the difference, this value doesn't need to be changed really unless you want to create a totally new mount (maybe a fantasy one).

    mass 3.0
    That line is important, the higher the value, the more devastating the cavalry charge is. Careful tough, it is also linked to the damage value of the cavalry charge. This IS the line you are looking for for balancing cavalry charge.

    banner_height 0
    This is the distance of the banner from the unit. Unless you want to make the banner fly in the sky, do not touch it.

    bouyancy_offset 1.8

    This is mostly related to animation again. This is bouyancy offset of mount above root node. I strongly suggest to not play with this unless you want weird results like floating mounts.

    water_trail_effect horse_water_trail
    This is the mount's animation for water trail. Again, either horse, camel or elephant.

    root_node_height 1.0
    This is the distance from the ground and the mounts, the 1.0 value is the standard one and you shouldn't change it, use vanilla setting.

    rider_offset 0.0, 0.38, 0.70
    This is the distance between the rider and the mounts. Again do not tough these unless you want weird results, use vanilla setting.

    The following are for the "Elephant" mounts.

    attack_delay 1

    This is the attack speed of elephant's tusks.

    dead_radius 2.5

    This is how wide the elephant corpse take place, the higher it is, the widen the corpse take place.

    tusk_z 3.0
    This is the distance in front of the elephant's tusks, in other word, the reach.

    tusk_radius 2.0
    This is the tusk's radius, the higher it is, the larger the attack radius is.

    How to increase the cavalry charge effectiveness?

    You will need to play with these lines in order to change your cavalry charge as you wish and needs.

    The radius and mass are the primary entries that affect cavalry charges.
    The x_radius and y_offset are secondary entries that can affect the cavalry charges but not as much as the above ones.

    How to create a new mount entry?

    I love easy and dirty ways, so basically you will need two files; the Descr_Mount.txt and the battlemodel.db.

    First of all, copy an entry and paste it and do this change as below:
    Spoiler Alert, click show to read: 
    type polycarpe horse
    class horse
    model Mount_Armoured_Horse
    radius 1.2
    x_radius 0.5
    y_offset 0.7
    height 2.5
    mass 3.75
    banner_height 0
    bouyancy_offset 1.8
    water_trail_effect horse_water_trail
    root_node_height 1.0
    rider_offset 0.0, 0.38, 0.70


    The Red part is the new name entry, the Blue one is the name entry of the model in the battlemodel.db. If you have a new mount type, you will have to add the BMDB codes before adding it to the Descr_Mount.txt file.

    You want to add your new mount into game? Easy, just find this entry in the Export_Descr_Unit.txt file (Located into your Data Folder):

    Spoiler Alert, click show to read: 
    mount barded horse


    And change it to this:

    Spoiler Alert, click show to read: 
    mount polycarpe horse


    That's it, you have all the required information to play with your mounts. Happy modding.
    Last edited by Polycarpe; July 22, 2011 at 12:44 PM.

  2. #2

    Default Re: A Guide on the Descr_Mount.txt

    I want to make the cav go deeper into the formation of the unit they're atacking,will increasing the charge effectiveness do anything?

  3. #3
    Polycarpe's Avatar Back into action!
    Join Date
    Feb 2010
    Location
    Quebec, Canada
    Posts
    3,338

    Default Re: A Guide on the Descr_Mount.txt

    Quote Originally Posted by A7X View Post
    I want to make the cav go deeper into the formation of the unit they're atacking,will increasing the charge effectiveness do anything?
    Correct, by increasing the cavalry charge effectiveness, the charge will not only goes deeper but also causes more casualties. .

  4. #4

    Default Re: A Guide on the Descr_Mount.txt

    Quote Originally Posted by St. Polycarpe View Post
    Correct, by increasing the cavalry charge effectiveness, the charge will not only goes deeper but also causes more casualties. .
    Thank you so much,+rep

  5. #5

    Default Re: A Guide on the Descr_Mount.txt

    hi all...

    i try to add Marshall of the Hospitallers to my grandcampaign....but i have one problem...
    Is grandcampaign,you can choose between Templar knight or st john knight by choose to build templar guild or Hospitallers guild.

    i try to edit battle_model file and...

    see this

    2
    9 jerusalem 83 unit_models/Mounts/Order_Mailed_Horse/textures/Order_mailed_horse_jerusalem.texture 80 unit_models/Mounts/Order_Mailed_Horse/textures/Order_mailed_horse_normal.texture 58 unit_sprites/jerusalem_Mount_Order_Mailed_Horse_sprite.spr 7 antioch 81 unit_models/Mounts/Order_Mailed_Horse/textures/Order_mailed_horse_antioch.texture 80 unit_models/Mounts/Order_Mailed_Horse/textures/Order_mailed_horse_normal.texture 56 unit_sprites/antioch_Mount_Order_Mailed_Horse_sprite.spr
    in crusader mod,it have 2 faction use Order Mailed Horse,but in grandcampaign...1 faction must choose between hospitaller Horse or templar Horse by choose templar guild or hospitaller guild..this is the problem.
    in grancampaign,12 faction can choose templar knight or hospitaller knight,but in crusader mod,u choose antioch and you play the game,antioch only build Marshall of the Hospitallers,if u choose Jerusalem,u can build only templar knight...how to fix this problem?
    I want to add hospitaller knight (marshall or else) and templar knight (marshall or else) from crusader mod to grandcampaign,and in grancampain catholic factions can choose templar knight or hospitaller knight....if they choose hospitaller knight,so...this knight will mount black horse,but if they choose build templar guild,templar knight use white horse...

    how to fix?

    PS: sorry about my bad english

  6. #6

    Default Re: A Guide on the Descr_Mount.txt

    [/QUOTE] How to create a new mount entry?

    I love easy and dirty ways, so basically you will need two files; the Descr_Mount.txt and the battlemodel.db.

    First of all, copy an entry and paste it and do this change as below:
    Spoiler Alert, click show to read: 
    type polycarpe horse
    class horse
    model Mount_Armoured_Horse
    radius 1.2
    x_radius 0.5
    y_offset 0.7
    height 2.5
    mass 3.75
    banner_height 0
    bouyancy_offset 1.8
    water_trail_effect horse_water_trail
    root_node_height 1.0
    rider_offset 0.0, 0.38, 0.70


    The Red part is the new name entry, the Blue one is the name entry of the model in the battlemodel.db. If you have a new mount type, you will have to add the BMDB codes before adding it to the Descr_Mount.txt file.

    You want to add your new mount into game? Easy, just find this entry in the Export_Descr_Unit.txt file (Located into your Data Folder):

    Spoiler Alert, click show to read: 
    mount barded horse


    And change it to this:

    Spoiler Alert, click show to read: 
    mount polycarpe horse


    That's it, you have all the required information to play with your mounts. Happy modding. [/QUOTE]

    I am afraid that modding doesn't work like that. You cannot create a new mount using this method, the mount just comes out skinless

  7. #7
    Gigantus's Avatar You should always listen to your inner voice! - Agreed, but which one?
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,928
    Blog Entries
    28

    Default Re: A Guide on the Descr_Mount.txt

    rider_offset 0.0, 0.38, 0.70
    This is the distance between the rider and the mounts. Again do not tough these unless you want weird results, use vanilla setting.
    The way I understand it, the vanilla values have the rider floating above the mount.
    It's an x, y, z thing apparently - any idea which one is 'down'? My bet is on the second value...
    Last edited by Gigantus; July 27, 2012 at 11:26 PM.




  8. #8
    JarlFrank's Avatar Libertus
    Join Date
    May 2008
    Location
    Midgard
    Posts
    93

    Default Re: A Guide on the Descr_Mount.txt

    Since I find the cavalry charges in most mods to be ridiculously overpowered - yes, they should be powerful, but 60 knights wiping out an entire unit of 160 medium spearmen in a single charge? seriously? it looks so silly when they charge into a formation and every single infantryman just falls down like a sack of rice... - I want to radically reduce its effectiveness. It's just frustrating to see an entire unit be wiped out by a single cavalry charge, and it's just as silly to use a repeated charge-retreat-charge-retreat tactic on the enemy to kill his entire infantry. It's not fun, it's frustrating and boring and exploity, so I want cav charges to take out only the first two ranks of any infantry formation.

    What's the optimal mass to do that?

    Veit ek, at ek hekk

    vindgameii
    ntr allar nu,
    geiri undar
    ok gefinn ni,
    sjalfur sjalfum mr,
    eim meii
    er manngi veit
    hvers af rtum renn.


  9. #9

    Default Re: A Guide on the Descr_Mount.txt

    I know there is a hard coded limit of 99 types in descr_mount, but does anyone know if there is a limit on the number of mount classes? Are we limited to horse, camel, and elephant or can we create more? If it is possible to add more classes, how would one go about doing this?

    I ask because the comments in the vanilla EDU file say this about the mount_effect modifiers: "Up to three factors may be specified, which may be classes of mount, or specific types". Can anyone confirm if this is correct? It would be a real shame if we're actually limited to only 3 mount classes or types specified for mount_effect.


    Edit: I can confirm that CA's comment in EDU is correct - we're only allowed to have 3 mount effects per unit type. I tested by adding a fourth effect with a -49 modifier. The unit was still able to kill the enemy mount. Then I simply moved the modifier for this mount from the 4th position on the mount_effects line to the 3rd position and the unit was then unable to kill the enemy mount (but they were now able to kill the mount in the 4th position). So the game simply doesn't read any mount effect modifiers after the 3rd one. This is very unfortunate but if it's possible to add more mount classes I can at least partly work around this limitation.
    Last edited by Callistonian; January 03, 2021 at 08:22 AM.

  10. #10
    Gigantus's Avatar You should always listen to your inner voice! - Agreed, but which one?
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,928
    Blog Entries
    28

    Default Re: A Guide on the Descr_Mount.txt

    From the file comment:
    Code:
    ;    class                    mount class (current possibilities - horse, camel, elephant)




  11. #11

    Default Re: A Guide on the Descr_Mount.txt

    I have always assumed it was hard coded but I was hoping someone had found a way to do it anyway. Sometimes, things that appear to be hard coded are actually just a matter of finding an obscure text file that most mods don't use.

  12. #12
    Gigantus's Avatar You should always listen to your inner voice! - Agreed, but which one?
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,928
    Blog Entries
    28

    Default Re: A Guide on the Descr_Mount.txt

    I scrounged the executable for the three words in the hope to find something in the vicinity but didn't find anything.




  13. #13

    Default Re: A Guide on the Descr_Mount.txt

    Its hardcoded for these three words

  14. #14

    Default Re: A Guide on the Descr_Mount.txt

    Does anyone know what parameters control the hitbox sizes (melee and projectiles) of mounts? Is it hard coded for each mount class and if so, what are the dimensions? Does it come from the bounding boxes on the mount model and if so, do the rider boxes matter at all?

  15. #15

    Default Re: A Guide on the Descr_Mount.txt

    The bounding spheres are only used for camera stuff.
    Did you test these in the descr_mount:
    radius
    x_radius
    y_offset
    height

    Or the scale in the battlemodeldb?

  16. #16

    Default Re: A Guide on the Descr_Mount.txt

    Quote Originally Posted by Jojo00182 View Post
    The bounding spheres are only used for camera stuff.
    Are you sure about this? Zarathos says they're used for a bunch of other things and doesn't even mention cameras. He explicitly says they're used to calculate collisions. I assume by 'camera stuff' you're referring to the bug where moving the camera too close to a unit causes the soldiers to disappear?

    I tried increasing the radius in descr_mount to various values and it's pretty hard to tell what the effect is. Setting it too high can make it impossible for the rider to attack in melee. Setting it to absurdly high values makes the unit bug out when walking (lots of rapid turning side to side, makes it harder for them to move forward as a unit). It doesn't seem to affect the spacing between mounts (I guess that's controlled using x_radius and/or params in EDU), and it doesn't seem to affect the hitboxes (I take the exact same casualties from archers).

    If I'm not mistaken, the scale factor is the first line after the entry name in bmdb? It was actually already set to 0.85 for the unit I was testing, I changed this and it didn't seem to have any effect.

  17. #17

    Default Re: A Guide on the Descr_Mount.txt

    Zarathos was proven wrong about his idea of the bounding sphere long before he came up with the idea.
    Argantonio the first dude to debug and reverse Med2 in 2009 found out that the bounding sphere are only used for camera stuff like fading out and LOD of the model.

    I will see what i can find out about the mount hitboxes. Iam 98% sure for the soldiers the hitbox is a cylinder(maybe cuboid or elipsoid) defined by the height and width in the EDU,

  18. #18
    Gigantus's Avatar You should always listen to your inner voice! - Agreed, but which one?
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,928
    Blog Entries
    28

    Default Re: A Guide on the Descr_Mount.txt

    I think 'radius' is the max number while x_radius is the min number - creating an ellipse at least as per descr_mounts and descr_animals: radius = head to tail distance, x_radius = flank to flank distance, although I can't see anything similar in the EDU for units.
    descr_campaign_db has 'box' values for the strat model (character_selection) plus the model's size can be set in descr_model_strat, but nothing for battle units. Scaling in descr_skeleton will scale the skeleton but not the animation afaik, resulting in trolls shrinking to normal size during animation - great laugh in the early TATW versions....

    I had some hope of finding stuff in descr_ik_controller_db, but nope.

    descr_skeleton has impact_delta that may be connected, but I am guessing it's related to the 'hitter', not the 'target', eg box.
    Code:
    ;                            -id:x,y,z    impact delta - specifies the point of weapon impact relative to
    ;                                        the starting position of the root node
    Last edited by Gigantus; March 03, 2021 at 11:51 PM.




  19. #19

    Default Re: A Guide on the Descr_Mount.txt

    Quote Originally Posted by Gigantus View Post
    I can't see anything similar in the EDU for units.
    descr_skeleton has impact_delta that may be connected, but I am guessing it's related to the 'hitter', not the 'target', eg box.
    The box size in the EDU is in the soldier line after the mass, most mods dont specify it so the game uses the default. (Botet monsters and TATW trolls have it for example)
    And you are right impact_delta is where the weapon in an attack animation hits.

  20. #20
    Gigantus's Avatar You should always listen to your inner voice! - Agreed, but which one?
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    49,928
    Blog Entries
    28

    Default Re: A Guide on the Descr_Mount.txt

    Never seen more then three values in that line, any links to discussions? eg confirmation that adding values define the hit box?
    The trolls in TATW have a massively increased collision mass value (60 instead of 1, the third value in soldier line) but that can't be the definition of the hit box?
    Last edited by Gigantus; March 04, 2021 at 04:43 AM.




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
  •