How to edit Units list.

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

Moderator: Panzer Corps 2 Moderators

dalfrede
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1490
Joined: Wed Mar 15, 2017 7:48 pm

How to edit Units list.

Post by dalfrede »

Two files are used:
Local Disk > Program Files(x86) > Slitherine > PanzerCorps2 > PanzerCorps2 > Content > Editor > Data > equipment.pzeqp
Local Disk > Program Files(x86) > Slitherine > PanzerCorps2 > PanzerCorps2 > Content > Data > Units.csv

The game uses Unit.csv, the Devs use equipment.pzeqp.

equipment.pzeqp is a TSV file, tab separated data. This is a modification of the same file used in PzC.
It allow comments to allow you the keep track of revisions.

In the editor: Edit > Unit Tools , this opens the ‘Unit Tools’ window.
Pushing the ‘Export to Game’ creates a new Unit.csv file.

-----------
To edit equip file
1) make a safety version.
2) Add .csv to file name - equipment.pzeqp.csv
3) Open equipment.pzeqp.csv in spreadsheet. I use LibreOffice.
Charactoer set: Unicode (UTF-16) , be just Unicode, NOT UTF-7 or UTF-8
Separator Options: Tab
4) Save in spreadsheet format of your choice. [.xls, .ods]
5) Tweak page for easy reading.

Mod away.

-----
To transfer to game.
File > Save as > Text CSV; Click on Edit filter setting
Charactoer set: Unicode (UTF-16) , be just Unicode, NOT UTF-7 or UTF-8
Field Delimiter: Tab
String Delimiter: null

Move to Editor > Data ;
remove .csv at end of name
Use editor to export to your game directory.

Note: I do all my equip file editing on my Mac Air.
You should come up with a method keeping track of your mods vs the original game set up.
EquipFile.jpg
EquipFile.jpg (254.56 KiB) Viewed 18603 times
There comes a time on every project when it is time to shoot the engineer and ship the damn thing.
jchastain
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 20
Joined: Sun Oct 15, 2017 2:21 pm

Re: How to edit Units list.

Post by jchastain »

Good tip Dalfrede. I have been playing with Units.csv and have found it opens, can be edited, and saves in Microsoft Excel. Super easy editing.

Also, I tried creating a mod directory under mygames to house the altered file. It didn't appear to find it, so I assume for now the only option is to replace the original in the main game directory.
dalfrede
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1490
Joined: Wed Mar 15, 2017 7:48 pm

Re: How to edit Units list.

Post by dalfrede »

jchastain wrote: Thu Mar 26, 2020 1:05 am Also, I tried creating a mod directory under mygames to house the altered file. It didn't appear to find it, so I assume for now the only option is to replace the original in the main game directory.
Not Mods, Scenarios and Campaigns are the new folder names. See screen capture in D-Day thread.
There comes a time on every project when it is time to shoot the engineer and ship the damn thing.
jchastain
Lance Corporal - SdKfz 222
Lance Corporal - SdKfz 222
Posts: 20
Joined: Sun Oct 15, 2017 2:21 pm

Re: How to edit Units list.

Post by jchastain »

dalfrede wrote: Thu Mar 26, 2020 2:34 am
jchastain wrote: Thu Mar 26, 2020 1:05 am Also, I tried creating a mod directory under mygames to house the altered file. It didn't appear to find it, so I assume for now the only option is to replace the original in the main game directory.
Not Mods, Scenarios and Campaigns are the new folder names. See screen capture in D-Day thread.
Placing an updated units.csv file in a campaign or scenario directory would presumably make it apply only to that specific campaign or scenario. I assume there will eventually also be a mods directory where we can place files that are applied globally to all campaigns and scenarios
dalfrede
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1490
Joined: Wed Mar 15, 2017 7:48 pm

Re: How to edit Units list.

Post by dalfrede »

Clarification, there is no Mods directory in PzC2.
There are TWO scenarios and TWO campaign directories. One set in the install directory tree, the other set under your 'My Games' directory.

I have not tested the effects of 'remote' Units.csv files, that will have to wait till there are some campaigns to test them on.
There comes a time on every project when it is time to shoot the engineer and ship the damn thing.
OldFocker
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 87
Joined: Sat Jun 28, 2014 9:29 pm

