Results 1 to 5 of 5

Thread: How to Add Heroes in Custom Battle

  1. #1

    Default How to Add Heroes in Custom Battle

    Adding heroes in Custom Battle


    This is a very simple tutorial which allows you to play heroes with their bodyguards in custom battle. For that you need a free unit slot left in the EDU. Just take care about one thing, the faction in which you're hero will be must already have been coded for. It has to be the original faction of the heroes.
    As an example I will add Faramir to the Gondor faction for the mod TATW

    1)Firstly you have to choose which unit you will use as a bodyguard. I will choose the unit already used in the campaign : Ithilien rangers:

    Spoiler Alert, click show to read: 
    Code:
    type             Ithilien Rangers_BG
    dictionary       Ithilien_Rangers_BG      ; Faramirs Bodyguard
    category         infantry
    class            missile
    voice_type       Heavy
    banner faction   main_missile
    banner holy      crusade
    soldier          rangers, 60, 0, 1
    mount_effect     elephant +3
    attributes       sea_faring, hide_improved_forest, extreme_range, very_hardy, can_withdraw, stakes, stakes, general_unit, no_custom, free_upkeep_unit
    formation        1.2, 1.2, 2.4, 2.4, 4, square
    stat_health      1, 3
    stat_pri         9, 2, arrow, 200, 35, missile, missile_mechanical, piercing, none, 0, 1
    stat_pri_attr    no
    stat_sec         8, 2, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
    stat_sec_attr    no
    stat_pri_armour  5, 3, 0, leather
    stat_sec_armour  0, 0, flesh
    stat_heat        2
    stat_ground      0, -1, 1, -2
    stat_mental      16, normal, trained
    stat_charge_dist 15
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        2, 540, 220, 50, 50, 540, 2, 250
    armour_ug_levels 0, 1
    armour_ug_models rangers, rangers_ug1
    ownership        sicily, timurids
    era 0            sicily, timurids
    era 1            sicily, timurids
    era 2            sicily, timurids
    recruit_priority_offset    0


    2)After that you have to copy the selected unit under the first one and change the name, for example add _CB at the end, like this, and delet the no_custom :

    Warning: copy it just above, other what i don't know why it will bug.

    Spoiler Alert, click show to read: 
    Code:
    type             Ithilien Rangers_BG
    dictionary       Ithilien_Rangers_BG      ; Faramirs Bodyguard
    category         infantry
    class            missile
    voice_type       Heavy
    banner faction   main_missile
    banner holy      crusade
    soldier          rangers, 60, 0, 1
    mount_effect     elephant +3
    attributes       sea_faring, hide_improved_forest, extreme_range, very_hardy, can_withdraw, stakes, stakes, general_unit, no_custom, free_upkeep_unit
    formation        1.2, 1.2, 2.4, 2.4, 4, square
    stat_health      1, 3
    stat_pri         9, 2, arrow, 200, 35, missile, missile_mechanical, piercing, none, 0, 1
    stat_pri_attr    no
    stat_sec         8, 2, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
    stat_sec_attr    no
    stat_pri_armour  5, 3, 0, leather
    stat_sec_armour  0, 0, flesh
    stat_heat        2
    stat_ground      0, -1, 1, -2
    stat_mental      16, normal, trained
    stat_charge_dist 15
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        2, 540, 220, 50, 50, 540, 2, 250
    armour_ug_levels 0, 1
    armour_ug_models rangers, rangers_ug1
    ownership        sicily, timurids
    era 0            sicily, timurids
    era 1            sicily, timurids
    era 2            sicily, timurids
    recruit_priority_offset    0
    
    type             Ithilien Rangers_CB
    dictionary       Ithilien_Rangers_CB     ; Faramirs Custom Battle
    category         infantry
    class            missile
    voice_type       Heavy
    banner faction   main_missile
    banner holy      crusade
    soldier          rangers, 60, 0, 1
    mount_effect     elephant +3
    attributes       sea_faring, no_custom, hide_improved_forest, extreme_range, very_hardy, can_withdraw, stakes, stakes, general_unit, free_upkeep_unit
    formation        1.2, 1.2, 2.4, 2.4, 4, square
    stat_health      1, 3
    stat_pri         9, 2, arrow, 200, 35, missile, missile_mechanical, piercing, none, 0, 1
    stat_pri_attr    no
    stat_sec         8, 2, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
    stat_sec_attr    no
    stat_pri_armour  5, 3, 0, leather
    stat_sec_armour  0, 0, flesh
    stat_heat        2
    stat_ground      0, -1, 1, -2
    stat_mental      16, normal, trained
    stat_charge_dist 15
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        2, 540, 220, 50, 50, 540, 2, 250
    armour_ug_levels 0, 1
    armour_ug_models rangers, rangers_ug1
    ownership        sicily, timurids
    era 0            sicily, timurids
    era 1            sicily, timurids
    era 2            sicily, timurids
    recruit_priority_offset    0



    3)The you have to find the coded name of the heroes model in the file. The best place to find it is in the campaign_strat or the campaign_script For Faramir it is faramir
    Then add under the line coded by soldiers the line:
    Code:
    officer         "coded_name_of_the_heroes"
    It does this:
    Spoiler Alert, click show to read: 
    Code:
    type             Ithilien Rangers_CB
    dictionary       Ithilien_Rangers_CB     ; Faramirs Custom Battle
    category         infantry
    class            missile
    voice_type       Heavy
    banner faction   main_missile
    banner holy      crusade
    soldier          rangers, 60, 0, 1
    officer 	 faramir
    mount_effect     elephant +3
    attributes       sea_faring, hide_improved_forest, extreme_range, very_hardy, can_withdraw, stakes, stakes, general_unit, free_upkeep_unit
    formation        1.2, 1.2, 2.4, 2.4, 4, square
    stat_health      1, 3
    stat_pri         9, 2, arrow, 200, 35, missile, missile_mechanical, piercing, none, 0, 1
    stat_pri_attr    no
    stat_sec         8, 2, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
    stat_sec_attr    no
    stat_pri_armour  5, 3, 0, leather
    stat_sec_armour  0, 0, flesh
    stat_heat        2
    stat_ground      0, -1, 1, -2
    stat_mental      16, normal, trained
    stat_charge_dist 15
    stat_fire_delay  0
    stat_food        60, 300
    stat_cost        2, 540, 220, 50, 50, 540, 2, 250
    armour_ug_levels 0, 1
    armour_ug_models rangers, rangers_ug1
    ownership        sicily, timurids
    era 0            sicily, timurids
    era 1            sicily, timurids
    era 2            sicily, timurids
    recruit_priority_offset    0


    4)Here you unit is available in custom battle. But it will have no name or pisture. Now we will add the name. Open the export_unit in the text folder. You will need the name_of_the heroes_unit and add things in this format at the end of the file:
    Code:
    {name_of_the heroes_unit} Name of the unit
    {name_of_the heroes_unit_descr} Long description of the unit
    {name_of_the heroes_unit_descr_short} Short description of the unit
    It gives:
    Spoiler Alert, click show to read: 
    Code:
    {Ithilien_Rangers_CB}	Faramirs Bodyguards
    {Ithilien_Rangers_CB_descr}
    After the Dark Lord Sauron returned to Mordor, the fair region of Ithilien was abandoned by its inhabitants. The Stewards of Gondor created the Rangers of Ithilien for both scouting and ambushing purposes. These brave men are mostly descendants from people who lived in the green lands of Ithilien before it was deserted. Masters of hiding in forests, they are perfect for hit and run tactics or ambushing. They wield their powerful longbows with great accuracy and have swords for close combat. Armoured mostly with camouflaged leather, they can’t be trusted to hold their ground against heavily armed forces.
    {Ithilien_Rangers_CB_descr_short}
    Light archers with excellent morale and stamina. Best used in supporting or ambushing roles.


    5)Now we will add the picture if the heroes for the unit card:
    • Find the heroes portrait in the data/ui/custom_portrait folder. Take the young or the older one.
    • Then copy it in the data/ui/units/"name of the faction" folder. take care, the name of the faction should be the coded one, for Gondor it is sicily.
    • Rename it "#Name of the heroes unit"


    For Faramir it gives:




    And this is finished: Enjoy
    Last edited by Arandir Tur-Anion de Bodemloze; November 15, 2012 at 01:53 PM.

  2. #2
    Gigantus's Avatar I am not special - I am a limited edition.
    Patrician took an arrow to the knee spy of the council

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    53,126
    Blog Entries
    35

    Default Re: How to Add Heroes in Custom Battle

    Simple, effective - thanks. All that is needed now, is how to restrict the 'recruiting' in custom battle to one unit.










  3. #3
    Emperor of Hell's Avatar SPA-NED 1-5
    Join Date
    Jul 2011
    Location
    Netherlands
    Posts
    5,747

    Default Re: How to Add Heroes in Custom Battle

    Good tutorial

    Quote Originally Posted by Gigantus
    All that is needed now, is how to restrict the 'recruiting' in custom battle to one unit.
    Make their costs increase to an unreachable amount for a second unit, so like this:

    Code:
    stat_cost        2, 540, 220, 50, 50, 540, 1, 9999999
    I don't know if there is a limit for the "99999999" number, requires testing.

  4. #4
    BM309K58SMERCH's Avatar Centenarius
    Join Date
    Feb 2012
    Location
    Gensokyo
    Posts
    879

    Default Re: How to Add Heroes in Custom Battle

    Is there a way to do this without the bodyguards? (ie. The hero alone for Custom Battles)

  5. #5

    Default Re: How to Add Heroes in Custom Battle

    No, except if you code this unit as an elephant I thonf. I do not I've found the way, and it is I think impossible to make single heroes unit.

Posting Permissions

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