Log in

View Full Version : Tutorial - Adding a unit to the game



Pages : 1 [2]

Simon The Killer
11-17-2007, 22:32
i hate to seem like a noob but i follow the directions to the letter and i cant get anything
im trying to make an unit thats basically a insanely good armored swordsmen for england
its supposed to have the same look but have a bow for a secondary weapon and be unstoppable so i can fight off endless hordes of turmirds and mongols and the like on another mod im working on

here is what i have in the

type Marines
dictionary Marines ; Marines
category infantry
class heavy
voice_type Heavy
banner faction main_infantry
banner holy crusade
soldier Armored_Swordsmen, 48, 0, 2.4
attributes sea_faring, can_swim, hide_anywhere, can_sap, command, hardy, can_withdraw, free_upkeep_unit
formation 1.2, 1.2, 2.4, 2.4, 4, square
stat_health 8, 0
stat_pri 60, 16, no, 0, 0, melee, melee_blade, piercing, sword, 10, 1
;stat_pri_ex 10, 10, 10
stat_pri_attr ap
stat_sec 48, 10, bodkin_arrow, 800, 3000, missile, missile_mechanical, piercing, none, 18, 1
;stat_sec_ex 10, 10, 10
stat_sec_attr bp
stat_pri_armour 36, 32, 36, metal
;stat_armour_ex 8, 9, 0, 0, 8, 6, 6, metal
stat_sec_armour 0, 0, flesh
stat_heat 0
stat_ground 8, 8, 8, 8
stat_mental 60, disciplined, lock_moral
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 610, 150, 90, 70, 610, 4, 150
armour_ug_levels 4, 5
armour_ug_models Marines, Marines_ug1
ownership england
era 1 england
era 2 england
;unit_info 60, 48, 104

i did everything but the DB and make a new texture thing cause im not making any new skins or textures just a really good unit for the same faction

Mother Yoda
11-23-2007, 02:48
I read the second thing listed that is needed to be done but I can't find anything for naval units? Could someone tell me how to do so?

nikolai1962
11-25-2007, 01:45
Naval units are a lot simpler.

Example--a merc longboat.

Copy and paste the listing for longboat in the export_descr_units file and change the things in red.



type merc longboat
dictionary longboat ; Longboat
category ship
class light
voice_type Light
soldier Peasants, 20, 0, 1
ship light warship
attributes sea_faring, can_withdraw, mercenary_unit
formation 50, 50, 75, 75, 1, square
stat_health 1, 0
stat_pri 8, 0, no, 0, 0, melee, melee_simple, slashing, none, 25, 1
;stat_pri_ex 0, 0, 0
stat_pri_attr no
stat_sec 0, 0, no, 0, 0, no, melee_simple, blunt, none, 25, 1
;stat_sec_ex 0, 0, 0
stat_sec_attr no
stat_pri_armour 0, 3, 0, flesh
;stat_armour_ex 0, 0, 0, 0, 5, 0, 0, flesh
stat_sec_armour 0, 0, flesh
stat_heat 0
stat_ground 0, 0, 0, 0
stat_mental 8, normal, trained
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 400, 200, 100, 100, 500, 4, 120
armour_ug_levels 0
armour_ug_models Peasants
ownership slave
;unit_info 8, 0, 5

Then in the descr_mercenaries.txt, in the section for Scandinavia change the line:


unit merc cog, exp 0 cost 400 replenish 0.03 - 0.15 max 1 initial 1

to


unit merc longboat, exp 0 cost 400 replenish 0.03 - 0.15 max 1 initial 1

That's the minimum you need to do. You can start up a game as denmark and a general can recruit a merc longboat on the coast.


The "dictionary" line in blue points the game at the text, title and ship picture the game uses so with that line unchanged the ships will have the same title and text as the original longboat.

If you want to change the text/title then you change the dictionary line to say "merc_longboat". You'd then need to:

1. Add an entry for "merc_longboat" in the units.text file in the text folder
2. Copy the longboat pictures from the UI folder for denmark, rename them to merc_longboat, then put them in the "slave" UI folder.

Suraknar
12-03-2007, 09:55
Thank you Musashi for this Tutorial.

The Model DB way was a turn off for modding in this TW game, however, after a couple of hours of just looking at the file I build up enough courage to start modding it, and thus far I was successful without crashes.

