GUIDE Map Creation. Scripts and Triggers.

Moderators: Slitherine Core, BA Moderators, WH40K Armageddon moderators

Post Reply
Nskap2
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 87
Joined: Wed Dec 01, 2021 5:48 am

GUIDE Map Creation. Scripts and Triggers.

Post by Nskap2 »

So, you have already created several maps, and now you want to make an interesting scenario, more interesting than "kill all the xenos", "capture hex", "survive". The scripts and triggers tabs will help you do this.Editor allows you to actually create very interesting scenarios using logic and scripts, for example, you can change landscape, dig trenches, create craters, destroy cities, create interactive maps of the landscape and events that the player can influence by moving units. You can also influence state of units, their health, numbers, morale, experience.Let's start with the most interesting.

"Add hex actions"

First I will explain the basics of the editor's work.As you already know, editor has 17 map editing sections and 4 sections for editing scripts, strings and units.
scripts2.jpg
scripts2.jpg (266.71 KiB) Viewed 2816 times
Elements in sections have an ordinal number starting from 0. An example for the "Terrain" section. You can also find the sequence number in a WHDAT file with the name "Terrain" (for the Terrain and Features section) in the "Data" folder and "Tileset" (for the Tiles sections) in the "Graphics" folder:
scripts3.jpg
scripts3.jpg (248.93 KiB) Viewed 2816 times
script4.jpg
script4.jpg (50.21 KiB) Viewed 2816 times
Nskap2
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 87
Joined: Wed Dec 01, 2021 5:48 am

Re: GUIDE Map Creation. Scripts and Triggers.

Post by Nskap2 »

The 17 map editing sections are divided into 9 according to their functions.In turn, these 9 groups are divided into those that can be used in different scripts. Now we are interested groups 1-6, they can be used in the "add hex actions" script:
script5.jpg
script5.jpg (63.26 KiB) Viewed 2809 times
Let's look at an example of what a script looks like for adding tranches by trigger:
script1.jpg
script1.jpg (335.75 KiB) Viewed 2791 times
Nskap2
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 87
Joined: Wed Dec 01, 2021 5:48 am

Re: GUIDE Map Creation. Scripts and Triggers.

Post by Nskap2 »

The "Update hexes" section specifies the hex with which the changes will occur. You can specify a zone or select hex coordinates , in this case you can use the impact radius, where 0 is 1 hex with the specified coordinates.It is also convenient if all 32 zones have already been applied.
script6789.jpg
script6789.jpg (342.95 KiB) Viewed 2779 times
"Changet" section is what you can do with this hex. As you can see, in each row there is a link to the sections on the "Edit" tab:
script678.jpg
script678.jpg (351.76 KiB) Viewed 2778 times
Nskap2
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 87
Joined: Wed Dec 01, 2021 5:48 am

Re: GUIDE Map Creation. Scripts and Triggers.

Post by Nskap2 »

Let me remind you that the Terrain and Features sections determine the characteristics of the hex, its patency, protective bonuses, shelter, LOS, etc. The tile sections - how the hexagon will look. Therefore, in order for the trenches to be displayed not only as a picture, but also as a description and properties, you need to specify the serial number of the trenches in the Terrain section.That's 31.
script67890.jpg
script67890.jpg (341.12 KiB) Viewed 2769 times
Now the hex will have the properties of a trench , but it will look the same as before . Therefore, in the Tiles section, you need to specify how the trench will look and its orientation. As you have already noticed, in the Tiles section there are 9 windows for data entry. 9 is the number of Tiles sections in the Edit tab. We need tab #7 "Road and Trenches", find the desired picture, take its serial number and enter it into the 7 window.
script678901.jpg
script678901.jpg (200.63 KiB) Viewed 2757 times
Nskap2
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 87
Joined: Wed Dec 01, 2021 5:48 am

Re: GUIDE Map Creation. Scripts and Triggers.

Post by Nskap2 »

script67.jpg
script67.jpg (349.89 KiB) Viewed 2753 times
It's all. When the trigger is activated, a trench will appear in the specified hex.
Nskap2
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 87
Joined: Wed Dec 01, 2021 5:48 am

Re: GUIDE Map Creation. Scripts and Triggers.

Post by Nskap2 »

"Trigger"

Point that someone may not understand is present in the "map condition".Let me explain with an example:
Triggers.jpg
Triggers.jpg (174.89 KiB) Viewed 2720 times
In this example it is indicated that the number of flags of side 1 on the entire map can be less than 3, which means that there can be 0,1,2 flags. Using the example of the number of 3, I will explain the options:
Less than "3" : 0,1,2
No more than "3" : 0,1,2,3
Equal to "3" : 3
No less than "3" : 3,4,5,6...etc
More than "3" : 4,5,6...etc

What's the use of it? Here is an example.
Triggers1.jpg
Triggers1.jpg (132.67 KiB) Viewed 2704 times
This means that a unit with the tag "15" from turn 1 to 50 will appear in zone 15, provided that in zone 16 the number of flags of side 2 is more than 0 and the number of units with the tag "15" on the entire map is 0,1,2,3 and in zone 15 0,1,2,3 units of side 2. For the player it will look like a respawn in zone 15 1-3 units, as they are destroyed, until they run out, or turn 50 comes, or the number of flags of side 2 in zone 16 becomes 0.The number of units is equal to the number of units with this trigger and tag 15 placed on the map.Zone 15 consists of 6 hex,Zone 16 - 1hex:
Triggers2.jpg
Triggers2.jpg (62.56 KiB) Viewed 2671 times

These conditions are necessary for respawn a small number of units (1-3) as they are destroyed,during the 50 turn, without them all units will appear on the first turn, some of them are in zone 15, and all the rest are where they are placed in the editor.The number of hex in zone 15 is 6 because the script adds 1-3 units, at the same time part of the hex during the game may be occupied by moving units, if so, units will appear in empty hex zones 15 or the appearance of units will be delayed until 3 hex becomes free.This is done because If the number of free hex is less than the number of units that the script should throw into the game, the unit will appear where it was placed in the editor.
Nskap2
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 87
Joined: Wed Dec 01, 2021 5:48 am

Re: GUIDE Map Creation. Scripts and Triggers.

Post by Nskap2 »

"Add unit action" Script

This script works simply.There are three areas for data entry. "Update units" - definition of the units that the script will affect. You can choose a side, class, faction, core, auxiliary units, and by tag it allows you to fairly accurately determine the group of units. "Where" - defines the impact area of the script, you can select a zone or one hex and a radius around it. "Change" - which unit parameter is changed by the script. Example:
Unit action.jpg
Unit action.jpg (81.9 KiB) Viewed 2347 times

This script works on all units of side 1, core and auxiliary, in a zone with a radius of 10 around hex with coordinates "4.10" replacing the value of the unit parameter "morale" to 120
Post Reply

Return to “Mods and Scenario Design”