Unit classes
Moderators: Slitherine Core, Panzer Corps Moderators, Panzer Corps Design
Unit classes
Hello everybody,
As I did some changes on the unit class (adding a few), the strategic map is behaving weirdly with this added classes. By example, I've created the class "motorized Land transport" (number 26 in the zero-based list), I've put an icon "allies-core26" and "axis-core26" in the strategic map folder.
However, in-game (on the stategic map) all classes above n°19 (the newly added ones) are represented by the next class' icon in the list... to be more precise, the class n°26 in the zero-based list is represented on the strategic map by the class n°27's icon. In a word it seems that after n°19 class (river boat) all other classes' number are no longer zero-based.
Is there a limit on the number of classes we can add ? Is my suspicion about the zero-based list which stops being zero-based from n°19 true ?
Does anybody has a solution if any ?
Thanks in advance.
Greetings,
Maths
As I did some changes on the unit class (adding a few), the strategic map is behaving weirdly with this added classes. By example, I've created the class "motorized Land transport" (number 26 in the zero-based list), I've put an icon "allies-core26" and "axis-core26" in the strategic map folder.
However, in-game (on the stategic map) all classes above n°19 (the newly added ones) are represented by the next class' icon in the list... to be more precise, the class n°26 in the zero-based list is represented on the strategic map by the class n°27's icon. In a word it seems that after n°19 class (river boat) all other classes' number are no longer zero-based.
Is there a limit on the number of classes we can add ? Is my suspicion about the zero-based list which stops being zero-based from n°19 true ?
Does anybody has a solution if any ?
Thanks in advance.
Greetings,
Maths
Re: Unit classes
As far as I know, they are indeed 0-based. Although I have never added more than 1 class at a time, it did work as expected.
Did you add all the extra classes at once or did you add one class and then check in-game to see if it worked? And then add another class, etc.?
Just a guess but if all the strat map icons are off but only by one, it sounds like there may be a space where there shouldn't be one. Maybe post your unitclass.pzdat file and any other relevant files for us to have a look?
Did you add all the extra classes at once or did you add one class and then check in-game to see if it worked? And then add another class, etc.?
Just a guess but if all the strat map icons are off but only by one, it sounds like there may be a space where there shouldn't be one. Maybe post your unitclass.pzdat file and any other relevant files for us to have a look?
Re: Unit classes
Hi cw58,
I've added all the extra classes at once.
Here is the link to the unitclass.pzdat file. Tell me if you have trouble opening it. It opens in the browser as a sound file but if you download it you should get it correctly.
What are the other files you may need to look too ?
https://drive.google.com/file/d/1n-k4wC ... sp=sharing
Thank you very much !
Greetings,
Maths
I've added all the extra classes at once.
Here is the link to the unitclass.pzdat file. Tell me if you have trouble opening it. It opens in the browser as a sound file but if you download it you should get it correctly.
What are the other files you may need to look too ?
https://drive.google.com/file/d/1n-k4wC ... sp=sharing
Thank you very much !
Greetings,
Maths
Last edited by Maths on Tue Jul 28, 2020 6:53 pm, edited 1 time in total.
Re: Unit classes
I post also a picture of the content of the Graphics\StrategicMap folder.
https://drive.google.com/file/d/1Fwjp-4 ... sp=sharing
Greetings
https://drive.google.com/file/d/1Fwjp-4 ... sp=sharing
Greetings
Re: Unit classes
I looked over your files and the vanilla files and discovered that I don't know what I thought I knew.
I don't normally use the vanilla icons in my strat map file so I never noticed this before but here is what I've learned:
I always thought these icons were left-over from unit classes that the devs decided not to include but that is incorrect. The first 3 represent artillery, AT & AA with a move value greater than 1 while the same classes with a movement of 1 (or 0?) are represented by icons 4, 3 & 5, respectively. The "core22" icon represents armored trains (class 18) and the "core23" represents riverboats (class 19).
So my suggestion is to start again with your first new class (class 20) using icon "core24". See if it works as expected and then continue from there. Best of luck with your mod!
I don't normally use the vanilla icons in my strat map file so I never noticed this before but here is what I've learned:
I always thought these icons were left-over from unit classes that the devs decided not to include but that is incorrect. The first 3 represent artillery, AT & AA with a move value greater than 1 while the same classes with a movement of 1 (or 0?) are represented by icons 4, 3 & 5, respectively. The "core22" icon represents armored trains (class 18) and the "core23" represents riverboats (class 19).
So my suggestion is to start again with your first new class (class 20) using icon "core24". See if it works as expected and then continue from there. Best of luck with your mod!
Re: Unit classes
Hello,
OK ! When I saw these icons n°19, 20, 21 I also thought they were leftover by the devs.
I've just done the changes you proposed but now the game still doesn't recognize my classes properly. Let's dive into the details.
First, my aim was to make new classes "motorized" and "mechanized" transports, even if it may appear useless I made it because I wanted the StratMap to picture two different types of infantry (motorized and mechanized using the appropriate NATO symbols). However the game understood those as classes on their own and thus the trucks or half-tracks were actual on-map units and no longer an ability (concerned by the mont/dismount button in-game) you add to the concerned units. So I delete these two classes as I'm pretty sure that the transport abiltiy is hard-coded.
Second, as you may have seen in my unitclass.pzdat, I've created motorized and mechanized infantry classes. This time the game understands them as actual units which is good. But on the StratMap, they appear (as for the "motorized") as mobile anti-air units (icon 21 on your message above).
As the creation of these classes was overall a mean, though I thought it was, to picture (on the StratMap) a wider array of icons which would better reflect the actual nature of the concerned units, I'll delete these additions as they seem to be messed-up. I'll check if the naval classes work though, because I intend them to be functional beyond the graphical point of view, but I assume I'll need to adapt the Editor too, I mean, by adding the new naval classes in the lists by example in the trigger (see picture).

