Variables Explained

Moderators: Order of Battle Moderators, The Artistocrats

Post Reply
earlecook
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 93
Joined: Sat Jan 16, 2016 2:46 am
Location: Cordova, Alaska
Contact:

Variables Explained

Post by earlecook »

My take on Variables.

This example uses Scenario Variables to determine Victory, Draw, Lose Conditions.

You have three trucks and three towns. Move the trucks to the towns (or not).

Number of Trucks in Towns.
Victory - Three Towns on turn 3.
Draw - Two Towns on turn 3.
Lose - Less than two towns on turn 3.

Scenario Variables in "Conditions" are used to determine Victory Condition Values (met or not).
Scenario Variables in "Effects" is math - (+1 Truck in town) or (-1 Truck not in town).
Triggers Enabled only allows for (-1) to determine if trucks have left town, after arrival.

Variables Explained.Zip
Variables Explained.zip
(1.5 KiB) Downloaded 153 times
Regards,
Earle
Erik2
Order of Battle Moderator
Order of Battle Moderator
Posts: 9633
Joined: Thu Jul 14, 2011 12:59 pm
Location: Norway

Re: Variables Explained

Post by Erik2 »

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

Re: Variables Explained

Post by Uhu »

So, you are saying, that the 5 outcomes of an scn can be customised?

Because uran21 wrote in the "Editor Manual - Draft" topic the followings:

"Major Defeat (0): NOT all primary objectives met + NOT all secondary objectives met + hostile alliance has achieved all

primary objectives/any predefinied objectives
Defeat (1): NOT all primary objectives met + ALL secondary objectives met + hostile alliance has achieved all primary

objectives
Draw (2): turn limit reaches + no one has met all primary objectives
Victory (3): ALL primary objectives met + NOT all secondary objectives met
Major Victory (4): ALL primary objectives met + ALL secondary objectives met"
earlecook wrote:My take on Variables.

This example uses Scenario Variables to determine Victory, Draw, Lose Conditions.

You have three trucks and three towns. Move the trucks to the towns (or not).

Number of Trucks in Towns.
Victory - Three Towns on turn 3.
Draw - Two Towns on turn 3.
Lose - Less than two towns on turn 3.

Scenario Variables in "Conditions" are used to determine Victory Condition Values (met or not).
Scenario Variables in "Effects" is math - (+1 Truck in town) or (-1 Truck not in town).
Triggers Enabled only allows for (-1) to determine if trucks have left town, after arrival.

Variables Explained.Zip
Variables Explained.zip
Regards,
Earle
Image
Image
earlecook
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 93
Joined: Sat Jan 16, 2016 2:46 am
Location: Cordova, Alaska
Contact:

Re: Variables Explained

Post by earlecook »

Uhu,

This is a simple as I can make it scenario using variables (and ways to use them).

In this case using the scenario you could determine the victory conditions as stated, then use the Objective trigger to finalize as is stated in the manual. However the actual available (end of game options) are determined by the "result" line in the /Mod name/campaign/data file.

Or let's say you wanted to (edit this scenario) and determine if a hex was held for a certain amount of turns, you could manipulate that with a different second variable that counted the number of turns a hex was occupied. Again using the Objective trigger when the number of turns have been reached.

As far as the Objective trigger goes, you tell it when the objectives are satisfied, by using a different Objective trigger for each Primary and Secondary event that is satisfied. If you want a Major Victory you simply put in an Objective trigger for each of the Primary/Secondary objectives when you want it to happen -- However the actual available (end of game options) are determined by the "result" line in the /Mod name/campaign/data file.

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

Re: Variables Explained

Post by Uhu »

It's a very complex, what you wrote, I'm trying to understand it. :)
The base situation is, that there are several 2nd goals in the scns. And by uran21's manual, major victory is possible if ALL 2nd goals are met. Normal victory is, when a 1st goals are met. I would have an option for major victory, when several, but not all 2nd goals were met, but the player achived still a decisive victory (let's say, because some of the other 2nd goals had not such impact on the end results).

By the way, if we speak about 1st and 2nd mission goals. I do not understand, what effect/purpose has the Set Trigger State, where the Objective State is set to victory, and the Trigger state is linked to failure. But the Enabled button is not on! And that's everywhere in the same in the scns. Pictures below:
earlecook wrote:Uhu,

This is a simple as I can make it scenario using variables (and ways to use them).

In this case using the scenario you could determine the victory conditions as stated, then use the Objective trigger to finalize as is stated in the manual. However the actual available (end of game options) are determined by the "result" line in the /Mod name/campaign/data file.

Or let's say you wanted to (edit this scenario) and determine if a hex was held for a certain amount of turns, you could manipulate that with a different second variable that counted the number of turns a hex was occupied. Again using the Objective trigger when the number of turns have been reached.

As far as the Objective trigger goes, you tell it when the objectives are satisfied, by using a different Objective trigger for each Primary and Secondary event that is satisfied. If you want a Major Victory you simply put in an Objective trigger for each of the Primary/Secondary objectives when you want it to happen -- However the actual available (end of game options) are determined by the "result" line in the /Mod name/campaign/data file.