A few Things I would like to share which may solve many people's issues with this file.

1st - I use Notepad, with Word Wrap on to do my modding. Without Word Wrap it is very difficult to navigate in the Data (but its your call).

2nd - It is very important to remember that there are places between some blocks that use 2 spaces. These have to be reproduced, specially if you want to make a unit from Faction A also available to Faction B (read bellow for more).

3rd - Never ever use "Enter/Return" key when you do operations in this file. Use the left and right arrows to navigate around, use Spacebar, and only use Copy and Paste operations, and always verify for 1 or 2 spaces at the end or the beginning of where you are copy pasting the new data. And of course use the Find function to find units fast, by always placing your cursor to the beginning of the file, since you want to find the first entry of a given unit, like CTRL-F, "dismounted_e_chivalric_knights".

4th - use the "-0.090000004 0 0 -0.34999999 0.80000001 0.60000002" strings to your visual advantage, they repeat only between different models so they do make good boxing indicators when you are looking at the file full of text.

5th - Start slowly. I started by simply making changes to some factions, taking a unit from one faction and making it available to the another. For instance I gave a couple key advanced units to Byzantium. This helps to become familiar with the file before moving to adding full new units. learn how it works first before making to many changes at once.

1 space or 2 Spaces?

Each unit block follows the same format.

Unit name/Model Info, Texture/sprite Info, Attachments texture Info, Weapons/Skeleton Info

This is repeated for the same unit, upgrade models if there are any.

What is important to know is that there is TWO spaces in some areas.


Unit name/Model InfoOne SpaceTexture/sprite InfoOne SpaceAttachments InfoTwo SpacesWeapons/Animation Info

Thus far, this is pretty straight forward when the unit is used by 1 faction.

But when the model is used by more than one Faction there are a couple more things to watch for. Lets say the following unit is shared by 4 factions.


Unit name/Model InfoOne Space4Texture/sprite InfoOne SpaceTexture/sprite InfoOne SpaceTexture/sprite InfoOne SpaceTexture/sprite InfoOne Space4Attachments InfoTwo SpacesAttachments InfoTwo SpacesAttachments InfoTwo SpacesAttachments InfoTwo SpacesWeapons/Animation Info

Notice the 4, this is the number of Factions that use that Unit at the same time as the Number of textures or attachments to follow. In short its the Faction count.

So, if you wanted to give reiters to a second faction, the count would be 2.

And that is about it, I haven't yet used KnightErrant's formated DB, because I just discovered it. Still, this maybe helpful to some, and I thought to share it.

Happy Modding.

Wontonman
01-19-2008, 02:11
Hello, im trying to add a unit into the game, and it crashes as soon as the battle loads, and just b4 crashing it shows everything white and black.


my modeldb


15 Hlaalu_Spearmen 1 4 48 unit_models/_Units/EN_Lmail_Hmail/DEHSPMlod0.mesh 121 48 unit_models/_Units/EN_Lmail_Hmail/DEHSPMlod1.mesh 900 48 unit_models/_Units/EN_Lmail_Hmail/DEHSPMlod2.mesh 2500 48 unit_models/_Units/EN_Lmail_Hmail/DEHSPMlod3.mesh 6400 1 7 england 78 unit_models/_Units/EN_Lmail_Hmail/textures/TX_A_bonemold_armun_an_helm.texture 72 unit_models/_Units/EN_Lmail_Hmail/textures/TX_A_bonemold_boots00.texture 72 unit_models/_Units/EN_Lmail_Hmail/textures/TX_A_bonemold_boots01.texture 82 unit_models/_Units/EN_Lmail_Hmail/textures/TX_A_bonemold_gah_julan_cuirass.texture 71 unit_models/_Units/EN_Lmail_Hmail/textures/TX_A_bonemold_ncloth.texture 76 unit_models/_Units/EN_Lmail_Hmail/textures/TX_A_bonemold_towershield.texture 71 unit_models/_Units/EN_Lmail_Hmail/textures/TX_B_N_Dark Elf_M_H03.texture 73 unit_models/_Units/EN_Lmail_Hmail/textures/TX_B_N_Dark Elf_M_Hpalm.texture 69 unit_models/_Units/EN_Lmail_Hmail/textures/Tx_C_Robe_comm3_01.texture 70 unit_models/_Units/EN_Lmail_Hmail/textures/TX_W_silver_spear02.texture 67 unit_models/_Units/EN_Lmail_Hmail/textures/TX_W_Spear_blade.texture 73 unit_models/_Units/EN_Lmail_Hmail/textures/TX_W_SPEAR_IRON_MIDDLE.texture 50 unit_sprites/merc_Dummy_EN_Spearmen_ug2_sprite.spr 1 4 merc 55 unit_models/AttachmentSets/Final Kite_merc_diff.texture 55 unit_models/AttachmentSets/Final Kite_merc_norm.texture 0 1 4 None 10 MTW2_Spear 0 2 18 MTW2_Spear_primary 14 fs_test_shield 0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002

