Guide: How to add new units.

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

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

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

Re: Guide: How to add new units.

Post by nikivdd »

blindsey wrote: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.
I cannot answer about excell since i always use (the obsolete?) notepad.
Units are refered by their ID, not the name. There is a program floating around called Sorteqp and sorts your efile for example nicely on date of availability.
Big unit pictures go to...\UI\BigPictures or smth similar.
https://www.facebook.com/NikivddPanzerCorps
https://www.youtube.com/channel/UCk2lyeEuH_hoA1s7tnTAEJQ
El_Condoro
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 2119
Joined: Tue Jun 03, 2008 9:32 am

Re: Guide: How to add new units.

Post by El_Condoro »

I edit the e-file in Excel successfully by associating the pzdat with Excel so that it opens correctly. I make edits as required in the cells as normal. The save process is a bit different, though:

a. Click Save, answer 'Yes' to keep the format.
b. When you close the file DO NOT SAVE IT - just exit (it has already been saved in a. above)

For other files like Movement.pzdat I always edit it in Notepad++. For some reason Excel always breaks it!

I wouldn't remove the Reserved rows. If you're going to use Excel learn how to use the AutoFilter and filter out rows with that content. You will have to do this each time you open the file, though, because the save process (above) won't keep it. Sorting using Excel's sort feature is much easier, too, but again it will be lost each time you close the file.
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 »

your problem is probably that Excel puts "" quotation marks around text fields in csv-type text tables. Try loading the file into text editor after you saved it with excel and search and replace " characters with nothing (just leave the "replace with" field completely empty.

Removing the Reserved lines and reordering the units is fine as long as you don't screw up the unit ID's. Be sure to sort it by unit ID before saving, just in case.

If you mess up unit ID's then all existing scenarios will have wrong units showing up in them.
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 »

El-Condoro

Close, but didn't work, but that gave me an idea.

I associated file type .pzeqp with Excel, and then opened equipment.pzeqp, made a change, Saved As... Other format, as a Unicode text file (not tab-delimited text), with the name equipment.pzeqp.txt (then deleted the .txt), said Yes first time and No second time, and it now keeps the correct formatting and saved my test and subsequent changes. Yea!

I remember the reason I got EditPadPro7 in the first place was due to a unicode saving file issue modding the Napoleon game from this site, it need unicode UTF-16 instead of UTF-8, or something like that, to save properly.

Thanks guys for the other tips as well.
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 »

I always used Mark Garnett's editor to make the additions to my games, but I wanted to try this method. I am using Open Office and when I open the columns pages and attempt to "Open" the equipment file, all I get is computer gibberish in a window and nothing on the columns. How do you get to the data from the equipment page and get it onto the columns so that you can make the changes? Sorry for my dumbness, I have been gone a while and there is rust and some cobwebs in my head.
Old Timer Panzer General fan. Maybe a Volksturm soldier now. Did they let Volksturm drive Panzers?
Akkula
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1898
Joined: Sat Apr 05, 2014 12:14 am

Re: Guide: How to add new units.

Post by Akkula »

Hi folks. I have a question: We can use the reserved rows for our own new units?, or they must remain untouched?
Eastern Front: Soviet Storm (v1.96): http://www.slitherine.com/forum/viewtopic.php?f=147&t=50342
Modern Conflicts (v2.10): http://www.slitherine.com/forum/viewtopic.php?f=147&t=72062
Andor66
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 41
Joined: Fri Jan 10, 2014 9:39 am

Re: Guide: How to add new units.

Post by Andor66 »

You better let them be. Add Your new units at the end of the file :-)
Akkula
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1898
Joined: Sat Apr 05, 2014 12:14 am

Re: Guide: How to add new units.

Post by Akkula »

Andor66 wrote:You better let them be. Add Your new units at the end of the file :-)
Oh, yeah, I kept doing that. The problem is (I don´t know why), when I reached the 2072 mark I started to have issues with the units, so addded the new ones at the 1900 row.
So, the new question is: There´s a row limit or ID limit?. I will try to add the new units at 1800 and so on....
Eastern Front: Soviet Storm (v1.96): http://www.slitherine.com/forum/viewtopic.php?f=147&t=50342
Modern Conflicts (v2.10): http://www.slitherine.com/forum/viewtopic.php?f=147&t=72062
Andor66
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 41
Joined: Fri Jan 10, 2014 9:39 am

Re: Guide: How to add new units.

Post by Andor66 »

Hmm, a little bit irritating. The last row of my equipment file is 2.614 and I never had problems as descibed.
But better wait for the opinion of the prof's
Akkula
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1898
Joined: Sat Apr 05, 2014 12:14 am

Re: Guide: How to add new units.

Post by Akkula »

