cwr
This tutorial is for beginners who wish to learn how to make new troops using the module system.
Here is a very good tutorial on how to set up to module system, if you haven't already.
Start with module_troops.py, and let's start by looking at the code for farmers:
Now its time for a tuple examination:
*farmer = troop ID: Troop ID is used for referencing the troop in other files. So if you want create a new party (more on that later) that has farmers in it, the game looks to the troop ID to see what troop your talking about.
*Farmer = Troop Name: This simply the name that will appear in-game.
*Farmers = Plural Troop Name: This is the name that appears when there's multiple of that troop.
*tf_guarantee_armor = Troop Flag: Guarantees that the troop will wear body armor. Below is a list of helpful starter troop flags (a full list can be found in header_troops).
*no_scene = Only used for NPCs: This troop will not appear in a scene unless specifically dictated by scripts or a mission template.
*reserved = Not used: Don't worry about it
*fac_commoners = The Troops Faction: Used for determining what faction the troop will appear in. (Check Module_Factions for a list of factions)
*[itm_blablabla] = Troop Inventory: Used for determining what items will be used on the troop. It is selected randomly but adding a troop flag will guarantee a troop a particular item (adding the same item multiple times will increase the chance of the troop receiving that item). Its recommended that you work with module_items to dress your soldiers.
*str_5|agi_5|int_5|cha_5 = Custom Attributes: This tuple is not used on the farmer but is essential for creating your own troops, its fairly straight forward. The number goes from a minimum of 4 to a maximum of 30. Below explains what each attribute does.
*def_attrib = Preassigned Attributes: in this case str_7 | agi_5 | int_4 | cha_4
*level(4) = Troop level: one of three major factors that determines advantage in autoresolve (every battle that your not a part of).
*wp(60) = Weapon Proficiency: Weapon proficiency determines weapon speed and damage for melee weapons and accuracy for ranged weapons. wp(60) means that all weapons proficiencies will be approximately 60.
Or if you want a more precise control of weapon proficiencies use this
*knows_common = Preassigned Skills: In this case knows_riding_1|knows_trade_2|knows_inventory_management_2|knows_prisoner_management_1|knows_leadership_1
You can also assign your own skills like this. Type knows_ironflesh_4 and modify the skill that you want and the desired strength of skill on a scale of 1 to 10.
man_face_middle_1, man_face_old_2 = Premade face codes: below is a full list of premade face codes. If put in two faces the game will randomly choose between them.
You can also make your own facecodes. Open Mount&Blade, Go to configure, enable edit mode, start the game and to the face generator (you can do this by creating a new character or go to the character screen and click the avatar) make the desired face and press ctrl~E, copy the face code and paste it in that field.
Now, copy the farmer code to a new troop, and make that troop, using that code arrangement.
For now, I'll assume that this is the troop you made:
And, we want farmers to upgrade into this new troop, right? So, we would then go to the bottom of module troops, and find this:
We still want farmers to be able to upgrade to watchmen, but we also want the player to have a choice to upgrade their farmers to Village Militiamen, right? Well this is what we will replace that with:
And voila! The new troop is created!
Now exit and save module_troops.py compile the module. (double click on build_module.bat)
Now, if you want village farmers to have a few guards with them, then you need to add the to the party template, found in module_party_templates.py.
And we would add the village militia to the party template:
Now compile again, and now village farmers will be joined by village militia.
I hope I provided you with a clear tutorial and all the tools you'll need to make your very own troops. Good Luck
Credit goes to Cunobelin who edited this tutorial for me when I was too lazy to.
Here is a very good tutorial on how to set up to module system, if you haven't already.
Start with module_troops.py, and let's start by looking at the code for farmers:
Code:
["farmer","Farmer","Farmers",tf_guarantee_armor,no_scene,reserved,fac_commoners,
[itm_cleaver,itm_knife,itm_pitch_fork,itm_sickle,itm_club,itm_stones,itm_leather_cap,itm_felt_hat,itm_felt_hat,itm_linen_tunic,itm_coarse_tunic,itm_nomad_boots,itm_wrapping_boots],
def_attrib|level(4),wp(60),knows_common,man_face_middle_1, man_face_old_2],
Now its time for a tuple examination:
*farmer = troop ID: Troop ID is used for referencing the troop in other files. So if you want create a new party (more on that later) that has farmers in it, the game looks to the troop ID to see what troop your talking about.
*Farmer = Troop Name: This simply the name that will appear in-game.
*Farmers = Plural Troop Name: This is the name that appears when there's multiple of that troop.
*tf_guarantee_armor = Troop Flag: Guarantees that the troop will wear body armor. Below is a list of helpful starter troop flags (a full list can be found in header_troops).
tf_male = Self Explanatory
tf_female = Self Explanatory
tf_undead = Would not recommend using: Been known to cause crashes
tf_hero = Marks the troop as special a special NPC (non-playable-character). Health will shown as a percentage instead of simply showing as wounded or not wounded (e.g companions and lords)
tf_allways_fall_dead = Cannot be knocked unconscious, will always be killed
tf_mounted = Will not slow down world party map movement speed
tf_randomize_face = Randomizes faces at the beginning of the game
tf_guarantee_boots = Self Explanatory
tf_guarantee_armor = Self Explanatory
tf_guarantee_helmet = Self Explanatory
tf_guarantee_gloves = Self Explanatory
tf_guarantee_horse = Self Explanatory
tf_guarantee_shield = Self Explanatory
tf_guarantee_ranged = Guarantees archers and crossbowmen their respective ranged weapons
tf_unmoveable_in_party_window = Can't be placed in garrisons
tf_female = Self Explanatory
tf_undead = Would not recommend using: Been known to cause crashes
tf_hero = Marks the troop as special a special NPC (non-playable-character). Health will shown as a percentage instead of simply showing as wounded or not wounded (e.g companions and lords)
tf_allways_fall_dead = Cannot be knocked unconscious, will always be killed
tf_mounted = Will not slow down world party map movement speed
tf_randomize_face = Randomizes faces at the beginning of the game
tf_guarantee_boots = Self Explanatory
tf_guarantee_armor = Self Explanatory
tf_guarantee_helmet = Self Explanatory
tf_guarantee_gloves = Self Explanatory
tf_guarantee_horse = Self Explanatory
tf_guarantee_shield = Self Explanatory
tf_guarantee_ranged = Guarantees archers and crossbowmen their respective ranged weapons
tf_unmoveable_in_party_window = Can't be placed in garrisons
*no_scene = Only used for NPCs: This troop will not appear in a scene unless specifically dictated by scripts or a mission template.
*reserved = Not used: Don't worry about it
*fac_commoners = The Troops Faction: Used for determining what faction the troop will appear in. (Check Module_Factions for a list of factions)
*[itm_blablabla] = Troop Inventory: Used for determining what items will be used on the troop. It is selected randomly but adding a troop flag will guarantee a troop a particular item (adding the same item multiple times will increase the chance of the troop receiving that item). Its recommended that you work with module_items to dress your soldiers.
*str_5|agi_5|int_5|cha_5 = Custom Attributes: This tuple is not used on the farmer but is essential for creating your own troops, its fairly straight forward. The number goes from a minimum of 4 to a maximum of 30. Below explains what each attribute does.
str = Strength: Each point of strength gives one hitpoint.
agi = Agility: Each point of agility increases weapon speed by 0.5 percent
int = Intelligence: Each point of intelligence gives one extra skill point. Not necessary for regular soldiers.
cha = Charisma: Each point of charisma allows you to command one extra troop. Not necessary for regular soldiers.
agi = Agility: Each point of agility increases weapon speed by 0.5 percent
int = Intelligence: Each point of intelligence gives one extra skill point. Not necessary for regular soldiers.
cha = Charisma: Each point of charisma allows you to command one extra troop. Not necessary for regular soldiers.
*def_attrib = Preassigned Attributes: in this case str_7 | agi_5 | int_4 | cha_4
*level(4) = Troop level: one of three major factors that determines advantage in autoresolve (every battle that your not a part of).
*wp(60) = Weapon Proficiency: Weapon proficiency determines weapon speed and damage for melee weapons and accuracy for ranged weapons. wp(60) means that all weapons proficiencies will be approximately 60.
Or if you want a more precise control of weapon proficiencies use this
wpex(60,59,58,57,56,55,54)
One Handed Equals (60)
Two Handed Equals (59)
Polearms Equals (5
Archery Equals (57)
Crossbows Equals (56)
Throwing Equals (55)
One Handed Equals (60)
Two Handed Equals (59)
Polearms Equals (5
Archery Equals (57)
Crossbows Equals (56)
Throwing Equals (55)
*knows_common = Preassigned Skills: In this case knows_riding_1|knows_trade_2|knows_inventory_management_2|knows_prisoner_management_1|knows_leadership_1
You can also assign your own skills like this. Type knows_ironflesh_4 and modify the skill that you want and the desired strength of skill on a scale of 1 to 10.
man_face_middle_1, man_face_old_2 = Premade face codes: below is a full list of premade face codes. If put in two faces the game will randomly choose between them.
swadian_face_younger_1 = 0x0000000000000001124000000020000000000000001c00800000000000000000
swadian_face_young_1 = 0x0000000400000001124000000020000000000000001c00800000000000000000
swadian_face_middle_1 = 0x0000000800000001124000000020000000000000001c00800000000000000000
swadian_face_old_1 = 0x0000000d00000001124000000020000000000000001c00800000000000000000
swadian_face_older_1 = 0x0000000fc0000001124000000020000000000000001c00800000000000000000
swadian_face_younger_2 = 0x00000000000062c76ddcdf7feefbffff00000000001efdbc0000000000000000
swadian_face_young_2 = 0x00000003c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
swadian_face_middle_2 = 0x00000007c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
swadian_face_old_2 = 0x0000000bc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
swadian_face_older_2 = 0x0000000fc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
vaegir_face_younger_1 = 0x0000000000000001124000000020000000000000001c00800000000000000000
vaegir_face_young_1 = 0x0000000400000001124000000020000000000000001c00800000000000000000
vaegir_face_middle_1 = 0x0000000800000001124000000020000000000000001c00800000000000000000
vaegir_face_old_1 = 0x0000000d00000001124000000020000000000000001c00800000000000000000
vaegir_face_older_1 = 0x0000000fc0000001124000000020000000000000001c00800000000000000000
vaegir_face_younger_2 = 0x000000003f00230c4deeffffffffffff00000000001efff90000000000000000
vaegir_face_young_2 = 0x00000003bf00230c4deeffffffffffff00000000001efff90000000000000000
vaegir_face_middle_2 = 0x00000007bf00230c4deeffffffffffff00000000001efff90000000000000000
vaegir_face_old_2 = 0x0000000cbf00230c4deeffffffffffff00000000001efff90000000000000000
vaegir_face_older_2 = 0x0000000ff100230c4deeffffffffffff00000000001efff90000000000000000
khergit_face_younger_1 = 0x0000000009003109207000000000000000000000001c80470000000000000000
khergit_face_young_1 = 0x00000003c9003109207000000000000000000000001c80470000000000000000
khergit_face_middle_1 = 0x00000007c9003109207000000000000000000000001c80470000000000000000
khergit_face_old_1 = 0x0000000b89003109207000000000000000000000001c80470000000000000000
khergit_face_older_1 = 0x0000000fc9003109207000000000000000000000001c80470000000000000000
khergit_face_younger_2 = 0x000000003f0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000
khergit_face_young_2 = 0x00000003bf0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000
khergit_face_middle_2 = 0x000000077f0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000
khergit_face_old_2 = 0x0000000b3f0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000
khergit_face_older_2 = 0x0000000fff0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000
nord_face_younger_1 = 0x0000000000000001124000000020000000000000001c00800000000000000000
nord_face_young_1 = 0x0000000400000001124000000020000000000000001c00800000000000000000
nord_face_middle_1 = 0x0000000800000001124000000020000000000000001c00800000000000000000
nord_face_old_1 = 0x0000000d00000001124000000020000000000000001c00800000000000000000
nord_face_older_1 = 0x0000000fc0000001124000000020000000000000001c00800000000000000000
nord_face_younger_2 = 0x00000000310023084deeffffffffffff00000000001efff90000000000000000
nord_face_young_2 = 0x00000003b10023084deeffffffffffff00000000001efff90000000000000000
nord_face_middle_2 = 0x00000008310023084deeffffffffffff00000000001efff90000000000000000
nord_face_old_2 = 0x0000000c710023084deeffffffffffff00000000001efff90000000000000000
nord_face_older_2 = 0x0000000ff10023084deeffffffffffff00000000001efff90000000000000000
rhodok_face_younger_1 = 0x0000000009002003140000000000000000000000001c80400000000000000000
rhodok_face_young_1 = 0x0000000449002003140000000000000000000000001c80400000000000000000
rhodok_face_middle_1 = 0x0000000849002003140000000000000000000000001c80400000000000000000
rhodok_face_old_1 = 0x0000000cc9002003140000000000000000000000001c80400000000000000000
rhodok_face_older_1 = 0x0000000fc9002003140000000000000000000000001c80400000000000000000
rhodok_face_younger_2 = 0x00000000000062c76ddcdf7feefbffff00000000001efdbc0000000000000000
rhodok_face_young_2 = 0x00000003c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
rhodok_face_middle_2 = 0x00000007c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
rhodok_face_old_2 = 0x0000000bc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
rhodok_face_older_2 = 0x0000000fc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
man_face_younger_1 = 0x0000000000000001124000000020000000000000001c00800000000000000000
man_face_young_1 = 0x0000000400000001124000000020000000000000001c00800000000000000000
man_face_middle_1 = 0x0000000800000001124000000020000000000000001c00800000000000000000
man_face_old_1 = 0x0000000d00000001124000000020000000000000001c00800000000000000000
man_face_older_1 = 0x0000000fc0000001124000000020000000000000001c00800000000000000000
man_face_younger_2 = 0x000000003f0052064deeffffffffffff00000000001efff90000000000000000
man_face_young_2 = 0x00000003bf0052064deeffffffffffff00000000001efff90000000000000000
man_face_middle_2 = 0x00000007bf0052064deeffffffffffff00000000001efff90000000000000000
man_face_old_2 = 0x0000000bff0052064deeffffffffffff00000000001efff90000000000000000
man_face_older_2 = 0x0000000fff0052064deeffffffffffff00000000001efff90000000000000000
merchant_face_1 = man_face_young_1
merchant_face_2 = man_face_older_2
woman_face_1 = 0x0000000000000001000000000000000000000000001c00000000000000000000
woman_face_2 = 0x00000003bf0030067ff7fbffefff6dff00000000001f6dbf0000000000000000
swadian_woman_face_1 = 0x0000000180102006124925124928924900000000001c92890000000000000000
swadian_woman_face_2 = 0x00000001bf1000061db6d75db6b6dbad00000000001c92890000000000000000
khergit_woman_face_1 = 0x0000000180103006124925124928924900000000001c92890000000000000000
khergit_woman_face_2 = 0x00000001af1030025b6eb6dd6db6dd6d00000000001eedae0000000000000000
refugee_face1 = woman_face_1
refugee_face2 = woman_face_2
girl_face1 = woman_face_1
girl_face2 = woman_face_2
mercenary_face_1 = 0x0000000000000000000000000000000000000000001c00000000000000000000
mercenary_face_2 = 0x0000000cff00730b6db6db6db7fbffff00000000001efffe0000000000000000
vaegir_face1 = vaegir_face_young_1
vaegir_face2 = vaegir_face_older_2
bandit_face1 = man_face_young_1
bandit_face2 = man_face_older_2
swadian_face_young_1 = 0x0000000400000001124000000020000000000000001c00800000000000000000
swadian_face_middle_1 = 0x0000000800000001124000000020000000000000001c00800000000000000000
swadian_face_old_1 = 0x0000000d00000001124000000020000000000000001c00800000000000000000
swadian_face_older_1 = 0x0000000fc0000001124000000020000000000000001c00800000000000000000
swadian_face_younger_2 = 0x00000000000062c76ddcdf7feefbffff00000000001efdbc0000000000000000
swadian_face_young_2 = 0x00000003c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
swadian_face_middle_2 = 0x00000007c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
swadian_face_old_2 = 0x0000000bc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
swadian_face_older_2 = 0x0000000fc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
vaegir_face_younger_1 = 0x0000000000000001124000000020000000000000001c00800000000000000000
vaegir_face_young_1 = 0x0000000400000001124000000020000000000000001c00800000000000000000
vaegir_face_middle_1 = 0x0000000800000001124000000020000000000000001c00800000000000000000
vaegir_face_old_1 = 0x0000000d00000001124000000020000000000000001c00800000000000000000
vaegir_face_older_1 = 0x0000000fc0000001124000000020000000000000001c00800000000000000000
vaegir_face_younger_2 = 0x000000003f00230c4deeffffffffffff00000000001efff90000000000000000
vaegir_face_young_2 = 0x00000003bf00230c4deeffffffffffff00000000001efff90000000000000000
vaegir_face_middle_2 = 0x00000007bf00230c4deeffffffffffff00000000001efff90000000000000000
vaegir_face_old_2 = 0x0000000cbf00230c4deeffffffffffff00000000001efff90000000000000000
vaegir_face_older_2 = 0x0000000ff100230c4deeffffffffffff00000000001efff90000000000000000
khergit_face_younger_1 = 0x0000000009003109207000000000000000000000001c80470000000000000000
khergit_face_young_1 = 0x00000003c9003109207000000000000000000000001c80470000000000000000
khergit_face_middle_1 = 0x00000007c9003109207000000000000000000000001c80470000000000000000
khergit_face_old_1 = 0x0000000b89003109207000000000000000000000001c80470000000000000000
khergit_face_older_1 = 0x0000000fc9003109207000000000000000000000001c80470000000000000000
khergit_face_younger_2 = 0x000000003f0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000
khergit_face_young_2 = 0x00000003bf0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000
khergit_face_middle_2 = 0x000000077f0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000
khergit_face_old_2 = 0x0000000b3f0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000
khergit_face_older_2 = 0x0000000fff0061cd6d7ffbdf9df6ebee00000000001ffb7f0000000000000000
nord_face_younger_1 = 0x0000000000000001124000000020000000000000001c00800000000000000000
nord_face_young_1 = 0x0000000400000001124000000020000000000000001c00800000000000000000
nord_face_middle_1 = 0x0000000800000001124000000020000000000000001c00800000000000000000
nord_face_old_1 = 0x0000000d00000001124000000020000000000000001c00800000000000000000
nord_face_older_1 = 0x0000000fc0000001124000000020000000000000001c00800000000000000000
nord_face_younger_2 = 0x00000000310023084deeffffffffffff00000000001efff90000000000000000
nord_face_young_2 = 0x00000003b10023084deeffffffffffff00000000001efff90000000000000000
nord_face_middle_2 = 0x00000008310023084deeffffffffffff00000000001efff90000000000000000
nord_face_old_2 = 0x0000000c710023084deeffffffffffff00000000001efff90000000000000000
nord_face_older_2 = 0x0000000ff10023084deeffffffffffff00000000001efff90000000000000000
rhodok_face_younger_1 = 0x0000000009002003140000000000000000000000001c80400000000000000000
rhodok_face_young_1 = 0x0000000449002003140000000000000000000000001c80400000000000000000
rhodok_face_middle_1 = 0x0000000849002003140000000000000000000000001c80400000000000000000
rhodok_face_old_1 = 0x0000000cc9002003140000000000000000000000001c80400000000000000000
rhodok_face_older_1 = 0x0000000fc9002003140000000000000000000000001c80400000000000000000
rhodok_face_younger_2 = 0x00000000000062c76ddcdf7feefbffff00000000001efdbc0000000000000000
rhodok_face_young_2 = 0x00000003c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
rhodok_face_middle_2 = 0x00000007c00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
rhodok_face_old_2 = 0x0000000bc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
rhodok_face_older_2 = 0x0000000fc00062c76ddcdf7feefbffff00000000001efdbc0000000000000000
man_face_younger_1 = 0x0000000000000001124000000020000000000000001c00800000000000000000
man_face_young_1 = 0x0000000400000001124000000020000000000000001c00800000000000000000
man_face_middle_1 = 0x0000000800000001124000000020000000000000001c00800000000000000000
man_face_old_1 = 0x0000000d00000001124000000020000000000000001c00800000000000000000
man_face_older_1 = 0x0000000fc0000001124000000020000000000000001c00800000000000000000
man_face_younger_2 = 0x000000003f0052064deeffffffffffff00000000001efff90000000000000000
man_face_young_2 = 0x00000003bf0052064deeffffffffffff00000000001efff90000000000000000
man_face_middle_2 = 0x00000007bf0052064deeffffffffffff00000000001efff90000000000000000
man_face_old_2 = 0x0000000bff0052064deeffffffffffff00000000001efff90000000000000000
man_face_older_2 = 0x0000000fff0052064deeffffffffffff00000000001efff90000000000000000
merchant_face_1 = man_face_young_1
merchant_face_2 = man_face_older_2
woman_face_1 = 0x0000000000000001000000000000000000000000001c00000000000000000000
woman_face_2 = 0x00000003bf0030067ff7fbffefff6dff00000000001f6dbf0000000000000000
swadian_woman_face_1 = 0x0000000180102006124925124928924900000000001c92890000000000000000
swadian_woman_face_2 = 0x00000001bf1000061db6d75db6b6dbad00000000001c92890000000000000000
khergit_woman_face_1 = 0x0000000180103006124925124928924900000000001c92890000000000000000
khergit_woman_face_2 = 0x00000001af1030025b6eb6dd6db6dd6d00000000001eedae0000000000000000
refugee_face1 = woman_face_1
refugee_face2 = woman_face_2
girl_face1 = woman_face_1
girl_face2 = woman_face_2
mercenary_face_1 = 0x0000000000000000000000000000000000000000001c00000000000000000000
mercenary_face_2 = 0x0000000cff00730b6db6db6db7fbffff00000000001efffe0000000000000000
vaegir_face1 = vaegir_face_young_1
vaegir_face2 = vaegir_face_older_2
bandit_face1 = man_face_young_1
bandit_face2 = man_face_older_2
Now, copy the farmer code to a new troop, and make that troop, using that code arrangement.
For now, I'll assume that this is the troop you made:
Code:
["village_militia","Village Militiaman","Villiage Militiamen",tf_guarantee_armor,no_scene,reserved,fac_commoners,
[itm_club,itm_hatchet,itm_wooden_shield,itm_leather_cap,itm_gambeson,itm_nomad_boots],
def_attrib|level(8),wp(80),knows_common|knows_ironflesh_1|knows_power_strike_1,man_face_middle_1, man_face_old_2],
And, we want farmers to upgrade into this new troop, right? So, we would then go to the bottom of module troops, and find this:
Code:
upgrade(troops,"farmer", "watchman")
Code:
upgrade2(troops,"farmer", "watchman","village_militia")
And voila! The new troop is created!
Now exit and save module_troops.py compile the module. (double click on build_module.bat)
Now, if you want village farmers to have a few guards with them, then you need to add the to the party template, found in module_party_templates.py.
Code:
("village_farmers","Village Farmers",icon_peasant|pf_civilian,0,fac_innocents,merchant_personality,[(trp_farmer,5,10),(trp_peasant_woman,3,8)]),
Code:
("village_farmers","Village Farmers",icon_peasant|pf_civilian,0,fac_innocents,merchant_personality,[(trp_farmer,5,10),(trp_peasant_woman,3,8),(trp_village_militia,1,4)]),
Now compile again, and now village farmers will be joined by village militia.
I hope I provided you with a clear tutorial and all the tools you'll need to make your very own troops. Good Luck
Credit goes to Cunobelin who edited this tutorial for me when I was too lazy to.