






Age of Wonders II
is a turn-based strategy game developed by
Triumph Studios

![]() |
![]() |
How Flags and Triggers Work in Shadow Magic v1.2 by Talon-Thorn Flags and triggers work slightly different in Shadow Magic v1.2 than they do in pre-patch 1.2 Shadow Magic and The Wizard's Throne. The difference makes it easier to write scripts using the "Flagged" condition. However, scripts written for pre-patch 1.2 Shadow Magic and The Wizard's Throne scenarios may not work when loaded into Shadow Magic v1.2! The main difference for designers of new scenarios is that the ordering of events which use "Flagged" conditions no longer matters in Shadow Magic v1.2. Scripts built around this bug will no longer work as expected in Shadow Magic v1.2. If you find the following too confusing to understand, just skip to the example at the example. What Has Changed?In the Wizard's Throne and in Shadow Magic, prior to patch 1.2, when a trigger is set off, the flag values are temporarily frozen while the computer evaluates the events triggered by the same trigger-instance. In Shadow Magic with patch 1.2, events are still evaluated in this same way. In addition, prior to patch 1.2, an event with the "Flagged" condition would be evaluated ONLY if the event was ordered in the editor's events-list above any "Control Flag" events that alter that flag's value. With patch 1.2, the flag's value can be changed the event will still be evaluated, even if the event is placed after a "Control Flag" event which alters the "Flagged" condition. This means that, for example, a unit enters an area and sets off an "Enter Area" trigger. Before the computer begins evaluation of the relevant triggers, it records the value of each condition. Thus, for example, the value of Flag 1 is recorded as "true." Next, the computer begins to evaluate each triggered script. During this time, if a script changes the value of Flag 1 to "false," the computer records this new value but continues to use the value of "true" for Flag 1. Note that if a script is encountered that uses Flag 1 as a condition, that script is evaluated by the Shadow Magic v1.2 engine even if the value of Flag 1 has been changed. Once all relevant triggers have been evaluated, the computer sets the value of Flag 1 to "false" and waits for the next trigger-instance to occur. ExampleSee the article A Detailed Explanation On How Triggers Work for the details of how scripts work in The Wizard's Throne and pre-patch 1.2 Shadow Magic. Using the same scripts used in that article, the following shows how the scripts will work with patch 1.2 applied:
Event1: Fire storm, trigger: new turn, condition: flag 1 On day 1 there is a lightning storm followed by a divine storm, and then a death storm (divine storm did not occur in pre-patch 1.2). Day two brings a fire storm, lightning storm, ice storm, and death storm (no death storm in pre-patch 1.2). Day three onward brings alternating fire-ice storms and fire-lightning-ice-death storms (pre-patch 1.2 had no death storms). Here is what is happening: Day 1: Day 2: Day 3: ![]() |
Headlines » AoW1 Summer 2008 Mapmaking Tournament » A new PBEM Singles Champion is crowned - Swolte!! Poll Age of Wonders Looking for info about the original AoW? HeavenGames Sites » Caesar 3 » Caesar 4 » Pharaoh » Zeus |
|
Age of Wonders II™ is a game by Triumph Studios and published by Gathering of Developers. Age of Wonders II Heaven Copyright © 1997-2004 HeavenGames LLC. All Rights Reserved. Written permission is required if you want to use any materials published on this website for use on your own website, in its original form, or translated into other languages. |