Guide: How to add new units.

A forum to discuss custom scenarios, campaigns and modding in general.

Moderators: Slitherine Core, Panzer Corps Design, Panzer Corps Moderators

nikivdd
Panzer Corps Map Designer
Panzer Corps Map Designer
Posts: 4518
Joined: Fri Jun 24, 2011 1:21 pm
Location: Belgium
Contact:

Guide: How to add new units.

Post 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. :)
https://www.facebook.com/NikivddPanzerCorps
https://www.youtube.com/channel/UCk2lyeEuH_hoA1s7tnTAEJQ
bebro
Slitherine
Slitherine
Posts: 4344
Joined: Sun Nov 19, 2006 12:50 pm

Re: Guide: How to add new units.

Post by bebro »

Good guide. I'll link to this in my unit creation thread too :)
nikivdd
Panzer Corps Map Designer
Panzer Corps Map Designer
Posts: 4518
Joined: Fri Jun 24, 2011 1:21 pm
Location: Belgium
Contact:

Re: Guide: How to add new units.

Post 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.
https://www.facebook.com/NikivddPanzerCorps
https://www.youtube.com/channel/UCk2lyeEuH_hoA1s7tnTAEJQ
VPaulus
Slitherine
Slitherine
Posts: 8311
Joined: Mon Dec 27, 2010 8:33 pm
Location: Portugal

Post by VPaulus »

Thanks, Nico.
I'll just add this to the Sticky Mods. :D

We now only need one with Mark's editor.
dan_hnnng
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 97
Joined: Fri Dec 09, 2011 9:45 am

Post by dan_hnnng »

Great explanation.
drjeff21
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 92
Joined: Sun Feb 20, 2011 10:00 pm

Post by drjeff21 »

Thank you. This is very helpful; especially for someone who is a beginner at customization like myself.
nikivdd
Panzer Corps Map Designer
Panzer Corps Map Designer
Posts: 4518
Joined: Fri Jun 24, 2011 1:21 pm
Location: Belgium
Contact:

Post 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.
https://www.facebook.com/NikivddPanzerCorps
https://www.youtube.com/channel/UCk2lyeEuH_hoA1s7tnTAEJQ
bt2steam
Corporal - Strongpoint
Corporal - Strongpoint
Posts: 64
Joined: Fri Mar 23, 2012 7:02 pm

Re: Guide: How to add new units.

Post 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
nikivdd
Panzer Corps Map Designer
Panzer Corps Map Designer
Posts: 4518
Joined: Fri Jun 24, 2011 1:21 pm
Location: Belgium
Contact:

Re: Guide: How to add new units.

Post 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.
https://www.facebook.com/NikivddPanzerCorps
https://www.youtube.com/channel/UCk2lyeEuH_hoA1s7tnTAEJQ
massi
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 538
Joined: Wed Jul 06, 2011 7:43 am
Location: Rome
Contact:

Re: Guide: How to add new units.

Post 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?
nikivdd
Panzer Corps Map Designer
Panzer Corps Map Designer
Posts: 4518
Joined: Fri Jun 24, 2011 1:21 pm
Location: Belgium
Contact:

Re: Guide: How to add new units.

Post 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.
https://www.facebook.com/NikivddPanzerCorps
https://www.youtube.com/channel/UCk2lyeEuH_hoA1s7tnTAEJQ
massi
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 538
Joined: Wed Jul 06, 2011 7:43 am
Location: Rome
Contact:

Re: Guide: How to add new units.

Post by massi »

ok
Flak Bebro
you given me some good statistics for the mine feild? (and good sound and animation :D)
bebro
Slitherine
Slitherine
Posts: 4344
Joined: Sun Nov 19, 2006 12:50 pm

Re: Guide: How to add new units.

Post 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.
flakfernrohr
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1572
Joined: Wed Aug 03, 2011 11:56 pm
Location: Texas

Re: Guide: How to add new units.

Post 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.
Old Timer Panzer General fan. Maybe a Volksturm soldier now. Did they let Volksturm drive Panzers?
massi
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 538
Joined: Wed Jul 06, 2011 7:43 am
Location: Rome
Contact:

Re: Guide: How to add new units.

Post 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
Radoye
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 125
Joined: Fri Mar 30, 2012 5:48 pm

Re: Guide: How to add new units.

Post 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
massi
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 538
Joined: Wed Jul 06, 2011 7:43 am
Location: Rome
Contact:

Re: Guide: How to add new units.

Post by massi »

GRANDEE :D Great!
flakfernrohr
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1572
Joined: Wed Aug 03, 2011 11:56 pm
Location: Texas

Re: Guide: How to add new units.

Post 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.
Old Timer Panzer General fan. Maybe a Volksturm soldier now. Did they let Volksturm drive Panzers?
Chris10
Captain - Bf 110D
Captain - Bf 110D
Posts: 890
Joined: Tue Mar 27, 2012 1:06 am
Location: Spain

Re: Guide: How to add new units.

Post 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:
blindsey
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 49
Joined: Fri May 28, 2010 3:50 pm
Location: Washington, DC

Re: Guide: How to add new units.

Post 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.
Post Reply

Return to “Panzer Corps : Scenario Design”