Hello moders!
Lets get started with those tasks :
1. Create uniqe units changing all vanilla ones -
a) battle_model file must be shortened and less complex
b) position of textures mesh files will be repositioned for better performance
Workplan :
1) I have learned a lot in battle_models code and here is my proposal - There is way to decrase code is size for better moding. First lets name it "bm code" for shorten use.
2) "bm code" holds information about folder/file position from where M2TW engine take models, textures,sprites, animations to battles for every unit.
3) Most of unit models/textures holds in folder "unit_models" and more detailed folder position for every faction wich can be shortened by naming folders with single character! Like folder named "Tev" for Teutons , "Lit" for lithuania etc.
4) In faction folder lays unit meshes, body textures and attachment textures. All those features can be named drasticly short using clever "bm code".
First symbol of unit files represents faction the same way as the folders , just small. Like "tev" for Teutons, "lit" for Lithuania etc.
Then in file name comes free space _ wich is for models or body textures , but attachments in same place has + (it will give advance in coding ,becouse you always know that file containing + is attachments)
Then come soldier model short name , and texture file names wich represents :
unit mesh file name, comes short name of it : axem - axeman , arch - archer , inft - infanty , cavl - cavalry etc.
body texture file name, comes short name of it : mail - chainmail , hide - leather armor , body - cloth dress , etc.
attachments texture file name, comes short name of it : rond - round , plne - plane , kite - kite etc.
(normal maps has the same short name of actual texture just ading _n in the end of file.)
Number representing file era 1 - early , 2- mid , 3 - late, 4 - high.
After that in the end is model , armor and equipment type L - light , M - medium , H - heavy
As a result we have new short compact and easy understudable "bm code" for single spearman unit of Baltic rebel faction.
15 estonian_rebels
1 1
33 unit_mod/Bal/bal_sprm1L_lod0.mesh 9400
1
5 slave
31 unit_mod/Bal/bal_body1L.texture
33 unit_mod/Bal/bal_body1L_n.texture
32 unit_sprites/b1_lspr_sprite.spr
1
5 slave
31 unit_mod/Bal/bal+plne1L.texture
33 unit_mod/Bal/bal+plne1L_n.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
What we can read here ?
b1_lspr_lod0 baltic early _ light spearmen mesh file
b1_lbody.texture baltic early _ light cloth dress texture file
b1+lplne.texture baltic early attachments light plane shields
Can you imagine code for Teuton late era heavy infantry ? You see its easy !
bm_code explanation
-------------------------------------
FACTION
pol - Poland
tev - Teutons
lit - Lithuania
nov - Novgorod
mon - Mongols
den - Denmark
hre - HRE
nor - Norvegy
bal - Baltic
-------------------------------
TYPE
Archer - arch
Cavalry - cavl
Halberds - halb
Pike - pike
Spearman - sprm
Infantry - inft
Qrosbow - crbw
Gunmens - gunm
Artilery - artl
Extra - extr
Faction - fact
---------------------------------
ERA
Early - 1
Middle - 2
Late - 3
High - 4
---------------------------------
EQUIP
Light - L
Medium - M
Heavy - H
(This will be updated!)
--------------------------------------------------------------
Battle models line counting
unit_mod/Pol/ = 13
unit_mod/Pol/pol_qbow1L_lod0.mesh = 33 for unit models
unit_mod/Pol/pol_mail1L.texture = 31 for body color
unit_mod/Pol/pol_mail1L_n.texture = 33 for body normal map
unit_mod/Pol/pol+rond1L.texture = 31 for equipment color
unit_mod/Pol/pol+rond1L_n.texture = 33 for equipment normal map