Hex Action - how it works?

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

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

Uhu
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1426
Joined: Fri Nov 04, 2011 9:16 pm
Location: Hungary

Hex Action - how it works?

Post by Uhu »

Has anybody clues how it works? I major update for the manual of the Editor would be needed anyway....
There are many empty boxes at the scripts/Add hex action window but what is for what? Can I make such things happen that in a certain hex the overlay will be changed? For example the industrial overlay will be changed to a rubble overlay if given enemy unit ("industrial unit") is destroyed on the given hex.
Image
Image
Uhu
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1426
Joined: Fri Nov 04, 2011 9:16 pm
Location: Hungary

Re: Hex Action - how it works?

Post by Uhu »

And a bonus OFFtopic question: structures are hard or soft targets? :shock:
Image
Image
bebro
Slitherine
Slitherine
Posts: 4327
Joined: Sun Nov 19, 2006 12:50 pm

Re: Hex Action - how it works?

Post by bebro »

I assume bunkers to be hard certainly, but didn't check in detail. IIRC there's a column in the equipment file for hard/soft, so I suppose they could be both (in case you want to mod it)
fsx
Warhammer Moderator
Warhammer Moderator
Posts: 389
Joined: Mon Dec 26, 2011 2:47 pm

Re: Hex Action - how it works?

Post by fsx »

Uhu wrote:Has anybody clues how it works? I major update for the manual of the Editor would be needed anyway....
There are many empty boxes at the scripts/Add hex action window but what is for what? Can I make such things happen that in a certain hex the overlay will be changed? For example the industrial overlay will be changed to a rubble overlay if given enemy unit ("industrial unit") is destroyed on the given hex.
At first, take a look at
viewtopic.php?f=147&t=43040

1. Each field represents a layer.
2. You have to Input the Position of the new tile/string.. from the layer.. Begin with 0
3. Empty fields are not changed.
4. I think, -1 is delete a tile from the map.
5. Streets, railways, rivers are not so easy. Because they connect two hex-fields.

For your example, you have to check, if both overlays in the same layer. If yes, you have "only" to input the position number of the rubble overlay in the right field. If are both in LayerTerrain, you have to fill the 3th input field for the line "Tiles". Perhaps you will change the text, you have to input the number of the new string from the pzloc file of the scenario. If you change the base (hills->city) use the same number for the lines Terrain and String.

My Suggestion: Work without Change hex. Use a unit that fills the whole hex and if it is destroyed, the Player see the "destroyed" tile.

Perhaps, I have the time to explain the new moddimng features at
<link will be announced>
in german and (my poor) english.

Who tested in the AC beta these new features?
Molve
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 535
Joined: Wed Jul 27, 2011 10:06 am

Re: Hex Action - how it works?

Post by Molve »

Hex Action - Hope This Helps