Regards,
Earle
Image

Image
Image
Image
earlecook
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 93
Joined: Sat Jan 16, 2016 2:46 am
Location: Cordova, Alaska
Contact:

Re: Variables Explained

Post by earlecook »

Uhu,

Something is always easier when you understand it, the hard part is trying to communicate it to someone who does not.

Are you writing the scenario pictures you are showing?

If so, follow Erik's advice and really study Mod - Battle of Britain (after finishing the game). I put in countless hours doing so (and other scenarios). I also wrote many small scenarios; such as (Variables Explained) to see how the triggers work. Writing scenarios is like everything else in life, you have to crawl on your knees, learn to stand, then walk, before you can run in the Olympic Games.

Regards,
Earle

PS: The Set Trigger State in your picture - is turning off - Secondary VP Failed - so it will no longer function. Using it here is pointless though, it has already activated - Since it has a (1), it will only activate once anyway.
Uhu
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1480
Joined: Fri Nov 04, 2011 9:16 pm
Location: Hungary

Re: Variables Explained

Post by Uhu »

Thanks, I studied now the example scenario. As I understand, it is just a middle-step, as there are no primary and secondary goals/missions in the scn, which would than summarise, what outcome would be. It is just adding an opportunity, how to messure the primary and secondary goal?

My concern is still: is it possible to create major victory with all primary goals, but not all secondary goals achived, when the 5 outcomes are definied, as beyond. I need such a solution, where I can define, which secondary goals make a major victory - still, that not all secondary goals are fulfilled.

"Major Defeat (0): NOT all primary objectives met + NOT all secondary objectives met + hostile alliance has achieved all primary objectives/any predefinied objectives
Defeat (1): NOT all primary objectives met + ALL secondary objectives met + hostile alliance has achieved all primary objectives
Draw (2): turn limit reaches + no one has met all primary objectives
Victory (3): ALL primary objectives met + NOT all secondary objectives met
Major Victory (4): ALL primary objectives met + ALL secondary objectives met"

...but right now, as I'm writing this, I got an idea: the words, written in the beginning of the lines are just words - which can be changed!

earlecook wrote:Uhu,

Something is always easier when you understand it, the hard part is trying to communicate it to someone who does not.

Are you writing the scenario pictures you are showing?

If so, follow Erik's advice and really study Mod - Battle of Britain (after finishing the game). I put in countless hours doing so (and other scenarios). I also wrote many small scenarios; such as (Variables Explained) to see how the triggers work. Writing scenarios is like everything else in life, you have to crawl on your knees, learn to stand, then walk, before you can run in the Olympic Games.

Regards,
Earle

PS: The Set Trigger State in your picture - is turning off - Secondary VP Failed - so it will no longer function. Using it here is pointless though, it has already activated - Since it has a (1), it will only activate once anyway.
Image
Image
Uhu
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1480
Joined: Fri Nov 04, 2011 9:16 pm
Location: Hungary

Re: Variables Explained

Post by Uhu »

Actually I don not understand, what purpose Set Trigger State has?
In your scn, it is set
- in the Towns triggers, that if it occupied, the player has 1 scn variable
I already not understand, why to include Check town triggers. :) If the counter do not count 3 variables, than it will no victory anyway. Why the negative variables?
It can happen, that the player occupies 2 towns, what sholud be initially a draw. But because the 3rd is not occupied, he get one minus, so it will be a defeat, as he would not occupied 2, just one, or nothing.
But the first question still remains: what connection makes the Set Trigger State between the Towns and Check towns triggers?
Image
Image
Uhu
Colonel - Fallschirmjäger
Colonel - Fallschirmjäger
Posts: 1480
Joined: Fri Nov 04, 2011 9:16 pm
Location: Hungary

Re: Variables Explained

Post by Uhu »

Hmm, I just thinking...maybe it can work the following:
-A have a primary goal (not interesting now). I add let say 2 secondary goals
- I add a secret second goal, which is not viewable among the missions (because it has no title and description)
- I have already a scenario/campaign variable, which is Major Victory-critical (the other, existing ones are not).
- Having this variable fulfills the secret second goal (at the end of the scn).
- I create a trigger, where fulfilling the secret second goal fulfills the other two secondary goals too.

So, at the end, if the player achived
- just the 2 ordinary second goals, it will be just a victory (or whatever it is named, but scn result nr. 4)
- the secret goal, than automatically all other goals too, so it will be scn result nr. 5

The only problem is, that with the automatic fulfilling of the 2 ordinary second goals - if they have such effect - the player gets them too. For example, an additional commander, which he didn't earned.

OR

Another workaround could be, that the "official" secondary goals would be changed to variables. So, the player get the reward, if fulfills these "variable" goals, but it do not count in the endresults. Question is than, that how can these "variable" goals be displayed on the goals table?
Image
Image
earlecook
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 93
Joined: Sat Jan 16, 2016 2:46 am
Location: Cordova, Alaska
Contact:

