Log in

View Full Version : Adding new units



Bwian
01-03-2005, 22:58
So far, I have been getting new units into the game by simply replacing old models, but I don't to keep doing that!

I read there is a 300 unit limit...but I don't know exactly what they mean by that!

Units seem to be defined in 2 places.
desc_model_battle.txt AND export_descr_unit

The first one defines the mesh and range of textures, plus the animation routines used. The second has the unit specifc data. Is this the one that can't exceed 300?

So far, I have made a few 'skeleton warrior' models, and have started on a cavalry unit. This requires a bit more complexity. I can make a skeleton horse...and a skeleton spearman to ride it. The second text file defines how the bits would come together.

I would like to add all the units I have made to the 2 text files and have them available as additional units to a faction. but am not sure what space I have to do this.

How many units already exist?? How many can I add... or do I have to bite the bullet and start something bigger :D

lt1956
01-04-2005, 10:42
I believe and could be wrong but 300 unit limit is for the export_descr_unit.txt and not the battle.txt

As I said I have not tested this out, but there were no warnings in the battle.txt file. I think the unit limit is for actual NEW units with stats etc. otherwise they could run out of space for things like Standards etc.

If I am wrong someone else speak up.

On the skeletons, You only need to add the entry to the model_battle file, unit file doesnt specify skeleton.

But you need to put the skeleton with the other ones which most likely requires you making a folder for it. So the pathway is the same as the others.

You should try makeing a skeleton for the standard bearer to be able to ride a horse. Then we could add them to the cavalry.

Lt

Encaitar
01-05-2005, 01:02
There is a limit to the number of entries in the descr_model_battle.txt file too. Not sure what it is, but I got an error once saying there were too many entries in it.

hoggy
01-05-2005, 09:31
Yep, I hit the limit on both but not sure what it is. You can add a fair few new ones though and probably best to add new ones rather than replace ones for your mod. I used DJs tutorial on adding new units in guides section. You add new entries in:

data\export_descr_units_enums.txt
data\text\export_units.txt
data\descr_model_battle.txt
data\export_descr_unit.txt

data\descr_mount.txt (an entry must be put in here as well as model_battle for new mounts)

data\models\unit_model.cas (model export)
data\models_unit\textures\unit_skin.tga.dds (texture)
data\models_unit\textures\unit_skin_gloss.tga.dds (i don't bother with this normally)
data\sprites\unit_sprite_###.tga.dds (i normally use an existing one)
data\sprites\unit_sprite_###.spr (i normally use an existing one)

data\ui\units\faction\#unit.tga
data\ui\unit_info\faction\unit.tga

Bwian
01-05-2005, 11:07
Thats a good point.... I will add new units until something breaks and ONLY THEN start actually replacing things.

So far, I have managed to build the skeleton mount and am adding a 'cataphract' version with some armour on it. I still need to make a couple of variations on the skeleton for a rider and some heavier infantry, and then the bone-boys should be about done. I still need to make a leader unit for the soldiers though, and a banner.

I am going to have to read up on teh tutorials for making these units buildable.... I had thought I might try to introdcue them into the basic game by making them buildable at certain religious sites.

Bwian
01-06-2005, 00:10
Aargh!!! This is driving me nuts :dizzy2:

I can get the units to work fine as a replacement for original units, but when I try to make them exist as a whole new unit, it won't even get past the starting screen.

Clearly I am doing something wrong.

Can anyone point me towards a good tutorial for adding a completely new unit to a faction ? Hoggy mentioned one by DJ... but I can't find the right one :(

I added a new entry to the folders, added the models and textures, but have obviousely not got the naming conventions right or messed up a link to something or other. Swapping my model for a stock one meant I didn't have to get involved with this side of the thing.

:help:

If I can get just one added, then I will be off and running!

GodsPetMonkey
01-06-2005, 01:55
Where are you up to with the adding?

Have you got your model data all set up? Do you just need to add the unit to the export_descr_unit.txt and set up the building for training them in export_descr_buildings.txt?

Bwian
01-06-2005, 09:48
Thank the Gods for the '-show_errs' de bug feature!!!!

I had the units all built and functional as 'replacements' and had roughed out what I thought was a correct set of updates to the various text files Hoggy listed above. They all were basically copy and pastes of the original entries with changes made to point at my models and textures etc.

But it was CTD'ing

When I ran it with debug, it told me exactly WHERE the error was occurring.

It turned out to be a surplus carriage return on the end of the file where I had defined the new unit ( export_descr_unit.txt I think ).......removed it, and it worked! Need to do a bit more tweaking to change some of the stats, but the text files are well commented and I am fairly happy with what needs to be done.

lantern
03-01-2020, 21:15
I did exactly as hoggy taught and got this error message DATA_BASE_TABLET ERROR max records exceeded from file

Could anyone help?