Re: How to edit Units list.

Post by OldFocker »

dalfrede wrote: Thu Mar 26, 2020 12:13 am
To edit equip file
1) make a safety version.
2) Add .csv to file name - equipment.pzeqp.csv
3) Open equipment.pzeqp.csv in spreadsheet. I use LibreOffice.
Charactoer set: Unicode (UTF-16) , be just Unicode, NOT UTF-7 or UTF-8
Separator Options: Tab
4) Save in spreadsheet format of your choice. [.xls, .ods]
5) Tweak page for easy reading.


I would like to access the equipment file but when I do the above I just get one-column listing the units only, i.e. no data (using LibreOffice 6.1).
dalfrede
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1490
Joined: Wed Mar 15, 2017 7:48 pm

Re: How to edit Units list.

Post by dalfrede »

OldFocker wrote: Sun Apr 05, 2020 11:15 am I would like to access the equipment file but when I do the above I just get one-column listing the units only, i.e. no data
It is difficult to debug without a picture, does this look familiar.
Equip.jpg
Equip.jpg (120.24 KiB) Viewed 18205 times
There comes a time on every project when it is time to shoot the engineer and ship the damn thing.
OldFocker
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 87
Joined: Sat Jun 28, 2014 9:29 pm

Re: How to edit Units list.

Post by OldFocker »

Okay, am halfway there - thank you. Now I am a bit confused over putting a modified XLS file back into the game folder.

I just want to replace the existing equipment file in PanzerCorps2/Content/Editor/Data/equipment. Can I just remove .xls and replace with .pzeqp? Will that work? (I have kept a backup of the original).
dalfrede
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1490
Joined: Wed Mar 15, 2017 7:48 pm

Re: How to edit Units list.

Post by dalfrede »

OldFocker wrote: Sun Apr 05, 2020 9:59 pm I just want to replace the existing equipment file in PanzerCorps2/Content/Editor/Data/equipment. Can I just remove .xls and replace with .pzeqp? Will that work? (I have kept a backup of the original).
No, the equip file is a .tsv file - tab separated values, a text file.
You save your spreadsheet as text [.csv] with the delimiters shown above.
After the save, you now have two files: equipment.pzeqp.xls and equipment.pzeqp.cvs
Now you delete the .cvs from the second filename. It is now the file used by the editor.
Your .xls file is a spreadsheet workbook which can have several versions of equipment as separate worksheets.

Spreadsheets use .csv [comma separated value] as their standard text I/O format and include delimiter options in their load/save functions.

To confuse the issue Unit.cvs is in Unicode - UTF-8, and is comma separated, which is a different format from the equipment file.
One can edit the Unit.cvs file, but it does not allow comments, which makes Configuration Control difficult.
There comes a time on every project when it is time to shoot the engineer and ship the damn thing.
AceDuceTrey
Senior Corporal - Destroyer
Senior Corporal - Destroyer
Posts: 111
Joined: Mon Sep 19, 2011 8:58 pm

Re: How to edit Units list.

Post by AceDuceTrey »

I don't have a "Local Disk"- I downloaded PC2 from Steam. I'm also not that "computer literate" and can't open ANY PC2 files. Also, much of the advice I've been getting seems to apply to PC(1)?
dalfrede
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1490
Joined: Wed Mar 15, 2017 7:48 pm

Re: How to edit Units list.

Post by dalfrede »

AceDuceTrey wrote: Thu Apr 09, 2020 3:04 pm I don't have a "Local Disk"- I downloaded PC2 from Steam. I'm also not that "computer literate" and can't open ANY PC2 files. Also, much of the advice I've been getting seems to apply to PC(1)?
Local Disk = 'C:' most of the time, some people have multiple disks and can install game elsewhere.
For Steam replace 'Slitherline" in path with 'Steam > Steam Apps'.
Note: I tend to traverse directory paths in a windowed environment so I follow my nose while navigating and may nor remember the path exactly.

