Adding a new unit class?

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

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

Post Reply
dalfrede
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1503
Joined: Wed Mar 15, 2017 7:48 pm

Adding a new unit class?

Post by dalfrede »

Starting new thread for open discussion.
.
guille1434 wrote: Any of the experienced modders here knows if it is possible to add a new unit class? For example, there are infantry, artillery, tank unit classes, and I would like to add a new class: Command class units. Does anyone know if this is feasible? Thanks!!
Short answer is yes. There is a unitclass.pzdat file in the main data folder.
Can one add useful traits to it?

Support fire is hardwired into artillery and is not a ‘trait’.
The radar trait adds initiative to aircraft within range, but there is nothing I know of for land units.
There comes a time on every project when it is time to shoot the engineer and ship the damn thing.
terminator
Field Marshal - Gustav
Field Marshal - Gustav
Posts: 6105
Joined: Mon Aug 15, 2011 12:48 pm
Location: the land of freedom

Re: Adding a new unit class?

Post by terminator »

unitclass.pzdat :

# This file contains the list of unit classes in the game
# Zero-based index of a unit class in the list is used to reference it throughout the game.
# So, the order of entries in the list is very important.
# It is recommended to add new entries to the end of the list. :!:

:arrow: Yes We Can
guille1434
Major-General - Jagdtiger
Major-General - Jagdtiger
Posts: 2856
Joined: Sun Jul 01, 2012 5:32 pm

Re: Adding a new unit class?

Post by guille1434 »

Excellent! At least it will only serve the purpose of better organization of the units purchase/upgrade screens. :-)
guille1434
Major-General - Jagdtiger
Major-General - Jagdtiger
Posts: 2856
Joined: Sun Jul 01, 2012 5:32 pm

Re: Adding a new unit class?

Post by guille1434 »

Well, keeping in mind the initiative to add a new "Command Unit" class in the purchase screen, I would like to know if it is possible to edit the purchase.htm (I think this is the file to edit, but I'm not absolutely sure) file to reduce de distance between the unit class icons, to make more room to add the new icon. Let´s explain with a screenshot:
2018-05-25 17_14_19-.png
2018-05-25 17_14_19-.png (205.14 KiB) Viewed 3379 times
And by the way, to add a new "Command" unit class, I am sure it is necessary to add strings and may be other things to some other files. Anyone can help with telling what is necessary to accomplish that?

Thanks!!
terminator
Field Marshal - Gustav
Field Marshal - Gustav
Posts: 6105
Joined: Mon Aug 15, 2011 12:48 pm
Location: the land of freedom

Re: Adding a new unit class?

Post by terminator »

I have reduced this space 5px -> 1px (purchase.htm) :
Purchase.JPG
Purchase.JPG (151.51 KiB) Viewed 3376 times
ClassPurchase.png
ClassPurchase.png (129.8 KiB) Viewed 3376 times
(space reduced only for the first units)
guille1434
Major-General - Jagdtiger
Major-General - Jagdtiger
Posts: 2856
Joined: Sun Jul 01, 2012 5:32 pm

Re: Adding a new unit class?

Post by guille1434 »

Thanks Terminator for your answer... But I already reduced that div height value to 0px, the matter is the I also reduced the height of the icon buttons (you can see that my unit class icon frames are no longer square, because I "flattened" them... The specific question is: Can the html file be edited to tell the program to draw those "flattened" icons closer? I think this is not related div style height value, it has to be related to the value of some other element in the htm file design... I hope I could explain myself clearly...

And another question: How can the vertical position of the "Show All Nations" checkbox can be adjusted? I can only move it in the horizontal plane, but not in its vertical position...
guille1434
Major-General - Jagdtiger
Major-General - Jagdtiger
Posts: 2856
Joined: Sun Jul 01, 2012 5:32 pm

Re: Adding a new unit class?

Post by guille1434 »

A (little less than) total success!!!

I could rearrange (in a somewhat creative way, as it can be seen) the unit class icons to make place for one new class: Command units. Also found a way to correctly position the "Show All Nations" checkbox. I like the way it looks... :-)
Attachments
2018-05-26 10_16_11-.png
2018-05-26 10_16_11-.png (225.96 KiB) Viewed 3346 times
AnalogGamer
Sergeant - 7.5 cm FK 16 nA
Sergeant - 7.5 cm FK 16 nA
Posts: 210
Joined: Sun Feb 01, 2015 6:56 pm

Re: Adding a new unit class?

Post by AnalogGamer »

Please tell me this is because you found a way to make a ground-based "radar" trait? :) I want to make a commander class that gives initiative to ground units within range. A "Guderian" unit if you will.
guille1434
Major-General - Jagdtiger
Major-General - Jagdtiger
Posts: 2856
Joined: Sun Jul 01, 2012 5:32 pm

Re: Adding a new unit class?

Post by guille1434 »

Unfortunately, this is not the case... At the moment, this is just an "administrative" mod, as Command type units will be just infantry or recon type units, but they will not be mixed with "real" infantry or recon units when you open up the purchase/upgrade game screen... :-)

I know we are a very small community at this days, but... Why not start asking the game developers to add a new trait (it can even be called "command" or "commander") that gives ground units within its spotting range an initiative and also may be better resistance to suppresion? They released the v1.31 of the exe which implemented the ability for submarine units to attack other submarines...

So, may be it takes a PM from one of the prominent members here to Rudankort or any other of the dev team... May be it's time for Panzer Corps v1.32?? :-) :-)
McGuba
Colonel - Ju 88A
Colonel - Ju 88A
Posts: 1572
Joined: Thu Mar 15, 2012 7:34 pm

Re: Adding a new unit class?

Post by McGuba »

Well, I sent a different question in a PM to Rudankort in September last year but he did not read it for several months, and now I checked it again and it is not in the Outbox folder, which means he should have opened/got it, but still no reply. But, as you said, maybe someone else will be more lucky.

(Or maybe I am just not in the league of the "prominent members" here. :wink: )

EDIT: Ooops, I just realized that I passed my 1000 posts here, and did not even celebrate it, lol. :)
ImageImage
slitherine.com/forum/viewtopic.php?f=147&t=47985
slitherine.com/forum/viewtopic.php?f=147&t=36969
guille1434
Major-General - Jagdtiger
Major-General - Jagdtiger
Posts: 2856
Joined: Sun Jul 01, 2012 5:32 pm

Re: Adding a new unit class?

Post by guille1434 »

Hello Mac! Yes, may be the few we are present here ceased from being prominent long ago... :-( Panzer Corps seems to be left alone. It looks that they are delayed with the PzCorps 2 project, and the may be busy with that.

Your request seemed to be put on hold (in the best case), but, on te other hand, Akkula got his "Attack Sub" fix... So, don't give the expectations up!

Aaaand, a thougt... I know we are few here, but what about offering a payment for a new .exe version? I would be happy to pay some money equivalent to a new DLC for a new .exe

By the way, what was your request about? :-)
Post Reply

Return to “Panzer Corps : Scenario Design”