Results 1 to 9 of 9

Thread: General Bodyguard

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default General Bodyguard

    I was wondering if it was possible to make some of the Generals in the game have bodyguard on foot? Don't know where this post should be so feel free to move it. Thank you

  2. #2
    kevindrosario's Avatar Ordinarius
    Join Date
    Jan 2011
    Location
    New Jersey
    Posts
    791

    Default Re: General Bodyguard

    It should be in Medieval 2 -> Mod Workshop -> Text Editing and Scripting

    But anyway, this is a very simple process assuming that your data files are unpacked. You first need to decide what foot unit you want to be your general's bodyguard. Then you need to go into export_descr_units.txt and give them the general_unit attribute. So, for example, let's say I'm playing as England and I want Billmen to be my general's bodyguard unit. I would find their entry in export_descr_unit
    Spoiler Alert, click show to read: 
    type Billmen
    dictionary Billmen ; Billmen, lp
    category infantry
    class heavy
    voice_type Light
    banner faction main_infantry
    banner holy crusade
    soldier Janissary_Heavy_Inf, 60, 0, 1.2
    officer northern_captain
    mount_effect horse +6, camel +6
    attributes sea_faring, hide_forest, can_withdraw, general_unit
    formation 1.2, 0, 2.4, 2.4, 4, square
    stat_health 1, 1
    stat_pri 6, 5, no, 0, 0, melee, melee_blade, slashing, axe, 105, 1
    stat_pri_attr ap
    stat_sec 0, 0, no, 0, 0, no, melee_simple, blunt, none, 0, 1
    stat_sec_attr no
    stat_pri_armour 0, 5, 0, flesh
    stat_sec_armour 0, 0, flesh
    stat_heat 4
    stat_ground 1, -1, 2, 1
    stat_mental 11, normal, trained
    stat_charge_dist 6
    stat_fire_delay 0
    stat_food 60, 300
    stat_cost 1, 540, 150, 75, 55, 390, 4, 50
    armour_ug_levels 0, 1, 4
    armour_ug_models Billmen, Billmen_ug1, Billmen_ug2
    ownership england, slave
    era 1 england
    era 2 england
    recruit_priority_offset 10

    Then add what I've bolded to attribute line. When you get a new general, the game automatically chooses the first entry of a "general_unit" in that file to use as his bodyguard. So when you assign your new bodyguard unit, make sure the unit entry is above the old bodyguard unit in the file.

    If you want to change your starting bodyguard units, you need to go into data/world/maps/campaign/imperial_campaign/descr_strat.txt and do that. Find the part where all your starting characters are listed and change their bodyguard from something like this:
    Spoiler Alert, click show to read: 
    character Henry Plantagenet, named character, male, leader, age 42, x 80, y 217
    traits Factionleader 1 , GovernorInclination 1 , Intelligent 2 , GoodBuilder 1 , PublicFaith 2 , Austere 1 , Unjust 2 , HarshJustice 2 , Corrupt 1 , ReligionStarter 1
    army
    unit NE Bodyguard exp 3 armour 0 weapon_lvl 0
    unit Norman Cavalry exp 1 armour 0 weapon_lvl 0
    unit Norman Serjeants exp 1 armour 0 weapon_lvl 0
    unit Norman Serjeants exp 2 armour 0 weapon_lvl 0
    unit Fyrd Spearmen exp 2 armour 0 weapon_lvl 0
    unit Fyrd Spearmen exp 2 armour 0 weapon_lvl 0
    unit Fyrd Spearmen exp 0 armour 0 weapon_lvl 0
    unit Spear Militia exp 1 armour 0 weapon_lvl 0
    unit Archer Militia exp 2 armour 0 weapon_lvl 0
    unit Archer Militia exp 1 armour 0 weapon_lvl 0
    unit Norman Cavalry exp 1 armour 0 weapon_lvl 0
    unit Hobilars exp 1 armour 0 weapon_lvl 0

    character Edward Plantagenet, named character, male, heir, age 21, x 52, y 211
    traits Factionheir 1 , MilitaryInclination 1 , Loyal 2 , GoodCommander 2 , StrategyChivalry 1 , Brave 1 , LoyaltyStarter 1 , ReligionStarter 1
    army
    unit NE Bodyguard exp 1 armour 0 weapon_lvl 0
    unit Norman Serjeants exp 1 armour 0 weapon_lvl 0
    unit Norman Serjeants exp 1 armour 0 weapon_lvl 0
    unit Fyrd Spearmen exp 2 armour 0 weapon_lvl 0
    unit Fyrd Spearmen exp 2 armour 0 weapon_lvl 0
    unit Longbowmen exp 2 armour 0 weapon_lvl 0
    unit Longbowmen exp 2 armour 0 weapon_lvl 0
    unit Hobilars exp 1 armour 0 weapon_lvl 0

    character Laurence, named character, male, age 24, x 69, y 226
    traits LoyaltyStarter 1 , MilitaryInclination 1 , NaturalMilitarySkill 1 , Drink 1 , GoodCommander 1 , DiscontentGeneral 1 , ReligionStarter 1
    army
    unit NE Bodyguard exp 2 armour 0 weapon_lvl 0
    unit Norman Serjeants exp 1 armour 0 weapon_lvl 0
    unit Norman Serjeants exp 2 armour 0 weapon_lvl 0
    unit Hobilars exp 1 armour 0 weapon_lvl 0

    To something like this depending on what unit you want as the bodyguard.
    Spoiler Alert, click show to read: 
    character Henry Plantagenet, named character, male, leader, age 42, x 80, y 217
    traits Factionleader 1 , GovernorInclination 1 , Intelligent 2 , GoodBuilder 1 , PublicFaith 2 , Austere 1 , Unjust 2 , HarshJustice 2 , Corrupt 1 , ReligionStarter 1
    army
    unit Billmen exp 3 armour 0 weapon_lvl 0
    unit Norman Cavalry exp 1 armour 0 weapon_lvl 0
    unit Norman Serjeants exp 1 armour 0 weapon_lvl 0
    unit Norman Serjeants exp 2 armour 0 weapon_lvl 0
    unit Fyrd Spearmen exp 2 armour 0 weapon_lvl 0
    unit Fyrd Spearmen exp 2 armour 0 weapon_lvl 0
    unit Fyrd Spearmen exp 0 armour 0 weapon_lvl 0
    unit Spear Militia exp 1 armour 0 weapon_lvl 0
    unit Archer Militia exp 2 armour 0 weapon_lvl 0
    unit Archer Militia exp 1 armour 0 weapon_lvl 0
    unit Norman Cavalry exp 1 armour 0 weapon_lvl 0
    unit Hobilars exp 1 armour 0 weapon_lvl 0

    character Edward Plantagenet, named character, male, heir, age 21, x 52, y 211
    traits Factionheir 1 , MilitaryInclination 1 , Loyal 2 , GoodCommander 2 , StrategyChivalry 1 , Brave 1 , LoyaltyStarter 1 , ReligionStarter 1
    army
    unit Billmen exp 1 armour 0 weapon_lvl 0
    unit Norman Serjeants exp 1 armour 0 weapon_lvl 0
    unit Norman Serjeants exp 1 armour 0 weapon_lvl 0
    unit Fyrd Spearmen exp 2 armour 0 weapon_lvl 0
    unit Fyrd Spearmen exp 2 armour 0 weapon_lvl 0
    unit Longbowmen exp 2 armour 0 weapon_lvl 0
    unit Longbowmen exp 2 armour 0 weapon_lvl 0
    unit Hobilars exp 1 armour 0 weapon_lvl 0

    character Laurence, named character, male, age 24, x 69, y 226
    traits LoyaltyStarter 1 , MilitaryInclination 1 , NaturalMilitarySkill 1 , Drink 1 , GoodCommander 1 , DiscontentGeneral 1 , ReligionStarter 1
    army
    unit Billmen exp 2 armour 0 weapon_lvl 0
    unit Norman Serjeants exp 1 armour 0 weapon_lvl 0
    unit Norman Serjeants exp 2 armour 0 weapon_lvl 0
    unit Hobilars exp 1 armour 0 weapon_lvl 0
    Last edited by kevindrosario; May 02, 2011 at 05:20 PM.

  3. #3

    Default Re: General Bodyguard

    Thanks So i can have a different Bodyguard for different Generals?

  4. #4
    kevindrosario's Avatar Ordinarius
    Join Date
    Jan 2011
    Location
    New Jersey
    Posts
    791

    Default Re: General Bodyguard

    Quote Originally Posted by FallLikeConimoes View Post
    Thanks So i can have a different Bodyguard for different Generals?
    Only for the starting generals. Any generals you get during the course of the game will receive the default bodyguard unit, which is the one closest to the top of the export_descr_unit file.

    But like Prestige said, you could make different types of bodyguard units recruitable.

  5. #5

    Default Re: General Bodyguard

    There's a unit called "Ne_Dismounted_Bodyguard" already in the EDU (export_desrc_units) file. It's near the bottom of the list, near the special character units like "Duke William" and "King Harold" etc...

    I'm pretty sure the faction ownership is only for Scotland, france, england, denmark, hre, and maybe a few more of them I forget -- it isn't all the factions.

    It's a heavily armored unit that looks a like dismounted broken lances, only with the smaller size shields. In game, if you edit the Buildings File, you can set it so they're recruited - I'm pretty sure body guard units already come with a Character on their own... The game I play has regular Bodyguard recruited and they come as a character with retinues and can buy mercs etc -

  6. #6

    Default Re: General Bodyguard

    could you make a brief "how to" on assigning starting generals (of the same faction) diffirent bg units ? you said it's doable..so a little help for the noobs? (does that also include spawning via script ones?)

    files needed ?


  7. #7
    kevindrosario's Avatar Ordinarius
    Join Date
    Jan 2011
    Location
    New Jersey
    Posts
    791

    Default Re: General Bodyguard

    Quote Originally Posted by Noobas View Post
    files needed ?
    For the generals you start out with, data/world/maps/campaign/imperial_campaign/descr_strat.txt. For the generals that spawn from a script data/world/maps/campaign/imperial_campaign/campaign_script.txt. For the generals that you get throughout the campaign either through adoption or coming of age, data/export_descr_units.txt

  8. #8
    Withwnar's Avatar Script To The Waist
    Join Date
    Oct 2008
    Location
    Earth
    Posts
    6,329

    Default Re: General Bodyguard

    This is answered in post 2 I think: change the first "unit" under the general in export_descr_strat.txt.

    Similarly for when doing it via script using spawn_army. The first "unit" is the bodyguard...

    Code:
    spawn_army 
      faction sicily
      character  Cammiron, named character, age 30, x 123, y 100
      unit  Gondor Bodyguard    exp 2 armour 1 weapon_lvl 0
      ..other units in army...
    end

  9. #9

    Default Re: General Bodyguard

    could you also explain how can an ordinary roster unit be turned into a BG unit with it's own stats ? i just want to use it for more variety of starting generals (don't want to mesh up the spawning ones for now)

    so..

    1...do i just have to copy-paste the entry for "unit" ,change the title to "unit_BG" (in both type and dictionary entry)

    2...tweak the stats according to my preferences

    3....set "recruit_priority_offset" to 0 (so that it doesn't become a recruitable roster unit)

    and that's it ?

    (4)..maybe "no custom" (in order to not jam the custom battle menu) too ?
    ...and what about "general_unit" ? i guess i don't have to put it in order to not interfere with the usual one ?

    EDIT
    what about right-click > unit card ? (i guess even though the above seems correct ,it would "get stuck" on not having a card..so what other files besides EDU and descr_strat do i need ?
    Last edited by Noobio; May 23, 2011 at 06:53 AM.


Posting Permissions

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