If you listen to Uran21 it looks a lot like PzC1, if you listen to Rudankort it looks a bit less like PzC1.
Uran21 is the one who actually handles the equip file and oddly enough his suggestions make more sense to me.
So I follow Uran21 on the equip file, not Rudankort.
This is equipment.pzeqp vs Units.cvs, and I suspect is UnrealEngine related.

Note: As far as opening files you might have permissions issues, which is Windows not the game.
There comes a time on every project when it is time to shoot the engineer and ship the damn thing.
dalfrede
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1490
Joined: Wed Mar 15, 2017 7:48 pm

How to edit Units list. Format Check via software

Post by dalfrede »

If you edit the equipment file instead of the Units file the Editor performs a file verification for you.
It does not tell you the error, but turn around time using the editor is faster than loading the game every time for debug.
UnitEditFail.jpg
UnitEditFail.jpg (245.74 KiB) Viewed 17218 times
There comes a time on every project when it is time to shoot the engineer and ship the damn thing.
Catacol
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 129
Joined: Sun Jun 30, 2019 12:09 pm

Re: How to edit Units list.

Post by Catacol »

dalfrede wrote: Thu Mar 26, 2020 12:13 am Two files are used:
Local Disk > Program Files(x86) > Slitherine > PanzerCorps2 > PanzerCorps2 > Content > Editor > Data > equipment.pzeqp
Local Disk > Program Files(x86) > Slitherine > PanzerCorps2 > PanzerCorps2 > Content > Data > Units.csv

The game uses Unit.csv, the Devs use equipment.pzeqp.

equipment.pzeqp is a TSV file, tab separated data. This is a modification of the same file used in PzC.
It allow comments to allow you the keep track of revisions.

In the editor: Edit > Unit Tools , this opens the ‘Unit Tools’ window.
Pushing the ‘Export to Game’ creates a new Unit.csv file.
Thanks Dalfrede. Have built scenarios - now want to crack the unit editor.

When I create a new unit.csv file by "export to game" from the editor - where does that file go? Given there are 2 installations of the editor/scenario folders, one in the game installation directory and one in My Games in my documents folder in the root drive I'm a bit vague as to where the changed units file should be. And I've clicked on that button and cant see where a new file might be sitting.

Or if I make one "by hand" (copy and edit the unit.csv file in the main game installation) where do I put the edited file? As another poster has suggested - if the unit.csv file is edited is it then edited for any and all games or just for the scenario being built?

EDIT - I've just found that the unit.csv file in the game directory was rewritten when I clicked "export to game" - so am I right that once altered the unit values are indeed altered for every game?

Finally I only play multiplayer. If I edit units does my opponent also need an edited .csv file or are the unit changes created in the game save file when a scenario is started, meaning only the scenario designer needs the edited file?
Catacol
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 129
Joined: Sun Jun 30, 2019 12:09 pm

Re: How to edit Units list.

Post by Catacol »

dalfrede wrote: Thu Mar 26, 2020 12:13 am

-----
To transfer to game.
File > Save as > Text CSV; Click on Edit filter setting
Charactoer set: Unicode (UTF-16) , be just Unicode, NOT UTF-7 or UTF-8
Field Delimiter: Tab
String Delimiter: null

Move to Editor > Data ;
remove .csv at end of name
Use editor to export to your game directory.

Note: I do all my equip file editing on my Mac Air.
You should come up with a method keeping track of your mods vs the original game set up.
EquipFile.jpg
Second question. I've opened the pzeqp file in excel without a problem by changing the file type to .csv... made a tiny tweak for testing, and now want to get it saved back as the right file type. But I don't see options to change the character set - I've either got a Unicode text option or CSV UTF-8. I've only got Excel - can these changes be done in excel?

EDIT - forget it. Easiest thing in the world - I just saved as .CSV and then deleted the.CSV afterwards leaving it as a pzeqp file again and then reloaded the equipment into the scenario. It worked without effort in Excel.
dalfrede
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1490
Joined: Wed Mar 15, 2017 7:48 pm

Re: How to edit Units list.

Post by dalfrede »

Catacol wrote: Fri May 08, 2020 3:31 pm . . . so am I right that once altered the unit values are indeed altered for every game?