Anyway, thank you very much for your attention !
Greetings,
Maths
OK ! When I saw these icons n°19, 20, 21 I also thought they were leftover by the devs.
I've just done the changes you proposed but now the game still doesn't recognize my classes properly. Let's dive into the details.
First, my aim was to make new classes "motorized" and "mechanized" transports, even if it may appear useless I made it because I wanted the StratMap to picture two different types of infantry (motorized and mechanized using the appropriate NATO symbols). However the game understood those as classes on their own and thus the trucks or half-tracks were actual on-map units and no longer an ability (concerned by the mont/dismount button in-game) you add to the concerned units. So I delete these two classes as I'm pretty sure that the transport abiltiy is hard-coded.
Second, as you may have seen in my unitclass.pzdat, I've created motorized and mechanized infantry classes. This time the game understands them as actual units which is good. But on the StratMap, they appear (as for the "motorized") as mobile anti-air units (icon 21 on your message above).
As the creation of these classes was overall a mean, though I thought it was, to picture (on the StratMap) a wider array of icons which would better reflect the actual nature of the concerned units, I'll delete these additions as they seem to be messed-up. I'll check if the naval classes work though, because I intend them to be functional beyond the graphical point of view, but I assume I'll need to adapt the Editor too, I mean, by adding the new naval classes in the lists by example in the trigger (see picture).

Anyway, thank you very much for your attention !
Greetings,
Maths
- Attachments
-
- editor.png (175.98 KiB) Viewed 3531 times
Re: Unit classes
Sorry I was unable to help solve your problem. I know it's possible to add new classes that will work in game as I added a night fighter class. But at the time I did it, I was modding McGuba's BE mod and the normal strat map icons are useless because the map is so huge. So I was using generic squares that all looked the same and would not have known if the unit was using the correct icon in the strat map.
To add a class, you'll need to modify a few other files too. You'll want to mod your strings.pzdat file for the names & descriptions of the new classes. If you want to be able to purchase the new classes, you'll need to modify the 'purchase' file in the UI folder; it's an HTML file so it's a bit more complicated to mod. And then there are icons that need to be added in a couple places in the UI folder.
But here is the problem I found with adding new classes: many class abilities are hard-coded. You can add traits to them but it doesn't make up for what you lose. For example, I noticed you're adding battleship and cruiser classes. But what you won't have is the suppression that you would normally inflict by attacking with a capital ship (class #12). So you'll have to decide if the benefits gained outweigh the benefits lost.
To add a class, you'll need to modify a few other files too. You'll want to mod your strings.pzdat file for the names & descriptions of the new classes. If you want to be able to purchase the new classes, you'll need to modify the 'purchase' file in the UI folder; it's an HTML file so it's a bit more complicated to mod. And then there are icons that need to be added in a couple places in the UI folder.
But here is the problem I found with adding new classes: many class abilities are hard-coded. You can add traits to them but it doesn't make up for what you lose. For example, I noticed you're adding battleship and cruiser classes. But what you won't have is the suppression that you would normally inflict by attacking with a capital ship (class #12). So you'll have to decide if the benefits gained outweigh the benefits lost.
Re: Unit classes
Hello cw58,
No problem, as you remind me, I think I'll use the StratMap squares too instead of the NATO icons. The map I'm working on is not that big but honestly the normal StratMap icons already looked quite big in comparison to the the hexes.
Yes, as for the HTML I'm able to do it, I never used that language before but with Panzer Corps I got a cumfortable (though not that great^^) knowledge as I went along.
Eventually, I don't mind if my new naval classes can't suppress the enemy ground units because I always disliked the naval-ground operations. I think the naval versus naval combat is good, ground versus ground combat as well but naval versus ground combat is too much weird. As I'm always looking for more historical accuracy, seeing a Pak36 unit destroying a Battleship HMS Nelson makes me angry ^^
Again, I want to thank you for your help ! Your explanations are great !
Greetings,
Maths
No problem, as you remind me, I think I'll use the StratMap squares too instead of the NATO icons. The map I'm working on is not that big but honestly the normal StratMap icons already looked quite big in comparison to the the hexes.
Yes, as for the HTML I'm able to do it, I never used that language before but with Panzer Corps I got a cumfortable (though not that great^^) knowledge as I went along.
Eventually, I don't mind if my new naval classes can't suppress the enemy ground units because I always disliked the naval-ground operations. I think the naval versus naval combat is good, ground versus ground combat as well but naval versus ground combat is too much weird. As I'm always looking for more historical accuracy, seeing a Pak36 unit destroying a Battleship HMS Nelson makes me angry ^^
Again, I want to thank you for your help ! Your explanations are great !
Greetings,
Maths
-
Yrfin
- 1st Lieutenant - 15 cm sFH 18

