User avatar
Leibst
Posts: 2581
Joined: Wed Sep 27, 2006 6:06 am
Location: Madrid, Spain
Contact: Website Facebook

A brief introduction to modding units

Thu Apr 10, 2014 4:03 pm

Imagine yo want to create a new game
You have to design units yes, but first you have to design the models because units are composed of models.
Example of models :
Bandera de Falange
CTV Bat Bersagliere
Bat.Int.Brigade
or just a one star Leader like Cipriano Mera.

And this models form part of units.
Units can have one or more models inside it.
An International Brigade have a comisar and several Bat.Int.Brigade.
Other units only need one model, like a leader or a Falange unit.

So lets see the Falange example as it is easier.

We need an excel file with the appropiate design, so we use an Ageod models file from another game. In España design i begun with RUS file.
I want to create my first unit, the falange unit, with just one type of subunit inside, Falangist infantry. Then i need to create in models file one entry that will be Falangist, i will call it Bandera de Falange.

See the picture of España models file.

[ATTACH]27312[/ATTACH]


First column UID must always be as this, numbers in increasing order, one by one (always check this before save).
First row should always be as you see. DONT CHANGE it never for the original file.
Important rows:
Alias: it is used in models alias file and in the units excel file to refer to the models that form each unit.
Portrait: Its the name of the png files used for this model. The png files are stored in the Graphics folders.

So you have to fill the fields with the info you want for this model. Take care of not leaving empty fields in the excel. Empty must be filled as NULL.

Once you have ended save the file (as excel file) in your work folder.
Now save it as CSV separated by comma.

Open CSVSplitter, select your CSV models file.
Select first Tab Convert Data
Click on mdl
Click on convert

You should have in your Output Path your models files MDL files, as much as UIDs you have and a model aliases file.
Now you have to copy these files into the game's folders.

These files are used in the game folders.
MDL files go into Gamedata/Models folder
copy them there and delete the cached file
Mdl_Alias file goes in Aliases folder.

It is important this:
your mdl_aliases file should be the one that corresponds with the models files you have in the Gamedata/Models folder.
So if the mdl_aliases file has 30 entries you must have 30 models files in your Gamedata/Models folder and they must correspond to the mdl_aliases info.

If you understand this way of working you will understand easily how to work with units.
Attachments
models1.JPG
Image
Headquarter game designer of Battles For Spain, Ageod English Civil War, España:1936 and Thirty Years War
HQ website

Aktivist
Private
Posts: 28
Joined: Thu Aug 22, 2013 11:16 am

Thu Apr 10, 2014 4:24 pm

To refer to my question in another thread (since I believe you startet this as multi thread for all question related to modding units or models):

What happens, if someone does not produce a connection in the column "text" (by $-symbol) to the corresponding line in the LocalStrings-file, but enters plaintext instead. If that plain text is shown in the game (where the LocalStrings-Text would normally appear), I am pleased. And I assume, the same would work for all other fields of description in the database spreadsheets that are not connected to other files during the parser process. Means, of course you need that connection between the model uid, the unit uid, the picture file, the ini-files and so on. No problem with that. But it is not needed for columns like "text", which for example also appear in event files referring to the name of an event (displayed upon command genmsg) or the text description (displayed upon command gentextmsg). Only a further example, I do not want to capture the "unit-thread" by talking now about events. But the rules behind are the same, aren't they?

Thank you for your answer.


Aktivist

User avatar
Leibst
Posts: 2581
Joined: Wed Sep 27, 2006 6:06 am
Location: Madrid, Spain
Contact: Website Facebook

Thu Apr 10, 2014 5:15 pm

i have never tried that.
I'm not sure if you are telling that you have already done it for the text. But if that works for a column only referenced in the Localstrings file it could work for similar columns,
Pocus will know it better, or P.Thibaut i guess.
Image
Headquarter game designer of Battles For Spain, Ageod English Civil War, España:1936 and Thirty Years War
HQ website

Aktivist
Private
Posts: 28
Joined: Thu Aug 22, 2013 11:16 am

Thu Apr 10, 2014 5:38 pm

Tried it with General Joe Johnston. Put "Joe Test Text" instead of the normal text. Joe Johnston did appear as usual, everything seemed to be exactly the same. Could not find the "Joe Test Text" though, but there was no blank line oder error field or suspicious text on display either. Name, Rank, Stats, the window when hovering the mouse over the unit, (...) - everything seemed normal me. Compared it with the other untouched generals, too. So I think, it will work.

(Not that I wanna go wild on that "text"-fields in the files. But for additional models/units it is good to know, that one can reach ones intentions without messing around in the string file. I mean, notwithstanding the must-have-strings.)

But - as the outcome didn't show any effect at all, I am still suspicious a bit.

Aktivist
Private
Posts: 28
Joined: Thu Aug 22, 2013 11:16 am

Mon Apr 14, 2014 12:11 pm

As this thread started by Leibstandarte covers all model/unit related questions, I repeat an information given by Pocus regarding the column: CbtDeathChance which determines the chance of a leader being killed during a battle.

1st - the combat leader casualties dice sides value is obsolet (found in the gamelogic.opt file)
2nd - the leader death combat chance is exclusively determined by the model (field: CbtDeathChance)
3rd - each round of a battle a 10.000-sided dice is rolled against the value given in that field
4th - even if the field is "nulled", there is a 0.2% chance each round, that a leader involved in a battle dies - so the default value is 20

These answers only cover battle-related leader deaths. There are still other possibilies, e.g. leader death by sickness, leader death by siege, etc.

Once again, merci beaucoup!

Aktivist

Return to “Modding AGE engine games”

Who is online

Users browsing this forum: No registered users and 3 guests