I made everthing tou said except instead of using a io.file_first I used a mod folder. Everything works fine including the unit cards but somehow the units are still invisible!!! I tried everything and I know its not because of battle_model file.
Any reason why it does not work?Code: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 18 kurdish_javelinmen 1 4 63 unit_models/_Units/ME_Light_Padded/kurdish_javelinmen_lod0.mesh 121 63 unit_models/_Units/ME_Light_Padded/kurdish_javelinmen_lod1.mesh 900 63 unit_models/_Units/ME_Light_Padded/kurdish_javelinmen_lod2.mesh 2500 63 unit_models/_Units/ME_Light_Padded/kurdish_javelinmen_lod3.mesh 6400 2 5 egypt 76 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_egypt.texture 77 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_normal.texture 48 unit_sprites/egypt_Kurdish_Javelinmen_sprite.spr 6 horhor 76 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_egypt.texture 77 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_normal.texture 48 unit_sprites/egypt_Kurdish_Javelinmen_sprite.spr 2 5 egypt 60 unit_models/AttachmentSets/Final ME Heavy_egypt_diff.texture 60 unit_models/AttachmentSets/Final ME Heavy_egypt_norm.texture 0 6 horhor 60 unit_models/AttachmentSets/Final ME Heavy_egypt_diff.texture 60 unit_models/AttachmentSets/Final ME Heavy_egypt_norm.texture 0 2 4 None 17 MTW2_Fast_Javelin 19 MTW2_Fast_Swordsman 2 20 MTW2_Javelin_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 kurdish_javelinmen_ug1 1 4 67 unit_models/_Units/ME_Light_Padded/kurdish_javelinmen_ug1_lod0.mesh 121 67 unit_models/_Units/ME_Light_Padded/kurdish_javelinmen_ug1_lod1.mesh 900 67 unit_models/_Units/ME_Light_Padded/kurdish_javelinmen_ug1_lod2.mesh 2500 67 unit_models/_Units/ME_Light_Padded/kurdish_javelinmen_ug1_lod3.mesh 6400 2 5 egypt 76 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_egypt.texture 77 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_normal.texture 52 unit_sprites/egypt_Kurdish_Javelinmen_ug1_sprite.spr 6 horhor 76 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_egypt.texture 77 unit_models/_Units/ME_Light_Padded/textures/ME_Peasant_Variant_normal.texture 52 unit_sprites/egypt_Kurdish_Javelinmen_ug1_sprite.spr 2 5 egypt 60 unit_models/AttachmentSets/Final ME Heavy_egypt_diff.texture 60 unit_models/AttachmentSets/Final ME Heavy_egypt_norm.texture 0 6 horhor 60 unit_models/AttachmentSets/Final ME Heavy_egypt_diff.texture 60 unit_models/AttachmentSets/Final ME Heavy_egypt_norm.texture 0 2 4 None 17 MTW2_Fast_Javelin 19 MTW2_Fast_Swordsman 2 20 MTW2_Javelin_primary 14 fs_test_shield 2 18 MTW2_Sword_Primary 14 fs_test_shield
You will need to post your entry from export_descr_unit
plssss help... i added new unit for moors faction and made all necessary entries. then when i played the game the unit i made doesnt show up in the custom battle.
but when i played the moor with orig unit, got ctd and this is the what it say in the system log.:hmmm:
[06:22:10.171 [script.err] [error] Script Error in data/export_descr_unit.txt, at line 14772, column 3
Could not find soldier battle model for unit type 'Me_andalusian_infantry'.
06:22:10.171 [data.invalid] [error] DATABASE_TABLE error found : error reading record from file data/export_descr_unit.txt.]
What exactly is a bat file? I did everything except this. Still getting invisible units.
Also what is this mymod folder?
Help!!! I can't find an answer to this question online. I have M2TW Gold, I unpacked all. I downloaded missing Gold files and unpacked them. Yet I still can't find units_models folder in my data. I have Windows 7. Where did I go wrong?
To Endomatic: I will add this to my tutorial upgrade(I will upgrade the tutorial as soon as i get home!!!)
To Time Commander Bob: The thing is try to test them in custom battle against hre(so many units as is armors)(i test units like this: My faction against the unit owner, first unit has no armor UG second has lvl1 third lvl2)(maybe a texture file is missing) And no it's not the double spacing(the game should crash when there isn't double space after zero) I will try to test it when i get home...
To Mr_Breeze: Thanks for helping other people when i am away... And yes the normal texting doesen't allow more but one space after each word that's why you should talk with the coding if you add a file's text so that copy and paste works...
To Everybody!!!: PM(Private message) me if anyone gets problems adding units (CTD/Units still invisible/units look strange)
Last edited by M3rcury15; January 02, 2007 at 06:54 AM. Reason: Grammar
I did this test and all my three units of different armoured sergeant spearmen were transparent (even though I had edited all the three levels) but all the three levels of HRE sergeant spearmen were fine and had no problems whatsoever.To Time Commander Bob: The thing is try to test them in custom battle against hre(so many units as is armors)(i test units like this: My faction against the unit owner, first unit has no armor UG second has lvl1 third lvl2)(maybe a texture file is missing) And no it's not the double spacing(the game should crash when there isn't double space after zero) I will try to test it when i get home...
It's VERY easy if you get to know the file from up to down - I don't know if i keep track but i think i already have added more than 40 units![]()
you are right. at first it made my eyes go cross, but i was able to add musketeers to HRE. textures, unit cards and all. by the end of the process it was getting much easier. I still think the txt file that assigned battlefield unit models was in a MUCH more user friendly format in Rome.
My battle_models.modelsdb is a giant block of text. is this supposed to be that way or did i srew up this file? if the file is normally like this is there any way to make it more friendly to mod?
Last edited by larry; January 07, 2007 at 07:25 PM.
Nice to see another estonian
By the way as i study the code. The buildup is number(string lenght) and string. 0 (null) and double space means empty string and marks end of the block.
20(stringlenght of that ->) teutonic_knights_ug1
1 (stringlenght of 3) 3(number of mesh or strings to come? not sure, I saw 4 vhere was 4 strings.)
65(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/teutonic_knights_ug1_lod0.mesh 121 (<- what is this? Don't know)
65(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/teutonic_knights_ug1_lod1.mesh 1225
65(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/teutonic_knights_ug1_lod2.mesh 6400
2 (number of factions)
3(stringlenght of hre) hre
70(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_hre.texture
73(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture
44(stringlenght of that ->) unit_sprites/hre_NE_Bodyguard_ug1_sprite.spr
6(stringlenght of sicily) sicily
73(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_hre.texture
73(stringlenght of that ->) unit_models/_Units/EN_Pplate_Plate/textures/mtw2_EN_Pplate_normal.texture
44(stringlenght of that ->) unit_sprites/hre_NE_Bodyguard_ug1_sprite.spr
2 (number of factions)
3(stringlenght of that ->) hre
64(stringlenght of that ->) unit_models/AttachmentSets/Final Heater Special_hre_diff.texture
64(stringlenght of that ->) unit_models/AttachmentSets/Final Heater Special_hre_norm.texture 0 (has double space, i quess it marks the end?)
6(stringlenght of that ->) sicily
64(stringlenght of that ->) unit_models/AttachmentSets/Final Heater Special_hre_diff.texture
64(stringlenght of that ->) unit_models/AttachmentSets/Final Heater Special_hre_norm.texture 0
Weapons section v1?
1(stringlenght of that ->) 5(stringlenght of that ->) Horse (or the 1 means 1 horse?)
13(stringlenght of that ->) MTW2_HR_Lance 12(stringlenght of that ->) MTW2_HR_Mace
2(stringlenght of that ->) 21(stringlenght of that ->) MTW2_HR_Lance_Primary
14(stringlenght of that ->) fs_test_shield
2(stringlenght of that ->) 17(stringlenght of that ->) MTW2_Mace_Primary 14(stringlenght of that ->) fs_test_shield 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
All numbers and string lenghts must equal. This way is more readable. Mercury try to testit out. Can the medieval parse this form of code? Does it ignore "Enter" or next line tag? (Ühesõnaga, kas programm oskab sellises vormis koodi lugeda? Saad järgi testida?)
EDIT: 19:06 8. jan 2007
Yes: I tested it out! medieval2 can read the code if you write it that kind This is original copy-paste frome my file battle_models.db Now my viking faction has danish skins on battlefield.
14 viking_raiders
1 4
61 unit_models/_Units/EN_Peasant_Padded/viking_raiders_lod0.mesh 121
61 unit_models/_Units/EN_Peasant_Padded/viking_raiders_lod1.mesh 900
61 unit_models/_Units/EN_Peasant_Padded/viking_raiders_lod2.mesh 2500
61 unit_models/_Units/EN_Peasant_Padded/viking_raiders_lod3.mesh 6400
3
7 denmark
79 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_denmark.texture
78 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_normal.texture
46 unit_sprites/denmark_Viking_Raiders_sprite.spr
7 normans
79 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_denmark.texture
78 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_normal.texture
46 unit_sprites/denmark_Viking_Raiders_sprite.spr
5 slave
78 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_rebels.texture
78 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_normal.texture
44 unit_sprites/slave_Viking_Raiders_sprite.spr
3
7 denmark
60 unit_models/AttachmentSets/Final Danish_denmark_diff.texture
60 unit_models/AttachmentSets/Final Danish_denmark_norm.texture 0
7 normans
60 unit_models/AttachmentSets/Final Danish_denmark_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 9 MTW2_Mace 0 2 17 MTW2_Mace_Primary 14 fs_test_shield 0
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
Now it is more readable! "Enter" or key stroke will not disturb your code! Have nice modding!
Last edited by kleemann; January 09, 2007 at 01:19 AM.
To Larry: Yes the file must be ugly![]()
To Kleemann: Thanks![]()
i have some answers kleeman
note not sure if this really changes it but if you look at the last unit entry, you'll notice this section is at the end of the unit not beginning
-0.090000004 0 0 -0.34999999 0.80000001 0.60000002
e.g:that is the last entry in fact16 baltest_hr_lance 1 4 60 unit_models/_Units/EN_Lmail_Hmail/baltest_hr_lance_lod0.mesh 121 60 unit_models/_Units/EN_Lmail_Hmail/baltest_hr_lance_lod1.mesh 900 60 unit_models/_Units/EN_Lmail_Hmail/baltest_hr_lance_lod2.mesh 2500 60 unit_models/_Units/EN_Lmail_Hmail/baltest_hr_lance_lod3.mesh 6400 2 7 england 73 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_england.texture 72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture 0 6 france 72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_france.texture 72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_Lmail_Hmail_normal.texture 0 2 7 england 60 unit_models/AttachmentSets/Final Heater_england_diff.texture 60 unit_models/AttachmentSets/Final Heater_england_norm.texture 0 6 france 59 unit_models/AttachmentSets/Final Heater_france_diff.texture 59 unit_models/AttachmentSets/Final Heater_france_norm.texture 0 1 5 Horse 13 MTW2_HR_Lance 0 2 21 MTW2_HR_Lance_Primary 14 fs_test_shield 0 16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002![]()
Last edited by Zorgrath; January 08, 2007 at 06:56 PM.
Good point Zorgrath - i made corrections.
Last edited by kleemann; January 09, 2007 at 01:20 AM.
Trading tip: Load your mercants on your (crapy, cheap upkeep) unit and place that crapy unit on the valuable trade ressource. All will earn money on that single ressourecAND other merchants can't do anything! ha:ha
BUT it has bad side efect, if the unit rebel you will lose your merchants:hmmm:
How-to: edit battle_model.modeldb to add new animations and skins.