my edu


type Hlaalu Spearmen
dictionary Hlaalu_Spearmen ; Hlaalu Spearmen
category infantry
class spearmen
voice_type Light
accent Mediterranean
banner faction main_spear
banner holy crusade
soldier Mercenary_Spearmen, 60, 0, 1
attributes sea_faring, hide_forest, can_withdraw
formation 1.2, 1.2, 2.4, 2.4, 4, square, schiltrom
stat_health 1, 0
stat_pri 7, 3, no, 0, 0, melee, melee_blade, piercing, spear, 25, 0.6
;stat_pri_ex 0, 0, 0
stat_pri_attr spear, spear_bonus_8
stat_sec 0, 0, no, 0, 0, no, melee_simple, blunt, none, 25, 1
;stat_sec_ex 0, 0, 0
stat_sec_attr no
stat_pri_armour 5, 3, 6, metal
;stat_armour_ex 5, 0, 0, 0, 3, 6, 6, metal
stat_sec_armour 0, 0, flesh
stat_heat 4
stat_ground 1, -2, 3, 2
stat_mental 5, normal, trained
stat_charge_dist 20
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 540, 185, 85, 65, 540, 4, 130
armour_ug_levels 2
armour_ug_models Hlaalu_Spearmen
ownership england
;unit_info 7, 0, 14


i dont have a clue about whats wrong please help :help:

Nevada
01-20-2008, 15:27
hi there,
I just went through it and had no problems, I created a new texture (recoloring a russian one) and then I started the game and I see only the model, it's like some kind of ghostguard:clown:

https://img88.imageshack.us/img88/6315/0048bi1.jpg (https://imageshack.us)

the unit is based on the Dvor unit of the vanilla russia, do I need to add a mount to georgia (the new faction i added the unit) or is the mistake somewhere else?

here's my export_descr_unit:

type G Bodyguard
dictionary G_Bodyguard ; Georgian Bodyguard
category cavalry
class missile
voice_type General
banner faction main_cavalry
banner holy crusade_cavalry
soldier Dvor_Cavalry, 16, 0, 1
mount eastern armoured horse
mount_effect elephant -4, camel -4
attributes sea_faring, hide_forest, can_withdraw, can_formed_charge, general_unit
formation 2, 4.4, 3, 6, 3, square
stat_health 1, 0
stat_pri 10, 3, cav_composite_arrow, 120, 20, missile, missile_mechanical, piercing, none, 25, 1
;stat_pri_ex 0, 0, 0
stat_pri_attr no
stat_sec 12, 3, no, 0, 0, melee, melee_blade, piercing, sword, 25, 1
;stat_sec_ex 0, 0, 0
stat_sec_attr ap
stat_pri_armour 6, 6, 6, metal
;stat_armour_ex 3, 4, 6, 0, 5, 6, 6, metal
stat_sec_armour 0, 0, flesh
stat_heat 6
stat_ground 0, 0, 0, 2
stat_mental 11, disciplined, trained
stat_charge_dist 45
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 960, 250, 95, 225, 960, 1, 280
armour_ug_levels 2, 3, 4
armour_ug_models Dvor_Cavalry, Dvor_Cavalry_ug1, Dvor_Cavalry_ug2
ownership georgia
era 0 georgia
era 1 georgia
era 2 georgia
;unit_info 9, 10, 14
recruit_priority_offset 25

and here's the model.db (or what i added):