Re: Variables Explained

Post by earlecook »

My concern is still: is it possible to create major victory with all primary goals, but not all secondary goals achived, when the 5 outcomes are definied, as beyond. I need such a solution, where I can define, which secondary goals make a major victory - still, that not all secondary goals are fulfilled.
The (5) outcomes are hard coded (i Think?) - They cannot be changed. What I would like the Artistocrats to do is add a trigger that will cause the game to exit, so you could do the ending however you would like it to be.

You can however "fool" the ending with the objective triggers.

To get Major Victory you need both Primary and Secondary objectives completed. If I understand correctly; you want to get a Major without all Secondary Objectives achieved. You can do this by your "trigger code".
Objectives.jpg
Objectives.jpg (97.55 KiB) Viewed 6081 times
Not sure if it is a bug, but Check VP Count trigger is not working in my scenario. For some reason when the Primary reaches the end (7), it resets to (0), so the trigger does not work, because it is now (0).

So what I did is this;
Objectives-2.jpg
Objectives-2.jpg (177.16 KiB) Viewed 6081 times
Using Check Unit Count Trigger, when my Victory conditions are satisfied, I closed the game with all Objective triggers completed. I think you can do the same, there are various ways (triggers) to determine outcome. So when you are happy with the result in "Conditions" you set all the Objective triggers to complete in "Effects", both Primary and Secondary to get a Major Victory.

Erik has more experience with this, you might ask him about it.

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

Re: Variables Explained

Post by Uhu »

I did not get it, but I will work on it to understand. Give me some time. ;)

But, I looked on the 1st solution (?), what I got in my last comment. So, I was afraid, that, with the "automatic-all second goals will be fulfilled, if the player has to secret goal fulfilled", the player gets all the benefits of the not-done secondary goals. But maybe not: these benefits are given, only when the player fulfills the criteria (let say shooting down 3 aiplanes) - then he will get a commander AND this secondary goal is fulfilled.
But when I make with the secret goal all other secondary goals to fulfill, with that I do not fulfill the criteria! Just have the second goal fulfilled achivement. So maybe it could still work.

earlecook wrote:
Not sure if it is a bug, but Check VP Count trigger is not working in my scenario. For some reason when the Primary reaches the end (7), it resets to (0), so the trigger does not work, because it is now (0).

So what I did is this;

Using Check Unit Count Trigger, when my Victory conditions are satisfied, I closed the game with all Objective triggers completed. I think you can do the same, there are various ways (triggers) to determine outcome. So when you are happy with the result in "Conditions" you set all the Objective triggers to complete in "Effects", both Primary and Secondary to get a Major Victory.

Erik has more experience with this, you might ask him about it.

Regards,
Earle
Image
Image
earlecook
Senior Corporal - Ju 87G
Senior Corporal - Ju 87G
Posts: 93
Joined: Sat Jan 16, 2016 2:46 am
Location: Cordova, Alaska
Contact:

Re: Variables Explained

Post by earlecook »

Actually I don not understand, what purpose Set Trigger State has?
In your scn, it is set
- in the Towns triggers, that if it occupied, the player has 1 scn variable
I already not understand, why to include Check town triggers. :) If the counter do not count 3 variables, than it will no victory anyway. Why the negative variables?
It can happen, that the player occupies 2 towns, what sholud be initially a draw. But because the 3rd is not occupied, he get one minus, so it will be a defeat, as he would not occupied 2, just one, or nothing.
But the first question still remains: what connection makes the Set Trigger State between the Towns and Check towns triggers?
The above is not correct. I suggest you try the scenario Variables Explained - again. Do what you said above and you will see it gives the correct result.

The Trigger Enabled checks to see if the Truck left the Town after arriving, at the end of the scenario.

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

Re: Variables Explained

Post by Uhu »

Oh, I understand now the logic! I was automatic thinking of hex ownership, that misleaded me.

In the meantime, I created a scn to test my theory about the secondary-secret missions/goals. It works!! :)

earlecook wrote:
Actually I don not understand, what purpose Set Trigger State has?
In your scn, it is set
- in the Towns triggers, that if it occupied, the player has 1 scn variable
I already not understand, why to include Check town triggers. :) If the counter do not count 3 variables, than it will no victory anyway. Why the negative variables?
It can happen, that the player occupies 2 towns, what sholud be initially a draw. But because the 3rd is not occupied, he get one minus, so it will be a defeat, as he would not occupied 2, just one, or nothing.
But the first question still remains: what connection makes the Set Trigger State between the Towns and Check towns triggers?
The above is not correct. I suggest you try the scenario Variables Explained - again. Do what you said above and you will see it gives the correct result.

The Trigger Enabled checks to see if the Truck left the Town after arriving, at the end of the scenario.

Regards,
Earle
Image
Image
Post Reply

Return to “Order of Battle : World War II - Scenario Design”