Page 1 of 1

Editor: How To...

Posted: Sun Feb 28, 2016 2:37 pm
by uran21
This topic is intended as the one that shows how to solve some specific situation with the Editor. It will start with the situation for basic victory conditions.

Re: Editor: How To...

Posted: Sun Feb 28, 2016 2:38 pm
by uran21
Capture Hex

The most important part of using Triggers is to define victory conditions for a scenario.
Common objectives in wargames are related to control of territory and destruction of an army. Although objectives can be made out of anything that can be measured by the game. For starters lets cover conquering territory from the enemy and preventing the same from capturing yours.

After the map and all the settings have been created make a decision about scenario victory conditions. Implement conditions trough triggers and TEST those to be sure they are working. This may include some unit predeployment and AI scripting (or hotseat test) outside of desired scenario flow that can be removed later but testing VARIOUS outcome possibilities and options early on is a time saver on the long run.

First example will include situation where player is tasked to capture 3 hexes marked as primary VPs. The other side (AI) is tasked to prevent this from happening. Mission tab has primary objective included. In Trigger tab we have one trigger for mission success and one trigger for mission failure. Both are placed in the same folder for better organization.

For mission success trigger we are using Check VP Count condition. Here we have several things to set like for what Team or Alliance we will be counting VPs, what kind of VP type, how many VP are needed to fulfill condition and we can link it to mission objective (this will add counter to mission objective). When conditions are set we are going to define the Effect. For victory conditions we are using Set Objective State effect. Here we define for what alliance this objective is referred to, what kind of objective (primary or secondary), what specific objective by name and what state do we want it to be in (open, completed, failed). Completing all primary objectives makes an end to a game.

For mission failure trigger we are also using Check VP Count condition. Here we can count is attacker having less than required primary VPs or is defender having more than 0. Either way will work but what is important is to add another condition, the one that will check this count only at scenario end (Check Turn condition). Otherwise game would end on the first turn because defending side would have all conditions met on turn 1. In order for Effect to happen ALL conditions need to be met. Effect of this trigger is to mark defenders objectives as completed which will result in defeat for attacker.

One problem can very often be solved on several different ways. This same situation could be solved by using Check Hex Owner condition but some solutions are more elegant than the others. While counting VPs enemy can recapture some of them from the attacker and this will be reflected in mission objective counter. Player will need to capture those again if he is about to meet victory conditions which means that Capture VP Count condition works as condition for Capture and Hold hexes.

Below is attached test scenario with triggers set for reference. It includes simulation of hex recapture by the AI.

Re: Editor: How To...

Posted: Wed Mar 02, 2016 12:49 pm
by uran21
Hold Hex at the End

This time we will make an example of holding hex with a focus on defender. As with the Capture Hex example we can use Check VP Count condition. We set Team or Alliance to defending player. We set VP type which is in this case Primary. In this example player is tasked to hold 3 primary objectives so counted Value is set to be equal to 3. We are linking this condition to objective already defined in Mission tab. Advantage of this linking is in counter appearing on the right of mission objective seen in Turn Overview pop-up window.

As an Effect to this Condition (reaction if condition is fulfilled) we add Set Objective State. Alliance parameter is set to defending player and we are setting primary objective to be completed. All this means that if defending player is holding N number of objectives his primary objective will be completed. Since this is the only objective it will make an end to a game with defending player being victorious. You can notice by now since defender is holding all necessary objectives from the start his conditions will be fulfilled from start and the game would end instantly.

To prevent this from happening we need to add additional condition to trigger. Effects do occur only if ALL conditions of particular trigger are fulfilled. We are adding time parameter through Check Turn condition with Scenario turn limit enabled. This means that defender needs to hold N number of objectives at scenario end. While the trigger would work as is we want to set Trigger Event to check condition at Turn Start. This saves game resources so game does not need to check for conditions after every possible action in the game occurs. It will check for conditions only at every turn start.

To make the game complete it is necessary to add another trigger that will check progress of attacker. For condition we are checking if attacker is holding ANY number of objectives (bigger than 0) at scenario end.

Described scenario example is attached below under name Hold Hex at the End.

Hold Hex

It is convenient to check if defender is holding all required hexes at the end but maybe you do not want to use the same standard for attacker. This way hex ownership can change several times and only thing that matters is who is holding what at the end. If you want game to end when attacker captures all objectives it is necessary to set trigger dealing with attackers progress differently.

Trigger for attackers progress is set in a way that Trigger Event is checked when Capture VP Event occurs. Check VP Count is used as condition checking if attacker owns all objectives. If it does Effect sets objective for attacker as completed and game is over making attacker victorious. There is a catch in all of this though. What if attacker does not control all objectives at the end and defender does not control all objectives either? In order for scenario to be completed all possible outcomes should be covered with their dedicated trigger. This specific situation was covered in previous scenario example which leads as to conclusion how this new scenario example is upgraded version of previous one with added layer of complexity.

Below is attached scenario example (Hold Hex) where game ends if attacker captures all objectives.

Hold Hexes at all Time

Third example includes situation where defender is tasked to hold 3 objectives all the time until scenario ends. If attacker captures only one objective at any time during scenario game will end.

Since this includes only two possible situations, either defender will hold all objectives at the end, either attacker will capture any of objectives we need to set only two triggers to cover victory outcomes. Example of this scenario is attached below under name Hold Hexes at all Time.