5 Horse
15 MTW2_HR_Javelin
12 MTW2_HR_Mace 2
23 MTW2_HR_Javelin_Primary
14 fs_test_shield 2
17 MTW2_Mace_Primary
14 fs_test_shield
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
11 g_bodyguard
1 4
68 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/dvor_cavalry_lod0.mesh 121
68 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/dvor_cavalry_lod1.mesh 900
68 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/dvor_cavalry_lod2.mesh 2500
68 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/dvor_cavalry_lod3.mesh 6400
1
7 georgia
97 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/textures/EE_Bekhtera_Heavy_Lamellar_georgia.texture
96 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/textures/EE_Bekhtera_Heavy_Lamellar_normal.texture
43 unit_sprites/georgia_G_Bodyguard_sprite.spr
1
7 georgia
61 unit_models/AttachmentSets/Final Teardrop_russia_diff.texture
61 unit_models/AttachmentSets/Final Teardrop_russia_norm.texture 0
1
5 Horse
11 MTW2_HR_Bow
12 MTW2_HR_Mace 2
19 MTW2_HR_Bow_Primary
14 fs_test_shield 2
17 MTW2_Mace_Primary
14 fs_test_shield
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
15 g_bodyguard_ug1
1 4
72 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/dvor_cavalry_ug1_lod0.mesh 121
72 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/dvor_cavalry_ug1_lod1.mesh 900
72 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/dvor_cavalry_ug1_lod2.mesh 2500
72 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/dvor_cavalry_ug1_lod3.mesh 6400
1
7 georgia
97 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/textures/EE_Bekhtera_Heavy_Lamellar_georgia.texture
96 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/textures/EE_Bekhtera_Heavy_Lamellar_normal.texture
47 unit_sprites/georgia_G_Bodyguard_ug1_sprite.spr
1
7 georgia
61 unit_models/AttachmentSets/Final Teardrop_russia_diff.texture
61 unit_models/AttachmentSets/Final Teardrop_russia_norm.texture 0
1
5 Horse
11 MTW2_HR_Bow
12 MTW2_HR_Mace 2
19 MTW2_HR_Bow_Primary
14 fs_test_shield 2
17 MTW2_Mace_Primary
14 fs_test_shield
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
15 g_bodyguard_ug2
1 4
72 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/dvor_cavalry_ug2_lod0.mesh 121
72 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/dvor_cavalry_ug2_lod1.mesh 900
72 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/dvor_cavalry_ug2_lod2.mesh 2500
72 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/dvor_cavalry_ug2_lod3.mesh 6400
1
7 georgia
97 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/textures/EE_Bekhtera_Heavy_Lamellar_georgia.texture
96 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/textures/EE_Bekhtera_Heavy_Lamellar_normal.texture
47 unit_sprites/georgia_G_Bodyguard_ug2_sprite.spr
1
7 georgia
61 unit_models/AttachmentSets/Final Teardrop_russia_diff.texture
61 unit_models/AttachmentSets/Final Teardrop_russia_norm.texture 0

Motep
03-24-2008, 04:22
ah! I dont have the textures thanks to faulty unpacking programs. Or maybe faulty packs....


And to the dude above me, that actually looks rather cool

lonck
04-09-2008, 03:34
What files do we have to mod to change weapon? You didn't seem to talk about how you gave your unit a gun, as it seems they do in the screenshot. Also, how do we change the horse? I don't seem to find how horses are given to cavalry units so that I can change their textures.
I am having this problem with the varangian guard. I modded the texture but the axes and the shields don't have the proper color.
https://i144.photobucket.com/albums/r183/photobuckteh/vara.jpg
the code:

7 england
78 unit_models/_Units/ES_Greek_Greek_Heavy/textures/mtw2_es_greek_england.texture
78 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_normal.texture
49 unit_sprites/england_Varangian_Guard_sprite.spr

budokwai
07-04-2008, 03:50
Hello i am new to the modding world and I really appreciate these tutorials:2thumbsup:, but I have a little problem, I did a new unit for scotland, I used the look of a noble swordsmen and I changed his sword and shield for a 2h sword (the same one the highland nobles use) I did everything you say in the tutorial but when I start the game and do a custom battle I cant find my unit:help:

Flying Pig
08-17-2008, 13:09
I copied the dismounted_GOTHIC_knights entry, changed the name tto heavy_alamanoi, and all the 1 3 hre entries into 1 9 byzantuim. But when I run it I get white knights. HELP, what's the problem?

