-
Re: Tutorial - Adding a unit to the game
Hi -Amon-
It's your edu entry
Code:
type Ghazi_Infantry
dictionary Ghazi_Infantry ; Ghazi Infantry
category infantry
class light
voice_type Light
accent Arabic
banner faction main_infantry
Usually the type entry doesn't have an underscore but since
you specified it that way try using
"Ghazi_Infantry"
in your edb file, I mean export_descr_buildings.txt,
and see if that works.
-
Re: Tutorial - Adding a unit to the game
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:
-
Re: Tutorial - Adding a unit to the game
@-Amon-
Excellent:2thumbsup:
-
Re: Tutorial - Adding a unit to the game
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?
-
Re: Tutorial - Adding a unit to the game
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?
-
Re: Tutorial - Adding a unit to the game
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:
-
Re: Tutorial - Adding a unit to the game
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.
-
Re: Tutorial - Adding a unit to the game
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:
-
Re: Tutorial - Adding a unit to the game
@Hesford
Did you put entries for them in the export_units.txt file
under /data/text and delete the corresponding .strings.bin file?
-
Re: Tutorial - Adding a unit to the game
I did, but my strings.bin file is not reappearing, that may have something to do with it.
-
Re: Tutorial - Adding a unit to the game
Hey guys, if we're following the tutorial (creating Byzantine Dragoons) couldn't we just take a texture file(like rn_half_3q_plate_england.texture), copy it, and rename it to rn_half_3q_plate_byzantiym.texture? I'm having some trouble and I believe it to be the modeldb file. The error log says it "Could not find soldier battle model for unit type 'GR_Dragoons'." in my mod folder. But shouldn't the modeldm file be in the default M2TW data/ unit_modles folder? It also says there was an error reading from my mod folders export/unit file. I've copied everything directly from the tutorial as I read along, so to make sure there was no error. Is there anything I could have missed?
-
Re: Tutorial - Adding a unit to the game
Ok, nevermind. I missed the "one space" rule in my export_units file. Thanks for the great tutorial!
-
Re: Tutorial - Adding a unit to the game
Is there any way I can download a export_units.txt.strings, or re-create one?
-
Re: Tutorial - Adding a unit to the game
-
Re: Tutorial - Adding a unit to the game
Thanks, I completely forgot about that, and that's where I downloaded my files from!:dizzy2: :oops:
-
Re: Tutorial - Adding a unit to the game
@hesford
Did you ever resolve your "unlocalised placement text"
problem or are you still working on it?
-
Re: Tutorial - Adding a unit to the game
I desperately need help with this. The damn file has been failing me at every turn and as far as I can surmise there is nothing wrong with this code, but obviously for it to CTD every time the game starts up, there is.
29 hospitaller_sergeant_spearmen
1 4
65 unit_models/_Units/EN_Lmail_Hmail/sergeant_spearmen_ug2_lod0.mesh 121
65 unit_models/_Units/EN_Lmail_Hmail/sergeant_spearmen_ug2_lod1.mesh 900
65 unit_models/_Units/EN_Lmail_Hmail/sergeant_spearmen_ug2_lod2.mesh 2500
65 unit_models/_Units/EN_Lmail_Hmail/sergeant_spearmen_ug2_lod3.mesh 6400
1
6 sicily
78 unit_models/_Units/EN_Lmail_Hmail/textures/crusader_hosp_sergeant_mail.texture
72 unit_models/_Units/EN_Lmail_Hmail/textures/EN_email_email_normal.texture
52 unit_sprites/sicily_Dummy_EN_Spearmen_ug2_sprite.spr
1
6 sicily
57 unit_models/AttachmentSets/Final Kite_sicily_diff.texture
57 unit_models/AttachmentSets/Final Kite_sicily_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
I'll upload the file and do just about everything if someone is willing to try and help me do this. This is keeping me from skinning further or modding in anything for the game. :(
-
Re: Tutorial - Adding a unit to the game
@sahran
Your character counts look ok so let me ask a question.
Do you get the black screen on loading or do you see a
splash screen and then get a CTD? If the latter, the problem
is probably in your EDU and your modeldb file is ok.
-
Re: Tutorial - Adding a unit to the game
-
Re: Tutorial - Adding a unit to the game
Hey i need help.
after seeing this i tried to add a new unit to the game for my welsh faction.
ive created new textures and everything and they are all in the right files. but i still get the CTD when the game loads. theres just a black screen and it stays like that until i press esc:wall:
here is a copy of what ive done
type Welsh Cavalry
dictionary Welsh_Cavalry ; Welsh Cavalry
category cavalry
class light
voice_type Light
accent Scottish
banner faction main_spear
banner holy crusade
soldier Welsh_Cavalry, 32, 0, 1
mount heavy horse
mount_effect elephant -4, camel -4
attributes sea_faring, hide_forest, can_withdraw, general_unit
formation 2, 4.4, 3, 6, 4, square
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 0, 3, 3, flesh
;stat_armour_ex 0, 0, 0, 0, 3, 3, 3, flesh
stat_sec_armour 0, 0, flesh
stat_heat 2
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, 340, 150, 85, 65, 340, 4, 80
armour_ug_levels 0
armour_ug_models Welsh_Cavalry
ownership wales
era 0 wales
era 1 wales
;unit_info 7, 0, 6
btw for the modeldb file im using the formatted modeldb
5 wales
65 unit_models/Mounts/Heavy_Horse/textures/heavy_horse_wales.texture
66 unit_models/Mounts/Heavy_Horse/textures/heavy_horse_normal.texture
49 unit_sprites/england_Mount_Heavy_Horse_sprite.spr
14 welsh_spearmen
1 4
61 unit_models/_Units/EN_Peasant_Padded/welsh_spearmen_lod0.mesh 121
61 unit_models/_Units/EN_Peasant_Padded/welsh_spearmen_lod1.mesh 900
61 unit_models/_Units/EN_Peasant_Padded/welsh_spearmen_lod2.mesh 2500
61 unit_models/_Units/EN_Peasant_Padded/welsh_spearmen_lod3.mesh 6400
2
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
47 unit_sprites/slave_Dummy_EN_Spearmen_sprite.spr
5 wales
77 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_wales.texture
78 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_normal.texture
46 unit_sprites/merc_Dummy_EN_Spearmen_sprite.spr
4 merc
77 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_mercs.texture
78 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_normal.texture
46 unit_sprites/merc_Dummy_EN_Spearmen_sprite.spr
2
5 slave
66 unit_models/AttachmentSets/Final European Light_slave_diff.texture
66 unit_models/AttachmentSets/Final European Light_slave_norm.texture 0
4 merc
65 unit_models/AttachmentSets/Final European Light_merc_diff.texture
65 unit_models/AttachmentSets/Final European Light_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
14 welsh_cavalry
1 4
61 unit_models/_Units/EN_Peasant_Padded/welsh_spearmen_lod0.mesh 121
61 unit_models/_Units/EN_Peasant_Padded/welsh_spearmen_lod1.mesh 900
61 unit_models/_Units/EN_Peasant_Padded/welsh_spearmen_lod2.mesh 2500
61 unit_models/_Units/EN_Peasant_Padded/welsh_spearmen_lod3.mesh 6400
2
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
47 unit_sprites/slave_Dummy_EN_Spearmen_sprite.spr
5 wales
77 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_wales.texture
78 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_normal.texture
46 unit_sprites/merc_Dummy_EN_Spearmen_sprite.spr
4 merc
77 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_mercs.texture
78 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_normal.texture
46 unit_sprites/merc_Dummy_EN_Spearmen_sprite.spr
2
5 slave
66 unit_models/AttachmentSets/Final European Light_slave_diff.texture
66 unit_models/AttachmentSets/Final European Light_slave_norm.texture 0
4 merc
65 unit_models/AttachmentSets/Final European Light_merc_diff.texture
65 unit_models/AttachmentSets/Final European Light_merc_norm.texture 0
1
5 Horse
13 MTW2_HR_Spear 1
2
21 MTW2_HR_spear_Primary
14 fs_test_shield 2
16 -0.090000004 0 0 -0.34999999 0.80000001 0.60000002
please help
-
Re: Tutorial - Adding a unit to the game
@Wontonman
Several mistakes in the modeldb file entries. The faction count is
off here, the red 2 should be a 3 for the number of faction entries.
Also you only have 2 entries for the attachment set part, need to have
a corresponding wales entry for the attachment sets.
Code:
2
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
47 unit_sprites/slave_Dummy_EN_Spearmen_sprite.spr
5 wales
77 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_wales.texture
78 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_normal.texture
46 unit_sprites/merc_Dummy_EN_Spearmen_sprite.spr
4 merc
77 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_mercs.texture
78 unit_models/_Units/EN_Peasant_Padded/textures/EN_Peasant_Padded_normal.texture
46 unit_sprites/merc_Dummy_EN_Spearmen_sprite.spr
For your welsh_cavalry unit the character count is off.
Should be 13 not 14. Similar remarks for this entry about changing faction
numbers from 2 to 3 and making sure the attachment sets have a wales
entry as well.
-
Re: Tutorial - Adding a unit to the game
im still having trouble any more ideas?
-
Re: Tutorial - Adding a unit to the game
@Wontonman
Boy, I was too focused on counting strings.
For your Welsh_Cavalry you're trying to turn
an infantry unit into a cavalry unit. I don't
think that's going to work. How about
copying the scots Border Horse modeldb entry
and make that into your welsh cavalry.
-
Re: Tutorial - Adding a unit to the game
-
Re: Tutorial - Adding a unit to the game
my game just crash, i need add Forlorn Hope to Milan and nothing :(
-
Re: Tutorial - Adding a unit to the game
Quote:
Originally Posted by KnightErrant
@hesford
Did you ever resolve your "unlocalised placement text"
problem or are you still working on it?
Yep, but I have another problem now, on the unit info scroll the picture of the unit doesn't appear.
-
Re: Tutorial - Adding a unit to the game
Edit: I get the dreaded grey peasant.
-
Re: Tutorial - Adding a unit to the game
@hesford
Did you put a .tga file in data/ui/units for it as per step 4 of the
tutorial, maybe the spelling is off and the exe isn't seeing it.
-
Re: Tutorial - Adding a unit to the game
Thanks, everything on the unit info and ui cards work, but I had to uninstall the game and do this again. Now my unit is invisible on the battle map.
-
Re: Tutorial - Adding a unit to the game
Someone? Please, anyone who has had this problem and knows what to do, or anyone who knows what to do anyway please :help: