Page 1 of 3

Guide: How to add new units.

Posted: Sun Jan 08, 2012 11:49 am
by nikivdd
Guide to add new units into the necessary files.

Always make a backup of your equipment file before you "experiment".

Part 1: Add unit in equipment file.

For example: There is a unit called Italian_Bruckenpioniere that you would like to include in your project

Image

Filename: Italian_Bruckenpioniere.png

First step, open the equipment.pzeqp file which is located in the \data folder with notepad, notepad++, excel...whatever suits best for you.

Image

This is what you see. Unit names followed by a lot of numbers. These are all different categories which are explained on the top of this file (the ID line)!

When adding a new unit, add it to the bottom of the list. It is not recommended to put it in a reserved slot of the vanilla equipment file.
The last unit is at line 1521:
1521 Landing Craft 16 80 7 60 4 1 0 1 0 0 -2 0 2 2 1 3 26 West_Allied_Landing_Craft.png 1.1.1940 1.1.1946 6

Your new entry could be 1522 but you don't have to. Let's say you will have a whole bunch of italian units you want to add so perhaps you can start them off at line number 2000

Image

We chose the place and the name for the unit. What's next? The other parameters ofcourse. The best is to copy a line of a unit of the same class as the unit you want to add.
Here we are lucky , the germans have a bridge engineer. So... let's copy and paste the line.
Then we get for line 2000:
2000 Italian Bruckenpioniere 0 113 5 0 2 2 0 1 2 1 -1 1 8 17 2 0 0 Bruckenpioniere.png 5.4.1939 1.1.1946 11 beng close Bridge

Image

Is that all? Not yet. You will have to change at least two things. The nation code and the unit png name.

Image

Encircled in red is the nation parameter, encircled in orange is the unit png name. Let's give it the correct values.

Image

The nation code for Italy = 5 and the name of our png file is Italian_Bruckenpioniere.png
The other values can also be changed but is personal preference. You can change the cost, movement, soft and hard attack, availability and much more. Now you can save this file.

Part 2: Add unit in efx file.

Our friend received his stats but if you don't add the Italian_Bruckenpioniere to the efx file, he is not going to make a sound. Also backup your efx file! The file is located in the \graphics folder.

You can open the file with the same program as you used for the equipment file.

Image

That is how it looks like.
Now we need to add our unit. New entries should be added to the bottom of the list.

Image


Now i am going to use the same trick. Copy and paste the data from the german unit.


Image

Then you can save the file.

Part 3. How to use your new unit.

It is better to load your project with its custom equipment file and efx file into GME. In my example it's a project's name which contains the Italian_Bruckenpioniere

Image

Then launch the scenario editor. Open your project's scenario, chose units and chose Italy ofcourse. (better untick the box show only units for this scenario for test purpose)

Image

It is there. At least we know we entered the correct name in the equipment file. If you only see the name but no picture, than you made a typo in the *.png file in the equipment roster or just simply forgot to exchange for the right *.png name.
To be certain if it is correct in the efx file, you will have to actually try out your scenario in the game and listen if it makes a sound. About correct animations, you'll have to ask somebody else.


Hope this was useful. :)

Re: Guide: How to add new units.

Posted: Sun Jan 08, 2012 1:15 pm
by bebro
Good guide. I'll link to this in my unit creation thread too :)

Re: Guide: How to add new units.

Posted: Sun Jan 08, 2012 1:30 pm
by nikivdd
bebro wrote:Good guide. I'll link to this in my unit creation thread too :)
They call it productive sunday morning spending ;). I hope i didn't overlook anything. When it is close to second nature, there is the probability to overlook one step that became so obvious.

Posted: Sun Jan 08, 2012 2:10 pm
by VPaulus
Thanks, Nico.
I'll just add this to the Sticky Mods. :D

We now only need one with Mark's editor.

Posted: Sun Jan 08, 2012 2:43 pm
by dan_hnnng
Great explanation.

Posted: Mon Jan 09, 2012 6:52 pm
by drjeff21
Thank you. This is very helpful; especially for someone who is a beginner at customization like myself.

Posted: Mon Jan 09, 2012 6:55 pm
by nikivdd
drjeff21 wrote:Thank you. This is very helpful; especially for someone who is a beginner at customization like myself.
I hear you. Had to figure most of it all out by myself. I'm glad i could make this contribution as a token of gratitude to all modders on this great forum.

Re: Guide: How to add new units.

Posted: Thu Apr 05, 2012 4:46 am
by bt2steam
How do you make room to type in the new unit to bottom of note pad for some reason i cant make room for it this is prob sooo dumb lol :) any help would be appreciated thank you

Re: Guide: How to add new units.

Posted: Thu Apr 05, 2012 5:01 am
by nikivdd
bt2steam wrote:How do you make room to type in the new unit to bottom of note pad for some reason i cant make room for it this is prob sooo dumb lol :) any help would be appreciated thank you
If i understood correctly: go to the last line in the list click on it like you would edit smth, move the cursor to the right till you are at the end of the parameters, press enter.

Re: Guide: How to add new units.

Posted: Mon Jun 18, 2012 2:12 pm
by massi
thanks nikivdd
it was really important to me!
questions:
I did minefiled: you what kind of stats, you will give this unit? and for the sea-mines units?

Re: Guide: How to add new units.

Posted: Mon Jun 18, 2012 3:49 pm
by nikivdd
massi wrote:thanks nikivdd
it was really important to me!
questions:
I did minefiled: you what kind of stats, you will give this unit? and for the sea-mines units?
I am very glad that it still serves some use :)
I think Flak and/or Bebro are using mines, perhaps they are in a better position to answer your question.

Re: Guide: How to add new units.

Posted: Mon Jun 18, 2012 6:21 pm
by massi
ok
Flak Bebro
you given me some good statistics for the mine feild? (and good sound and animation :D)

Re: Guide: How to add new units.

Posted: Tue Jun 19, 2012 5:08 pm
by bebro
I have them in the same unit class as forts and bunkers etc. IIRC that's class 6.

Then for anti tank mines I use hard attack of -10 or higher, low soft attack. For anti personnel mines it would be the other way around. Or make one general minefield unit with both higher soft and hard attack (but all negative, so it cannot attack on its own).

It's not perfect since artillery and air units can attack them too, but I use those mines only in some instances mainly to slow the player's advance - for that it works.

Re: Guide: How to add new units.

Posted: Wed Jun 20, 2012 4:09 pm
by flakfernrohr
massi wrote:ok
Flak Bebro
you given me some good statistics for the mine feild? (and good sound and animation :D)

Massi,
I have not used them and have been hoping to find the right combination. I think Bebro is spot on with his statistics.

Re: Guide: How to add new units.

Posted: Thu Jun 21, 2012 5:43 pm
by massi
thanks
some questions, where can I find these things:
Detailed list of class
type of class
Type of Movement
Add Traits list and details
flag class detailed

Re: Guide: How to add new units.

Posted: Thu Jun 21, 2012 6:37 pm
by Radoye
a lot of this info you can find in files in the data folder

unitclass.pzdat
terrain.pzdat
movement.pzdat
nations.pzdat
gamerules.pzdat
strings.pzdat
etc

Re: Guide: How to add new units.

Posted: Thu Jun 21, 2012 7:36 pm
by massi
GRANDEE :D Great!

Re: Guide: How to add new units.

Posted: Thu Jun 21, 2012 9:55 pm
by flakfernrohr
This is a great thread with very thorough instructions indeed, but isn't it just as easy or easier even (maybe) to "clone" a unit in Mr. Garnett's Editor, adding the new picture png image into the graphics folder and naming both accordingly in the Equipment file and the Graphics file? The reason I ask is because I have done it that way many times and it works great too. I have been able to do all sorts of interesting things and tweaks in the Garnett Equipment Editor mod, sometimes enough that a person doesn't even need to mess with the files to change a scenario's parimeters because the equipment is adjusted.

Re: Guide: How to add new units.

Posted: Sat Jun 23, 2012 4:48 pm
by Chris10
flakfernrohr wrote:This is a great thread with very thorough instructions indeed, but isn't it just as easy or easier even (maybe) to "clone" a unit in Mr. Garnett's Editor, .......
I tried the editor and found that using excel spreadsheet gives far better overview and editing abilities as you can see at a glance whats going on and clone units by copypaste simply inserting new lines and compare the new entries with each other while changing stats..as well you dont have to worry about blank space or beaking space as excel converts each info into one cell on opening the file...same holds true for saving
for me excel is by far the most comfortable, quickest and most secure way to manipulate the equipment file

and for those who do not have MS-Office well..OpenOffice is more then just competitive and comes for free... :wink:

Re: Guide: How to add new units.

Posted: Mon Jul 09, 2012 4:35 am
by blindsey
chris10 or Moderator
When you use Excel, (I have version Excel 2007), what file format do you save it in? Every time I have edited and tried to save the equipment.pzeqp file using excel it breaks it (no units show up in the game or purchase screen). I have to use a text editor called EditPadPro7, which works for file saving, but it is really difficult to use to edit the equipment.pzeqp as things don't appear as columns, you can't sort, hide rows and columns, etc, to compare similar unit rows near each other. If someone can tell me how to use Excel 2007 and save the file you would be saving me a ton of time and I might even be able to post my one big mod that I use (I combined SS, SE, Sound mods, added some others' units, added a few of my own units, etc). I am trying to tweak the SS units to dummy them down to play DLC all the way through now that I am finished 45 East, but it is really slow going.

I also wanted to try and remove all of the "Reserved" rows to cut down on size/scrolling of equipment.pzeqp file, and sort the records/rows by flag (country) and unit type, but my attempt to do this using Excel failed and it is too time consuming to use text editor or equipment editor. So again, Excel would be great if I could figure out how to safe the file so it would work.

Question, can anyone tell me if the scenario files refer to the units by their ID or their shortname? I also wanted to give the units new ID numbers after sorting them, but I am afraid that will break scenarios? Also, I am trying to clean up unit names (43 at front of some and at end of others, Wehrmacht Inf is redundant (it is like saying Army Infantry, why not just call them Infantrie?), etc. Anyway, there are a million and one things I could do way faster with Excel if I could just make it work. Thanks for any help.

Another question, where do you save the big picture of the unit so it shows up over on the right side under the full unit name? I swear I have opened every folder in the game and I can't find them.