Darkvicer98
08-18-2008, 20:00
I can't find the files to mod. I go to my M2TW directory and all i find is some data files, however there is 5 data pack files in the packs folder. I would like to try out these Dragoon's but i can't seem to find the files.

zindel 14
05-27-2009, 03:33
Please help, I've been messing around with the battle_models thing for this group I'm making, I think I've got everything right on my other stuff. But, it still isn't working and I think something on this is the problem. Can anyone give me their advice?














11 Aindrea_ug1 1 3 82

unit_models/_Units/ES_Greek_Greek_Heavy/dismounted_byzantine_lancers_ug1_lod0.mesh 121 82

unit_models/_Units/ES_Greek_Greek_Heavy/dismounted_byzantine_lancers_ug1_lod1.mesh 1225 82

unit_models/_Units/ES_Greek_Greek_Heavy/dismounted_byzantine_lancers_ug1_lod2.mesh 6400 1 7

Denmark 78 unit_models/_Units/ES_Greek_Greek_Heavy/textures/Aindrea.texture 65

unit_models/_Units/ES_Greek_Greek_Heavy/textures/mtw2_es_greek_normal.texture 82

unit_sprites/byzantium_Byzantine_Infantry_ug1_sprite.spr 1 7 Denmark 58

unit_models/AttachmentSets/Final Kite_byzantium_diff.texture 60 unit_models/AttachmentSets/Final

Kite_byzantium_norm.texture 0 1 4 None 14 MTW2_Swordsman 0 2 18 MTW2_Sword_Primary 14

fs_test_shield 0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
11 Aindrea_ug2 1 3 82

unit_models/_Units/ES_Greek_Greek_Heavy/dismounted_byzantine_lancers_ug2_lod0.mesh 121 82

unit_models/_Units/ES_Greek_Greek_Heavy/dismounted_byzantine_lancers_ug2_lod1.mesh 1225 82

unit_models/_Units/ES_Greek_Greek_Heavy/dismounted_byzantine_lancers_ug2_lod2.mesh 6400 1 7

Denmark 78 unit_models/_Units/ES_Greek_Greek_Heavy/textures/Aindrea.texture 65

unit_models/_Units/ES_Greek_Greek_Heavy/textures/mtw2_es_greek_normal.texture 82

unit_sprites/byzantium_Dismounted_Byzantine_Lancers_ug2_sprite.spr 1 7 Denmark 58

unit_models/AttachmentSets/Final Kite_byzantium_diff.texture 60 unit_models/AttachmentSets/Final

Kite_byzantium_norm.texture 0 1 4 None 14 MTW2_Swordsman 0 2 18 MTW2_Sword_Primary 14

fs_test_shield 0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002 11 Aindrea_ug3 1 3 82

unit_models/_Units/ES_Greek_Greek_Heavy/dismounted_byzantine_lancers_ug3_lod0.mesh 121 82

unit_models/_Units/ES_Greek_Greek_Heavy/dismounted_byzantine_lancers_ug3_lod1.mesh 1225 82

unit_models/_Units/ES_Greek_Greek_Heavy/dismounted_byzantine_lancers_ug3_lod2.mesh 6400 1 7

Denmark 78 unit_models/_Units/ES_Greek_Greek_Heavy/textures/Aindrea.texture 65

unit_models/_Units/ES_Greek_Greek_Heavy/textures/mtw2_es_greek_normal.texture 82

unit_sprites/byzantium_Dismounted_Byzantine_Lancers_ug3_sprite.spr 1 7 Denmark 58

unit_models/AttachmentSets/Final Kite_byzantium_diff.texture 60 unit_models/AttachmentSets/Final

Kite_byzantium_norm.texture 0 1 4 None 14 MTW2_Swordsman 0 2 18 MTW2_Sword_Primary 14

fs_test_shield 0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002

camren shea
06-04-2009, 13:29
this is awesome :2thumbsup:
just on thing though how can I get a missle unit (such as genoa crossbowmen) to have a super beastly arrow attack. like what should I change in Export_descr_unit?

Makanyane
06-14-2009, 18:20
you'd change the damage inflicted on other units by changing the units stats in Export_descr_unit

did you mean that or the projectile animation?

BHCluster
11-11-2010, 00:50
Hi everyone I have a problem with this ad the problem is that units are invisible! my files are as follows:



