My hobby – Scripting Pz Corps?

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

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

Loamshire
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 34
Joined: Mon Jun 04, 2012 9:54 pm

My hobby – Scripting Pz Corps?

Post by Loamshire »

I’m starting to realise that I spend more time tinkering with the game than playing it. I just counted the number of scripts in the scenario I’m putting together at the moment (version sixteen), there’s 228 scripts and I’m not finished but am nearing its completion and it’s not a mega-battle or anything. Many of the scripts have multiple actions, the biggest has sixteen. I like the mental challenges it provides which to me are way better than sudoku etc. The challenge, complexity, creativity plus sometimes there isn’t even a solution – or is there? A few times I’ve woken up in the morning and – I think I’ve got the answer. I even enjoy hunting for my mistakes.

The down side to scripts is only being able to put new scripts at the end, plus there’s no script line numbers which would really help with hand written notes.
cw58
Master Sergeant - Bf 109E
Master Sergeant - Bf 109E
Posts: 487
Joined: Thu Sep 24, 2015 9:44 pm

Re: My hobby – Scripting Pz Corps?

Post by cw58 »

Lol, I too spend more time modifying rather than playing the game. It's always, "How can I do....." or "What would happen if....." then a flurry of modding and then fire up the game and see the results. It's a fun hobby. :)
Yrfin
1st Lieutenant - 15 cm sFH 18
1st Lieutenant - 15 cm sFH 18
Posts: 818
Joined: Sun Dec 04, 2016 6:47 am
Location: Behind your backs

Re: My hobby – Scripting Pz Corps?

Post by Yrfin »

Loamshire wrote: Sun Nov 08, 2020 2:13 pm I’m starting to realise that I spend more time tinkering with the game than playing it.
Same like me :)
Loamshire wrote: Sun Nov 08, 2020 2:13 pm I just counted the number of scripts in the scenario I’m putting together at the moment (version sixteen), there’s 228 scripts and I’m not finished but am nearing its completion
The down side to scripts is only being able to put new scripts at the end, plus there’s no script line numbers which would really help with hand written notes.
Very interesting idea about sharing a Scripts, coz AI Scripts play a crucial role in PzC.
Thanks you.
Its looking realy interesing !

PS. I hate Scenario Editor, coz it don't have Undo :(
Cursing for you, Rudanko.
When im died - I must be a killed.
Loamshire
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 34
Joined: Mon Jun 04, 2012 9:54 pm

Re: My hobby – Scripting Pz Corps?

Post by Loamshire »

Soviet Surrender 7.png
Soviet Surrender 7.png (15.05 KiB) Viewed 3038 times
Loamshire
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 34
Joined: Mon Jun 04, 2012 9:54 pm

Re: My hobby – Scripting Pz Corps?

Post by Loamshire »

The mass surrender of troops, a way of incorporating this into the game. 1941 Eastern Front Example.

This creates difficulties for the advancing Axis side.

How it plays – When an Axis unit ends its move next to the Soviet surrender unit the Axis and Soviet units disappear with the following message.

“Troops at map ref 12,10 have taken a large amount of prisoners and are now escorting them to the rear. The unit will return to muster tomorrow.”

The Axis player gains 50xp and their unit goes back into the reserves list for redeployment in the game straight away (to be placed in the Axis deployment hexes).

A new unit needs to be created showing Soviet soldiers surrendering with white flags and raised hands etc. This infantry unit has zero movement and armaments, but high strength and defence to prevent Axis units accidentally bumping into it and wiping it out. The new unit needs assigning a name identifier in Unit Parameters. These units can also be given Camo trait so they are harder to avoid. The surrendering units can be assigned a random chance of appearing and if so their Unit Parameter Triggers need - the number of Axis units in Z1 equals zero, plus the percentage chance of arrival.

The Flag file (in Graphics, Overlays) needs a slight change to an in-game flag. What’s needed is a flag that has no graphics (however just an overlay flag is not satisfactory as it will change from invisible to a Soviet flag if Russian forces move onto it). I decided to delete the Turkish flag graphic, as I have Christmas and turkey on my mind. The available Nations in Scenario Parameters need to be set to include Turkey (if it’s the chosen flag for deletion) on the allied side.

Map and code – The surrendering unit needs to be in the middle hex in a zone of seven.
Line 1 – Trigger, Number of Allied units in Z1 equals 1 (the special identifier name). Hex Action at end of turn is, Flag 28(Turkey) and the Axis Exit Zone switched on.
Line 2 – Trigger, Number of Axis flags in Z1 is more than zero. Actions instantly, Display Message. Plus surrendering unit in Z1 with special identifier is set to Strength zero via Unit Action.
Line 3 – Trigger, Number of Axis flags in Z1 is more than zero. Actions instantly, Hex Action Z1 set to Flag -28 (minus twenty eight), Axis Exit Zone taken off.
PeteMitchell
Major-General - Tiger I
Major-General - Tiger I
Posts: 2458
Joined: Tue Jul 10, 2018 1:18 pm

