Results 1 to 7 of 7

Thread: Unit modding

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    KnightsTemplar's Avatar Campidoctor
    Join Date
    Aug 2010
    Location
    Hong Kong
    Posts
    1,929

    Default Unit modding

    As I'm playing with Gondor, I often see Boromir's guard got beaten by other infantries.
    So is spearmen weaker when fighting with heavy infantries than normal infantries fighting each other?
    If so, how could I change this?
    And also, can I make the Boromir BG fight with swords instead of spears?
    Or just replace them with unmounted General Bodyguards?

  2. #2

    Default Re: Unit modding

    Well, it is a bit like scissor, stone, paper... a bit


    Spearmen>Cavalry>Infantry>Spearmen

    Of course light infantry can't beat really good spearmen, and light cavalry can't beat heavy infantry.
    But still...^^ you know, just as a basic rule.

    Sorry, but I can't help you with the rest.

  3. #3

    Default Re: Unit modding

    Heavy infantry beating spearmen is hardcoded, there's nothing you can do about it. Boromir uses a unique bodyguard unit that exists only for him and nowhere else, it's called Kingsguard_BG. To change it to swordsmen, open up export_descr_unit.txt and find this entry:
    Spoiler Alert, click show to read: 
    Code:
    type             Kingsguard_BG
    dictionary       Kingsguard_BG      ; Boromirs Bodyguard
    category         infantry
    class            spearmen
    voice_type       Heavy
    banner faction   main_spear
    banner holy      crusade
    soldier          Armored_Sergeants, 60, 0, 1.2
    attributes       sea_faring, hide_forest, hardy, can_withdraw, general_unit, no_custom
    formation        1.2, 1.2, 2.4, 2.4, 4, square, shield_wall
    stat_health      1, 3
    stat_pri         9, 4, no, 0, 0, melee, melee_blade, piercing, spear, 0, 1
    stat_pri_attr    light_spear, spear_bonus_4
    stat_sec         0, 0, no, 0, 0, no, melee_simple, blunt, none, 0, 1
    stat_sec_attr    no
    stat_pri_armour  8, 4, 6, metal
    stat_sec_armour  0, 0, flesh
    stat_heat        6
    stat_ground      0, -1, 0, -2
    stat_mental      17, disciplined, highly_trained
    stat_charge_dist 15
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        2, 720, 300, 90, 90, 720, 2, 250
    armour_ug_levels 3, 4
    armour_ug_models kingsguard, kingsguard_ug1
    ownership        sicily, timurids
    era 0            sicily
    era 1            sicily
    era 2            sicily
    recruit_priority_offset    0
    Change it to this (changes are bolded):
    Spoiler Alert, click show to read: 
    Code:
    type             Kingsguard_BG
    dictionary       Kingsguard_BG      ; Boromirs Bodyguard
    category         infantry
    class            heavy
    voice_type       Heavy
    banner faction   main_infantry
    banner holy      crusade
    soldier          Norse_Swordsmen, 60, 0, 1.2
    attributes       sea_faring, hide_forest, hardy, can_withdraw, general_unit, no_custom
    formation        1.2, 1.2, 2.4, 2.4, 4, square, <delete the entry "shield_wall"
    stat_health      1, 3
    stat_pri         9, 4, no, 0, 0, melee, melee_blade, piercing, sword, 0, 1
    stat_pri_attr    no
    stat_sec         0, 0, no, 0, 0, no, melee_simple, blunt, none, 0, 1
    stat_sec_attr    no
    stat_pri_armour  8, 4, 6, metal
    stat_sec_armour  0, 0, flesh
    stat_heat        6
    stat_ground      0, -1, 0, -2
    stat_mental      17, disciplined, highly_trained
    stat_charge_dist 15
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        2, 720, 300, 90, 90, 720, 2, 250
    armour_ug_levels 3, 4
    armour_ug_models gondor_infantry, gondor_infantry_ug1
    ownership        sicily, timurids
    era 0            sicily
    era 1            sicily
    era 2            sicily
    recruit_priority_offset    0

  4. #4
    KnightsTemplar's Avatar Campidoctor
    Join Date
    Aug 2010
    Location
    Hong Kong
    Posts
    1,929

    Default Re: Unit modding

    Quote Originally Posted by Lord Butters I View Post
    Heavy infantry beating spearmen is hardcoded, there's nothing you can do about it. Boromir uses a unique bodyguard unit that exists only for him and nowhere else, it's called Kingsguard_BG. To change it to swordsmen, open up export_descr_unit.txt and find this entry:
    Spoiler Alert, click show to read: 
    Code:
    type             Kingsguard_BG
    dictionary       Kingsguard_BG      ; Boromirs Bodyguard
    category         infantry
    class            spearmen
    voice_type       Heavy
    banner faction   main_spear
    banner holy      crusade
    soldier          Armored_Sergeants, 60, 0, 1.2
    attributes       sea_faring, hide_forest, hardy, can_withdraw, general_unit, no_custom
    formation        1.2, 1.2, 2.4, 2.4, 4, square, shield_wall
    stat_health      1, 3
    stat_pri         9, 4, no, 0, 0, melee, melee_blade, piercing, spear, 0, 1
    stat_pri_attr    light_spear, spear_bonus_4
    stat_sec         0, 0, no, 0, 0, no, melee_simple, blunt, none, 0, 1
    stat_sec_attr    no
    stat_pri_armour  8, 4, 6, metal
    stat_sec_armour  0, 0, flesh
    stat_heat        6
    stat_ground      0, -1, 0, -2
    stat_mental      17, disciplined, highly_trained
    stat_charge_dist 15
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        2, 720, 300, 90, 90, 720, 2, 250
    armour_ug_levels 3, 4
    armour_ug_models kingsguard, kingsguard_ug1
    ownership        sicily, timurids
    era 0            sicily
    era 1            sicily
    era 2            sicily
    recruit_priority_offset    0
    Change it to this (changes are bolded):
    Spoiler Alert, click show to read: 
    Code:
    type             Kingsguard_BG
    dictionary       Kingsguard_BG      ; Boromirs Bodyguard
    category         infantry
    class            heavy
    voice_type       Heavy
    banner faction   main_infantry
    banner holy      crusade
    soldier          Norse_Swordsmen, 60, 0, 1.2
    attributes       sea_faring, hide_forest, hardy, can_withdraw, general_unit, no_custom
    formation        1.2, 1.2, 2.4, 2.4, 4, square, <delete the entry "shield_wall"
    stat_health      1, 3
    stat_pri         9, 4, no, 0, 0, melee, melee_blade, piercing, sword, 0, 1
    stat_pri_attr    no
    stat_sec         0, 0, no, 0, 0, no, melee_simple, blunt, none, 0, 1
    stat_sec_attr    no
    stat_pri_armour  8, 4, 6, metal
    stat_sec_armour  0, 0, flesh
    stat_heat        6
    stat_ground      0, -1, 0, -2
    stat_mental      17, disciplined, highly_trained
    stat_charge_dist 15
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        2, 720, 300, 90, 90, 720, 2, 250
    armour_ug_levels 3, 4
    armour_ug_models gondor_infantry, gondor_infantry_ug1
    ownership        sicily, timurids
    era 0            sicily
    era 1            sicily
    era 2            sicily
    recruit_priority_offset    0
    Did the "soldier" entry affects the model of the unit or it's another entry?

  5. #5

    Default Re: Unit modding

    Quote Originally Posted by KnightsTemplar View Post
    Did the "soldier" entry affects the model of the unit or it's another entry?
    Yes, in that line "Norse_Swordsmen, 60, 0, 1.2", Norse_Swordsmen refers to a model (which in TATW is Gondor Infantry), 60 is how many men are in the unit, 0 is the number of secondary units, like siege engines or elephants, are in the unit, and 1.2 is the mass of the unit, 1 being normal. The more mass a unit has, the less it is blown back by cavalry charges and the like.

  6. #6
    KnightsTemplar's Avatar Campidoctor
    Join Date
    Aug 2010
    Location
    Hong Kong
    Posts
    1,929

    Default Re: Unit modding

    Quote Originally Posted by Lord Butters I View Post
    Yes, in that line "Norse_Swordsmen, 60, 0, 1.2", Norse_Swordsmen refers to a model (which in TATW is Gondor Infantry), 60 is how many men are in the unit, 0 is the number of secondary units, like siege engines or elephants, are in the unit, and 1.2 is the mass of the unit, 1 being normal. The more mass a unit has, the less it is blown back by cavalry charges and the like.
    But when I take a look at Bodyguard and Swan Knights, they share the same line as Chivaric Knights?

  7. #7

    Default Re: Unit modding

    Quote Originally Posted by KnightsTemplar View Post
    But when I take a look at Bodyguard and Swan Knights, they share the same line as Chivaric Knights?
    True, but if you'll look at the lower line, armor_ug_models, it's different. That line means more than the one in soldier, but both are necessary. This is a guide to the EDU file, it's what I used.

Posting Permissions

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