no that didnt work >.< do i have to have a space inbetween the 1 and the 5 1 5 milan 77 ?
Printable View
no that didnt work >.< do i have to have a space inbetween the 1 and the 5 1 5 milan 77 ?
Oh yeah, and where it says " 0 4 none" it needs to be " 0 1 4 none" (with 2 spaces between 0 and 1)
If that's not it then I have no idea.HTML Code:20 ne_huge_bombard_crew 1 4 61 unit_models/_Units/EN_Peasant_Padded/ne_cannon_crew_lod0.mesh 121 61 unit_models/_Units/EN_Peasant_Padded/ne_cannon_crew_lod1.mesh 900 61 unit_models/_Units/EN_Peasant_Padded/ne_cannon_crew_lod2.mesh 2500 61 unit_models/_Units/EN_Peasant_Padded/ne_cannon_crew_lod3.mesh 6400 1 5 milan 77 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_milan.texture 78 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_normal.texture 43 unit_sprites/milan_Dummy_NE_Crew_sprite.spr 5 milan 66 unit_models/AttachmentSets/Final European Light_milan_norm.texture 66 unit_models/AttachmentSets/Final European Light_milan_diff.texture 0 1 4 none 22 MTW2_Crew_Huge_Bombard 0 1 18 MTW2_Knife_Primary 0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
Hi Mango55, what unit did you use for your Swabian Swordsmen? I have been trying to make a unit with a similar look and can't find a unit that looks like that at all. Are you using a mesh that isn't used in the game?
It's the upgraded Highland Nobles. They are in the en_lmail_hmail folder.Quote:
Originally Posted by ezekiel6
cool, thanks for that.
Thanks, Mushashi! It's not that tough for me anymore! This tutorial enlightened me!
Nope that didnt work >.<, i think i'll try doing something else start froms scratch.
This is what i have done, i really dont know what i'am doing wrong i have followed every bit of advice to the letter, yet i still get the error.
http://www.box.net/public/c6j3o13b7n
Okay, I'm having a problem:
14 GR_Pikemen_ug2 1 4 57 unit_models/_Units/RN_Half_3Q_Plate/pikemen_ug2_lod0.mesh 121 57 unit_models/_Units/RN_Half_3Q_Plate/pikemen_ug2_lod1.mesh 900 57 unit_models/_Units/RN_Half_3Q_Plate/pikemen_ug2_lod2.mesh 2500 57 unit_models/_Units/RN_Half_3Q_Plate/pikemen_ug2_lod3.mesh 6400 1 9 byzantium 79 unit_models/_Units/RN_Half_3Q_Plate/textures/rn_half_3q_plate_byzantium.texture 76 unit_models/_Units/RN_Half_3Q_Plate/textures/rn_half_3q_plate_normal.texture 41 unit_sprites/byzantium_Pikemen_ug2_sprite.spr 1 9 byzantium 65 unit_models/AttachmentSets/Final European Light_france_diff.texture 67 unit_models/AttachmentSets/Final European Light_france_norm.texture 0 1 4 None 9 MTW2_Pike 15 MTW2_Non_Shield 1 17 MTW2_Pike_primary 1 18 MTW2_Sword_Primary 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
14 GR_Pikemen_ug2 1 4 57 unit_models/_Units/RN_Half_3Q_Plate/pikemen_ug2_lod0.mesh 121 57 unit_models/_Units/RN_Half_3Q_Plate/pikemen_ug2_lod1.mesh 900 57 unit_models/_Units/RN_Half_3Q_Plate/pikemen_ug2_lod2.mesh 2500 57 unit_models/_Units/RN_Half_3Q_Plate/pikemen_ug2_lod3.mesh 6400 1 9 byzantium 79 unit_models/_Units/RN_Half_3Q_Plate/textures/rn_half_3q_plate_byzantium.texture 76 unit_models/_Units/RN_Half_3Q_Plate/textures/rn_half_3q_plate_normal.texture 41 unit_sprites/byzantium_Pikemen_ug2_sprite.spr 1 9 byzantium 65 unit_models/AttachmentSets/Final European Light_france_diff.texture 67 unit_models/AttachmentSets/Final European Light_france_norm.texture 0 1 4 None 9 MTW2_Pike 15 MTW2_Non_Shield 1 17 MTW2_Pike_primary 1 18 MTW2_Sword_Primary 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
try that, that might work
also i uploaded the wrong file heres the right one http://www.box.net/public/416g5zgcou
I saw there were two scots models that were not yet used by the game(en_highlander_basic, en_highlander_chainmail) so I tried to code them in to see what they looked like, but I get a blank screen when the custom battle loads. I used the highland rabble unit as a base, here is my entry:
15 highland_rabble 1 4 62 unit_models/_Units/EN_Highlander/en_highlander_basic_lod0.mesh 121 62 unit_models/_Units/EN_Highlander/en_highlander_basic_lod1.mesh 900 62 unit_models/_Units/EN_Highlander/en_highlander_basic_lod2.mesh 2500 62 unit_models/_Units/EN_Highlander/en_highlander_basic_lod3.mesh 6400 2 8 scotland 72 unit_models/_Units/EN_Highlander/textures/en_highlander_scotland.texture 70 unit_models/_Units/EN_Highlander/textures/en_highlander_normal.texture 48 unit_sprites/scotland_Highland_Rabble_sprite.spr 5 slave 70 unit_models/_Units/EN_Highlander/textures/en_highlander_rebels.texture 70 unit_models/_Units/EN_Highlander/textures/en_highlander_normal.texture 45 unit_sprites/slave_Highland_Rabble_sprite.spr 2 8 scotland 69 unit_models/AttachmentSets/Final European Light_scotland_diff.texture 69 unit_models/AttachmentSets/Final European Light_scotland_norm.texture 0 5 slave 66 unit_models/AttachmentSets/Final European Light_slave_diff.texture 66 unit_models/AttachmentSets/Final European Light_slave_norm.texture 0 1 4 None 18 MTW2_Fast_Knifeman 0 1 18 MTW2_Knife_Primary 0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
Really the only thing i changed was to alter:
58 unit_models/_Units/EN_Highlander/highland_rabble_lod1.mesh
to:
62 unit_models/_Units/EN_Highlander/en_highlander_basic_lod0.mesh
Anyone have ideas what I am doing wrong?
I'm getting a problem with the modeldb file, but I dont know what it is. As a test, I created a new unit called Northern Nobles and based them on highland nobles. I wanted to use the .texture files of a dismounted feudal knight, but otherwise not change them.
Heres my DB code
15 northern_nobles 1 4 58 unit_models/_Units/EN_Highlander/highland_nobles_lod0.mesh 121 58 unit_models/_Units/EN_Highlander/highland_nobles_lod1.mesh 900 58 unit_models/_Units/EN_Highlander/highland_nobles_lod2.mesh 2500 58 unit_models/_Units/EN_Highlander/highland_nobles_lod3.mesh 6400 1 8 scotland 72 unit_models/_Units/EN_Highlander/textures/en_lmail_hmail_scotland1.texture 70 unit_models/_Units/EN_Highlander/textures/en_highlander_normal.texture 48 unit_sprites/scotland_Highland_Nobles_sprite.spr 1 8 scotland 70 unit_models/AttachmentSets/Final European Archer_scotland_diff.texture 70 unit_models/AttachmentSets/Final European Archer_scotland_norm.texture 0 1 4 None 16 MTW2_2HSwordsman 0 1 24 MTW2_2HSwordsman_Primary 0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002 19 northern_nobles_ug1 1 4 63 unit_models/_Units/EN_Lmail_Hmail/highland_nobles_ug1_lod0.mesh 121 63 unit_models/_Units/EN_Lmail_Hmail/highland_nobles_ug1_lod1.mesh 900 63 unit_models/_Units/EN_Lmail_Hmail/highland_nobles_ug1_lod2.mesh 2500 63 unit_models/_Units/EN_Lmail_Hmail/highland_nobles_ug1_lod3.mesh 6400 1 8 scotland 74 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_scotland1.texture 72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture 52 unit_sprites/scotland_Highland_Nobles_ug1_sprite.spr 1 8 scotland 70 unit_models/AttachmentSets/Final European Archer_scotland_diff.texture 70 unit_models/AttachmentSets/Final European Archer_scotland_norm.texture 0 1 4 None 16 MTW2_2HSwordsman 0 1 24 MTW2_2HSwordsman_Primary 0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
Where the en_lmail_hmail_scotland1.texture is my own custom texture
Hi Eltharon for a start I would say that this line 1 8 scotland 72 unit_models/_Units/EN_Highlander/textures/en_lmail_hmail_scotland1.texture is wrong. The 72 should be changed to 74
So I have learned that there is a limit to the number of entrys that you can have in the models file. :embarassed:
One time after adding a unit, I tried to start the game, and it told me that it couldn't find the model for some historical battle unit, that I hadn't even messed with.
So I deleted one of the entrys I made that I wasn't using anymore, and it started right up.
:no: :no: :no:
What I'm doing wrong?
11 GR_Naffatun 1 3 62 unit_models/_Units/ME_Light_Mail_Heavy_Mail/naffatun_lod0.mesh 121 62 unit_models/_Units/ME_Light_Mail_Heavy_Mail/naffatun_lod1.mesh 1225 62 unit_models/_Units/ME_Light_Mail_Heavy_Mail/naffatun_lod2.mesh 6400 1 9 byzantium 89 unit_models/_Units/ME_Light_Mail_Heavy_Mail/textures/mtw2_ME_light_mail_byzantium.texture 86 unit_models/_Units/ME_Light_Mail_Heavy_Mail/textures/mtw2_ME_light_mail_normal.texture 42 unit_sprites/byzantium_Naffatun_sprite.spr 1 9 byzantium 60 unit_models/AttachmentSets/Final ME Heavy_egypt_diff.texture 60 unit_models/AttachmentSets/Final ME Heavy_egypt_norm.texture 0 1 4 None 17 MTW2_Fast_Javelin 20 MTW2_Non_Shield_Fast 1 20 MTW2_Javelin_primary 1 18 MTW2_Sword_Primary 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
Doesn't necessarily mean that... If you had messed up an earlier entry, it could have caused it to choke and not see the entry for the historical battle unit later in the file...Quote:
Originally Posted by the_mango55
Quote:
Originally Posted by ezekiel6
Quote:
Originally Posted by Rythmic
:wall: :wall: :wall: Why did I not see that...?
Thanks alot. I'm off to test it now
EDIT: OK, it works...but the texture is really screwed up. The helmet texture is on their chest, the hand texture on their behind, their pants as cone helmets...
The aim is to get the DFK look (Great helm, heavy chain), with a greatsword. As I think about this, it occurs to me that the meshes would need to be fiddled with, wouldnt they?
Yes.
Hmmm, I guess there goes that idea...oh well, thanks anyway
With a great helm, yes.Quote:
Originally Posted by Eltharon
But there is already a mesh that is very similar to what you want, just no great helm, in the highland_nobles_ug1.
They are wearing open face helms, but they have the heavy chain and the greatsword.
This is an example (as I guess you saw as you read through the thread), the second guy.
https://img404.imageshack.us/img404/...previewvh5.jpg
Hi, I am not new to unit editing ( I did quite a lot for Rome ) but the battle_models file is a long shot from descr_model_battle. That is the only thing putting me off. Is there an easier way to read the file?
So, the --io.file_first is incompatible with a mymod folder? There's no way to interlink the two?
Not atm, though im working on spacing things out more in the file so its more readable, once im done ill upload it somewhere.Quote:
Hi, I am not new to unit editing ( I did quite a lot for Rome ) but the battle_models file is a long shot from descr_model_battle. That is the only thing putting me off. Is there an easier way to read the file?
Is that one guy in there taking a dump in his armor? :laugh4:Quote:
Originally Posted by the_mango55
Hello !
I tried to add a new unit for a new faction that I created : Kiev
This is what I kept in Data base :
When I stat a battle with this unit it shows texture unit only if I go very close to the unit. Horses don't appears because I did't keep them in the database.Code:18 ee_cavalry_militia 1 3 66 unit_models/_Units/EE_Peasant_Leather/ee_cavalry_militia_lod0.mesh 121 66 unit_models/_Units/EE_Peasant_Leather/ee_cavalry_militia_lod1.mesh 1225 66 unit_models/_Units/EE_Peasant_Leather/ee_cavalry_militia_lod2.mesh 6400 1 4 kiev 75 unit_models/_Units/EE_Peasant_Leather/textures/mtw2_ee_peasant_kiev.texture 77 unit_models/_Units/EE_Peasant_Leather/textures/mtw2_EE_Peasant_normal.texture 47 unit_sprites/kiev_ee_cavalry_militia_sprite.spr 1 4 kiev 65 unit_models/AttachmentSets/final european light_kiev_diff.texture 65 unit_models/AttachmentSets/final european light_kiev_norm.texture 0 1 5 Horse 13 MTW2_HR_Spear 13 MTW2_HR_Sword 2 21 MTW2_HR_spear_Primary 14 fs_test_shield 2 18 MTW2_Sword_Primary 14 fs_test_shield 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002 22 ee_cavalry_militia_ug1 1 4 78 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/ee_cavalry_militia_ug1_lod0.mesh 121 78 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/ee_cavalry_militia_ug1_lod1.mesh 900 78 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/ee_cavalry_militia_ug1_lod2.mesh 2500 78 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/ee_cavalry_militia_ug1_lod3.mesh 6400 1 4 kiev 94 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/textures/ee_bekhtera_heavy_lamellar_kiev.texture 96 unit_models/_Units/EE_Bekhtera_Heavy_Lamellar/textures/EE_Bekhtera_Heavy_Lamellar_normal.texture 51 unit_sprites/kiev_ee_cavalry_militia_ug1_sprite.spr 1 4 kiev 65 unit_models/AttachmentSets/final european light_kiev_diff.texture 65 unit_models/AttachmentSets/final european light_kiev_norm.texture 0 1 5 Horse 13 MTW2_HR_Spear 13 MTW2_HR_Sword 2 21 MTW2_HR_spear_Primary 14 fs_test_shield 2 18 MTW2_Sword_Primary 14 fs_test_shield 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
https://img96.imageshack.us/img96/7614/bouhea8.jpg
Please :help: me
Is it possible to make a swiss guard with having swords instead??
Ok, i wanted to have the the same looks of a Swiis guard, but now with sword!
So i copied the swiss guard and mixed it with the "dismounted feudal knights"
And inCode:type Swiss Guard Swordman
dictionary Swiss_Guard_Swordman ; Swiss Guard Swordman
category infantry
class heavy
voice_type Heavy
accent German
banner faction main_infantry
banner holy crusade
soldier Swiss_Guard_Swordman, 48, 0, 1.2
attributes sea_faring, hide_forest, very_hardy, can_withdraw
formation 1.2, 1.2, 2.4, 2.4, 4, square
stat_pri 13, 3, no, 0, 0, melee, melee_blade, piercing, sword, 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 7, 8, 6, metal
;stat_armour_ex 7, 8, 0, 0, 8, 6, 6, metal
stat_sec_armour 0, 0, flesh
stat_heat 5
stat_ground 1, -2, 3, 2
stat_mental 11, disciplined, highly_trained
stat_charge_dist 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 890, 175, 100, 75, 890, 4, 220
armour_ug_levels 3
armour_ug_models Swiss_Guard
ownership papal_states
era 2 papal_states
;unit_info 12, 0, 12
battle_moddels.dbectect.
In preferencesCode:20 swiss_guard_swordman 1 4 57 unit_models/_Units/RN_Half_3Q_Plate/swiss_guard_lod0.mesh 121 57 unit_models/_Units/RN_Half_3Q_Plate/swiss_guard_lod1.mesh 900 57 unit_models/_Units/RN_Half_3Q_Plate/swiss_guard_lod2.mesh 2500 57 unit_models/_Units/RN_Half_3Q_Plate/swiss_guard_lod3.mesh 6400 1 12 papal_states 82 unit_models/_Units/RN_Half_3Q_Plate/textures/rn_half_3q_plate_papal_states.texture 76 unit_models/_Units/RN_Half_3Q_Plate/textures/rn_half_3q_plate_normal.texture 48 unit_sprites/papal_states_Swiss_Guard_sprite.spr 1 12 papal_states 73 unit_models/AttachmentSets/Final European Light_papal_states_diff.texture 73 unit_models/AttachmentSets/Final European Light_papal_states_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
[io]
file_first = True
and i created a .bat
and i made a UI card.
Now. Letstest it:
WHAM* it didn't worked!
Why why why why??
Oh, lets see theres a system.log. lets open it:
=( What did I do wrong...what did i do wrong...Quote:
12:47:20.718 [system.rpt] [always] CPU: SSE2
12:47:20.718 [system.rpt] [always] ==== system log start, build date: Dec 5 2006 version development ===
12:47:20.718 [system.io] [always] mounted pack packs/data_0.pack
12:47:20.718 [system.io] [always] mounted pack packs/data_1.pack
12:47:20.718 [system.io] [always] mounted pack packs/data_2.pack
12:47:20.718 [system.io] [always] mounted pack packs/data_3.pack
12:47:20.718 [system.io] [always] mounted pack packs/data_4.pack
12:47:20.718 [system.io] [always] mounted pack packs/localized.pack
12:47:21.359 [data.missing] [warning] missing/invalid cursor for ANISELECT
12:47:21.359 [data.missing] [warning] missing/invalid cursor for MODIFIER_SABOTAGE
12:47:21.359 [data.missing] [warning] missing/invalid cursor for MODIFIER_TRADE
12:47:21.375 [data.missing] [warning] missing/invalid cursor for DRAGGABLE
12:47:21.375 [data.missing] [warning] missing/invalid cursor for DRAGGING
12:47:21.375 [data.missing] [warning] missing/invalid cursor for MODIFIER_MULTIPLE_SELECT
12:47:21.375 [data.missing] [warning] missing/invalid cursor for MODIFIER_ATTACK
12:47:21.375 [data.missing] [warning] missing/invalid cursor for MODIFIER_PLACE_CHARACTER
12:47:21.375 [data.missing] [warning] missing/invalid cursor for MODIFIER_PLACE_RESOURCE
12:47:21.375 [data.missing] [warning] missing/invalid cursor for MODIFIER_PLACE_FORT
12:47:21.375 [data.missing] [warning] missing/invalid cursor for MODIFIER_MOVE_OBJECT
12:47:21.375 [data.missing] [warning] missing/invalid cursor for MODIFIER_PLACE_WATCHTOWER
12:47:21.375 [data.missing] [warning] missing/invalid cursor for MODIFIER_DEPLOYMENT_AREA
12:47:21.375 [data.missing] [warning] missing/invalid cursor for MODIFIER_PLACE_TILE
12:47:21.375 [data.missing] [warning] missing/invalid cursor for MODIFIER_PLACE_SPECIAL_PIECE
12:47:21.375 [data.missing] [warning] missing/invalid cursor for MODIFIER_PAINT
12:47:21.375 [data.missing] [warning] missing/invalid cursor for MODIFIER_ADJUST_HEIGHTS
12:47:21.375 [data.missing] [warning] missing/invalid cursor for MODIFIER_ADD_UNIT
12:47:21.375 [data.missing] [warning] missing/invalid cursor for MODIFIER_PLACE_SETTLEMENT
12:47:22.468 [script.err] [error] Script Error in data/export_descr_unit.txt, at line 8062, column 1
Stat_health statistic missing from unit type 'Swiss Guard Swordman'.
12:47:22.468 [data.invalid] [error] DATABASE_TABLE error found : error reading record from file data/export_descr_unit.txt.
I've made everything right ( at least i suppose...), but i encountered difficulties here. First time in text modding and i already find stuck in :sweatdrop:Quote:
Step Three: Texture Alteration
First you go to unit_models/_Units/RN_Half_3Q_Plate/textures. In here you'll see textures for this model type for a bunch of different factions. What you need to do is open one, say rn_half_3q_plate_england.texture, with a hex editor, and cut (Cut to the clipboard, you're going to need to paste it back in later) the first 48 bytes. Now rename the file from .texture to .dds, and load it up in your favorite image processing software. I'm going to be talking about how to work with it in Photoshop CS2, because that's what I own.
Never seen an HEX editor and i don't know what to look for. I downloaded it, but selecting those "48 bites" it's too much as now. I need some explanation on what to look for and modify...
Someone can help ?
P.S. I'm starting this because of my intention to mod existing units for the mod i'm working on with others. I would take advantage of this discussion to ask here if someone is interested. The Mod is in Italian but there are no problems for us. HERE'S a link to the discussion on TWC. We also have our own forum but it's in italian language and so for now it's useless. If someone wants to help us.
If you go here you can download a texture to dds converter which will convert the files into something Photoshop can read. You'll also need the Nvidia plugins for PS, that way you won't have to do any hex editing.
So i will only have to rename a copy of that texture file and use it for my new unit right ??
Thanks for your help!
Everything worked fine! Now i need to test it in-game. If i say right i should see them in custom battles changin' a DDS, the export unit, the models.db and an icon ?? And to see them in campaign ??
Out of all the TW games, that has to be the most annoying, heart breaking, pain in the ******** :furious3: :dizzy2: :skull: :wall:
I have every had to edit......
which noob wasn't on our side when they made the modeldb file ffs.
MTW unit thingie took me 15 mins to figure out, and 15 mins to create a "new unit".
4 hours later.... i am about to test.......please excuse next post.....if all is not well.
fenir :furious3:
:wall:
:furious3:
:help:
:oops:
:sweatdrop:
:shame:
*snivel* All i wanted was to make the Spainish musketeers, and militia Crossbow included in byzantium.
Arrrrrrrrrrrrgggggggggggghhhhhhhhhhhhh
oh well, what doesn't kill me, only.......argh shove it John!!
Sqaure 1......
fenir
aah pity you.
Atleast you know you could make a new unit. CHANGING WEAPONS IS IMPOSSIBLE in med2
But no one else that whiners here ?? Where are "Those who know" ??
What is it that you are stuck with?
Is there a program for editing the modeldb file? One that can open it in a sort of ordered sense?
fenir
Everything worked for me but i wanted to know how can i include this new unit in the campaign.:book:Quote:
Originally Posted by ezekiel6
Fenir; at the moment there is no prgram for editing the modeldb file other than notepad. sometimes switching on word wrap can make things a little easier to see, but that's it.
Caprera to get your new units into the campaign you have to open the export_description_building.txt and decide what building you want for the creation of your units, you then have to make an entry under that building so the campaign will know they are buildable eg;
You'll also need to put entries for the units in the export_units.txt file in the text folder and if you haven't done so already you'll need to make .tga for the unit pic in the data/ui/units folder and a unit_info .tga for the data/ui/unit_info folder. That should be about all the things you need to change.Code:recruit_pool "Crossbow Militia" 1 0.5 4 0 requires factions { byzantium,}
Thanks !
I've created a formatted version of the modeldb file that might
be easier to edit. I uploaded it here:
http://www.totalwar.org/Downloads/Rt...ads/RTWupload/
It is called formatted_modeldb.zip.
For those technically interested I parsed it with a MatLab script using
regular expressions to format as per KleeMann's suggestions. This file
has no other mods to it, it is just the vanilla battle_models.modeldb
with the appropriate carriage return/linefeed control codes inserted where
needed. I tested it with the --io.file_first switch and it worked. I then
broke it (by changing one of the string numbers to something incorrect) to make sure I was actually reading it and got the usual CTD. I then changed it
back and tested it again to make sure the game loaded.
Any feedback on its usefulness would be appreciated.
Happy modding.~:)
KnightErrant this is cool definitely much easier to read, should make modding units a breeze.
Thanks!:beam:
Thanks to you KnightErrant! You saved all of us a lot of nasty, booooring work! :D
KnightErrant
Beautiful! :balloon2: Even now when I am already familiar with file. I hope that my friend will successfully write program to work with it for easy moding. That sorted file, I think, can help.
Thanks guys.~:)
Thanks to everyone making such a great work !
Need some help : I have added some unit (which was before just a rebel one )
I have made changes in .modeldb , export_descr_unit , export_descr_buildings , but I am getting this error:
Script Error in DLV_ext/data/export_descr_buildings.txt, at line 150, column 52
Unknown unit type specified
I wonder where I could miss that description...? ( using bat file with MOD dir )
Thanks .. :balloon2:
Have you gone to the line to see what is written there? Perhaps it is a spelling mistake? Make sure that the unit name matches in both the export_descr_unit and export_descr_bulidings.txts
Made my first unit today. Nothing fancy but it worked so I now know I can do more. Thanks for the guide and the comments, they were all really helpful.
Thanks for that info, finally i was able to mount musketeers. Hooah.
Please can somebody help me :dizzy2:
i want add this unit.
(I dont see there problem, but game wasn´t run :furious3: . )
I make quite many copy/paste from Norse_swordmen.
THX for help
This write me systemlog
21:27:16.000 [script.err] [error] Script Error in MCRM/data/export_descr_unit.txt, at line 14771, column 2
Could not find soldier battle model for unit type 'GR_Slovan'.
21:27:16.000 [data.invalid] [error] DATABASE_TABLE error found : error reading record from file MCRM/data/export_descr_unit.txt.
Descr_unit.txt
type GR Slovan
dictionary GR_Slovan ; Slovanski sermiari
category infantry
class heavy
voice_type Heavy
banner faction main_infantry
banner holy crusade
soldier GR_Slovan, 48, 0, 1.2
attributes sea_faring, hide_forest, can_withdraw
formation 1.2, 1.2, 2.4, 2.4, 4, square
stat_health 1, 0
stat_pri 11, 2, no, 0, 0, melee, melee_blade, piercing, sword, 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 5, 7, 6, metal
;stat_armour_ex 5, 7, 8, 0, 7, 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 30
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 400, 150, 75, 55, 400, 4, 100
armour_ug_levels 2, 3, 4
armour_ug_models GR_Slovan, GR_Slovan_ug1, GR_Slovan_ug2
ownership milan, slave
era 1 milan
era 2 milan
;unit_info 11, 0, 18
Modelsdbfile
9 GR_Slovan
1 4
59 unit_models/_Units/EN_Lmail_Hmail/norse_swordsmen_lod0.mesh 121
59 unit_models/_Units/EN_Lmail_Hmail/norse_swordsmen_lod1.mesh 900
59 unit_models/_Units/EN_Lmail_Hmail/norse_swordsmen_lod2.mesh 2500
59 unit_models/_Units/EN_Lmail_Hmail/norse_swordsmen_lod3.mesh 6400
2
5 milan
71 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_milan.texture
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture
50 unit_sprites/denmark_Viking_Raiders_ug2_sprite.spr
5 slave
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_rebels.texture
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture
48 unit_sprites/slave_Viking_Raiders_ug2_sprite.spr
2
5 milan
58 unit_models/AttachmentSets/Final Danish_milan_diff.texture
60 unit_models/AttachmentSets/Final Danish_denmark_norm.texture 0
5 slave
58 unit_models/AttachmentSets/Final Danish_slave_diff.texture
58 unit_models/AttachmentSets/Final Danish_slave_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
13 GR_Slovan_ug1
1 4
63 unit_models/_Units/EN_Lmail_Hmail/norse_swordsmen_ug1_lod0.mesh 121
63 unit_models/_Units/EN_Lmail_Hmail/norse_swordsmen_ug1_lod1.mesh 900
63 unit_models/_Units/EN_Lmail_Hmail/norse_swordsmen_ug1_lod2.mesh 2500
63 unit_models/_Units/EN_Lmail_Hmail/norse_swordsmen_ug1_lod3.mesh 6400
2
5 milan
71 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_milan.texture
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture
50 unit_sprites/denmark_Viking_Raiders_ug3_sprite.spr
5 slave
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_rebels.texture
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture
48 unit_sprites/slave_Viking_Raiders_ug3_sprite.spr
2
5 milan
58 unit_models/AttachmentSets/Final Danish_milan_diff.texture
58 unit_models/AttachmentSets/Final Danish_milan_norm.texture 0
5 slave
58 unit_models/AttachmentSets/Final Danish_slave_diff.texture
58 unit_models/AttachmentSets/Final Danish_slave_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
13 GR_Slovan_ug2
1 3
69 unit_models/_Units/LN_3QPlate_HalfPlate/norse_swordsmen_ug2_lod0.mesh 121
69 unit_models/_Units/LN_3QPlate_HalfPlate/norse_swordsmen_ug2_lod1.mesh 1225
69 unit_models/_Units/LN_3QPlate_HalfPlate/norse_swordsmen_ug2_lod2.mesh 6400
2
5 milan
80 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_milan.texture
81 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_normal.texture
51 unit_sprites/denmark_Norse_Swordsmen_ug2_sprite.spr
5 slave
81 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_rebels.texture
81 unit_models/_Units/LN_3QPlate_HalfPlate/textures/mtw2_LN_halfplate_normal.texture
49 unit_sprites/slave_Norse_Swordsmen_ug2_sprite.spr
2
5 milan
58 unit_models/AttachmentSets/Final Danish_milan_diff.texture
58 unit_models/AttachmentSets/Final Danish_milan_norm.texture 0
5 slave
58 unit_models/AttachmentSets/Final Danish_slave_diff.texture
58 unit_models/AttachmentSets/Final Danish_slave_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
Hi AliAS
I think part of the problem might be your
AttachmentSets entries in the modeldb file.
Unless you copied and renamed them, these
don't exist.
You can change them back, milan -> denmark, and change the character counts back,Code:58 unit_models/AttachmentSets/Final Danish_milan_diff.texture
58 unit_models/AttachmentSets/Final Danish_milan_norm.texture 0
but keep your milan textures in the body blocks.
Check all 3 upgrade levels.
And just to check, you're also using the io.file_first switch?
I made that shield textures first so there is no problem.
I also using io file .
And i have also textures for milan. But game still dont run
It looks problem is can be here. Tha game can´t battle soldier battle model. but for what ??
i start again with new name and now all funcion great. :2thumbsup:
Glad you got it working.~:cheers: Sorry I couldn't help you
better.
You say sorry me, you don´t need say me sorry.
I thank you for help and for your great formated_battlemodelsdbfile
If you don´t edit it a never can make new unit :smash: :bow: :bow:
Hoping for a quick hand...I'm trying to create a Spear unit for sicily out of "Merc. Dismounted Frankish Knights" I can get everything except I get those silver looking ghost armies and I just can't figure out how to get it to look...well "normal" sorry for the long post but was hoping someone smarter than me could point out my errors..thanks.
type Sicilian Spearmen
dictionary Sicilian_Spearmen ; Sicilian Spearmen
category infantry
class spearmen
voice_type Heavy
accent French
banner faction main_spear
banner holy crusade
soldier Dismounted_Frankish_Knights, 48, 0, 1.35
attributes sea_faring, hide_forest, hardy, can_withdraw
formation 1.0, 1.0, 2.0, 2.0, 4, square
stat_health 1, 0
stat_pri 11, 4, no, 0, 0, melee, melee_blade, piercing, spear, 0, 0.7
;stat_pri_ex 0, 0, 0
stat_pri_attr spear, spear_bonus_10
stat_sec 0, 0, no, 0, 0, no, melee_simple, blunt, none, 0, 0.7
;stat_sec_ex 0, 0, 0
stat_sec_attr no
stat_pri_armour 9, 9, 6, metal
;stat_armour_ex 7, 0, 0, 0, 4, 6, 6, metal
stat_sec_armour 0, 0, flesh
stat_heat 5
stat_ground 1, -2, 3, 2
stat_mental 11, normal, trained
stat_charge_dist 30
stat_fire_delay -2500
stat_food 60, 300
stat_cost 1, 570, 200, 90, 70, 870, 4, 160
armour_ug_levels 3, 4
armour_ug_models Dismounted_Frankish_Knights, Dismounted_Frankish_Knights
ownership sicily
era 0 sicily
era 1 sicily
;unit_info 9, 0, 17
:help:
19 sicilian_spearmen
1 4
71 unit_models/_Units/EN_Lmail_Hmail/dismounted_frankish_knights_lod0.mesh 121
71 unit_models/_Units/EN_Lmail_Hmail/dismounted_frankish_knights_lod1.mesh 900
71 unit_models/_Units/EN_Lmail_Hmail/dismounted_frankish_knights_lod2.mesh 2500
71 unit_models/_Units/EN_Lmail_Hmail/dismounted_frankish_knights_lod3.mesh 6400
1
6 sicily
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_sicily.texture
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture
56 unit_sprites/merc_Dismounted_Frankish_Knights_sprite.spr
1
6 sicily
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
First off, thanks for this thread.
I have a similar question, because while I think I understand the tutorial, I'm not sure I understand the modeldb file. I tried to modify magyar_cavalry to create a Szekely unit. Judging by my reading here, I've borked the modeldb file. It gets right up to the battle screen, where you see the sprites for your unit, and then I get the unspecified error.
"szekely_cavalry" is one letter longer than "magyar_cavalry," so I've increased the digit count by one. I also created textures with an outright copy/paste from the magyar cav. (I'm an historian, so I'm a nerd, not a geek. ;) I don't even own a copy of photoshop, though that should probably change).
So, my question is the following: what else needed to be done in said editing? From what I've read, it doesn't sound like random modifications to weapons and defensive stats should make a difference -- but if it does, then I've seriously misunderstood the tutorial itself.
This is fun. Thanks.
Edit: Oh, along with that. If I used the formatted modelsdb file, would there be any pitfalls about how many space characters to include, etc? I've replaced theone with the other after backing it up, but it occurs to me that I might have committed a beginner's error on that front.
Hi Russ,
The formatted modeldb file is identical to the vanilla EXCEPT
that it has carriage return/linefeeds inserted to break the lines nicely.
So it preserves all the funny space at end of line and double spaces
after some 0's and all that stuff that the modeldb file is so picky about.
If you are just starting to mod this file may I suggest you get the version 2.0
formatted modeldb file here
https://forums.totalwar.org/vb/showthread.php?t=79455
The advantage is I've included a Python syntax checking script
that can check those character counts and faction counts that are
so easy to get wrong.
But yes, modding this file is both fun and frustrating at the same time.~:)
I tried 30 times and still blank screen with error noise..
I edited EDU file for making my neew unit "ghazi infantry"..
1.here is EDU entry
Code:
type Ghazi_Infantry
dictionary Ghazi_Infantry ; Ghazi Infantry
category infantry
class light
voice_type Light
accent Arabic
banner faction main_infantry
banner holy crusade
soldier Ghazi_Infantry, 48, 0, 1
attributes sea_faring, hide_forest, very_hardy, can_withdraw
formation 1.2, 1.2, 2.4, 2.4, 4, square
stat_health 1, 0
stat_pri 11, 6, no, 0, 0, melee, melee_blade, slashing, axe, 25, 1.2
;stat_pri_ex 0, 0, 0
stat_pri_attr ap
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, 1, 6, flesh
;stat_armour_ex 0, 0, 0, 0, 1, 6, 6, flesh
stat_sec_armour 0, 0, flesh
stat_heat 0
stat_ground 1, 1, 0, -1
stat_mental 9, impetuous, untrained
stat_charge_dist 40
stat_fire_delay 0
stat_food 60, 300
stat_cost 1, 490, 70, 90, 70, 490, 4, 120
armour_ug_levels 0
armour_ug_models Ghazi_Infantry
ownership turks
era 0 turks
era 1 turks
era 2 turks
;unit_info 10, 0, 7
2.and model.db entry
Code:14 Ghazi_Infantry 1 4 51 unit_models/_Units/ME_Light_Padded/ghazis_lod0.mesh 121 51 unit_models/_Units/ME_Light_Padded/ghazis_lod1.mesh 900 51 unit_models/_Units/ME_Light_Padded/ghazis_lod2.mesh 2500 51 unit_models/_Units/ME_Light_Padded/ghazis_lod3.mesh 6400 1 5 turks 76 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_turks.texture 77 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_normal.texture 35 unit_sprites/turks_Ghazi_Infantry_sprite.spr 1 5 turks 65 unit_models/AttachmentSets/Final Middle eastern_turks_diff.texture 65 unit_models/AttachmentSets/Final Middle eastern_turks_norm.texture 0 1 4 None 14 MTW2_Fast_Mace 0 2 17 MTW2_Mace_Primary 14 fs_test_shield 0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
3.i added the line,
[io]
file_first = 1 to mediecal.pre.cfg...
4. I created turks_Ghazi_Infantry_sprite.spr file..
BUT..
I still get blank screen :wall:
I REALLY appriciated for your help..
@-Amon-
Check the character count on your sprite entry.
I think it's 44 not 35. See if that cures the blank
screen.
Thanks. I'll run this through (am trying not to post the text until I've exhausted the other options...)Quote:
Originally Posted by KnightErrant
Quote:
Originally Posted by KnightErrant
uh,no...I still get blank screen :(
i changed toCode:14 Ghazi_Infantry 1 4 51 unit_models/_Units/ME_Light_Padded/ghazis_lod0.mesh 121 51 unit_models/_Units/ME_Light_Padded/ghazis_lod1.mesh 900 51 unit_models/_Units/ME_Light_Padded/ghazis_lod2.mesh 2500 51 unit_models/_Units/ME_Light_Padded/ghazis_lod3.mesh 6400 1 5 turks 76 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_turks.texture 77 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_normal.texture 44 unit_sprites/turks_Ghazi_Infantry_sprite.spr 1 5 turks 65 unit_models/AttachmentSets/Final Middle eastern_turks_diff.texture 65 unit_models/AttachmentSets/Final Middle eastern_turks_norm.texture 0 1 4 None 14 MTW2_Fast_Mace 0 2 17 MTW2_Mace_Primary 14 fs_test_shield 0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
@-Amon-
OK, sorry I didn't count every thing carefully.
Try changing these two entries
toCode:65 unit_models/AttachmentSets/Final Middle eastern_turks_diff.texture
65 unit_models/AttachmentSets/Final Middle eastern_turks_norm.texture 0
Code:66 unit_models/AttachmentSets/Final Middle eastern_turks_diff.texture
66 unit_models/AttachmentSets/Final Middle eastern_turks_norm.texture 0
Quote:
Originally Posted by KnightErrant
Yess,thanks a lot !!It worked !!!:2thumbsup:
Anyway,what did we do by changing these parameters??? whats the meaning difference of 65 & 66 ??:book: for future usings..
@-Amon-
Every string in the modeldb file has a number in front of it
that is the number of characters in that string. I was just
counting your strings and telling you what numbers I got.
It looks like you are using the original modeldb file which isn't
formatted. This is very difficult to work with. Take a look
in this thread.
https://forums.totalwar.org/vb/showthread.php?t=79455
I made a formatted modeldb file (vanilla only, no mods in it) that
has line break characters so it's easier to edit. I also made a
syntax checker (a Python script so you would need Python to use
it) that checks all these counts for you. Even without the
syntax checker, the formatted file is much easier.~:)
Hmm why don't you write a quick conversion utility that takes a formatted text file without string length info and supplies the string length info into the modeldb? Would be pretty easy to do and quite useful methinks.Quote:
Originally Posted by KnightErrant
Agreed, it would be pretty easy. When I first did the
syntax checker I thought about this. Since I read line by line
I could check the character counts and write out a corrected
line. Faction counts would be harder since you have to buffer
up the data for all faction entries until you know you're done
processing a body textures block or an AttachmentSets block.
Main reason I didn't do this is: who's trusting enough to allow
a Python script write access to their modeldb file?:laugh4:
uhh..me again..:help:
i want to use my unit on campaign so i edited export_descr_buildings.txt as follows :
Code:recruit_pool "Ghazi Infantry" 1 0.2 2 0 requires factions { turks, }
**It is in all castles and garrison quarters (and upgaredes too) sections..
so,when i run .exe,i get game loading screen and after that game crashes to windows..
I looked to system.log.txt file and at the and of the line :
Code:[system.io] [always] mounted pack packs/localized.pack
[data.missing] [warning] missing/invalid cursor for ANISELECT
[data.missing] [warning] missing/invalid cursor for MODIFIER_SABOTAG[data.missing] [warning] missing/invalid cursor for MODIFIER_TRADE
[data.missing] [warning] missing/invalid cursor for DRAGGABLE
[data.missing] [warning] missing/invalid cursor for DRAGGING
[data.missing] [warning] missing/invalid cursor for MODIFIER_MULTIPLE_SELECT
[data.missing] [warning] missing/invalid cursor for MODIFIER_ATTACK
[data.missing] [warning] missing/invalid cursor for MODIFIER_PLACE_CHARACTER
[data.missing] [warning] missing/invalid cursor for MODIFIER_PLACE_RESOURCE
[data.missing] [warning] missing/invalid cursor for MODIFIER_PLACE_FORT
[data.missing] [warning] missing/invalid cursor for MODIFIER_MOVE_OBJECT
[data.missing] [warning] missing/invalid cursor for MODIFIER_PLACE_WATCHTOWER
[data.missing] [warning] missing/invalid cursor for MODIFIER_DEPLOYMENT_AREA
[data.missing] [warning] missing/invalid cursor for MODIFIER_PLACE_TILE
[data.missing] [warning] missing/invalid cursor for MODIFIER_PLACE_SPECIAL_PIECE
[data.missing] [warning] missing/invalid cursor for MODIFIER_PAINT
[data.missing] [warning] missing/invalid cursor for MODIFIER_ADJUST_HEIGHTS
[data.missing] [warning] missing/invalid cursor for MODIFIER_ADD_UNIT
[data.missing] [warning] missing/invalid cursor for MODIFIER_PLACE_SETTLEMENT
[script.err] [error] Script Error in data/export_descr_buildings.txt, at line 239, column 48
Unknown unit type specified: Ghazi Infantry
Do you have any idea for solution?:wall: :whip: :furious3:
Hi -Amon-
It's your edu entry
Usually the type entry doesn't have an underscore but sinceCode:type Ghazi_Infantry
dictionary Ghazi_Infantry ; Ghazi Infantry
category infantry
class light
voice_type Light
accent Arabic
banner faction main_infantry
you specified it that way try using
"Ghazi_Infantry"
in your edb file, I mean export_descr_buildings.txt,
and see if that works.
Yes it worked !!
thank you again KnightErrant,you are my savior :2thumbsup: ~:cheers::cheerleader:
I'm begining for my new unit "Mounted Janissary"...
See you soon ~:joker:
@-Amon-
Excellent:2thumbsup:
hello again!
I read at first page that about an hex editor to cut texture files..
I searched in google and get thousands of result..
Which hex editor do you use?
Hi -Amon-
Yes there are lots of them. I don't know which
is best. I use hexedit which is very basic but does
the job. Its here
http://www.physics.ohio-state.edu/~prewett/hexedit/
Since its written by somebody at university I tend
to trust it a little better.
Are you converting textures to dds to put them in
Photoshop?
yes i tried but i got an error message like this
" this is an unknown file format bla bla bla..."
and what about "cutting first 48 bytes"? when i open a .texture file with hex editor,i see numbered lines at left on the screen and every line has number pairs..like :
20 00 00 00 00 00 00 00 00 00 00 00 00 00 ..
:help:
Hi -Amon-
That's what you should see. Each pair represents one
8-bit byte. Each line in hexedit is 16 bytes long. Thus
48 bytes is 3 lines. On the fourth line over on the right
in what's called the ASCII window you should see DDS
and in the hex window for the fourth line you should see
the three hex numbers 44 44 53 which are the hex codes
for the upper case characters DDS.
Make sure you've backed up this file. Then you can cut
the first three lines and save the file as filename.dds.
Then you can open it in Photoshop but you must have
the nvidia DDS plugin for Photoshop or it won't recognize
the file type.
Thanks, great tutorial!:2thumbsup:
One problem though.
If I right click on the unit to bring up its info scroll, the picture of the unit, the unit stats and the unit abilities come up, but where the name of the unit and the description should be, I get a sentence saying 'unlocalised placement text'.
Any help much appreciated.:help:
@Hesford
Did you put entries for them in the export_units.txt file
under /data/text and delete the corresponding .strings.bin file?
I did, but my strings.bin file is not reappearing, that may have something to do with it.