Re: My hobby – Scripting Pz Corps?

Post by PeteMitchell »

McGuba has some sort of troop surrenders in his Battlefield Europe mod as well, i.e. you need to encircle them and/or reach certain hexes and hold these hexes until the end of the turn and in the next turn the SU troops disappear, e.g. for Białystok–Minsk and Kiev encirclements.

If you download his mod and want to check it, it's around turn 2 and turns 8 to 10 respectively, I think.
Comprehensive Battlefield Europe AAR:
http://www.slitherine.com/forum/viewtopic.php?f=145&t=86481
Loamshire
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 34
Joined: Mon Jun 04, 2012 9:54 pm

Re: My hobby – Scripting Pz Corps?

Post by Loamshire »

Another thing I like to use are buildings as units which is really just another expression of bunkers. My favourite is a fortified grain silo (no it’s not the famous one) which I use in a Ukraine scenario. The silo changes hands several times, so Soviet and Axis unit version of the fortified silo are required. In game, eventually the building can only take so much fighting and it is reduced to rubble. At its destruction there is the usual explosion animation and the upright silo image fades away to reveal – ruins! Quite a lot of tinkering goes into that. Not least having two images in the LayerBaseFrozen.png file. It’s quite important to have the silo in the unit graphic exactly matching, the silo in the base layer graphic, pixel perfect, otherwise it can jump a little when attacked from different sides.

The silo unit image
Fortified_Silo_Bld2.png
Fortified_Silo_Bld2.png (15.01 KiB) Viewed 3004 times
The winter silo unit image
Fortified_Silo_Bld_Winter.png
Fortified_Silo_Bld_Winter.png (13.65 KiB) Viewed 3002 times
Last edited by Loamshire on Sat Dec 12, 2020 11:39 pm, edited 1 time in total.
Loamshire
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 34
Joined: Mon Jun 04, 2012 9:54 pm

Re: My hobby – Scripting Pz Corps?

Post by Loamshire »

The winter silo base layer
Silo Tile.png
Silo Tile.png (34.38 KiB) Viewed 3003 times
The winter silo destroyed, base layer (only images for the winter base layer were needed so there’s no graphics for the other base layers)
Silo Ruins Tile.png
Silo Ruins Tile.png (38.16 KiB) Viewed 3001 times
Of course those factory images in the modded LayerSations.png are excellent for having as units.
lennis29
Sergeant Major - SdKfz 234/2 8Rad
Sergeant Major - SdKfz 234/2 8Rad
Posts: 617
Joined: Sun Jul 20, 2014 9:54 pm
Location: Republica Dominicana

Re: My hobby – Scripting Pz Corps?

Post by lennis29 »

excellent project
- GerMOD
- VolksMOD
- XXIX Le PzKorps
lennis29
Sergeant Major - SdKfz 234/2 8Rad
Sergeant Major - SdKfz 234/2 8Rad
Posts: 617
Joined: Sun Jul 20, 2014 9:54 pm
Location: Republica Dominicana

Re: My hobby – Scripting Pz Corps?

Post by lennis29 »

@Loamshire Do you know how to modify this file strings.pzdat , such as creating a new one (traits)?
- GerMOD
- VolksMOD
- XXIX Le PzKorps
dalfrede
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1493
Joined: Wed Mar 15, 2017 7:48 pm

Re: My hobby – Scripting Pz Corps?

Post by dalfrede »

lennis29 wrote: Sun Dec 13, 2020 12:49 am @Loamshire Do you know how to modify this file strings.pzdat , such as creating a new one (traits)?
You use a text editor, [Word Pad].
Make a safety copy, you will likely screw something up.
There comes a time on every project when it is time to shoot the engineer and ship the damn thing.
Loamshire
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 34
Joined: Mon Jun 04, 2012 9:54 pm

Re: My hobby – Scripting Pz Corps?

Post by Loamshire »

From a Christmas past.
Emplacement_1.png
Emplacement_1.png (59.44 KiB) Viewed 2832 times
I got the set that included British and German infantry. My friend also got one and invited me to play a wargame at his house, telling me to bring some of my tanks along. He’d made a modest sized board of terrain which included an out- of- scale railway tunnel that had a river/canal going through it. It was my first wargame and had easy rules – roll a six and one of your tanks can destroy an enemy tank that’s in range. We were about 10 or 11 years old.