- Posts: 818
- Joined: Sun Dec 04, 2016 6:47 am
- Location: Behind your backs
Re: Unit classes
Yes thank you !
Of course, I already implemented that in all my mods. It's the first thing I do at the begining of a new work, I literally rush for it ^^
Greetings,
Maths
-
Yrfin
- 1st Lieutenant - 15 cm sFH 18

- Posts: 818
- Joined: Sun Dec 04, 2016 6:47 am
- Location: Behind your backs
Re: Unit classes
Wise solution
I did it also for class 0-2 and 5.
And about additional unit classes.
I think it was just declare by "developers", but never been realased.
Same with additional Terrain Type
When im died - I must be a killed.
Re: Unit classes
I think you did well by adding classes 0-2 to those which can't fight against naval vessels.
As for my mods, barring coastal batteries, there is not a f*** single class of units which can fire at ships.
I don't know that much things about what the devs said, but modding terrain is interesting, I'll definitively try to do it
Greetings,
Maths
As for my mods, barring coastal batteries, there is not a f*** single class of units which can fire at ships.
I don't know that much things about what the devs said, but modding terrain is interesting, I'll definitively try to do it
Greetings,
Maths
-
Yrfin
- 1st Lieutenant - 15 cm sFH 18

- Posts: 818
- Joined: Sun Dec 04, 2016 6:47 am
- Location: Behind your backs
Re: Unit classes
When im died - I must be a killed.
Re: Unit classes
Perfect ! Thank you ! I'll take a closer look and report back here asap.Yrfin wrote: ↑Fri Jul 31, 2020 2:32 pm I do a little.
You can see at:
viewtopic.php?f=147&t=88133&p=753914&hilit=EMMY#p750692
Greetings,
Maths
Re: Unit classes
Hello Yrfin,
I've just read your terrain.pzdat file and I have a few questions.
What is the exact meaning of the traits glow, lowsup, gndsup, airsup, navalsup, river and strait ?
What is a supply hex for units ? Indeed there is no concept of supply lines linked to supply sources.
Thank you in advance !
Greetings,
Maths
I've just read your terrain.pzdat file and I have a few questions.
What is the exact meaning of the traits glow, lowsup, gndsup, airsup, navalsup, river and strait ?
What is a supply hex for units ? Indeed there is no concept of supply lines linked to supply sources.
Thank you in advance !
Greetings,
Maths
-
Yrfin
- 1st Lieutenant - 15 cm sFH 18

- Posts: 818
- Joined: Sun Dec 04, 2016 6:47 am
- Location: Behind your backs
Re: Unit classes
Hi, Maths,Maths wrote: ↑Sat Aug 01, 2020 11:52 am Hello Yrfin,
I've just read your terrain.pzdat file and I have a few questions.
What is the exact meaning of the traits glow, lowsup, gndsup, airsup, navalsup, river and strait ?
What is a supply hex for units ? Indeed there is no concept of supply lines linked to supply sources.
Thank you in advance !
Greetings,
Maths
from my knowlege:
"glow" - it means that terrain types with this trait will "glow" or "shine" if terrain glow is enabled in the in-game menu:
as it says it is used by the game for certain terrains like cities or forests so that units standing on these terrains stand out more from the background.
lowsup - 50% supply on such hex
When im died - I must be a killed.
-
Yrfin
- 1st Lieutenant - 15 cm sFH 18

- Posts: 818
- Joined: Sun Dec 04, 2016 6:47 am
- Location: Behind your backs
Re: Unit classes
Hi, Maths,Maths wrote: ↑Sat Aug 01, 2020 11:52 am Hello Yrfin,
I've just read your terrain.pzdat file and I have a few questions.
What is the exact meaning of the traits glow, lowsup, gndsup, airsup, navalsup, river and strait ?
What is a supply hex for units ? Indeed there is no concept of supply lines linked to supply sources.
Thank you in advance !
Greetings,
Maths
from my knowlege:
"glow" - it means that terrain types with this trait will "glow" or "shine" if terrain glow is enabled in the in-game menu:
as it says it is used by the game for certain terrains like cities or forests so that units standing on these terrains stand out more from the background.
lowsup - 50% supply on such hex
When im died - I must be a killed.
Re: Unit classes
Hi Yrfin,
Thank you very much ! Definitively, the glow trait is only "graphical". Received for supply, it sounds good !
As for river and strait, what is(are) the difference(s) between those and the terrain features you draw on the map in the Editor ?
Greetings,
Maths
Thank you very much ! Definitively, the glow trait is only "graphical". Received for supply, it sounds good !
As for river and strait, what is(are) the difference(s) between those and the terrain features you draw on the map in the Editor ?
Greetings,
Maths