23 bosnian_peasant_archers
1 4
64 unit_models/_Units/ES_Peasant_Padded/s_peasant_archers_lod0.mesh 121
64 unit_models/_Units/ES_Peasant_Padded/s_peasant_archers_lod1.mesh 900
64 unit_models/_Units/ES_Peasant_Padded/s_peasant_archers_lod2.mesh 2500
64 unit_models/_Units/ES_Peasant_Padded/s_peasant_archers_lod3.mesh 6400
1
6 bosnia
71 unit_models/_Units/ES_Peasant_Padded/textures/ES_Peasant_bosnia.texture
71 unit_models/_Units/ES_Peasant_Padded/textures/ES_Peasant_normal.texture
47 unit_sprites/Bosnian_Peasant_Archers_sprite.spr
1
6 bosnia
68 unit_models/AttachmentSets/Final European Archer_bosnia_diff.texture
68 unit_models/AttachmentSets/Final European Archer_bosnia_norm.texture 0
1
4 None
16 MTW2_Fast_Bowman
18 MTW2_Fast_Knifeman 1
19 MTW2_Bowman_Primary 1
18 MTW2_Knife_Primary
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002




type Bosnian Peasant Archers
dictionary Bosnian_Peasant_Archers ; Bosnian Archers
category infantry
class missile
voice_type Light
banner faction main_missile
banner holy crusade
soldier S_Peasant_Archers, 48, 0, 0.8
attributes sea_faring, hide_forest, can_withdraw
formation 1.2, 1.2, 2.4, 2.4, 4, square
stat_health 1, 0
stat_pri 5, 1, arrow, 120, 30, missile, missile_mechanical, piercing, none, 25, 1
;stat_pri_ex 0, 0, 0
stat_pri_attr no
stat_sec 2, 1, no, 0, 0, melee, melee_simple, piercing, knife, 25, 1.8
;stat_sec_ex 0, 0, 0
stat_sec_attr no
stat_pri_armour 0, 1, 0, flesh
;stat_armour_ex 0, 4, 0, 0, 1, 0, 0, flesh
stat_sec_armour 0, 0, flesh
stat_heat 0
stat_ground 1, 0, 2, 0
stat_mental 3, normal, untrained
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 220, 100, 65, 50, 220, 4, 50
armour_ug_levels 0, 1
armour_ug_models Bosnian_Peasant_Archers
ownership bosnia
era 0 bosnia
era 1 bosnia
era 2 bosnia
;unit_info 2, 5, 1



Also where ever S Peasant Archers appeared in the 2export_descr_buildings.txt" I had dupicated it like this:
From this:


recruit_pool "S Peasant Archers" 0 0.000001 0.999 0 requires factions { sicily, hungary, byzantium, }

to this:


recruit_pool "Bosnian Peasant Archers" 0 0.000001 0.999 0 requires factions { bosnia, }


Game doesn't crash but as I have already stated units are invisible for some reason, I have based this unit on a "S Peasant Archers" and cloned everything including scins etc... Any help would be greatly appreciated.

BHCluster
11-11-2010, 21:35
I also I have tried this:

A7b) If you're using a mymod and that's where your modded export_descr_units.txt file is and load the game through a shortcut to a .bat rather than the man launcher then --io.file_first must not only be in the shortcut command line , but also in the .bat .
Find the mymod.bat {located in Program Files\SEGA\Medieval II Total War} , right click it , select edit from the menu and add --io.file_first to the end of the text therein {which is medieval2.exe @mymod.cfg } with a single space between them so it will then read medieval2.exe @mymod.cfg --io.file_first. save the file and close it and Bob's your Uncle .

...but no luck, any suggestions?

Soul Reaver
11-12-2010, 15:39
As you have added a unit you have to change the number at the top of the BMDB by one, this is the normal vanilla one yours might be different.
22 serialization::archive 3 0 0 0 0 701 0 0
Should read like this.
22 serialization::archive 3 0 0 0 0 702 0 0

There is really no need to edit the battlemodels file if you are using an existing unit, clone the said unit in the EDU and rename it like you have already done. As long as your faction has the correct textures there shouldn't be a problem.

kinghaakon
06-17-2013, 14:47
Hi, i have open norway faction in teuctonic campaign to playable, but i can't create units in norway cities, does anyone know how i can fix this??