To assign the firing animation/sound - in the efx.pzdat file copy and paste an existing artillery entry (I chose Axis_Fort.png ) rename to Emplacement_1.png , and set the co-ordinates to "(60,-20)" "(-6,-20)". It’ll also obviously need an entry in the equipment.pzeqp file.

Merry Christmas everyone
Loamshire
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 34
Joined: Mon Jun 04, 2012 9:54 pm

Re: My hobby – Scripting Pz Corps?

Post by Loamshire »

lennis29 wrote: Sun Dec 13, 2020 12:49 am @Loamshire Do you know how to modify this file strings.pzdat , such as creating a new one (traits)?
Apologies for the delay in reply. That's a negatory, it's something I haven't worked on.
Loamshire
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 34
Joined: Mon Jun 04, 2012 9:54 pm

Re: My hobby – Scripting Pz Corps?

Post by Loamshire »

Now a Graphic for the Kfz 69 Protze

I was unable to find a graphic for the Krupp Kfz 69, the towing partner for the Pak 35/36, which has the ammunition lockers.
So a minor contribution…
Kfz69_Protze.png
Kfz69_Protze.png (25.75 KiB) Viewed 2420 times
Loamshire
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 34
Joined: Mon Jun 04, 2012 9:54 pm

Re: My hobby – Scripting Pz Corps?

Post by Loamshire »

What it looks like in-game with other units.
Kfz69 ingame.png
Kfz69 ingame.png (386 KiB) Viewed 2419 times
Loamshire
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 34
Joined: Mon Jun 04, 2012 9:54 pm

Re: My hobby – Scripting Pz Corps?

Post by Loamshire »

The main inspiration though one of many images.
Krupp Kfz.jpg
Krupp Kfz.jpg (76.36 KiB) Viewed 2418 times
A vehicle with crew seating perhaps inspired by that on horse drawn gun limbers (the word Protze might be a clue), no cab, and has the crew sitting as if on a cart and exposed to the weather. That said in the photograph I think metal semi-circular bows for supporting a canvas roof are on the hood and are arranged in a circle? If so it’d look like a covered wagon without a horse when it was raining.

BTW also in the photo, I hoped the name on the building in the background was a 1930’s jazz-band - Piston BHB! A bit like Carter USM. But I see now from a web search it’s just a maker of pistons.
lennis29
Sergeant Major - SdKfz 234/2 8Rad
Sergeant Major - SdKfz 234/2 8Rad
Posts: 617
Joined: Sun Jul 20, 2014 9:54 pm
Location: Republica Dominicana

Re: My hobby – Scripting Pz Corps?

Post by lennis29 »

Loamshire wrote: Fri Feb 26, 2021 12:10 am What it looks like in-game with other units.
Kfz69 ingame.png
very good
- GerMOD
- VolksMOD
- XXIX Le PzKorps
faos333
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1465
Joined: Sat Feb 16, 2019 9:04 pm

Re: My hobby – Scripting Pz Corps?

Post by faos333 »

Loamshire wrote: Fri Feb 26, 2021 12:09 am Now a Graphic for the Kfz 69 Protze

I was unable to find a graphic for the Krupp Kfz 69, the towing partner for the Pak 35/36, which has the ammunition lockers.
So a minor contribution…
Kfz69_Protze.png
very nice graphic!!!
Battlefield Europe get the most from Panzer Corps 8)
Download the new 2.4 Mod here http://www.slitherine.com/forum/viewtopic.php?f=147&t=47985
Loamshire
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 34
Joined: Mon Jun 04, 2012 9:54 pm

Re: My hobby – Scripting Pz Corps?

Post by Loamshire »

Thank you for your kind feedback.
Loamshire
Corporal - 5 cm Pak 38
Corporal - 5 cm Pak 38
Posts: 34
Joined: Mon Jun 04, 2012 9:54 pm

Re: My hobby – Scripting Pz Corps?

Post by Loamshire »

My highlight of today was working out how to use scripts with the Terrain Features, which has the two waterways, rail and road features. I wanted to set a task for an engineer unit to repair a gap in a railway line caused by sabotage. I didn’t need to check anywhere on how to do it because I thought it’d be easy. Wow, it took me ages to work out that scripting changes in Terrain Features is actually the opposite of scripting the various background tiles etc. Terrain Features use negative numbers for placement and positive for removal! But hey, at least the designers didn’t have a bit of a joke on this bit and make us use Roman numerals or something.

I also got to thinking how many people must be being helped, especially at the moment, by playing computer games. A lovely distraction. I know Panzer Corps totally does it for me and I'm really appreciating it.
Post Reply

Return to “Panzer Corps : Scenario Design”