How to make Traits appear ?

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

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

Post Reply
glaude1955
Master Sergeant - Bf 109E
Master Sergeant - Bf 109E
Posts: 465
Joined: Tue Sep 01, 2015 6:55 am

How to make Traits appear ?

Post by glaude1955 »

Since version 1.30, it is possible to display by a right click on a unit the characteristics of this unit (fortkiller, mineswweper ... etc)
I would like to add this feature to some mods created before this release.

I modified the file Strings.pzdat by adding the paragraph
"# New in 1.30
IDS_TITLE_UNIT_TYPE UNIT TYPE
IDS_ABIL_SWITCH Can switch to a different unit type
IDS_ABIL_BRIDGE_ENGINEER Bridge Engineer
IDI_ABIL_BRIDGE_ENGINEER Acts as a bridge when placed on a river hex.
IDS_ABIL_BUNKER_KILLER Bunker Killer
IDI_ABIL_BUNKER_KILLER +5 attack strength against enemy structures.
IDS_ABIL_CAMO Camouflage
IDI_ABIL_CAMO Can only be detected by an adjacent ground unit.
IDS_ABIL_GLIDER Glider
IDI_ABIL_GLIDER Can disembark outside airfields.
IDS_ABIL_GREEN Green
IDI_ABIL_GREEN Purchased unit always starts with zero experience.
IDS_ABIL_KAMIKAZE Kamikaze
IDI_ABIL_KAMIKAZE This unit is always destroyed after attacking.
IDS_ABIL_MILITARY_ENGINEER Military Engineer
IDI_ABIL_MILITARY_ENGINEER Ignores enemy entrenchment level when attacking.
IDS_ABIL_MINE_SWEEPER Mine Sweeper
IDI_ABIL_MINE_SWEEPER Clears a minefield with a single attack.
IDS_ABIL_MISSILE Missile
IDI_ABIL_MISSILE Missiles cannot be resupplied on a friendly airfield.
IDS_ABIL_NO_ZOC No ZOC
IDI_ABIL_NO_ZOC Does not project Zone of Control to adjacent hexes.
IDS_ABIL_PARATROOPER Paratrooper
IDI_ABIL_PARATROOPER Can paradrop from air transport on any free hex.
IDS_ABIL_RADAR Radar
IDI_ABIL_RADAR +1 initiative to all friendly air units within spotting range.
IDS_RADIO_SOFT_CAP Prestige Soft Cap
IDS_OPTION_DEFAULT Default
IDS_OPTION_ON On
IDS_OPTION_OFF Off
IDS_TT_FORMAT_SOFT_CAP Soft cap: %d%%"


But this is not enough.
What else do you have to do?

NB: Traits are well listed in Equipment.pzeqp


How to make Traits appear?

Best regards
Yves
hamlet77
Private First Class - Opel Blitz
Private First Class - Opel Blitz
Posts: 1
Joined: Tue Aug 28, 2018 10:02 am

Re: How to make Traits appear ?

Post by hamlet77 »

Hi,
you need to modify/add 1 entry in UI\purchase.htm.
Merge the 1.30 file with the one from the mod (if there is any), and add/paste the following:


<div id="UnitSpecialAbilities" style="position:absolute; left:16px; top:232px; height:32px; width: 164px; text-align:center; vertical-align:middle">
&nbsp;
</div>

Best regards
hamlet77
glaude1955
Master Sergeant - Bf 109E
Master Sergeant - Bf 109E
Posts: 465
Joined: Tue Sep 01, 2015 6:55 am

Re: How to make Traits appear ?

Post by glaude1955 »

Thanks hamlet77,
Mr Rudankort gave me the solution this morning.
I tested it and it works very well.
Best regards hamlet77

I enclose a copy of Mr Rudankort's answer which I thank again.
For simplicity, I think we can copy the original 4 htm file in the UI folder of the mod (or delete the 4 htm of the mod).

"In 1.30, game code knows how to display unit traits, but it must still be told where on the screen to display them. All UI is Panzer Corps is layouted using HTML, and these placeholders are part of UI layout too. You need to go to UI folder and search for all *.htm files which include "SpecialAbilities" substring. These files are:

neweqp.htm
purchase.htm
unit.htm
unittype.htm

You need to carefully copy relevant sections (the whole div which includes "SpecialAbilities" in its name, from <div> to </div>) from these files to their counterparts used in various mods.

Hope this helps.

Alex "
Post Reply

Return to “Panzer Corps : Scenario Design”