|
Scenario Design
Scripting Manual
SHADOW MAGIC SCRIPTING
Events Manual
by Talon-Thorn
|
List of Events
|
|
|
|
|
|
* New event ** Old event no longer available (but see
notes)
|
|
|
Center View
|
|
|
|
|
|
DESCRIPTION: Centers the player's view on the specified map location.
|
|
|
|
|
|
ACTIVATE: Once, Once a Player, Always
|
|
|
|
|
|
SETTINGS:
|
|
|
|
|
| |
Players
|
|
|
|
| |
|
List of players affected by event.
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values : one or more players, trigger player, independents
|
|
| |
XYL
|
|
|
|
| |
|
Location on map.
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values : valid (X, Y, Level) coordinates (including map border)
|
|
|
NOTES:
|
|
|
|
|
| |
-
|
Though you can include "independents" in the list of players, it serves no practical purpose for this event.
|
|
|
Return to the Top
|
Change Terrain
|
|
|
|
|
|
DESCRIPTION: Changes the terrain at a specified location to a specified terrain type.
|
|
|
|
|
|
ACTIVATE: Once, Once a Player, Always
|
|
|
|
|
|
SETTINGS:
|
|
|
|
|
| |
XYL
|
|
|
|
| |
|
Location on map.
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values : valid (X, Y, Level) coordinates (not including map border)
|
|
| |
Terrain Type
|
|
|
|
| |
|
Type of terrain to change to.
|
|
|
| |
|
Required : Yes
|
|
|
| |
|
Valid Values :
|
|
|
| |
|
ttGrass, ttDesert, ttSnow, ttSteppe, ttWaste, ttSwamp, ttBeach, ttDirt, ttShadowLand
|
|
|
| |
|
- |
changes terrain to specified type |
|
| |
|
- |
tiles in the target area are changed to corresponding tile of the new terrain type. |
|
| |
|
- |
does not kill units, destroy structures, nor remove mountains. |
|
| |
|
|
Exceptions: mountains will be changed to the designated terrain type only
if the majority of the hexagons of the mountain are affected; in this case, swamp will remove the mountains since swamp has no mountain tiles. Subsequently changing back from swamp will not bring
back mountains. |
|
| |
|
- |
will remove earth, rock, shadow void, and cavern wall tiles. |
|
| |
|
ttWater, ttIce, ttLava, ttShadowWater |
|
|
| |
|
- |
changes terrain to specified type only where elevation is "zero"
|
|
| |
|
|
Exceptions: for surface and shadow level, cavern wall tiles, earth, and rock will be removed and the hexagon will change to the specified terrain -- even though
these tiles are at the highest elevation. For the underground level, all target hexagons are changed regardless of elevation and terrain occupying the hexagon.
|
|
| |
|
- |
roads will change to bridges IF the terrain to either side is not one of these terrain types, is not changed, or has elevation greater than "zero".
|
|
| |
|
-
|
any units on a hexagon that is changed will die unless they can walk on the terrain type or can float or fly.
|
|
| |
|
-
|
any structure at elevation zero will be destroyed.
|
|
| |
|
|
Exception: for the underground level, all structures are destroyed regardless of elevation.
|
|
| |
|
ttEarth, ttRock, ttShadowVoid
|
|
|
| |
|
-
|
changes terrain to specified type, destroying any structure and killing any unit in the affected hexagons.
|
|
| |
|
-
|
structures are destroyed even if only one hexagon they occupy is affected.
|
|
| |
|
-
|
terrain elevation is raised to the maximum height (regardless of adjacent terrain) by ttEarth and ttRock; surrounding elevation is affected only if it is not volcanic, water (shadow or surface),
nor ice.
|
|
| |
|
-
|
ttEarth and ttRock will not work on any hexagon containing a treasure item on the ground.
|
|
| |
Radius
|
|
|
|
| |
|
Radius distance in hexagons around the target location (where zero is the target hexagon only).
|
|
|
| |
|
|
Required : No (default zero, or target hexagon only)
|
|
| |
|
|
Valid Values : Positive number
|
|
|
NOTES:
|
|
|
|
|
| |
-
|
Though ttBorder is listed in the values list for terrain type, it can not be selected.
|
|
|
| |
-
|
Units do not get shadow sickness from being on shadow tiles when on the surface.
|
|
|
| |
-
|
Interestingly, rock, earth, and shadow water terrain can be placed on the surface using this event (they can not be placed on the surface using the editor).
|
|
|
Return to the Top
|
Control Flag
|
|
|
|
|
|
DESCRIPTION: Sets the value of an internal flag variable.
|
|
|
|
|
|
ACTIVATE: Once, Once a Player, Always
|
|
|
|
|
|
SETTINGS:
|
|
|
|
|
| |
FlagID
|
|
|
|
| |
|
User-defined value for identifying flag variable.
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values : positive number
|
|
| |
Active
|
|
|
|
| |
|
Value to be assigned to flag variable.
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values : True, False
|
|
|
NOTES:
|
|
|
|
|
| |
-
|
Do not confuse this event with flags on structures and cities. This is purely a programming tool for keeping track of things.
|
|
|
| |
-
|
See article, How Shadow Magic v1.2+ Flags Work with Triggers.
|
|
|
Return to the Top
|
Control Counter
|
|
|
|
|
|
DESCRIPTION: Allows script writer to control the workings of a numeric variable which can be used to keep track of a count and can serve as a trigger to set off other
events (see conditions: counter).
|
|
|
|
|
|
ACTIVATE: Once, Once a Player, Always
|
|
|
|
|
|
SETTINGS:
|
|
|
|
|
| |
CounterID
|
|
|
|
| |
|
The user-specified ID assigned to the counter.
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values : positive (non-zero) number.
|
|
| |
Mode
|
|
|
|
| |
|
Add to (+/-) or Set the counter's value.
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values :
|
|
| |
|
|
ccmAdd - add the Value amount (+/-) to the counter
|
|
| |
|
|
ccmSet - set the counter to the amount specified by Value
|
|
| |
Value
|
|
|
|
| |
|
Value amount to change the counter by.
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values : numeric value.
|
|
|
NOTES:
|
|
|
|
|
| |
-
|
Each counter is initialized to zero.
|
|
|
Return to the Top
|
Control Player
Relation
|
|
|
|
|
|
DESCRIPTION: Player relations can be adjusted using this event.
|
|
|
|
|
|
ACTIVATE: Once, Once a Player, Always
|
|
|
|
|
|
SETTINGS:
|
|
|
|
|
| |
PlayerFrom
|
|
|
|
| |
|
The player whom the relation change is from
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values : one player, trigger player
|
|
| |
PlayerTo
|
|
|
|
| |
|
The player whom the relation change is to
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values : one player, trigger player
|
|
| |
Modifier
|
|
|
|
| |
|
Value amount to change the relation by.
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values : numeric value (+/-).
|
|
|
NOTES:
|
|
|
|
|
|
|
-
|
Relations between every two players run on a scale of 0 to 100.
|
|
|
|
|
-
|
This event is useful only for changing the relation between AI players or between a human and AI player.
|
|
|
Return to the Top
|
Control Race
Relation
|
|
|
|
|
|
DESCRIPTION: Player relations can be adjusted using this event.
|
|
|
|
|
|
ACTIVATE: Once, Once a Player, Always
|
|
|
|
|
|
SETTINGS:
|
|
|
|
|
| |
Modifier
|
|
|
|
| |
|
Value amount to change the relation.
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values : numeric value (+/-).
|
|
| |
Race
|
|
|
|
| |
|
Race for which the relations is changed.
|
|
|
| |
|
|
Required : Yes
|
|
|
|
Players
|
|
|
|
|
|
|
List of players affected by event.
|
|
|
|
|
|
|
Required : Yes
|
|
|
|
|
|
Valid Values : one or more players, trigger player, independents
|
|
| |
Reason
|
|
|
|
| |
|
Text reason for the change.
|
|
|
| |
|
|
Required : No
|
|
|
NOTES:
|
|
|
|
|
|
|
-
|
Relations between each player and race runs on a scale of 0 to 100.
|
|
|
Return to the Top
|
Diplomatic
Action
|
|
|
|
|
|
DESCRIPTION: Evokes a diplomatic action between players.
|
|
|
|
|
|
ACTIVATE: Once, Once a Player, Always
|
|
|
|
|
|
SETTINGS:
|
|
|
|
|
| |
PlayerFrom
|
|
|
|
| |
|
Player from whom the diplomatic action originates.
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values : Single player, trigger player
|
|
| |
PlayerTo
|
|
|
|
| |
|
Player to whom diplomatic action is sent.
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values : Single player, trigger player
|
|
| |
Action
|
|
|
|
| |
|
Required : Yes
|
|
|
| |
|
Valid Values : Pre-defined diplomatic action (see below).
|
|
|
| |
|
eaSendMessage
|
|
|
| |
|
-
|
Sends a message from PlayerFrom to PlayerTo
|
|
| |
|
eaOfferPeace
|
|
|
| |
|
-
|
PlayerFrom negotiates for peace with PlayerTo
|
|
| |
|
-
|
If PlayerFrom and PlayerTo are already at peace or allied, this event will not occur.
|
|
| |
|
eaDeclareWar
|
|
|
| |
|
-
|
PlayerFrom declares war with PlayerTo
|
|
| |
|
-
|
If PlayerFrom and PlayerTo are already at war, this event will not occur.
|
|
| |
|
eaProposeAlliance
|
|
|
| |
|
-
|
PlayerFrom negotiates an alliance with PlayerTo
|
|
| |
|
-
|
If PlayerFrom and PlayerTo are already allied, this event will not occur.
|
|
| |
Message
|
|
|
|
| |
|
User-defined text message.
|
|
|
| |
|
|
Required : No
|
|
| |
|
|
Valid Values : User-defined text message.
|
|
| |
|
Message text is sent only for Actions of type eaSendMssage and eaDeclareWar. There is no place for the message to appear for the eaOfferPeace and eaProposeAlliance
actions.
|
|
|
|
NOTES:
|
|
|
|
|
|
-
|
With this event a player can go from War to Alliance in one step.
|
|
|
|
|
-
|
The two players do not have to be in contact for this event to occur.
|
|
|
|
|
-
|
Event puts a message in the affected players' message logs.
|
|
|
|
|
-
|
PlayerFrom has no control over the event.
|
|
|
|
|
-
|
Works the same for human and AI players.
|
|
|
|
|
-
|
Event will not occur if players are already in a diplomatic state agreeable to the event. (Peace offer does not occur if already at peace or allied, etc.)
|
|
|
|
Return to the Top
|
Explore
Area
|
|
|
|
|
|
DESCRIPTION: "Explores" the target area (does not clear the fog of war, but reveals the land and structures; can not see units).
|
|
|
|
|
|
ACTIVATE: Once, Once a Player, Always
|
|
|
|
|
|
SETTINGS:
|
|
|
|
|
| |
Players
|
|
|
|
| |
|
List of players to which the event applies.
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values : One or more players, trigger player, independents
|
|
| |
Radius
|
|
|
|
| |
|
Radius distance in hexagons around the target location (where zero is the target hexagon only).
|
|
|
| |
|
|
Required : No (default zero, or target hexagon only)
|
|
| |
|
|
Valid Values : Positive number
|
|
| |
XYL
|
|
|
|
| |
|
A location on the map.
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values : Valid (X, Y, Level) coordinates
|
|
Return to the Top
|
Flag
Structure
|
|
|
|
|
|
DESCRIPTION: Specified structure is flagged as owned by the specified player.
|
|
|
|
|
|
ACTIVATE: Once, Once a Player, Always
|
|
|
|
|
|
SETTINGS:
|
|
|
|
|
| |
StructureID
|
|
|
|
| |
|
ID number of structure.
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values : ID of any city, tower, node, or resource site on the map
|
|
| |
Player
|
|
|
|
| |
|
Player to which the event applies.
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values : One player, trigger player, independents
|
|
|
NOTES:
|
|
|
|
|
|
-
|
Works only on cities, towers, and income structures.
|
|
|
|
Return to the Top
|
Gold
Reward
|
|
|
|
|
|
DESCRIPTION: Gives (or takes from) the player a random amount of gold.
|
|
|
|
|
|
ACTIVATE: Once, Once a Player, Always
|
|
|
|
|
|
SETTINGS:
|
|
|
|
|
| |
Players
|
|
|
|
| |
|
List of players affected by this event.
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values : One or more players, trigger player, independents
|
|
| |
GoldMin
|
|
|
|
| |
|
Minimum amount of gold to be rewarded.
|
|
|
| |
|
|
Required : Yes
|
|
| |
|
|
Valid Values : Number
|
|
| |
GoldMax
|
|
|
|
| |
|
Maximum amount of gold to be rewarded.
|
|
|
| |
|
|
Required : No (see notes)
|
|
| |
|
|
Valid Values : Number
|
|
|
NOTES:
|
|
|
|
|
|
-
|
No message is sent to player and no notification is given of this event's occurrence.
|
|
|
|
|
-
|
If MaxGold is less than GoldMin, GoldMin is the amount given to the player.
|
|
|
|
|
-
|
Despite the name of this event, a negative value takes gold from the player, even if it makes the player's reserve negative!
|
|
|
|
Return to the Top
|
Hero Join
|
|
|
|
|
|
|
DESCRIPTION: A hero and his companions offer to join the player's cause.
|
|
|
|
|
|
|
ACTIVATE: Once
|
|
|
|
|
|
|
SETTINGS:
|
|
|
|
|
|
| |
Player
|
|
|
|
|
| |
|
Player to whom the offer is made.
|
|
|
|
| |
|
|
Required : Yes
|
|
|
| |
|
|
Valid Values : single player, trigger player
|
|
|
| |
HeroID
|
|
|
|
|
| |
|
ID number of hero.
|
|
|
|
| |
|
|
Required : Yes
|
|
|
| |
|
|
Valid Values : Valid hero ID number
|
|
|
| |
Compagnions [sic]
|
|
|
|
|
| |
|
Random list of companions that can spawn with the hero.
|
|
|
|
| |
|
User can specify several sets of units; one of the sets is randomly selected.
|
|
|
|
| |
|
|
Required : No
|
|
|
| |
|
|
Valid Values : zero or more sets of zero or more units
|
|
|
| |
Message
|
|
|
|
|
| |
|
Text message sent to the player.
|
|
|
|
| |
|
|
| |