Short version:
To properly change a hex from one type to another (say, burning down a forest (forest -> clear) you need one hex action changing three things: terrain, overlay tile, and string.


Update hexes:
You can either specify which hex or hexes to change by coordinates/radius or by zone. (This part is fairly easy to understand if you have used scripts before, so I won't go into detail here and now)

Change:
First off, like the message says, leave a field empty if you don't want to make any changes. "Empty" for a checkbox is the special undecided state, neither empty nor checked.

There are 6 things to change in this dialog:
Terrain
Terrain Features
Tiles
String
Flag
And the column of check boxes for things you'll find in the editor under "special hexes". Let's explore each in turn, okay?

Terrain:
Change the underlying terrain type. This is what affects units, not how it looks on your screen. (Remember how you normally "generate" the looks of the map out of this raw map?)

This is how you can reduce a town into rubble (change a city hex into fortification), simulate flooding (change clear hexes into swamp) or build an airstrip (change clear into airfield).

Again remember that changing terrain changes nothing of how your map looks, only how it works!

0 = Deep sea
1 = Shallow sea
2 = Lake
3 = Swamp
4 = Clear
5 = Countryside
6 = Bocage
7 = Forest
8 = Thick Forest
9 = Hills
10 = Mountains
11 = High Mountains
12 = City
13 = Airfield
14 = Port
15 = Fortification
16 = Desert
17 = Dunes
18 = Rough Desert
19 = Escarpment
20 = Strait
21 = Jungle

Terrain Features:
There are four terrain features in the editor: Thick (impassable) river, thin (normal) river, rail, and road. And there are four edit boxes in the hex action dialog. So by entering a number in the third box from the left, you would specify a rail line in that hex.

The specific numbers you need to enter specify the orientation of the feature. (Whether a river runs from east to west, or whether it branches to the southeast etc). I simply do not know these numbers. Best guess: to look at the ordering of the terrain tiles that follows. (For instance, road tile #5 looks like a road coming from the north bending to the left, to the south-east. So if we're lucky, entering a 5 in the last (rightmost) edit box here would tell the game there is a road going between the N and SE borders of the hex, and you'd enter the same number in both places)
See fsx's excellent bit value map in the link below to demystify these numbers!


Tiles:
There are nine edit boxes and nine types of tiles in the editor, so from the left:
Backgrounds
Coasts
Overlays (including terrains)
Rivers
Roads
Rails
Ports
Stations
Markers

So, if you created a city by entering "12" in the Terrain field above, you would also want to set the overlay tile of that hex to one of the city tiles if you wanted the player to see a city on the screen. Counting the Overlay tiles, you would find three city variations as number 25, 26 and 27. So enter the number 25, say, in the third edit box from the left to make what the player sees ("a city tile overlay") match how the game treats that hex ("city terrain").

Backgrounds: variations on green grassy backgrounds (and three oceans).
Coasts: I am thankful for how well the editors generate function handles these and wouldn't want to change them for my life, so I'll simply skip this step. ;)
Overlays: By far the most important sort of tile, providing the visual cues to the player about what terrain his units travel through. Here's a few "bookmarks" :-)
10 Mountains
15 Hills
20 High Mountains
24 "No anchorage"
25 Cities
29 Airfield
30 Swamps
35 Countryside (Bocage?)
40 Countryside
45 Extra patches of trees (to round out adjoining forests)
50 Fortifications
65 Thick forest
70 Countryside
73 More cities
75 More hills
90 More mountains
97 Oasis
100 Specific cities (103 = Moscow and the Kremlin)
105 Jungle
110 Desert City
114 Desert Airfield
115 Rough Desert
120 Rough Desert?
125 Escarpment (since these are directional much like roads, there are dozens of them)
149 More Escarpment at 179 below
150 Dunes
155 Deserty Hills
160 Badlands?
165 Peaks
168 High Road Pass
169 The Pyramids
176 The Sphinx
177 More Jungle
179 Escarpment, Cont'd
194 The Wire
203 Even More City, including patches of added city (much like 45 above)

Rivers, Roads, Rail:
What would be useful here is a PDF with a graphical matrix of all the variations, to quickly look up the number of a particular tile. Me giving textual descriptions "river from north to southeast, branching to the south" feels more like a chore, both for me to write and you to read :-)
See fsx's excellent bit value map in the link below to demystify these numbers!

Ports, Stations:
The same reasoning goes for ports and stations too...

Markers:
The ninth and last (=rightmost) edit box concerns markers, and here a list could be useful. Remember, this is only graphics on a screen and doesn't change any functionality by itself. (In other words, don't forget to tick the exit zone checkbox below if you add an exit zone graphic to the map here)
0 = mission area "A"
1 = mission area "B"
2 = mission area "C"
3 = dollar sign (gain prestige here)
4 = Axis exit zone
5 = Allied exit zone

String: Strings are edited in the editor and stored in the pzloc file. Enter the index number here to set the label of the hex. The first strings are often always the same, but then scenarios add specific city names and the like. Remember our city hex? You would probably want to add the new city's name here and specify a number (or at the very least set it to 12 for the generic word "City").
0 = Deep sea
1 = Shallow sea
2 = Lake
3 = Swamp
4 = Clear
5 = Countryside
6 = Bocage
7 = Forest
8 = Thick Forest
9 = Hills
10 = Mountains
11 = High Mountains
12 = City
13 = Airfield
14 = Port
15 = Fortification
16 = Desert
17 = Dunes
18 = Rough Desert
19 = Escarpment
20 = Strait
21 = Jungle
22 = ...