Finally I only play multiplayer. If I edit units does my opponent also need an edited .csv file or are the unit changes created in the game save file when a scenario is started, meaning only the scenario designer needs the edited file?
At the moment yes the edited unit values affect every game.

As for multiplayer both players should have the edited file. However it may be only the the first player needs it, because yes it is saved as part of a saved game. I do not believe the scenario designer's saves count as a saved game, which is why I think the first player needs the edited files.

I assume to be true:
1) having a edited unit file affecting all games is temporary. Early Betas had a 'Mod' option [it wasn't functional], and I expect the game to have one as well.
2) Multiplayer is the current top issue being attacked by the Devs for fixing/cleanup.
3) Modding will be 'fixed' next. It will also require a big info dump on modders, so that will take time to prepare in addition to the software upgrades.
4) Generating the Mod documentation may take more effort than the software.

The Devs actually handed off the final game manual to a long time PzC1 gamer/Modder from Australia.
Most of the Devs are not native English speakers, and most native English speaking engineers shouldn't be writing manuals anyway. :D
There comes a time on every project when it is time to shoot the engineer and ship the damn thing.
Catacol
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 129
Joined: Sun Jun 30, 2019 12:09 pm

Re: How to edit Units list.

Post by Catacol »

dalfrede wrote: Fri May 08, 2020 4:19 pm
Catacol wrote: Fri May 08, 2020 3:31 pm . . . so am I right that once altered the unit values are indeed altered for every game?

Finally I only play multiplayer. If I edit units does my opponent also need an edited .csv file or are the unit changes created in the game save file when a scenario is started, meaning only the scenario designer needs the edited file?
At the moment yes the edited unit values affect every game.

As for multiplayer both players should have the edited file. However it may be only the the first player needs it, because yes it is saved as part of a saved game. I do not believe the scenario designer's saves count as a saved game, which is why I think the first player needs the edited files.

I assume to be true:
1) having a edited unit file affecting all games is temporary. Early Betas had a 'Mod' option [it wasn't functional], and I expect the game to have one as well.
2) Multiplayer is the current top issue being attacked by the Devs for fixing/cleanup.
3) Modding will be 'fixed' next. It will also require a big info dump on modders, so that will take time to prepare in addition to the software upgrades.
4) Generating the Mod documentation may take more effort than the software.

The Devs actually handed off the final game manual to a long time PzC1 gamer/Modder from Australia.
Most of the Devs are not native English speakers, and most native English speaking engineers shouldn't be writing manuals anyway. :D
Thanks - a couple more hours of fiddling and I'm ready to go - understand how it works, and the difference/role between the equipment file and the units file. Most important of all? Back up the originals.....

Now to go and create Brandenburgers, Waffen SS and a host of other units that are missing from the base game.
NETSCAPE
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 127
Joined: Wed Apr 15, 2020 8:43 pm

Re: How to edit Units list.

Post by NETSCAPE »

I've read through this thread twice... very helpful thanks.
jeannot le lapin
1st Lieutenant - 15 cm sFH 18
1st Lieutenant - 15 cm sFH 18
Posts: 827
Joined: Sun Dec 10, 2017 3:29 pm

Re: How to edit Units list.

Post by jeannot le lapin »

Very interesting, thank you :)
ESPADATXI
Administrative Corporal - SdKfz 251/1
Administrative Corporal - SdKfz  251/1
Posts: 138
Joined: Mon Jan 02, 2017 9:06 pm

Re: How to edit Units list.

Post by ESPADATXI »

Hello, in my case I am only interested in making multiplayer scenarios but adding units to the map or the "pool" of available units is not so simple and as I understand it you have to name them as they are in the list file that has been discussed here . I searched for it but I didn't find it in my game installation on Steam, please could someone publish this list file in a spreadsheet or in pdf just to be able to read the name and be able to copy it easily ?, thank you
Ezequiel1996
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 231
Joined: Sat Jun 13, 2020 6:58 am

Re: How to edit Units list.

Post by Ezequiel1996 »

i made the list, so now i want to add to my campaign scenarios, im a little bit lost, how im supposed to that? can anyone explain it to me step by step if possible.
Post Reply

Return to “Panzer Corps 2 Scenario Design”