Ha, ok. Thanks for the answers andor66, I will look if I am doing it wrong.
Eastern Front: Soviet Storm (v1.96): http://www.slitherine.com/forum/viewtopic.php?f=147&t=50342
Modern Conflicts (v2.10): http://www.slitherine.com/forum/viewtopic.php?f=147&t=72062
nikivdd
Panzer Corps Map Designer
Panzer Corps Map Designer
Posts: 4537
Joined: Fri Jun 24, 2011 1:21 pm
Location: Belgium
Contact:

Re: Guide: How to add new units.

Post by nikivdd »

Don't use empty ID lines from the vanilla part of the e-file. You will have extra work when the vanilla part gets an update (with Soviet corps for example)
Errors in the e-file can be caused by:
- Two or more lines with the same ID number
- An empty (blank) line among the rest
- General data or info in the e-file should start with ### (then this is ignored)
- A faulty line, can be caused when parameters are not in the correct row
- An error while saving

I always check the e-file in excell, to verify that all appropriate data is placed in the correct rows
https://www.facebook.com/NikivddPanzerCorps
https://www.youtube.com/channel/UCk2lyeEuH_hoA1s7tnTAEJQ
Akkula
Brigadier-General - 8.8 cm Pak 43/41
Brigadier-General - 8.8 cm Pak 43/41
Posts: 1898
Joined: Sat Apr 05, 2014 12:14 am

Re: Guide: How to add new units.

Post by Akkula »

Thanks for the tips nikivdd, I already made a new equipment file for my mod to avoid the possible conflicts you mentioned above.
Eastern Front: Soviet Storm (v1.96): http://www.slitherine.com/forum/viewtopic.php?f=147&t=50342
Modern Conflicts (v2.10): http://www.slitherine.com/forum/viewtopic.php?f=147&t=72062
JagdpanzerIV
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 216
Joined: Thu Apr 30, 2015 5:15 am

Re: Guide: How to add new units.

Post by JagdpanzerIV »

after adding a unit at the end of both file equipment.pzeqp and efx.pzdat the movement sound of all units stopped working.

Any ideas what might cause that?
Magic1111
Captain - Bf 110D
Captain - Bf 110D
Posts: 872
Joined: Mon Feb 25, 2013 8:11 pm
Location: Germany
Contact:

Re: Guide: How to add new units.

Post by Magic1111 »

JagdpanzerIV wrote:after adding a unit at the end of both file equipment.pzeqp and efx.pzdat the movement sound of all units stopped working.
Hmm, do you mean all Units of the game have no more movement sounds? :shock:
JagdpanzerIV
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 216
Joined: Thu Apr 30, 2015 5:15 am

Re: Guide: How to add new units.

Post by JagdpanzerIV »

Magic1111 wrote:
JagdpanzerIV wrote:after adding a unit at the end of both file equipment.pzeqp and efx.pzdat the movement sound of all units stopped working.
Hmm, do you mean all Units of the game have no more movement sounds? :shock:
yes
Razz1
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 3308
Joined: Tue Jan 18, 2011 4:49 am
Location: USA

Re: Guide: How to add new units.

Post by Razz1 »

If you do not edit carefully you can destroy the file.

Load it up in excel format and make sure everything is in the correct columns.

If that fails, delete the file. Save your back up as the original file and edit it.
JagdpanzerIV
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 216
Joined: Thu Apr 30, 2015 5:15 am

Re: Guide: How to add new units.

Post by JagdpanzerIV »

Razz1 wrote:If you do not edit carefully you can destroy the file.

Load it up in excel format and make sure everything is in the correct columns.

If that fails, delete the file. Save your back up as the original file and edit it.
ive looked and found nothing special, i forgot to make a back up of that particular file, silly me, so i will check if running steam integrity will fix it, or else i will have to re install i guess? unless someone can send me the original file
JagdpanzerIV
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 216
Joined: Thu Apr 30, 2015 5:15 am

Re: Guide: How to add new units.

Post by JagdpanzerIV »

looks like steam repaired my file, i got movement sound again!
Comrade_Andrzej
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 2
Joined: Mon May 27, 2019 5:27 pm

Re: Guide: How to add new units.

Post by Comrade_Andrzej »

I had a problem with graphic for example unit. Where I can find ready graphics for units? Thanks for tutorial, I'm a begginer in modering this game :D
Attachments
Problem.jpg
Problem.jpg (687.04 KiB) Viewed 4842 times
cw58
Master Sergeant - Bf 109E
Master Sergeant - Bf 109E
Posts: 487
Joined: Thu Sep 24, 2015 9:44 pm

Re: Guide: How to add new units.

Post by cw58 »

Here's a good icon for the unit in question:
Italian_Bruckenpioniere.png
Italian_Bruckenpioniere.png (31.83 KiB) Viewed 4818 times
This one came from Uhu's Italian Campaign. I'm not sure who the original creator is.

There are many different icon makers around these forums, some still currently here. Guille (viewtopic.php?f=147&t=36536) has probably done the most but many others have made significant contributions. Just do a search if you're in need of more.
Post Reply

Return to “Panzer Corps : Scenario Design”