Author Topic: How to make a unit to have different set of uniform+hat?  (Read 2178 times)

0 Members and 1 Guest are viewing this topic.

Offline Ivkolya

  • Sergeant Major
  • *
  • Posts: 333
    • View Profile
  • Nick: Ivkolya
  • Side: Neutral
How to make a unit to have different set of uniform+hat?
« on: October 03, 2019, 11:14:52 pm »
hello all, I'm making Ottoman Bashi-Bazouks for my mod, they had people of many nations, and accordingly different nations traditions, so there was a large variety of costumes. But simply give to the unit random uniforms and hats isn't a good way, because the hat must match other costume, it will be wrong to see an Albanian with Arab hat (as example). So is there a way to make hats matching uniform, but that are randomly given to the unit?
As a last resort, I can make different nations of Bashi-Bazouks as different units, but it's not so interesting.

And also can I give to a unit lance and musket simultaneously? In game there is or lance or musket :(

Offline Wolffe

  • Lieutenant Colonel
  • *
  • Posts: 1215
  • Bydand!
    • View Profile
    • 92nd Regiment of Foot
  • Nick: 92nd | Col | John Gordon
  • Side: Neutral
Re: How to make a unit to have different set of uniform+hat?
« Reply #1 on: October 18, 2019, 09:06:44 am »
For as far as I know they will always be random when you give 1 troop multiple uniforms.
You could however just add another troop.

Hope this helps you out :p

Offline Ivkolya

  • Sergeant Major
  • *
  • Posts: 333
    • View Profile
  • Nick: Ivkolya
  • Side: Neutral
Re: How to make a unit to have different set of uniform+hat?
« Reply #2 on: October 19, 2019, 08:45:23 pm »
Thank you :)
But I was hoping I can avoid making extra troops:)

Offline DarthKiller

  • Sergeant Major
  • *
  • Posts: 83
    • View Profile
    • Eliteteam alias. The Imperial Army
  • Nick: kk_IR_Nr59_Obst_DarthKiller
  • Side: Union
Re: How to make a unit to have different set of uniform+hat?
« Reply #3 on: October 28, 2019, 12:48:45 pm »
I might be a bit late but just asking, is it a real modification or just a skin for nw?

Cause if it was a modification there are ways in scripting to actually achieve your goal (That however requires you to be able to use the mount & blade scripting language)
Join the Nr59 join the Infantry.
kk_IR_Nr59_Obst_DarthKiller

Offline Woeski

  • First Lieutenant
  • *
  • Posts: 234
  • (2Ch) - DDB - Mamluk
    • View Profile
    • 2Ch & BACM regiment
  • Nick: Woeski
  • Side: Neutral
Re: How to make a unit to have different set of uniform+hat?
« Reply #4 on: October 28, 2019, 07:33:37 pm »
I might be a bit late but just asking, is it a real modification or just a skin for nw?

Cause if it was a modification there are ways in scripting to actually achieve your goal (That however requires you to be able to use the mount & blade scripting language)

The question is still how  :P

Offline Parrot

  • Donator
  • *
  • Posts: 762
  • Lieutenant Colonel - Equestrian Foreign Legion
    • View Profile
    • EQFL Homepage
  • Nick: ExParrot
  • Side: Neutral
Re: How to make a unit to have different set of uniform+hat?
« Reply #5 on: October 31, 2019, 09:54:23 pm »
i managed this in b&i for the french militia; you assign one item to the head, trousers, and feet in the troops module file, then assign a pool of items to the torso. In the scripts file you add a check to the script that triggers on agent spawning, this will check for a specific item and then you can execute some code that will replace the items in the other slots, like this:

Code
	   (try_for_range_backwards,":equipment_slot",ek_item_0,ek_gloves),
     (agent_get_item_slot, ":item_id", ":agent_no", ":equipment_slot"),
     (gt,":item_id",-1), # even have an item there?
     (try_begin),
   (eq, ":item_id", "itm_fr_civ_black"),
   (agent_unequip_item, ":agent_no", "itm_fr_civ_hat_green", ek_head),
   (agent_unequip_item, ":agent_no", "itm_fr_civ_trousers_green", ek_foot),
   (agent_equip_item, ":agent_no", "itm_fr_civ_hat_black", ek_head),
   (agent_equip_item, ":agent_no", "itm_fr_civ_trousers_brown", ek_foot),
     (else_try),
   (eq, ":item_id", "itm_fr_civ_blue_01"),
   (agent_unequip_item, ":agent_no", "itm_fr_civ_hat_green", ek_head),
   (agent_unequip_item, ":agent_no", "itm_fr_civ_trousers_green", ek_foot),
   (agent_equip_item, ":agent_no", "itm_fr_civ_hat_blue_alt", ek_head),
   (agent_equip_item, ":agent_no", "itm_fr_civ_trousers_skyblue", ek_foot),
     (else_try),

as for the voices, use the same principle that applies to the highlanders and king's german legion in NW (i used this for the cantis in b&i, something you're trying to achieve too), but rather than point the script to the highlander voice tuple, point it to the normal female one and have it trigger only on the canti troop.
Check out mods I've worked on: Blood and Iron: Age of Imperialism, and North and South!