Flag: Set a flag and make the hex capturable. Remember airfields need to be capturable to be useful...
-1: No flag (remove?)
0: Neutral (white)
1: Germany
2: UK
3: US
4: USSR
5: France
6: Italy
and so on. 27 is "Free france" for instance.

Actually "flag" seems tied to something else; order of "nations" perhaps?

Finally the check boxes allow you to change whether hexes are neutral (and impassable), add or remove deployment and exit zones.

Example: building an airstrip (clear -> airfield). Let's say you want a neutral airfield to appear on turn 3 in zone 29.

Then you'd add a script with the trigger [3,3] and the following hex action:

Code: Select all

Update hexes: 
Zone 29
Change:
Terrain 13
Terrain Features (empty) (empty) (empty) (empty)
Tiles (empty) (empty) 29 (empty) (empty) (empty) (empty) (empty) (empty)
String 13
Flag 0
All checkboxes left undefined
As you can see, there are four things changed: Terrain 13 = Airfield, Third Tile 29 = Airfield Overlay, String 13 = the word "Airfield" and Flag 0 Neutral.

Of course, normally you'd add message actions and possibly require the player to have an engineer at location to simulate the construction of the airfield etc etc.
Last edited by Molve on Wed Jan 08, 2014 11:25 pm, edited 2 times in total.
fsx
Warhammer Moderator
Warhammer Moderator
Posts: 389
Joined: Mon Dec 26, 2011 2:47 pm

Re: Hex Action - how it works?

Post by fsx »

Thank you Molve!

Now I finished my post for hex Actions.
Look at http://www.streitmacht.com/viewtopic.ph ... 5464#p5464

And...
I made a small "scenario" that shows some of the new features.
Copy the files into the My Games/Panzer Corps/Scenario folder and play it (custom scenario) as allies.
I hope, you'll enjoy it.
Attachments
Scenario.zip
(3.45 KiB) Downloaded 194 times
Molve
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 535
Joined: Wed Jul 27, 2011 10:06 am

Re: Hex Action - how it works?

Post by Molve »

Thank you for explaining the directional bit values Fsx! :D

A question:
fsx wrote:If you change a terrain to city or airfield, the player could deploy purchased units around it.
I believe cities and airfields need to be capturable (have a flag) in order to "work" like this. (A city would still work like a terrain feature even without a flag, but would then pretty much act like fortifications)

On the other hand, my limited testing suggests that the game itself "helps" the designer by adding a flag when you switch terrain into city/airfield.

Do you know more about this? (I didn't find any discussion specific to the "flag" field in your post)
Molve
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 535
Joined: Wed Jul 27, 2011 10:06 am

Re: Hex Action - how it works?

Post by Molve »

fsx wrote:Now I finished my post for hex Actions.
Look at http://www.streitmacht.com/viewtopic.ph ... 5464#p5464
I would respectfully request that fsx gives his permission for Slitherine to duplicate the info on these forums, and then add it to the FAQ. It's that valuable! :)
fsx
Warhammer Moderator
Warhammer Moderator
Posts: 389
Joined: Mon Dec 26, 2011 2:47 pm

Re: Hex Action - how it works?

Post by fsx »

Hi Molve!

1. Could I add some of your informations in my post?
2. Could someone translate my poor english into "real" english (PN)? After that:
3. I would copy my post to slith-forum.

Do you downloaded my testing Scenario (I think not)? I added the flag to the new City in the same Hex-Action (turn 7, german flag with number "0"). I did not tried to make a City without a flag,
nikivdd
Panzer Corps Map Designer
Panzer Corps Map Designer
Posts: 4514
Joined: Fri Jun 24, 2011 1:21 pm
Location: Belgium
Contact:

Re: Hex Action - how it works?

Post by nikivdd »

About the flags...

-2 is to remove a flag
-1 is the neutral flag
0 is the German flag
and so on.
https://www.facebook.com/NikivddPanzerCorps
https://www.youtube.com/channel/UCk2lyeEuH_hoA1s7tnTAEJQ
Molve
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 535
Joined: Wed Jul 27, 2011 10:06 am

Re: Hex Action - how it works?

Post by Molve »

1. Sure feel free :)
Molve
Master Sergeant - U-boat
Master Sergeant - U-boat
Posts: 535
Joined: Wed Jul 27, 2011 10:06 am

Re: Hex Action - how it works?

Post by Molve »

Thanks!
maguro
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 305
Joined: Thu Oct 23, 2014 3:14 pm

Re: Hex Action - how it works?

Post by maguro »

Is there a way to remove terrain features using hex action? Seems like there should be a number (maybe negative) to enter in the box corresponding to the terrain feature you want to alter. Everything I've tried so far doesn't work.
maguro
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 305
Joined: Thu Oct 23, 2014 3:14 pm

Re: Hex Action - how it works?

Post by maguro »

I can get the road tile to change but the hex still functions as a road. It must not be possible, at least not using hex action. Someone surely would've taken advantage of its usefulness by now.
BiteNibbleChomp
Lieutenant-General - Do 217E
Lieutenant-General - Do 217E
Posts: 3231
Joined: Mon Jul 01, 2013 6:35 am

Re: Hex Action - how it works?

Post by BiteNibbleChomp »

-1 and -2 delete stuff in the other boxes, those would seem like your best bet.

- BNC
Ryan O'Shea - Developer - Strategic Command American Civil War
maguro
Staff Sergeant - Kavallerie
Staff Sergeant - Kavallerie
Posts: 305
Joined: Thu Oct 23, 2014 3:14 pm

Re: Hex Action - how it works?

Post by maguro »

One would think that a -1 or -2 or something would work but doesn't to do anything. I was trying to make certain important bridges destructible for some scenarios in a campaign but I think there is another way, just using terrain. Not perfect but it will do.
Thanks as always BNC. The input is always appreciated
Uhu
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1426
Joined: Fri Nov 04, 2011 9:16 pm
Location: Hungary

Re: Hex Action - how it works?

Post by Uhu »

Does anybody used the Deploy Air, Deploy Ground hex-changes to implement int a scenario? I did it (for example, if a given hex has Axis flag, than message + Axis Air Deploy hexes are available in the given zone hexes. Now, the message is there, but no deploy hexes showed up in the map...
Image
Image
captainjack
Brigadier-General - 15 cm Nblwf 41
Brigadier-General - 15 cm Nblwf 41
Posts: 1907
Joined: Thu Sep 13, 2012 7:42 am

Re: Hex Action - how it works?

Post by captainjack »

There's some US Corps scenarios and I think one or two in one of the MPC mods where you can't deploy planes until you capture an airport or create landing strip.

Somewhere in the scripts there will be hex actions to add air deployment hexes (and in at least on case ground deployment hexes).

If you open the scenario with the editor you can have a look to see what was done.

Might be worth backing up the file first in case you are good at pressing buttons by mistake.
Last edited by captainjack on Sat Jul 23, 2016 6:43 am, edited 1 time in total.
Razz1
Panzer Corps Moderator
Panzer Corps Moderator
Posts: 3308
Joined: Tue Jan 18, 2011 4:49 am
Location: USA

Re: Hex Action - how it works?

Post by Razz1 »

Uhu wrote:Does anybody used the Deploy Air, Deploy Ground hex-changes to implement int a scenario? I did it (for example, if a given hex has Axis flag, than message + Axis Air Deploy hexes are available in the given zone hexes. Now, the message is there, but no deploy hexes showed up in the map...
Yes, I have in the Danzig Campaign.

All the parameters people are talking about work. Either I have done it myself or others in the Mods.

Bug River shows how you can add open slots.

http://www.slitherine.com/forum/viewtop ... 47&t=55210
Uhu
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1426
Joined: Fri Nov 04, 2011 9:16 pm
Location: Hungary

Re: Hex Action - how it works?

Post by Uhu »

Thank you all the tipps and advices!
It turned out, that I just probably forgot to open the deploy menu, while playing the scenario and that's, while the deploy hexes do not showed up. :oops: :lol:
Image
Image
Post Reply

Return to “Panzer Corps : Scenario Design”