mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-11 00:36:22 +00:00
Add documentation for all but two of the utility macros.
Put all documentation comments in a standard form that can be mechanically extracted. Move some macsos to the deprecated.cfg file.
This commit is contained in:
parent
a594e4bdd9
commit
b704c056f4
@ -1,7 +1,9 @@
|
|||||||
# Macros for setting animations.
|
# Macros for setting animations.
|
||||||
# These don't rely on any other macros. Please don't change this.
|
# These don't rely on any other macros. Please don't change this.
|
||||||
|
|
||||||
#define DEFENSE_ANIM FRAME BASEFRAME HITSOUND
|
#define DEFENSE_ANIM REACTION BASEFRAME HITSOUND
|
||||||
|
# Define a defensive animation moving from a specified BASEFRAME
|
||||||
|
# to REACTION, with HITSOUND playing only if a hit occurs.
|
||||||
[defend]
|
[defend]
|
||||||
start_time=-126
|
start_time=-126
|
||||||
[frame]
|
[frame]
|
||||||
@ -10,13 +12,13 @@
|
|||||||
[/frame]
|
[/frame]
|
||||||
[frame]
|
[frame]
|
||||||
duration=100
|
duration=100
|
||||||
image={FRAME}
|
image={REACTION}
|
||||||
[/frame]
|
[/frame]
|
||||||
[if]
|
[if]
|
||||||
hits=hit
|
hits=hit
|
||||||
[frame]
|
[frame]
|
||||||
duration=150
|
duration=150
|
||||||
image={FRAME}
|
image={REACTION}
|
||||||
sound={HITSOUND}
|
sound={HITSOUND}
|
||||||
[/frame]
|
[/frame]
|
||||||
[/if]
|
[/if]
|
||||||
@ -24,7 +26,7 @@
|
|||||||
hits=miss,kill
|
hits=miss,kill
|
||||||
[frame]
|
[frame]
|
||||||
duration=150
|
duration=150
|
||||||
image={FRAME}
|
image={REACTION}
|
||||||
[/frame]
|
[/frame]
|
||||||
[/else]
|
[/else]
|
||||||
[frame]
|
[frame]
|
||||||
@ -35,7 +37,10 @@
|
|||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
|
||||||
#define DEFENSE_ANIM_FILTERED FRAME BASEFRAME HITSOUND FILTER
|
#define DEFENSE_ANIM_FILTERED REACTION BASEFRAME HITSOUND FILTER
|
||||||
|
# Define a defensive animation moving from a specified BASEFRAME
|
||||||
|
# to REACTION, with HITSOUND playing only if a hit occurs. This
|
||||||
|
# fires only if FILTER is matched.
|
||||||
[defend]
|
[defend]
|
||||||
start_time=-126
|
start_time=-126
|
||||||
{FILTER}
|
{FILTER}
|
||||||
@ -45,13 +50,13 @@
|
|||||||
[/frame]
|
[/frame]
|
||||||
[frame]
|
[frame]
|
||||||
duration=100
|
duration=100
|
||||||
image={FRAME}
|
image={REACTION}
|
||||||
[/frame]
|
[/frame]
|
||||||
[if]
|
[if]
|
||||||
hits=hit
|
hits=hit
|
||||||
[frame]
|
[frame]
|
||||||
duration=150
|
duration=150
|
||||||
image={FRAME}
|
image={REACTION}
|
||||||
sound={HITSOUND}
|
sound={HITSOUND}
|
||||||
[/frame]
|
[/frame]
|
||||||
[/if]
|
[/if]
|
||||||
@ -59,7 +64,7 @@
|
|||||||
hits=miss,kill
|
hits=miss,kill
|
||||||
[frame]
|
[frame]
|
||||||
duration=150
|
duration=150
|
||||||
image={FRAME}
|
image={REACTION}
|
||||||
[/frame]
|
[/frame]
|
||||||
[/else]
|
[/else]
|
||||||
[frame]
|
[frame]
|
||||||
@ -70,7 +75,10 @@
|
|||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
|
||||||
#define DEFENSE_ANIM_RANGE FRAME BASEFRAME HITSOUND RANGE
|
#define DEFENSE_ANIM_RANGE REACTION BASEFRAME HITSOUND RANGE
|
||||||
|
# Define a defensive animation moving from a specified BASEFRAME
|
||||||
|
# to REACTION, with HITSOUND playing only if a hit occurs. This
|
||||||
|
# fires only on the class of attacks specified by RANGE.
|
||||||
[defend]
|
[defend]
|
||||||
start_time=-126
|
start_time=-126
|
||||||
[attack_filter]
|
[attack_filter]
|
||||||
@ -82,13 +90,13 @@
|
|||||||
[/frame]
|
[/frame]
|
||||||
[frame]
|
[frame]
|
||||||
duration=100
|
duration=100
|
||||||
image={FRAME}
|
image={REACTION}
|
||||||
[/frame]
|
[/frame]
|
||||||
[if]
|
[if]
|
||||||
hits=hit
|
hits=hit
|
||||||
[frame]
|
[frame]
|
||||||
duration=150
|
duration=150
|
||||||
image={FRAME}
|
image={REACTION}
|
||||||
sound={HITSOUND}
|
sound={HITSOUND}
|
||||||
[/frame]
|
[/frame]
|
||||||
[/if]
|
[/if]
|
||||||
@ -96,7 +104,7 @@
|
|||||||
hits=miss,kill
|
hits=miss,kill
|
||||||
[frame]
|
[frame]
|
||||||
duration=150
|
duration=150
|
||||||
image={FRAME}
|
image={RANGE}
|
||||||
[/frame]
|
[/frame]
|
||||||
[/else]
|
[/else]
|
||||||
[frame]
|
[frame]
|
||||||
@ -107,7 +115,11 @@
|
|||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
|
||||||
#define DEFENSE_ANIM_ELVEN_FILTERED FRAME BASEFRAME HITSOUND FILTER
|
#define DEFENSE_ANIM_ELVEN_FILTERED REACTION BASEFRAME HITSOUND FILTER
|
||||||
|
# Define a defensive animation moving from a specified BASEFRAME
|
||||||
|
# to REACTION, with HITSOUND playing only if a hit occurs and an
|
||||||
|
# elven halo waxing and waning during the animation. This fires
|
||||||
|
# only if FILTER is matched.
|
||||||
[defend]
|
[defend]
|
||||||
{FILTER}
|
{FILTER}
|
||||||
[frame]
|
[frame]
|
||||||
@ -125,13 +137,13 @@
|
|||||||
[frame]
|
[frame]
|
||||||
begin=-125
|
begin=-125
|
||||||
end=-75
|
end=-75
|
||||||
image={FRAME}
|
image={REACTION}
|
||||||
halo=halo/elven/elven-shield-halo-60pct.png
|
halo=halo/elven/elven-shield-halo-60pct.png
|
||||||
[/frame]
|
[/frame]
|
||||||
[frame]
|
[frame]
|
||||||
begin=-75
|
begin=-75
|
||||||
end=-25
|
end=-25
|
||||||
image={FRAME}
|
image={REACTION}
|
||||||
halo=halo/elven/elven-shield-halo-80pct.png
|
halo=halo/elven/elven-shield-halo-80pct.png
|
||||||
[/frame]
|
[/frame]
|
||||||
[if]
|
[if]
|
||||||
@ -139,7 +151,7 @@
|
|||||||
[frame]
|
[frame]
|
||||||
begin=-25
|
begin=-25
|
||||||
end=75
|
end=75
|
||||||
image={FRAME}
|
image={REACTION}
|
||||||
sound={HITSOUND}
|
sound={HITSOUND}
|
||||||
halo=halo/elven/elven-shield-halo-100pct.png
|
halo=halo/elven/elven-shield-halo-100pct.png
|
||||||
[/frame]
|
[/frame]
|
||||||
@ -149,14 +161,14 @@
|
|||||||
[frame]
|
[frame]
|
||||||
begin=-25
|
begin=-25
|
||||||
end=75
|
end=75
|
||||||
image={FRAME}
|
image={REACTION}
|
||||||
halo=halo/elven/elven-shield-halo-100pct.png
|
halo=halo/elven/elven-shield-halo-100pct.png
|
||||||
[/frame]
|
[/frame]
|
||||||
[/else]
|
[/else]
|
||||||
[frame]
|
[frame]
|
||||||
begin=75
|
begin=75
|
||||||
end=125
|
end=125
|
||||||
image={FRAME}
|
image={REACTION}
|
||||||
halo=halo/elven/elven-shield-halo-80pct.png
|
halo=halo/elven/elven-shield-halo-80pct.png
|
||||||
[/frame]
|
[/frame]
|
||||||
[frame]
|
[frame]
|
||||||
@ -180,224 +192,12 @@
|
|||||||
[/defend]
|
[/defend]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# These are included for backwards-compatibility mainly; they aren't and
|
|
||||||
# shouldn't be used for mainline units.
|
|
||||||
|
|
||||||
#define MISSILE_FRAME_WAIL
|
|
||||||
[if]
|
|
||||||
direction=n,ne,nw
|
|
||||||
|
|
||||||
[missile_frame]
|
|
||||||
begin=-300
|
|
||||||
end=-230
|
|
||||||
image="projectiles/wailprojectile-n-1.png"
|
|
||||||
image_diagonal="projectiles/wailprojectile-ne-1.png"
|
|
||||||
[/missile_frame]
|
|
||||||
[missile_frame]
|
|
||||||
begin=-230
|
|
||||||
end=-160
|
|
||||||
image="projectiles/wailprojectile-n-2.png"
|
|
||||||
image_diagonal="projectiles/wailprojectile-ne-2.png"
|
|
||||||
[/missile_frame]
|
|
||||||
[missile_frame]
|
|
||||||
begin=-160
|
|
||||||
end=0
|
|
||||||
image="projectiles/wailprojectile-n-3.png"
|
|
||||||
image_diagonal="projectiles/wailprojectile-ne-3.png"
|
|
||||||
[/missile_frame]
|
|
||||||
[missile_frame]
|
|
||||||
begin=0
|
|
||||||
end=40
|
|
||||||
image="projectiles/wailprojectile-n-4.png"
|
|
||||||
image_diagonal="projectiles/wailprojectile-ne-4.png"
|
|
||||||
[/missile_frame]
|
|
||||||
[missile_frame]
|
|
||||||
begin=40
|
|
||||||
end=80
|
|
||||||
image="projectiles/wailprojectile-n-5.png"
|
|
||||||
image_diagonal="projectiles/wailprojectile-ne-5.png"
|
|
||||||
[/missile_frame]
|
|
||||||
[missile_frame]
|
|
||||||
begin=80
|
|
||||||
end=120
|
|
||||||
image="projectiles/wailprojectile-n-6.png"
|
|
||||||
image_diagonal="projectiles/wailprojectile-ne-6.png"
|
|
||||||
[/missile_frame]
|
|
||||||
[/if]
|
|
||||||
[else]
|
|
||||||
direction=s,se,sw
|
|
||||||
### The price of asymmetrical projectiles - here, we use a conditional because the game automatically flips the images for the south frame. We have a separate set of images for the south part, which are not only flipped vertically, but also have their angle corrected for the sw direction.
|
|
||||||
|
|
||||||
[missile_frame]
|
|
||||||
begin=-300
|
|
||||||
end=-230
|
|
||||||
image="projectiles/wailprojectile-s-1.png"
|
|
||||||
image_diagonal="projectiles/wailprojectile-se-1.png"
|
|
||||||
[/missile_frame]
|
|
||||||
[missile_frame]
|
|
||||||
begin=-230
|
|
||||||
end=-160
|
|
||||||
image="projectiles/wailprojectile-s-2.png"
|
|
||||||
image_diagonal="projectiles/wailprojectile-se-2.png"
|
|
||||||
[/missile_frame]
|
|
||||||
[missile_frame]
|
|
||||||
begin=-160
|
|
||||||
end=0
|
|
||||||
image="projectiles/wailprojectile-s-3.png"
|
|
||||||
image_diagonal="projectiles/wailprojectile-se-3.png"
|
|
||||||
[/missile_frame]
|
|
||||||
[missile_frame]
|
|
||||||
begin=0
|
|
||||||
end=40
|
|
||||||
image="projectiles/wailprojectile-s-4.png"
|
|
||||||
image_diagonal="projectiles/wailprojectile-se-4.png"
|
|
||||||
[/missile_frame]
|
|
||||||
[missile_frame]
|
|
||||||
begin=40
|
|
||||||
end=80
|
|
||||||
image="projectiles/wailprojectile-s-5.png"
|
|
||||||
image_diagonal="projectiles/wailprojectile-se-5.png"
|
|
||||||
[/missile_frame]
|
|
||||||
[missile_frame]
|
|
||||||
begin=80
|
|
||||||
end=120
|
|
||||||
image="projectiles/wailprojectile-s-6.png"
|
|
||||||
image_diagonal="projectiles/wailprojectile-se-6.png"
|
|
||||||
[/missile_frame]
|
|
||||||
[/else]
|
|
||||||
#enddef
|
|
||||||
|
|
||||||
#define MISSILE_FRAME_FIRE_BREATH N_OFFSET S_OFFSET N_DIAGONAL_OFFSET S_DIAGONAL_OFFSET
|
|
||||||
[if]
|
|
||||||
direction=n
|
|
||||||
|
|
||||||
[missile_frame]
|
|
||||||
begin=-400
|
|
||||||
end=100
|
|
||||||
halo=projectiles/fire-breath-n-1.png:80,projectiles/fire-breath-n-2.png:80,projectiles/fire-breath-n-3.png:80,projectiles/fire-breath-n-4.png:80,projectiles/fire-breath-n-5.png:80
|
|
||||||
halo_x,halo_y={N_OFFSET}
|
|
||||||
[/missile_frame]
|
|
||||||
[/if]
|
|
||||||
[else]
|
|
||||||
direction=s
|
|
||||||
|
|
||||||
[missile_frame]
|
|
||||||
begin=-400
|
|
||||||
end=100
|
|
||||||
halo=projectiles/fire-breath-s-1.png:80,projectiles/fire-breath-s-2.png:80,projectiles/fire-breath-s-3.png:80,projectiles/fire-breath-s-4.png:80,projectiles/fire-breath-s-5.png:80
|
|
||||||
halo_x,halo_y={S_OFFSET}
|
|
||||||
[/missile_frame]
|
|
||||||
[/else]
|
|
||||||
[else]
|
|
||||||
direction=ne,nw
|
|
||||||
|
|
||||||
[missile_frame]
|
|
||||||
begin=-400
|
|
||||||
end=100
|
|
||||||
halo=projectiles/fire-breath-ne-1.png:80,projectiles/fire-breath-ne-2.png:80,projectiles/fire-breath-ne-3.png:80,projectiles/fire-breath-ne-4.png:80,projectiles/fire-breath-ne-5.png:80
|
|
||||||
halo_x,halo_y={N_DIAGONAL_OFFSET}
|
|
||||||
[/missile_frame]
|
|
||||||
[/else]
|
|
||||||
[else]
|
|
||||||
direction=se,sw
|
|
||||||
|
|
||||||
[missile_frame]
|
|
||||||
begin=-400
|
|
||||||
end=100
|
|
||||||
halo=projectiles/fire-breath-se-1.png:80,projectiles/fire-breath-se-2.png:80,projectiles/fire-breath-se-3.png:80,projectiles/fire-breath-se-4.png:80,projectiles/fire-breath-se-5.png:80
|
|
||||||
halo_x,halo_y={S_DIAGONAL_OFFSET}
|
|
||||||
[/missile_frame]
|
|
||||||
[/else]
|
|
||||||
#enddef
|
|
||||||
|
|
||||||
#define MISSILE_FRAME_FAERIE_FIRE
|
|
||||||
[missile_frame]
|
|
||||||
begin=-500
|
|
||||||
end=-350
|
|
||||||
image="projectiles/icemissile-n-1.png"
|
|
||||||
image_diagonal="projectiles/icemissile-ne-1.png"
|
|
||||||
halo=halo/elven/ice-halo1.png:100,halo/elven/ice-halo2.png:100,halo/elven/ice-halo3.png:25
|
|
||||||
halo_x,halo_y=0,0
|
|
||||||
[/missile_frame]
|
|
||||||
[missile_frame]
|
|
||||||
begin=-350
|
|
||||||
end=-200
|
|
||||||
image="projectiles/icemissile-n-2.png"
|
|
||||||
image_diagonal="projectiles/icemissile-ne-2.png"
|
|
||||||
halo=halo/elven/ice-halo3.png:75,halo/elven/ice-halo4.png:75
|
|
||||||
halo_x,halo_y=0,0
|
|
||||||
[/missile_frame]
|
|
||||||
[missile_frame]
|
|
||||||
begin=-200
|
|
||||||
end=-50
|
|
||||||
image="projectiles/icemissile-n-3.png"
|
|
||||||
image_diagonal="projectiles/icemissile-ne-3.png"
|
|
||||||
halo=halo/elven/ice-halo5.png:100,halo/elven/ice-halo1.png:100,halo/elven/ice-halo2.png:50
|
|
||||||
halo_x,halo_y=0,0
|
|
||||||
[/missile_frame]
|
|
||||||
[missile_frame]
|
|
||||||
begin=-50
|
|
||||||
end=0
|
|
||||||
image="projectiles/icemissile-n-4.png"
|
|
||||||
image_diagonal="projectiles/icemissile-ne-4.png"
|
|
||||||
halo=halo/elven/ice-halo6.png
|
|
||||||
halo_x,halo_y=0,0
|
|
||||||
[/missile_frame]
|
|
||||||
[missile_frame]
|
|
||||||
begin=25
|
|
||||||
end=75
|
|
||||||
image="projectiles/icemissile-n-5.png"
|
|
||||||
image_diagonal="projectiles/icemissile-ne-5.png"
|
|
||||||
halo=halo/elven/ice-halo7.png
|
|
||||||
halo_x,halo_y=0,0
|
|
||||||
[/missile_frame]
|
|
||||||
[missile_frame]
|
|
||||||
begin=75
|
|
||||||
end=125
|
|
||||||
image="projectiles/icemissile-n-6.png"
|
|
||||||
image_diagonal="projectiles/icemissile-ne-6.png"
|
|
||||||
halo=halo/elven/ice-halo8.png
|
|
||||||
halo_x,halo_y=0,0
|
|
||||||
[/missile_frame]
|
|
||||||
[missile_frame]
|
|
||||||
begin=125
|
|
||||||
end=175
|
|
||||||
image="projectiles/icemissile-n-7.png"
|
|
||||||
image_diagonal="projectiles/icemissile-ne-7.png"
|
|
||||||
halo=halo/elven/ice-halo9.png
|
|
||||||
halo_x,halo_y=0,0
|
|
||||||
[/missile_frame]
|
|
||||||
#enddef
|
|
||||||
|
|
||||||
#define MISSILE_FRAME_FIREBALL
|
|
||||||
[missile_frame]
|
|
||||||
begin=-220
|
|
||||||
end=-100
|
|
||||||
image="projectiles/fireball-n-2.png"
|
|
||||||
image_diagonal="projectiles/fireball-nw-2.png"
|
|
||||||
[/missile_frame]
|
|
||||||
[missile_frame]
|
|
||||||
begin=-100
|
|
||||||
end=25
|
|
||||||
image="projectiles/fireball-n.png"
|
|
||||||
image_diagonal="projectiles/fireball-nw.png"
|
|
||||||
[/missile_frame]
|
|
||||||
[missile_frame]
|
|
||||||
begin=25
|
|
||||||
end=80
|
|
||||||
image="projectiles/fireball-n-2.png"
|
|
||||||
image_diagonal="projectiles/fireball-nw-2.png"
|
|
||||||
[/missile_frame]
|
|
||||||
#enddef
|
|
||||||
|
|
||||||
|
|
||||||
# this macro is called on top of every idle animation,
|
# this macro is called on top of every idle animation,
|
||||||
# to provide a standard set of conditions to play the idle animation
|
# to provide a standard set of conditions to play the idle animation
|
||||||
|
|
||||||
#define STANDARD_IDLE_FILTER
|
#define STANDARD_IDLE_FILTER
|
||||||
# Poisoned units should have no idle animation
|
# Poisoned units should have no idle animation. This macro defines a
|
||||||
|
# filter that excludes them.
|
||||||
[unit_filter]
|
[unit_filter]
|
||||||
[not]
|
[not]
|
||||||
[wml_filter]
|
[wml_filter]
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
# Conditionals for MP scenarios.
|
# Conditionals for MP scenarios.
|
||||||
# These don't depend on any other macros.
|
# These don't depend on any other macros.
|
||||||
|
|
||||||
# Condition triggering if PLAYER has at least one unit left.
|
|
||||||
|
#define IF_ALIVE PLAYER ACTION
|
||||||
|
# Condition triggering of ACTION om whether PLAYER has at least one unit left.
|
||||||
# For example, if the player 2 is still alive, kill all his units.
|
# For example, if the player 2 is still alive, kill all his units.
|
||||||
# {IF_ALIVE 2 (
|
# {IF_ALIVE 2 (
|
||||||
# [kill]
|
# [kill]
|
||||||
# side=2
|
# side=2
|
||||||
# [/kill]
|
# [/kill]
|
||||||
# )}
|
# )}
|
||||||
|
|
||||||
#define IF_ALIVE PLAYER ACTION
|
|
||||||
[if]
|
[if]
|
||||||
[have_unit]
|
[have_unit]
|
||||||
side={PLAYER}
|
side={PLAYER}
|
||||||
@ -20,7 +20,9 @@
|
|||||||
[/if]
|
[/if]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
# Condition triggering if PLAYER has no units left.
|
|
||||||
|
#define IF_DEAD PLAYER ACTION
|
||||||
|
# Condition triggering of ACTION on whether PLAYER has no units left.
|
||||||
# For example, give player 2 gold if player 1 is dead
|
# For example, give player 2 gold if player 1 is dead
|
||||||
# {IF_DEAD 1 (
|
# {IF_DEAD 1 (
|
||||||
# [gold]
|
# [gold]
|
||||||
@ -28,8 +30,6 @@
|
|||||||
# amount=25
|
# amount=25
|
||||||
# [/gold]
|
# [/gold]
|
||||||
# )}
|
# )}
|
||||||
|
|
||||||
#define IF_DEAD PLAYER ACTION
|
|
||||||
[if]
|
[if]
|
||||||
[have_unit]
|
[have_unit]
|
||||||
side={PLAYER}
|
side={PLAYER}
|
||||||
@ -42,8 +42,10 @@
|
|||||||
[/if]
|
[/if]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
#define IF_ALLIED PLAYER1 PLAYER2 ACTION
|
||||||
# Condition that triggers if PLAYER1 and PLAYER2 belong to the same team.
|
# Condition that triggers if PLAYER1 and PLAYER2 belong to the same team.
|
||||||
# NOTE: only works if leaders are alive, are the same leader as the game started and haven't changed teams.
|
# NOTE: only works if leaders are alive, are the same leader as the game
|
||||||
|
# started and haven't changed teams.
|
||||||
# For example, if player 3 and 4 is allied, steal 10 gold from each:
|
# For example, if player 3 and 4 is allied, steal 10 gold from each:
|
||||||
# {IF_ALLIED 3 4 (
|
# {IF_ALLIED 3 4 (
|
||||||
# [gold]
|
# [gold]
|
||||||
@ -55,8 +57,6 @@
|
|||||||
# amount=-10
|
# amount=-10
|
||||||
# [/gold]
|
# [/gold]
|
||||||
# )}
|
# )}
|
||||||
|
|
||||||
#define IF_ALLIED PLAYER1 PLAYER2 ACTION
|
|
||||||
[store_unit]
|
[store_unit]
|
||||||
[filter]
|
[filter]
|
||||||
side={PLAYER1}
|
side={PLAYER1}
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
# These are clutter, scheduled to be removed.
|
# These are clutter, scheduled to be removed.
|
||||||
|
|
||||||
# This one it used to tag macros for removal, the number in the name is the
|
#define DEPRECATE_132 NAME
|
||||||
|
# Tag macros for removal, the number in the name is the
|
||||||
# release where the message is shown the first time.
|
# release where the message is shown the first time.
|
||||||
# The removal will be 2 versions later.
|
# The removal will be 2 versions later.
|
||||||
#define DEPRECATE_132 NAME
|
|
||||||
[deprecated_message]
|
[deprecated_message]
|
||||||
message="Macro '" + {NAME} + "' is scheduled for removal in Wesnoth 1.3.4."
|
message="Macro '" + {NAME} + "' is scheduled for removal in Wesnoth 1.3.4."
|
||||||
[/deprecated_message]
|
[/deprecated_message]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
# Gives a side an amount of gold
|
|
||||||
# For example, lets make player 1 rich:
|
|
||||||
# {ADD_GOLD 1 999}
|
|
||||||
|
|
||||||
#define ADD_GOLD SIDE AMOUNT
|
#define ADD_GOLD SIDE AMOUNT
|
||||||
|
# Gives a side an amount of gold
|
||||||
|
# For example, to make player 1 rich:
|
||||||
|
# {ADD_GOLD 1 999}
|
||||||
{DEPRECATE_132 ADD_GOLD}
|
{DEPRECATE_132 ADD_GOLD}
|
||||||
[gold]
|
[gold]
|
||||||
side={SIDE}
|
side={SIDE}
|
||||||
@ -21,4 +21,217 @@
|
|||||||
[/gold]
|
[/gold]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
# These are included for backwards-compatibility mainly; they aren't and
|
||||||
|
# shouldn't be used for mainline units.
|
||||||
|
|
||||||
|
#define MISSILE_FRAME_WAIL
|
||||||
|
{DEPRECATE_132 MISSILE_FRAME_WAIL}
|
||||||
|
[if]
|
||||||
|
direction=n,ne,nw
|
||||||
|
|
||||||
|
[missile_frame]
|
||||||
|
begin=-300
|
||||||
|
end=-230
|
||||||
|
image="projectiles/wailprojectile-n-1.png"
|
||||||
|
image_diagonal="projectiles/wailprojectile-ne-1.png"
|
||||||
|
[/missile_frame]
|
||||||
|
[missile_frame]
|
||||||
|
begin=-230
|
||||||
|
end=-160
|
||||||
|
image="projectiles/wailprojectile-n-2.png"
|
||||||
|
image_diagonal="projectiles/wailprojectile-ne-2.png"
|
||||||
|
[/missile_frame]
|
||||||
|
[missile_frame]
|
||||||
|
begin=-160
|
||||||
|
end=0
|
||||||
|
image="projectiles/wailprojectile-n-3.png"
|
||||||
|
image_diagonal="projectiles/wailprojectile-ne-3.png"
|
||||||
|
[/missile_frame]
|
||||||
|
[missile_frame]
|
||||||
|
begin=0
|
||||||
|
end=40
|
||||||
|
image="projectiles/wailprojectile-n-4.png"
|
||||||
|
image_diagonal="projectiles/wailprojectile-ne-4.png"
|
||||||
|
[/missile_frame]
|
||||||
|
[missile_frame]
|
||||||
|
begin=40
|
||||||
|
end=80
|
||||||
|
image="projectiles/wailprojectile-n-5.png"
|
||||||
|
image_diagonal="projectiles/wailprojectile-ne-5.png"
|
||||||
|
[/missile_frame]
|
||||||
|
[missile_frame]
|
||||||
|
begin=80
|
||||||
|
end=120
|
||||||
|
image="projectiles/wailprojectile-n-6.png"
|
||||||
|
image_diagonal="projectiles/wailprojectile-ne-6.png"
|
||||||
|
[/missile_frame]
|
||||||
|
[/if]
|
||||||
|
[else]
|
||||||
|
direction=s,se,sw
|
||||||
|
### The price of asymmetrical projectiles - here, we use a conditional because the game automatically flips the images for the south frame. We have a separate set of images for the south part, which are not only flipped vertically, but also have their angle corrected for the sw direction.
|
||||||
|
|
||||||
|
[missile_frame]
|
||||||
|
begin=-300
|
||||||
|
end=-230
|
||||||
|
image="projectiles/wailprojectile-s-1.png"
|
||||||
|
image_diagonal="projectiles/wailprojectile-se-1.png"
|
||||||
|
[/missile_frame]
|
||||||
|
[missile_frame]
|
||||||
|
begin=-230
|
||||||
|
end=-160
|
||||||
|
image="projectiles/wailprojectile-s-2.png"
|
||||||
|
image_diagonal="projectiles/wailprojectile-se-2.png"
|
||||||
|
[/missile_frame]
|
||||||
|
[missile_frame]
|
||||||
|
begin=-160
|
||||||
|
end=0
|
||||||
|
image="projectiles/wailprojectile-s-3.png"
|
||||||
|
image_diagonal="projectiles/wailprojectile-se-3.png"
|
||||||
|
[/missile_frame]
|
||||||
|
[missile_frame]
|
||||||
|
begin=0
|
||||||
|
end=40
|
||||||
|
image="projectiles/wailprojectile-s-4.png"
|
||||||
|
image_diagonal="projectiles/wailprojectile-se-4.png"
|
||||||
|
[/missile_frame]
|
||||||
|
[missile_frame]
|
||||||
|
begin=40
|
||||||
|
end=80
|
||||||
|
image="projectiles/wailprojectile-s-5.png"
|
||||||
|
image_diagonal="projectiles/wailprojectile-se-5.png"
|
||||||
|
[/missile_frame]
|
||||||
|
[missile_frame]
|
||||||
|
begin=80
|
||||||
|
end=120
|
||||||
|
image="projectiles/wailprojectile-s-6.png"
|
||||||
|
image_diagonal="projectiles/wailprojectile-se-6.png"
|
||||||
|
[/missile_frame]
|
||||||
|
[/else]
|
||||||
|
#enddef
|
||||||
|
|
||||||
|
#define MISSILE_FRAME_FIRE_BREATH N_OFFSET S_OFFSET N_DIAGONAL_OFFSET S_DIAGONAL_OFFSET
|
||||||
|
{DEPRECATE_132 MISSILE_FRAME_FIRE_BREATH}
|
||||||
|
[if]
|
||||||
|
direction=n
|
||||||
|
|
||||||
|
[missile_frame]
|
||||||
|
begin=-400
|
||||||
|
end=100
|
||||||
|
halo=projectiles/fire-breath-n-1.png:80,projectiles/fire-breath-n-2.png:80,projectiles/fire-breath-n-3.png:80,projectiles/fire-breath-n-4.png:80,projectiles/fire-breath-n-5.png:80
|
||||||
|
halo_x,halo_y={N_OFFSET}
|
||||||
|
[/missile_frame]
|
||||||
|
[/if]
|
||||||
|
[else]
|
||||||
|
direction=s
|
||||||
|
|
||||||
|
[missile_frame]
|
||||||
|
begin=-400
|
||||||
|
end=100
|
||||||
|
halo=projectiles/fire-breath-s-1.png:80,projectiles/fire-breath-s-2.png:80,projectiles/fire-breath-s-3.png:80,projectiles/fire-breath-s-4.png:80,projectiles/fire-breath-s-5.png:80
|
||||||
|
halo_x,halo_y={S_OFFSET}
|
||||||
|
[/missile_frame]
|
||||||
|
[/else]
|
||||||
|
[else]
|
||||||
|
direction=ne,nw
|
||||||
|
|
||||||
|
[missile_frame]
|
||||||
|
begin=-400
|
||||||
|
end=100
|
||||||
|
halo=projectiles/fire-breath-ne-1.png:80,projectiles/fire-breath-ne-2.png:80,projectiles/fire-breath-ne-3.png:80,projectiles/fire-breath-ne-4.png:80,projectiles/fire-breath-ne-5.png:80
|
||||||
|
halo_x,halo_y={N_DIAGONAL_OFFSET}
|
||||||
|
[/missile_frame]
|
||||||
|
[/else]
|
||||||
|
[else]
|
||||||
|
direction=se,sw
|
||||||
|
|
||||||
|
[missile_frame]
|
||||||
|
begin=-400
|
||||||
|
end=100
|
||||||
|
halo=projectiles/fire-breath-se-1.png:80,projectiles/fire-breath-se-2.png:80,projectiles/fire-breath-se-3.png:80,projectiles/fire-breath-se-4.png:80,projectiles/fire-breath-se-5.png:80
|
||||||
|
halo_x,halo_y={S_DIAGONAL_OFFSET}
|
||||||
|
[/missile_frame]
|
||||||
|
[/else]
|
||||||
|
#enddef
|
||||||
|
|
||||||
|
#define MISSILE_FRAME_FAERIE_FIRE
|
||||||
|
{DEPRECATE_132 MISSILE_FRAME_FAERIE_FIRE}
|
||||||
|
[missile_frame]
|
||||||
|
begin=-500
|
||||||
|
end=-350
|
||||||
|
image="projectiles/icemissile-n-1.png"
|
||||||
|
image_diagonal="projectiles/icemissile-ne-1.png"
|
||||||
|
halo=halo/elven/ice-halo1.png:100,halo/elven/ice-halo2.png:100,halo/elven/ice-halo3.png:25
|
||||||
|
halo_x,halo_y=0,0
|
||||||
|
[/missile_frame]
|
||||||
|
[missile_frame]
|
||||||
|
begin=-350
|
||||||
|
end=-200
|
||||||
|
image="projectiles/icemissile-n-2.png"
|
||||||
|
image_diagonal="projectiles/icemissile-ne-2.png"
|
||||||
|
halo=halo/elven/ice-halo3.png:75,halo/elven/ice-halo4.png:75
|
||||||
|
halo_x,halo_y=0,0
|
||||||
|
[/missile_frame]
|
||||||
|
[missile_frame]
|
||||||
|
begin=-200
|
||||||
|
end=-50
|
||||||
|
image="projectiles/icemissile-n-3.png"
|
||||||
|
image_diagonal="projectiles/icemissile-ne-3.png"
|
||||||
|
halo=halo/elven/ice-halo5.png:100,halo/elven/ice-halo1.png:100,halo/elven/ice-halo2.png:50
|
||||||
|
halo_x,halo_y=0,0
|
||||||
|
[/missile_frame]
|
||||||
|
[missile_frame]
|
||||||
|
begin=-50
|
||||||
|
end=0
|
||||||
|
image="projectiles/icemissile-n-4.png"
|
||||||
|
image_diagonal="projectiles/icemissile-ne-4.png"
|
||||||
|
halo=halo/elven/ice-halo6.png
|
||||||
|
halo_x,halo_y=0,0
|
||||||
|
[/missile_frame]
|
||||||
|
[missile_frame]
|
||||||
|
begin=25
|
||||||
|
end=75
|
||||||
|
image="projectiles/icemissile-n-5.png"
|
||||||
|
image_diagonal="projectiles/icemissile-ne-5.png"
|
||||||
|
halo=halo/elven/ice-halo7.png
|
||||||
|
halo_x,halo_y=0,0
|
||||||
|
[/missile_frame]
|
||||||
|
[missile_frame]
|
||||||
|
begin=75
|
||||||
|
end=125
|
||||||
|
image="projectiles/icemissile-n-6.png"
|
||||||
|
image_diagonal="projectiles/icemissile-ne-6.png"
|
||||||
|
halo=halo/elven/ice-halo8.png
|
||||||
|
halo_x,halo_y=0,0
|
||||||
|
[/missile_frame]
|
||||||
|
[missile_frame]
|
||||||
|
begin=125
|
||||||
|
end=175
|
||||||
|
image="projectiles/icemissile-n-7.png"
|
||||||
|
image_diagonal="projectiles/icemissile-ne-7.png"
|
||||||
|
halo=halo/elven/ice-halo9.png
|
||||||
|
halo_x,halo_y=0,0
|
||||||
|
[/missile_frame]
|
||||||
|
#enddef
|
||||||
|
|
||||||
|
#define MISSILE_FRAME_FIREBALL
|
||||||
|
{DEPRECATE_132 MISSILE_FRAME_FIREBALL}
|
||||||
|
[missile_frame]
|
||||||
|
begin=-220
|
||||||
|
end=-100
|
||||||
|
image="projectiles/fireball-n-2.png"
|
||||||
|
image_diagonal="projectiles/fireball-nw-2.png"
|
||||||
|
[/missile_frame]
|
||||||
|
[missile_frame]
|
||||||
|
begin=-100
|
||||||
|
end=25
|
||||||
|
image="projectiles/fireball-n.png"
|
||||||
|
image_diagonal="projectiles/fireball-nw.png"
|
||||||
|
[/missile_frame]
|
||||||
|
[missile_frame]
|
||||||
|
begin=25
|
||||||
|
end=80
|
||||||
|
image="projectiles/fireball-n-2.png"
|
||||||
|
image_diagonal="projectiles/fireball-nw-2.png"
|
||||||
|
[/missile_frame]
|
||||||
|
#enddef
|
||||||
|
|
||||||
|
@ -1,328 +1,339 @@
|
|||||||
# This file contains shortcuts for common WML events (such as prestart, side
|
# This file contains shortcuts for common WML events (such as prestart, side
|
||||||
# turn, and such), which can be used to write events faster and in less space.
|
# turn, and such), which can be used to write events faster and in less space.
|
||||||
#
|
#
|
||||||
# It is recommended that you only use these if you're confident you could write
|
# It is recommended that you only use these if you're confident you could write
|
||||||
# the expanded form as well; these are mostly intended as shortcuts for
|
# the expanded form as well; these are mostly intended as shortcuts for
|
||||||
# experienced WML authors.
|
# experienced WML authors.
|
||||||
#
|
#
|
||||||
# These don't depend on any other macros. Please don't change this.
|
# These don't depend on any other macros. Please don't change this.
|
||||||
|
|
||||||
# Creates a generic event, only intended to be used when no other event can be
|
|
||||||
# used.
|
#define ON_EVENT NAME ACTION
|
||||||
|
# Creates a generic event. Strictly a syntactic shortcut
|
||||||
#define ON_EVENT NAME ACTION
|
[event]
|
||||||
[event]
|
name={NAME}
|
||||||
name={NAME}
|
{ACTION}
|
||||||
{ACTION}
|
[/event]
|
||||||
[/event]
|
#enddef
|
||||||
#enddef
|
|
||||||
|
#define ON_PRESTART ACTION
|
||||||
# Creates an event that triggers when the scenario starts but before the user
|
# Creates an event that triggers when the scenario starts but before the user
|
||||||
# gets any visible output.
|
# gets any visible output. Strictly a syntactic shortcut.
|
||||||
#
|
#
|
||||||
# For example, you can make side 2 start the scenario with ownership of the
|
# For example, you can make side 2 start the scenario with ownership of the
|
||||||
# village at 13,15:
|
# village at 13,15:
|
||||||
#
|
#
|
||||||
# {ON_PRESTART (
|
# {ON_PRESTART (
|
||||||
# [capture_village]
|
# [capture_village]
|
||||||
# side=2
|
# side=2
|
||||||
# x,y=13,15
|
# x,y=13,15
|
||||||
# [/capture_village]
|
# [/capture_village]
|
||||||
# )}
|
# )}
|
||||||
|
[event]
|
||||||
#define ON_PRESTART ACTION
|
name=prestart
|
||||||
[event]
|
{ACTION}
|
||||||
name=prestart
|
[/event]
|
||||||
{ACTION}
|
#enddef
|
||||||
[/event]
|
|
||||||
#enddef
|
|
||||||
|
|
||||||
|
#define ON_START ACTION
|
||||||
# Creates an event that triggers when the scenario starts, after the map is
|
# Creates an event that triggers when the scenario starts, after the map is
|
||||||
# displayed but before the player can act.
|
# displayed but before the player can act. Strictly a syntactic shortcut.
|
||||||
#
|
#
|
||||||
# For example you could display some dialogue when the scenario starts:
|
# For example you could display some dialogue when the scenario starts:
|
||||||
#
|
#
|
||||||
# {ON_START (
|
# {ON_START (
|
||||||
# [message]
|
# [message]
|
||||||
# speaker=Konrad
|
# speaker=Konrad
|
||||||
# message= _ "Hey, I can see some enemies up ahead!"
|
# message= _ "Hey, I can see some enemies up ahead!"
|
||||||
# [/message]
|
# [/message]
|
||||||
#
|
#
|
||||||
# [message]
|
# [message]
|
||||||
# speaker=Delfador
|
# speaker=Delfador
|
||||||
# message= _ "Yes, so it would seem. Charge!"
|
# message= _ "Yes, so it would seem. Charge!"
|
||||||
# [/message]
|
# [/message]
|
||||||
# )}
|
# )}
|
||||||
|
[event]
|
||||||
#define ON_START ACTION
|
name=start
|
||||||
[event]
|
{ACTION}
|
||||||
name=start
|
[/event]
|
||||||
{ACTION}
|
#enddef
|
||||||
[/event]
|
|
||||||
#enddef
|
# {ON_NEXT_TURN (
|
||||||
|
# Creates an event that triggers at the end of every turn.
|
||||||
|
#
|
||||||
# Creates an event that triggers at the end of every turn.
|
# For example, you could give a player some gold at the end every turn:
|
||||||
#
|
# [gold]
|
||||||
# For example, you could give a player some gold at the end every turn:
|
# amount=35
|
||||||
#
|
# side=1
|
||||||
# {ON_NEXT_TURN (
|
# [/gold]
|
||||||
# [gold]
|
# )}
|
||||||
# amount=35
|
|
||||||
# side=1
|
#define ON_NEXT_TURN ACTION
|
||||||
# [/gold]
|
[event]
|
||||||
# )}
|
name=new turn
|
||||||
|
first_time_only=no
|
||||||
#define ON_NEXT_TURN ACTION
|
{ACTION}
|
||||||
[event]
|
[/event]
|
||||||
name=new turn
|
#enddef
|
||||||
first_time_only=no
|
|
||||||
{ACTION}
|
#define ON_NEXT_TURN_ONCE ACTION
|
||||||
[/event]
|
# Creates an event that triggers at the end of the current turn.
|
||||||
#enddef
|
# For example you could give a player some gold before his/hers next turn.:
|
||||||
|
# {ON_NEXT_TURN (
|
||||||
# Creates an event that triggers at the end of the current turn.
|
# [gold]
|
||||||
# For example you could give a player some gold before his/hers next turn.:
|
# amount=100
|
||||||
# {ON_NEXT_TURN (
|
# side=1
|
||||||
# [gold]
|
# [/gold]
|
||||||
# amount=100
|
# )}
|
||||||
# side=1
|
[event]
|
||||||
# [/gold]
|
name=new turn
|
||||||
# )}
|
first_time_only=yes
|
||||||
|
{ACTION}
|
||||||
#define ON_NEXT_TURN_ONCE ACTION
|
[/event]
|
||||||
[event]
|
#enddef
|
||||||
name=new turn
|
|
||||||
first_time_only=yes
|
#define ON_SIDETURN ACTION
|
||||||
{ACTION}
|
# Creates an event that triggers at the start of every players turn
|
||||||
[/event]
|
# For example, you could set each players gold to a fixed amount every turn.
|
||||||
#enddef
|
# {ON_SIDETURN (
|
||||||
|
# [modify_side]
|
||||||
# Creates an event that triggers at the start of every players turn
|
# side=3
|
||||||
# For example you could set each players gold to a fixed amount every turn.
|
# gold=0
|
||||||
# {ON_SIDETURN (
|
# [/modify_side]
|
||||||
# [modify_side]
|
# )}
|
||||||
# side=3
|
[event]
|
||||||
# gold=0
|
name=side turn
|
||||||
# [/modify_side]
|
first_time_only=no
|
||||||
# )}
|
{ACTION}
|
||||||
|
[/event]
|
||||||
#define ON_SIDETURN ACTION
|
#enddef
|
||||||
[event]
|
|
||||||
name=side turn
|
|
||||||
first_time_only=no
|
#define ON_TURN TURN ACTION
|
||||||
{ACTION}
|
# Creates an event that triggers at the start of turn TURN
|
||||||
[/event]
|
# For example you can create a Wose belonging to player 1 at turn 3:
|
||||||
#enddef
|
# Strictly a syntactic shortcut.
|
||||||
|
# {ON_TURN 3 (
|
||||||
# Creates an event that triggers at the start of turn TURN
|
# [unit]
|
||||||
# For example you can create a Wose belonging to player 1 at turn 3:
|
# side=1
|
||||||
# {ON_TURN 3 (
|
# type=wose
|
||||||
# [unit]
|
# x,y=12,4
|
||||||
# side=1
|
# [/unit]
|
||||||
# type=wose
|
# )}
|
||||||
# x,y=12,4
|
[event]
|
||||||
# [/unit]
|
name=turn {TURN}
|
||||||
# )}
|
{ACTION}
|
||||||
|
[/event]
|
||||||
#define ON_TURN TURN ACTION
|
#enddef
|
||||||
[event]
|
|
||||||
name=turn {TURN}
|
#define ON_LAST_TURN ACTION
|
||||||
{ACTION}
|
# Creates an event that triggers when the last turn ends.
|
||||||
[/event]
|
# Strictly a syntactic shortcut.
|
||||||
#enddef
|
#
|
||||||
|
# For example you could display a message saying they suck:
|
||||||
# Creates an event that triggers when the last turn ends.
|
# {ON_LAST_TURN (
|
||||||
# For example you could display a message saying they suck:
|
# [message]
|
||||||
# {ON_LAST_TURN (
|
# speaker=narrator
|
||||||
# [message]
|
# message="They suck!"
|
||||||
# speaker=narrator
|
# [/message]
|
||||||
# message="They suck!"
|
# )}
|
||||||
# [/message]
|
[event]
|
||||||
# )}
|
name=time over
|
||||||
|
{ACTION}
|
||||||
#define ON_LAST_TURN ACTION
|
[/event]
|
||||||
[event]
|
#enddef
|
||||||
name=time over
|
|
||||||
{ACTION}
|
#define ON_VICTORY ACTION
|
||||||
[/event]
|
# Creates an event that triggers when a player wins the game, before
|
||||||
#enddef
|
# the game ends. Strictly a syntactic shortcut.
|
||||||
|
#
|
||||||
# Creates an event that triggers when a player wins the game, before the game ends.
|
# For example you could congratulate the player:
|
||||||
# For example you could congratulate the player:
|
# {ON_VICTORY (
|
||||||
# {ON_VICTORY (
|
# [message]
|
||||||
# [message]
|
# speaker=narrator
|
||||||
# speaker=narrator
|
# message="Congratulations!"
|
||||||
# message="Congratulations!"
|
# [/message]
|
||||||
# [/message]
|
# )}
|
||||||
# )}
|
[event]
|
||||||
|
name=victory
|
||||||
#define ON_VICTORY ACTION
|
{ACTION}
|
||||||
[event]
|
[/event]
|
||||||
name=victory
|
#enddef
|
||||||
{ACTION}
|
|
||||||
[/event]
|
#define ON_DEFEAT ACTION
|
||||||
#enddef
|
# Creates an event that triggers when a player wins the game, before
|
||||||
|
# the game ends. Strictly a syntactic shortcut.
|
||||||
# Creates an event that triggers when a player wins the game, before the game ends.
|
#
|
||||||
# For example you could suggest an easier difficulty the player:
|
# For example you could suggest an easier difficulty
|
||||||
# {ON_DEFEAT (
|
# the player:
|
||||||
# [message]
|
# {ON_DEFEAT (
|
||||||
# speaker=narrator
|
# [message]
|
||||||
# message="Aww.. you lost. Try again with 800g and +40g income?"
|
# speaker=narrator
|
||||||
# [/message]
|
# message="Aww.. you lost. Try again with 800g and +40g income?"
|
||||||
# )}
|
# [/message]
|
||||||
|
# )}
|
||||||
#define ON_DEFEAT ACTION
|
[event]
|
||||||
[event]
|
name=defeat
|
||||||
name=defeat
|
{ACTION}
|
||||||
{ACTION}
|
[/event]
|
||||||
[/event]
|
#enddef
|
||||||
#enddef
|
|
||||||
|
#define ON_TILE X Y FILTER ACTION
|
||||||
# Creates an event that triggers anytime a unit steps on a given tile.
|
# Creates an event that triggers anytime a unit steps on a given tile.
|
||||||
# The filter can be used to only affect special units, or units of a given player.
|
# The filter can be used to only affect special units, or units of a
|
||||||
# For example we could make a tree where the first players leader can read a note, but noone else:
|
# given player.
|
||||||
# {ON_TILE 5 7 (
|
#
|
||||||
# side=1
|
# For example, we could make a tree where the first player's leader can
|
||||||
# canrecruit=1
|
# read a note, but noone else:
|
||||||
# ) (
|
# {ON_TILE 5 7 (
|
||||||
# [message]
|
# side=1
|
||||||
# speaker=narrator
|
# canrecruit=1
|
||||||
# message="This is a note."
|
# ) (
|
||||||
# [/message]
|
# [message]
|
||||||
# )}
|
# speaker=narrator
|
||||||
|
# message="This is a note."
|
||||||
#define ON_TILE X Y FILTER ACTION
|
# [/message]
|
||||||
[event]
|
# )}
|
||||||
name=moveto
|
[event]
|
||||||
first_time_only=no
|
name=moveto
|
||||||
[filter]
|
first_time_only=no
|
||||||
x={X}
|
[filter]
|
||||||
y={Y}
|
x={X}
|
||||||
{FILTER}
|
y={Y}
|
||||||
[/filter]
|
{FILTER}
|
||||||
{ACTION}
|
[/filter]
|
||||||
[/event]
|
{ACTION}
|
||||||
#enddef
|
[/event]
|
||||||
|
#enddef
|
||||||
# Allows the player to undo the effects of a moveto event.
|
|
||||||
# For example, lets allow undoing reading a note:
|
#define ALLOW_UNDO
|
||||||
# {ON_TILE 5 7 () (
|
# Allows the player to undo the effects of a moveto event.
|
||||||
# [message]
|
# Strictly a syntactic shortcut.
|
||||||
# speaker=narrator
|
#
|
||||||
# message="This is a note."
|
# For example, let's allow undoing reading a note:
|
||||||
# [/message]
|
# {ON_TILE 5 7 () (
|
||||||
# {ALLOW_UNDO}
|
# [message]
|
||||||
# )}
|
# speaker=narrator
|
||||||
#define ALLOW_UNDO
|
# message="This is a note."
|
||||||
[allow_undo]
|
# [/message]
|
||||||
[/allow_undo]
|
# {ALLOW_UNDO}
|
||||||
#enddef
|
# )}
|
||||||
|
[allow_undo]
|
||||||
# Creates an event that triggers the first time a unit steps on a given tile.
|
[/allow_undo]
|
||||||
# The filter can be used to only affect special units, or units of a given player.
|
#enddef
|
||||||
# For example we could make a text-message that is only readable once:
|
|
||||||
# {ON_TILE_ONCE 5 7 () (
|
#define ON_TILE_ONCE X Y FILTER ACTION
|
||||||
# [message]
|
# Creates an event that triggers the first time a unit steps on a
|
||||||
# speaker=narrator
|
# given tile. The filter can be used to only affect special units, or
|
||||||
# message="This is a note."
|
# units of a given player.
|
||||||
# [/message]
|
|
||||||
# )}
|
For example we could make a text-message
|
||||||
|
# that is only readable once:
|
||||||
#define ON_TILE_ONCE X Y FILTER ACTION
|
# {ON_TILE_ONCE 5 7 () (
|
||||||
[event]
|
# [message]
|
||||||
name=moveto
|
# speaker=narrator
|
||||||
first_time_only=yes
|
# message="This is a note."
|
||||||
[filter]
|
# [/message]
|
||||||
x={X}
|
# )}
|
||||||
y={Y}
|
[event]
|
||||||
{FILTER}
|
name=moveto
|
||||||
[/filter]
|
first_time_only=yes
|
||||||
{ACTION}
|
[filter]
|
||||||
[/event]
|
x={X}
|
||||||
#enddef
|
y={Y}
|
||||||
|
{FILTER}
|
||||||
# Creates an event that triggers anytime a unit matching FILTER dies.
|
[/filter]
|
||||||
# For example we can make all units scream in pain upon death:
|
{ACTION}
|
||||||
# {ON_DEATH () (
|
[/event]
|
||||||
# [message]
|
#enddef
|
||||||
# speaker=unit
|
|
||||||
# message="AAaaaaAAaaAAaarrrghh!!!"
|
#define ON_DEATH FILTER ACTION
|
||||||
# [/message]
|
# Creates an event that triggers anytime a unit matching FILTER dies.
|
||||||
# )}
|
# Strictly a syntactic shortcut.
|
||||||
|
#
|
||||||
#define ON_DEATH FILTER ACTION
|
# For example we can make all units scream in pain upon death:
|
||||||
[event]
|
# {ON_DEATH () (
|
||||||
name=die
|
# [message]
|
||||||
first_time_only=no
|
# speaker=unit
|
||||||
[filter]
|
# message="AAaaaaAAaaAAaarrrghh!!!"
|
||||||
{FILTER}
|
# [/message]
|
||||||
[/filter]
|
# )}
|
||||||
{ACTION}
|
[event]
|
||||||
[/event]
|
name=die
|
||||||
#enddef
|
first_time_only=no
|
||||||
|
[filter]
|
||||||
# Creates an event that triggers the first time a unit matching FILTER dies.
|
{FILTER}
|
||||||
# For example we can make only player 3s leader units scream in pain upon death:
|
[/filter]
|
||||||
# {ON_DEATH_ONCE (
|
{ACTION}
|
||||||
# side=3
|
[/event]
|
||||||
# canrecruit=1
|
#enddef
|
||||||
# ) (
|
|
||||||
# [message]
|
#define ON_DEATH_ONCE FILTER ACTION
|
||||||
# speaker=unit
|
# Creates an event that triggers the first time a unit matching FILTER
|
||||||
# message="AAaaaaAAaaAAaarrrghh!!!"
|
# dies. Strictly a syntactic shortcut.
|
||||||
# [/message]
|
#
|
||||||
# )}
|
# For example we can make only player 3s leader units scream in
|
||||||
|
# pain upon death:
|
||||||
#define ON_DEATH_ONCE FILTER ACTION
|
# {ON_DEATH_ONCE (
|
||||||
[event]
|
# side=3
|
||||||
name=die
|
# canrecruit=1
|
||||||
first_time_only=yes
|
# ) (
|
||||||
[filter]
|
# [message]
|
||||||
{FILTER}
|
# speaker=unit
|
||||||
[/filter]
|
# message="AAaaaaAAaaAAaarrrghh!!!"
|
||||||
{ACTION}
|
# [/message]
|
||||||
[/event]
|
# )}
|
||||||
#enddef
|
[event]
|
||||||
|
name=die
|
||||||
# Creates an event that triggers before any unit matching FILTER advances to a new class.
|
first_time_only=yes
|
||||||
# For example we could make it smile:
|
[filter]
|
||||||
# {ON_ADVANCEMENT () (
|
{FILTER}
|
||||||
# [message]
|
[/filter]
|
||||||
# speaker=unit
|
{ACTION}
|
||||||
# message=":D"
|
[/event]
|
||||||
# [/message]
|
#enddef
|
||||||
# )}
|
|
||||||
|
#define ON_ADVANCEMENT FILTER ACTION
|
||||||
#define ON_ADVANCEMENT FILTER ACTION
|
# Creates an event that triggers before any unit matching FILTER
|
||||||
[event]
|
# advances to a new class. Strictly a syntactic shortcut.
|
||||||
name=advance
|
#
|
||||||
first_time_only=no
|
# For example we could make it smile:
|
||||||
[filter]
|
# {ON_ADVANCEMENT () (
|
||||||
{FILTER}
|
# [message]
|
||||||
[/filter]
|
# speaker=unit
|
||||||
{ACTION}
|
# message=":D"
|
||||||
[/event]
|
# [/message]
|
||||||
#enddef
|
# )}
|
||||||
|
[event]
|
||||||
# Creates an event that triggers after any unit matching FILTER advanced to a new class.
|
name=advance
|
||||||
# For example we could make it claim to be the strongest one alive:
|
first_time_only=no
|
||||||
# {ON_POSTADVANCEMENT () (
|
[filter]
|
||||||
# [message]
|
{FILTER}
|
||||||
# speaker=unit
|
[/filter]
|
||||||
# message="I'm the strongest one alive!"
|
{ACTION}
|
||||||
# [/message]
|
[/event]
|
||||||
# )}
|
#enddef
|
||||||
|
|
||||||
#define ON_POSTADVANCEMENT FILTER ACTION
|
#define ON_POSTADVANCEMENT FILTER ACTION
|
||||||
[event]
|
# Creates an event that triggers after any unit matching FILTER
|
||||||
name=post_advance
|
# advanced to a new class. Strictly a syntactic shortcut.
|
||||||
first_time_only=no
|
#
|
||||||
[filter]
|
# For example we could make it claim to be
|
||||||
{FILTER}
|
# the strongest one alive:
|
||||||
[/filter]
|
# {ON_POSTADVANCEMENT () (
|
||||||
{ACTION}
|
# [message]
|
||||||
[/event]
|
# speaker=unit
|
||||||
#enddef
|
# message="I'm the strongest one alive!"
|
||||||
|
# [/message]
|
||||||
|
# )}
|
||||||
|
[event]
|
||||||
|
name=post_advance
|
||||||
|
first_time_only=no
|
||||||
|
[filter]
|
||||||
|
{FILTER}
|
||||||
|
[/filter]
|
||||||
|
{ACTION}
|
||||||
|
[/event]
|
||||||
|
#enddef
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
# Utility macros for images, overlays, and display effects.
|
# Utility macros for images, overlays, and display effects.
|
||||||
# These don't depend on any other macros. Please don't change this.
|
# These don't depend on any other macros. Please don't change this.
|
||||||
|
|
||||||
|
#define MAGENTA_IS_THE_TEAM_COLOR
|
||||||
# A macro to define a common set of magenta color values which different
|
# A macro to define a common set of magenta color values which different
|
||||||
# units can be color shifted by using the team color system.
|
# units can be color shifted by using the team color system.
|
||||||
|
|
||||||
#define MAGENTA_IS_THE_TEAM_COLOR
|
|
||||||
flag_rgb=magenta
|
flag_rgb=magenta
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
@ -23,11 +22,12 @@ blue=255
|
|||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#define IS_HERO
|
#define IS_HERO
|
||||||
# Embed this into a unit declaration to add a hero icon to the unit
|
# Embed this into a unit declaration to add a hero icon to the unit.
|
||||||
overlays="misc/hero-icon.png"
|
overlays="misc/hero-icon.png"
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#define DOT X Y
|
#define DOT X Y
|
||||||
|
# Mark the specified map hex with a dot.
|
||||||
[image]
|
[image]
|
||||||
x,y={X},{Y}
|
x,y={X},{Y}
|
||||||
file=misc/dot.png
|
file=misc/dot.png
|
||||||
@ -36,6 +36,7 @@ delay=500
|
|||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#define CROSS X Y
|
#define CROSS X Y
|
||||||
|
# Mark the specified map hex with a cross.
|
||||||
[image]
|
[image]
|
||||||
x,y={X},{Y}
|
x,y={X},{Y}
|
||||||
file=misc/cross.png
|
file=misc/cross.png
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
# Interface shortcut macros.
|
# Interface shortcut macros.
|
||||||
# These don't depend on any other macros. Please don't change this.
|
# These don't depend on any other macros. Please don't change this.
|
||||||
|
|
||||||
# Displays a text message spoken by SPEAKER.
|
|
||||||
# Speaker can be any of: narrator, unit and second_unit
|
|
||||||
# For example, let's have the narrator, which looks like a feary
|
|
||||||
# express some feelings on the undead:
|
|
||||||
# {MESSAGE narrator "units/elves-wood/shyde.png" _ "Faery" _ "Aarr! Them be undeadies! Loooks at them.."}
|
|
||||||
|
|
||||||
#define MESSAGE SPEAKER IMAGE CAPTION TEXT
|
#define MESSAGE SPEAKER IMAGE CAPTION TEXT
|
||||||
|
# Displays a text message spoken by SPEAKER.
|
||||||
|
# Speaker can be any of: narrator, unit and second_unit
|
||||||
|
# For example, let's have the narrator, which looks like a faery
|
||||||
|
# express some feelings on the undead:
|
||||||
|
# {MESSAGE narrator "units/elves-wood/shyde.png" _ "Faery" _ "Aarr! Them be undeadies! Loooks at them.."}
|
||||||
[message]
|
[message]
|
||||||
speaker={SPEAKER}
|
speaker={SPEAKER}
|
||||||
message={TEXT}
|
message={TEXT}
|
||||||
@ -16,15 +16,12 @@
|
|||||||
[/message]
|
[/message]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
# Scrolls the screen to the given coordinates.
|
|
||||||
# For example, lets focus on 26,35:
|
|
||||||
# {SCROLL 26 35}
|
|
||||||
|
|
||||||
# Puts a label on the map at x,y
|
|
||||||
# example:
|
|
||||||
# {SET_LABEL 4 7 _ "There be dragons here!"}
|
|
||||||
|
|
||||||
#define SET_LABEL X Y TEXT
|
#define SET_LABEL X Y TEXT
|
||||||
|
# Puts TEXT on the map at X,Y. Strictly a syntactic shortcut.
|
||||||
|
#
|
||||||
|
# For example:
|
||||||
|
# {SET_LABEL 4 7 _ "There be dragons here!"}
|
||||||
[label]
|
[label]
|
||||||
x={X}
|
x={X}
|
||||||
y={Y}
|
y={Y}
|
||||||
@ -32,11 +29,11 @@
|
|||||||
[/label]
|
[/label]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
# Removes a label from a given tile
|
|
||||||
# Exameple, remove it from 4,7
|
|
||||||
# {REMOVE_LABEL 4 7}
|
|
||||||
|
|
||||||
#define REMOVE_LABEL X Y
|
#define REMOVE_LABEL X Y
|
||||||
|
# Removes a label from a given tile.
|
||||||
|
#
|
||||||
|
# For example, remove it from 4,7
|
||||||
|
# {REMOVE_LABEL 4 7}
|
||||||
[label]
|
[label]
|
||||||
x={X}
|
x={X}
|
||||||
y={Y}
|
y={Y}
|
||||||
@ -44,70 +41,71 @@
|
|||||||
[/label]
|
[/label]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
#define SET_LABEL_PERSISTANT X Y TEXT
|
||||||
# Sets a label on tile x,y that gets reset every sideturn in case
|
# Sets a label on tile x,y that gets reset every sideturn in case
|
||||||
# someone clears it.
|
# someone clears it.
|
||||||
|
#
|
||||||
# Example:
|
# Example:
|
||||||
# {SET_LABEL_PERSISTANT 4 7 _ "There really will be dragons here!!"}
|
# {SET_LABEL_PERSISTANT 4 7 _ "There really will be dragons here!!"}
|
||||||
|
|
||||||
#define SET_LABEL_PERSISTANT X Y TEXT
|
|
||||||
{SET_LABEL {X} {Y} ({TEXT}) }
|
{SET_LABEL {X} {Y} ({TEXT}) }
|
||||||
{ON_SIDETURN (
|
{ON_SIDETURN (
|
||||||
{SET_LABEL {X} {Y} ({TEXT}) }
|
{SET_LABEL {X} {Y} ({TEXT}) }
|
||||||
)}
|
)}
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
# Places an image at a given tile, shrinking it to fit the tile
|
|
||||||
# For example, lets put a tent on tile 14,5
|
|
||||||
# {SET_IMAGE 14 5 "terrain/tent.png"}
|
|
||||||
|
|
||||||
#define SET_IMAGE X Y IMAGE
|
#define SET_IMAGE X Y IMAGE
|
||||||
|
# Places an image at a given tile, shrinking it to fit the tile
|
||||||
|
#
|
||||||
|
# For example, let's put a tent on tile 14,5
|
||||||
|
# {SET_IMAGE 14 5 "terrain/tent.png"}
|
||||||
[item]
|
[item]
|
||||||
x,y={X},{Y}
|
x,y={X},{Y}
|
||||||
image={IMAGE}
|
image={IMAGE}
|
||||||
[/item]
|
[/item]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
# Removes a previously set image from a tile
|
#define REMOVE_IMAGE X Y
|
||||||
|
# Removes a previously set image from a tile.
|
||||||
|
#
|
||||||
# Example:
|
# Example:
|
||||||
# {REMOVE_IMAGE 14 5}
|
# {REMOVE_IMAGE 14 5}
|
||||||
|
|
||||||
#define REMOVE_IMAGE X Y
|
|
||||||
[removeitem]
|
[removeitem]
|
||||||
x,y={X},{Y}
|
x,y={X},{Y}
|
||||||
[/removeitem]
|
[/removeitem]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
# Shorthand for setting both an image and a label at once.
|
|
||||||
|
|
||||||
#define SET_IMAGE_AND_LABEL X Y IMAGE TEXT
|
#define SET_IMAGE_AND_LABEL X Y IMAGE TEXT
|
||||||
|
# Shorthand for setting both an image and a label at once.
|
||||||
{SET_LABEL {X} {Y} ({TEXT}) }
|
{SET_LABEL {X} {Y} ({TEXT}) }
|
||||||
{SET_IMAGE {X} {Y} ({IMAGE}) }
|
{SET_IMAGE {X} {Y} ({IMAGE}) }
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
# Shorthand for setting both a persistant label and image at once.
|
|
||||||
|
|
||||||
#define SET_IMAGE_AND_LABEL_PERSISTANT X Y IMAGE TEXT
|
#define SET_IMAGE_AND_LABEL_PERSISTANT X Y IMAGE TEXT
|
||||||
|
# Shorthand for setting both a persistant label and image at once.
|
||||||
{SET_LABEL_PERSISTANT {X} {Y} ({TEXT}) }
|
{SET_LABEL_PERSISTANT {X} {Y} ({TEXT}) }
|
||||||
{SET_IMAGE {X} {Y} ({IMAGE}) }
|
{SET_IMAGE {X} {Y} ({IMAGE}) }
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
# Shorthand for removing both image and label at once
|
|
||||||
|
|
||||||
#define REMOVE_IMAGE_AND_LABEL X Y
|
#define REMOVE_IMAGE_AND_LABEL X Y
|
||||||
|
# Shorthand for removing both image and label at once
|
||||||
{REMOVE_IMAGE {X} {Y}}
|
{REMOVE_IMAGE {X} {Y}}
|
||||||
{REMOVE_LABEL {X} {Y}}
|
{REMOVE_LABEL {X} {Y}}
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#define SCROLL X Y
|
#define SCROLL X Y
|
||||||
|
# Scrolls the screen to the given coordinates.
|
||||||
|
#
|
||||||
|
# For example, let's focus on 26,35:
|
||||||
|
# {SCROLL 26 35}
|
||||||
[scroll]
|
[scroll]
|
||||||
x={X}
|
x={X}
|
||||||
y={Y}
|
y={Y}
|
||||||
[/scroll]
|
[/scroll]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
# Visuals and sound for an earth tremor.
|
|
||||||
|
|
||||||
#define TREMOR
|
#define TREMOR
|
||||||
|
# Visuals and sound for an earth tremor.
|
||||||
[sound]
|
[sound]
|
||||||
name="rumble.ogg"
|
name="rumble.ogg"
|
||||||
[/sound]
|
[/sound]
|
||||||
@ -133,6 +131,7 @@
|
|||||||
[/scroll]
|
[/scroll]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
#define EARTHQUAKE ACTION
|
||||||
# Creates an earthquake-effect while performing ACTION
|
# Creates an earthquake-effect while performing ACTION
|
||||||
# For example we could kill all non-leader units in the earthquake:
|
# For example we could kill all non-leader units in the earthquake:
|
||||||
# {EARTHQUAKE (
|
# {EARTHQUAKE (
|
||||||
@ -141,8 +140,6 @@
|
|||||||
# animate=yes
|
# animate=yes
|
||||||
# [/kill]
|
# [/kill]
|
||||||
# )}
|
# )}
|
||||||
|
|
||||||
#define EARTHQUAKE ACTION
|
|
||||||
[sound]
|
[sound]
|
||||||
name=lightning.ogg
|
name=lightning.ogg
|
||||||
[/sound]
|
[/sound]
|
||||||
@ -154,11 +151,10 @@
|
|||||||
{SCROLL 1 -2}
|
{SCROLL 1 -2}
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
# adjusts the color of the screen by a tint or red, green and blue
|
#define COLOR_ADJUST RED GREEN BLUE
|
||||||
|
# Adjusts the color of the screen by a tint or red, green and blue
|
||||||
# for example, lets make it very blueish:
|
# for example, lets make it very blueish:
|
||||||
# {COLOR_ADJUST 0 0 100}
|
# {COLOR_ADJUST 0 0 100}
|
||||||
|
|
||||||
#define COLOR_ADJUST RED GREEN BLUE
|
|
||||||
[colour_adjust]
|
[colour_adjust]
|
||||||
red={RED}
|
red={RED}
|
||||||
green={GREEN}
|
green={GREEN}
|
||||||
@ -169,6 +165,7 @@
|
|||||||
# Flashes the screen with a given color performing ACTION
|
# Flashes the screen with a given color performing ACTION
|
||||||
# These macros come in WHITE, RED, GREEN and BLUE and can
|
# These macros come in WHITE, RED, GREEN and BLUE and can
|
||||||
# easily be expanded for ORANGE, PURPLE etc.
|
# easily be expanded for ORANGE, PURPLE etc.
|
||||||
|
#
|
||||||
# Example, Flash the screen to scare the player:
|
# Example, Flash the screen to scare the player:
|
||||||
# {FLASH_GREEN ()}
|
# {FLASH_GREEN ()}
|
||||||
# {FLASH_RED ()}
|
# {FLASH_RED ()}
|
||||||
@ -176,6 +173,7 @@
|
|||||||
# {FLASH_WHITE ()}
|
# {FLASH_WHITE ()}
|
||||||
|
|
||||||
#define FLASH_WHITE ACTION
|
#define FLASH_WHITE ACTION
|
||||||
|
# Flash the screen momentarily white.
|
||||||
{COLOR_ADJUST 67 67 67}
|
{COLOR_ADJUST 67 67 67}
|
||||||
{COLOR_ADJUST 100 100 100}
|
{COLOR_ADJUST 100 100 100}
|
||||||
{ACTION}
|
{ACTION}
|
||||||
@ -184,6 +182,7 @@
|
|||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#define FLASH_RED ACTION
|
#define FLASH_RED ACTION
|
||||||
|
# Flash the screen momentarily red.
|
||||||
{COLOR_ADJUST 67 0 0}
|
{COLOR_ADJUST 67 0 0}
|
||||||
{COLOR_ADJUST 100 0 0}
|
{COLOR_ADJUST 100 0 0}
|
||||||
{ACTION}
|
{ACTION}
|
||||||
@ -192,6 +191,7 @@
|
|||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#define FLASH_GREEN ACTION
|
#define FLASH_GREEN ACTION
|
||||||
|
# Flash the screen momentarily green.
|
||||||
{COLOR_ADJUST 0 67 0}
|
{COLOR_ADJUST 0 67 0}
|
||||||
{COLOR_ADJUST 0 100 0}
|
{COLOR_ADJUST 0 100 0}
|
||||||
{ACTION}
|
{ACTION}
|
||||||
@ -200,6 +200,7 @@
|
|||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#define FLASH_BLUE ACTION
|
#define FLASH_BLUE ACTION
|
||||||
|
# Flash the screen momentarily blue.
|
||||||
{COLOR_ADJUST 0 0 67}
|
{COLOR_ADJUST 0 0 67}
|
||||||
{COLOR_ADJUST 0 0 100}
|
{COLOR_ADJUST 0 0 100}
|
||||||
{ACTION}
|
{ACTION}
|
||||||
@ -207,8 +208,9 @@
|
|||||||
{COLOR_ADJUST 0 0 0}
|
{COLOR_ADJUST 0 0 0}
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
# Creates a flashlike-effect while performing ACTION
|
#define THUNDER ACTION
|
||||||
# For example, player 3 might disappear in the flash of a lightning:
|
# Creates a thunder-and-lightning effect while performing ACTION.
|
||||||
|
# For example, player 3 might disappear in the flash of lightning:
|
||||||
# {THUNDER (
|
# {THUNDER (
|
||||||
# [store_unit]
|
# [store_unit]
|
||||||
# [filter]
|
# [filter]
|
||||||
@ -218,8 +220,6 @@
|
|||||||
# kill=yes
|
# kill=yes
|
||||||
# [/store_unit]
|
# [/store_unit]
|
||||||
# )}
|
# )}
|
||||||
|
|
||||||
#define THUNDER ACTION
|
|
||||||
[sound]
|
[sound]
|
||||||
name=lightning.ogg
|
name=lightning.ogg
|
||||||
[/sound]
|
[/sound]
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
# Utility macros for scenario-objectivew control.
|
# Utility macros for scenario-objectivew control.
|
||||||
# These macros don't depend on any others. Please don't change this.
|
# These macros don't depend on any others. Please don't change this.
|
||||||
|
|
||||||
|
#define SET_OBJECTIVES SIDE SUMMARY NOTE CONDITIONS
|
||||||
# Sets the objectives for a given player
|
# Sets the objectives for a given player
|
||||||
# Side 0 means every player. Does not affect gameplay,
|
# Side 0 means every player. Does not affect gameplay,
|
||||||
# except that it tells the player what the objectives of a scenario are.
|
# except that it tells the player what the objectives of a scenario are.
|
||||||
|
#
|
||||||
# For example, we could set the objective for all players to: "survive for
|
# For example, we could set the objective for all players to: "survive for
|
||||||
# 3 turns" wuth this:
|
# 3 turns" wuth this:
|
||||||
# {SET_OBJECTIVES 0 "Survive for 3 turns" () ()}
|
# {SET_OBJECTIVES 0 "Survive for 3 turns" () ()}
|
||||||
#
|
#
|
||||||
#define SET_OBJECTIVES SIDE SUMMARY NOTE CONDITIONS
|
|
||||||
[objectives]
|
[objectives]
|
||||||
side = {SIDE}
|
side = {SIDE}
|
||||||
summary = {SUMMARY}
|
summary = {SUMMARY}
|
||||||
@ -17,40 +18,42 @@
|
|||||||
[/objectives]
|
[/objectives]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
#define VICTORY_CONDITION DESCRIPTION
|
||||||
# Used in conjunction with SET_OBJECTIVES this sets a victory condition
|
# Used in conjunction with SET_OBJECTIVES this sets a victory condition
|
||||||
# (marked green).
|
# (marked green).
|
||||||
|
#
|
||||||
# For example we could tell player 2 to win by killing all other players
|
# For example we could tell player 2 to win by killing all other players
|
||||||
# {SET_OBJECTIVES 0 "Kill eachother." (
|
# {SET_OBJECTIVES 0 "Kill eachother." (
|
||||||
# {VICTORY_CONDITION "Kill all other players."}
|
# {VICTORY_CONDITION "Kill all other players."}
|
||||||
# )}
|
# )}
|
||||||
#
|
#
|
||||||
#define VICTORY_CONDITION DESCRIPTION
|
|
||||||
[objective]
|
[objective]
|
||||||
condition = "win"
|
condition = "win"
|
||||||
description = {DESCRIPTION}
|
description = {DESCRIPTION}
|
||||||
[/objective]
|
[/objective]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
#define DEFEAT_CONDITION DESCRIPTION
|
||||||
# Used in conjunction with SET_OBJECTIVES this sets a defeat condition
|
# Used in conjunction with SET_OBJECTIVES this sets a defeat condition
|
||||||
# (marked red).
|
# (marked red).
|
||||||
|
#
|
||||||
# For example we could tell all players that they lose if they die.
|
# For example we could tell all players that they lose if they die.
|
||||||
# {SET_OBJECTIVES 0 "Survive." (
|
# {SET_OBJECTIVES 0 "Survive." (
|
||||||
# {DEFEAT_CONDITION "Death of your leader."}
|
# {DEFEAT_CONDITION "Death of your leader."}
|
||||||
# )}
|
# )}
|
||||||
#
|
#
|
||||||
#define DEFEAT_CONDITION DESCRIPTION
|
|
||||||
[objective]
|
[objective]
|
||||||
condition = "lose"
|
condition = "lose"
|
||||||
description = {DESCRIPTION}
|
description = {DESCRIPTION}
|
||||||
[/objective]
|
[/objective]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
#define SIDE_PLAYER SIDE TEAM DESCRIPTION GOLD INCOME SIDE_PARMS
|
||||||
# Defines a multiplayer side in a scenario that is controllable by the player.
|
# Defines a multiplayer side in a scenario that is controllable by the player.
|
||||||
|
#
|
||||||
# For example we can set side 1 to be a player belonging to team "Good Guys"
|
# For example we can set side 1 to be a player belonging to team "Good Guys"
|
||||||
# starting with 200g and no income:
|
# starting with 200g and no income:
|
||||||
# {SIDE_PLAYER 1 "Good Guys" "Good Guy #1" 200 -2 ()}
|
# {SIDE_PLAYER 1 "Good Guys" "Good Guy #1" 200 -2 ()}
|
||||||
#
|
|
||||||
#define SIDE_PLAYER SIDE TEAM DESCRIPTION GOLD INCOME SIDE_PARMS
|
|
||||||
[side]
|
[side]
|
||||||
description={DESCRIPTION}
|
description={DESCRIPTION}
|
||||||
side={SIDE}
|
side={SIDE}
|
||||||
@ -63,15 +66,16 @@
|
|||||||
[/side]
|
[/side]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
#define SIDE_COMPUTER SIDE TEAM DESCRIPTION GOLD INCOME SIDE_PARMS AI_PARMS
|
||||||
# Defines a multiplayer side in a scenario that is controllad by the computer.
|
# Defines a multiplayer side in a scenario that is controllad by the computer.
|
||||||
# For example we can set side 4 to be a computer belonging to team "Evil Guys"
|
#
|
||||||
|
# For example, we can set side 4 to be a computer belonging to team "Evil Guys"
|
||||||
# starting with 666g and no 99 income.
|
# starting with 666g and no 99 income.
|
||||||
# We also make it more aggressive:
|
# We also make it more aggressive:
|
||||||
# {SIDE_COMPUTER 4 "Evil Guys" "Evil One" 666 99 (
|
# {SIDE_COMPUTER 4 "Evil Guys" "Evil One" 666 99 (
|
||||||
# aggression=0.95
|
# aggression=0.95
|
||||||
# )}
|
# )}
|
||||||
#
|
#
|
||||||
#define SIDE_COMPUTER SIDE TEAM DESCRIPTION GOLD INCOME SIDE_PARMS AI_PARMS
|
|
||||||
[side]
|
[side]
|
||||||
description={DESCRIPTION}
|
description={DESCRIPTION}
|
||||||
side={SIDE}
|
side={SIDE}
|
||||||
|
@ -14,12 +14,10 @@
|
|||||||
# like that. Of course, if you want something more elaborate, code it
|
# like that. Of course, if you want something more elaborate, code it
|
||||||
# manually.
|
# manually.
|
||||||
|
|
||||||
|
#define DEFAULT_MUSIC_PLAYLIST
|
||||||
# A macro to define a standard playlist suitable for any level. The
|
# A macro to define a standard playlist suitable for any level. The
|
||||||
# music is defined twice to catch instances where music is changed in
|
# music is defined twice to catch instances where music is changed in
|
||||||
# a story and not set back.
|
# a story and not set back.
|
||||||
|
|
||||||
#define DEFAULT_MUSIC_PLAYLIST
|
|
||||||
[music]
|
[music]
|
||||||
name=gameplay01.ogg
|
name=gameplay01.ogg
|
||||||
ms_before=12000
|
ms_before=12000
|
||||||
@ -84,6 +82,9 @@
|
|||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
#define SCENARIO_MUSIC MUSIC
|
||||||
# This music macro ensures that the correct music is selected
|
# This music macro ensures that the correct music is selected
|
||||||
# for a scenario just in case it is changed by [story].
|
# for a scenario just in case it is changed by [story].
|
||||||
# It should be positioned at the top of the scenario file
|
# It should be positioned at the top of the scenario file
|
||||||
@ -91,17 +92,14 @@
|
|||||||
#
|
#
|
||||||
# It also allows for the convenient use of a standardized
|
# It also allows for the convenient use of a standardized
|
||||||
# intra-scenario music, should we decide to use one.
|
# intra-scenario music, should we decide to use one.
|
||||||
#
|
|
||||||
|
|
||||||
#define SCENARIO_MUSIC MUSIC
|
|
||||||
[music]
|
[music]
|
||||||
name="wesnoth-2.ogg"
|
name="wesnoth-2.ogg"
|
||||||
[/music]
|
[/music]
|
||||||
[event]
|
[event]
|
||||||
name=prestart
|
name=prestart
|
||||||
[music]
|
[music]
|
||||||
name={MUSIC}
|
name={MUSIC}
|
||||||
[/music]
|
[/music]
|
||||||
[/event]
|
[/event]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
# Macros for teleporting units.
|
# Macros for teleporting units.
|
||||||
# These don't depend on any other macros. Please don't change this.
|
# These don't depend on any other macros. Please don't change this.
|
||||||
|
|
||||||
|
#define TELEPORT_UNIT FILTER NEWX NEWY
|
||||||
# Teleports a unit matching FILTER to NEWX,NEWY
|
# Teleports a unit matching FILTER to NEWX,NEWY
|
||||||
# For example, teleport player 3's leader to 4,5
|
# For example, teleport player 3's leader to 4,5
|
||||||
|
#
|
||||||
# {TELEPORT_UNIT (
|
# {TELEPORT_UNIT (
|
||||||
# side=3
|
# side=3
|
||||||
# canrecruit=1
|
# canrecruit=1
|
||||||
# ) 4 5}
|
# ) 4 5}
|
||||||
|
|
||||||
#define TELEPORT_UNIT FILTER NEWX NEWY
|
|
||||||
[teleport]
|
[teleport]
|
||||||
[filter]
|
[filter]
|
||||||
{FILTER}
|
{FILTER}
|
||||||
@ -20,11 +20,11 @@
|
|||||||
[/redraw]
|
[/redraw]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
#define TELEPORT_TILE OLDX OLDY NEWX NEWY
|
||||||
# Teleports a unit on tile OLDX,OLDY to NEWX,NEWY
|
# Teleports a unit on tile OLDX,OLDY to NEWX,NEWY
|
||||||
|
#
|
||||||
# For example, teleport any unit thats currently on 1,1 to 4,5
|
# For example, teleport any unit thats currently on 1,1 to 4,5
|
||||||
# {TELEPORT_TILE 1 1 4 5}
|
# {TELEPORT_TILE 1 1 4 5}
|
||||||
|
|
||||||
#define TELEPORT_TILE OLDX OLDY NEWX NEWY
|
|
||||||
[teleport]
|
[teleport]
|
||||||
[filter]
|
[filter]
|
||||||
x={OLDX}
|
x={OLDX}
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
# Utility macros for manipulating map terrain.
|
# Utility macros for manipulating map terrain.
|
||||||
# These don't depend on any other macros. Please don't change this.
|
# These don't depend on any other macros. Please don't change this.
|
||||||
|
|
||||||
|
|
||||||
# Changes the terrain at a given list of coordinates
|
|
||||||
# For example we could make 14,15 and 14,16 grassland:
|
|
||||||
# {MODIFY_TERRAIN g (14,14) (15,16)}
|
|
||||||
|
|
||||||
#define MODIFY_TERRAIN LETTER X Y
|
#define MODIFY_TERRAIN LETTER X Y
|
||||||
|
# Changes the terrain at a given list of coordinates
|
||||||
|
#
|
||||||
|
# For example, we could make 14,15 and 14,16 grassland:
|
||||||
|
# {MODIFY_TERRAIN g (14,14) (15,16)}
|
||||||
[terrain]
|
[terrain]
|
||||||
letter={LETTER}
|
letter={LETTER}
|
||||||
x={X}
|
x={X}
|
||||||
@ -14,16 +13,15 @@
|
|||||||
[/terrain]
|
[/terrain]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
#define MODIFY_TERRAIN_MASK X Y MASK RULES
|
||||||
# Changes the terrain for a given area
|
# Changes the terrain for a given area
|
||||||
# For example we could create a castle at 10,12:
|
#
|
||||||
# #define CASTLE_MASK
|
# For example, we could create a castle at 10,12:
|
||||||
|
# {MODIFY_TERRAIN_MASK 10 12 (
|
||||||
# CC
|
# CC
|
||||||
# CKC
|
# CKC
|
||||||
# CC
|
# CC
|
||||||
# #enddef
|
# )}
|
||||||
# {MODIFY_TERRAIN_MASK 10 12 ({CASTLE_MASK})}
|
|
||||||
|
|
||||||
#define MODIFY_TERRAIN_MASK X Y MASK RULES
|
|
||||||
[terrain_mask]
|
[terrain_mask]
|
||||||
x={X}
|
x={X}
|
||||||
y={Y}
|
y={Y}
|
||||||
|
@ -46,67 +46,67 @@
|
|||||||
|
|
||||||
#### END OF TABLE OF CONTENTS ####
|
#### END OF TABLE OF CONTENTS ####
|
||||||
|
|
||||||
#macro to define a 'quantity' differently based on difficulty levels
|
|
||||||
#define QUANTITY ATTRIBUTE ON_EASY ON_NORMAL ON_HARD
|
#define QUANTITY ATTRIBUTE ON_EASY ON_NORMAL ON_HARD
|
||||||
|
# Macro to define a 'quantity' differently based on difficulty levels.
|
||||||
#ifdef EASY
|
#ifdef EASY
|
||||||
{ATTRIBUTE}={ON_EASY}
|
{ATTRIBUTE}={ON_EASY}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NORMAL
|
#ifdef NORMAL
|
||||||
{ATTRIBUTE}={ON_NORMAL}
|
{ATTRIBUTE}={ON_NORMAL}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HARD
|
#ifdef HARD
|
||||||
{ATTRIBUTE}={ON_HARD}
|
{ATTRIBUTE}={ON_HARD}
|
||||||
#endif
|
#endif
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#macro to define number of turns for different difficulty levels
|
|
||||||
#define TURNS ON_EASY ON_NORMAL ON_HARD
|
#define TURNS ON_EASY ON_NORMAL ON_HARD
|
||||||
|
# Macro to define number of turns for different difficulty levels.
|
||||||
{QUANTITY turns {ON_EASY} {ON_NORMAL} {ON_HARD}}
|
{QUANTITY turns {ON_EASY} {ON_NORMAL} {ON_HARD}}
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#macro which will let you go {GOLD x y z} to set
|
|
||||||
#the gold depending on easy/medium/hard - x/y/z
|
|
||||||
|
|
||||||
#define GOLD ON_EASY ON_NORMAL ON_HARD
|
#define GOLD ON_EASY ON_NORMAL ON_HARD
|
||||||
|
# Macro which will let you say {GOLD x y z} to set
|
||||||
|
# starting gold depending on easy/medium/hard - x/y/z
|
||||||
{QUANTITY gold {ON_EASY} {ON_NORMAL} {ON_HARD}}
|
{QUANTITY gold {ON_EASY} {ON_NORMAL} {ON_HARD}}
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#define INCOME ON_EASY ON_NORMAL ON_HARD
|
#define INCOME ON_EASY ON_NORMAL ON_HARD
|
||||||
|
# Macro which will let you say {GOLD x y z} to set
|
||||||
|
# per-turn income depending on easy/medium/hard - x/y/z
|
||||||
{QUANTITY income {ON_EASY} {ON_NORMAL} {ON_HARD}}
|
{QUANTITY income {ON_EASY} {ON_NORMAL} {ON_HARD}}
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#macro to define AI attack depth for different difficulty levels (set it to 1-6)
|
|
||||||
#define ATTACK_DEPTH ON_EASY ON_NORMAL ON_HARD
|
#define ATTACK_DEPTH ON_EASY ON_NORMAL ON_HARD
|
||||||
|
# Macro to define AI attack depth for different difficulty levels
|
||||||
|
# (set it to 1-6)
|
||||||
{QUANTITY attack_depth {ON_EASY} {ON_NORMAL} {ON_HARD}}
|
{QUANTITY attack_depth {ON_EASY} {ON_NORMAL} {ON_HARD}}
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#macro to make an AI team not recruit scouts
|
|
||||||
#define NO_SCOUTS
|
#define NO_SCOUTS
|
||||||
|
# Macro to make an AI team not recruit scouts.
|
||||||
villages_per_scout=0
|
villages_per_scout=0
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#macro to quickly pick a random value (in the $random variable, to avoid
|
|
||||||
#cluterring up savegames with such temporary variables)
|
|
||||||
|
|
||||||
#define RANDOM RANGE
|
#define RANDOM RANGE
|
||||||
|
# Macro to quickly pick a random value (in the $random variable, to avoid
|
||||||
|
# cluttering up savegames with such temporary variables).
|
||||||
[set_variable]
|
[set_variable]
|
||||||
name=random
|
name=random
|
||||||
random={RANGE}
|
random={RANGE}
|
||||||
[/set_variable]
|
[/set_variable]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#macro to initialize a variable
|
|
||||||
#define VARIABLE VAR VALUE
|
#define VARIABLE VAR VALUE
|
||||||
|
# Macro to initialize a variable. Strictly a syntatic shortcut.
|
||||||
[set_variable]
|
[set_variable]
|
||||||
name={VAR}
|
name={VAR}
|
||||||
value={VALUE}
|
value={VALUE}
|
||||||
[/set_variable]
|
[/set_variable]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#macro to do mathematical operations on variables
|
|
||||||
#define VARIABLE_OP VAR OP ARG
|
#define VARIABLE_OP VAR OP ARG
|
||||||
|
# Macro to do mathematical operations on variables.
|
||||||
[set_variable]
|
[set_variable]
|
||||||
name={VAR}
|
name={VAR}
|
||||||
{OP}={ARG}
|
{OP}={ARG}
|
||||||
@ -114,13 +114,14 @@ name={VAR}
|
|||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#define CLEAR_VARIABLE VAR
|
#define CLEAR_VARIABLE VAR
|
||||||
|
# Macro to clear a variable previously set.
|
||||||
[clear_variable]
|
[clear_variable]
|
||||||
name={VAR}
|
name={VAR}
|
||||||
[/clear_variable]
|
[/clear_variable]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#macro to iterate over an array
|
|
||||||
#define FOREACH ARRAY VAR
|
#define FOREACH ARRAY VAR
|
||||||
|
# Macro to begin a WML clause that iterates over an array.
|
||||||
{VARIABLE {VAR} 0}
|
{VARIABLE {VAR} 0}
|
||||||
[while]
|
[while]
|
||||||
[variable]
|
[variable]
|
||||||
@ -131,6 +132,7 @@ name={VAR}
|
|||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#define NEXT VAR
|
#define NEXT VAR
|
||||||
|
# Macro to end a WML clause that iterates over an array.
|
||||||
[set_variable]
|
[set_variable]
|
||||||
name={VAR}
|
name={VAR}
|
||||||
add=1
|
add=1
|
||||||
@ -141,21 +143,20 @@ name={VAR}
|
|||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#define DEBUG_MSG MSG
|
#define DEBUG_MSG MSG
|
||||||
|
# Emit a debug message. Meant to be overridden with no-op definition
|
||||||
|
# of the same name for proction use.
|
||||||
[message]
|
[message]
|
||||||
speaker=narrator
|
speaker=narrator
|
||||||
message={MSG}
|
message={MSG}
|
||||||
[/message]
|
[/message]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
#define MODIFY_UNIT FILTER VAR VALUE
|
||||||
|
# Alters a unit variable (such as unit.x, unit.type,
|
||||||
# MODIFY_UNIT alters a unit variable (such as unit.x, unit.type,
|
|
||||||
# unit.side), handling all the storing and unstoring.
|
# unit.side), handling all the storing and unstoring.
|
||||||
#
|
#
|
||||||
# Example that flips all spearmen to side 2:
|
# Example that flips all spearmen to side 2:
|
||||||
# {MODIFY_UNIT type=Spearman side 2}
|
# {MODIFY_UNIT type=Spearman side 2}
|
||||||
|
|
||||||
#define MODIFY_UNIT FILTER VAR VALUE
|
|
||||||
[store_unit]
|
[store_unit]
|
||||||
[filter]
|
[filter]
|
||||||
{FILTER}
|
{FILTER}
|
||||||
@ -180,15 +181,12 @@ message={MSG}
|
|||||||
{CLEAR_VARIABLE MODIFY_UNIT_store}
|
{CLEAR_VARIABLE MODIFY_UNIT_store}
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
#define STORE_UNIT_VAR FILTER VAR TO_VAR
|
||||||
# Stores an attribute of a unit to the given variable.
|
# Stores an attribute of a unit to the given variable.
|
||||||
#
|
#
|
||||||
# Example where this is used to flip all orcs to whatever side James is on:
|
# Example where this is used to flip all orcs to whatever side James is on:
|
||||||
#
|
|
||||||
# {STORE_UNIT_VAR description=James side side_of_James}
|
# {STORE_UNIT_VAR description=James side side_of_James}
|
||||||
# {MODIFY_UNIT race=orc side $side_of_James}
|
# {MODIFY_UNIT race=orc side $side_of_James}
|
||||||
|
|
||||||
#define STORE_UNIT_VAR FILTER VAR TO_VAR
|
|
||||||
[store_unit]
|
[store_unit]
|
||||||
[filter]
|
[filter]
|
||||||
{FILTER}
|
{FILTER}
|
||||||
@ -203,13 +201,12 @@ message={MSG}
|
|||||||
{CLEAR_VARIABLE STORE_UNIT_VAR_store}
|
{CLEAR_VARIABLE STORE_UNIT_VAR_store}
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
#define IF_TERRAIN X Y TYPES CONTENTS
|
||||||
# This is a way to check whether or not the terrain in the given coordinates
|
# This is a way to check whether or not the terrain in the given coordinates
|
||||||
# is of the given type or types. Might be useful, since filtering by terrain
|
# is of the given type or types. Might be useful, since filtering by terrain
|
||||||
# isn't possible directly.
|
# isn't possible directly.
|
||||||
#
|
#
|
||||||
# You can use it for example like this:
|
# You can use it, for example, like this:
|
||||||
#
|
|
||||||
# [event]
|
# [event]
|
||||||
# name=moveto
|
# name=moveto
|
||||||
# first_time_only=no
|
# first_time_only=no
|
||||||
@ -220,8 +217,6 @@ message={MSG}
|
|||||||
# [/then]
|
# [/then]
|
||||||
# )}
|
# )}
|
||||||
# [/event]
|
# [/event]
|
||||||
|
|
||||||
#define IF_TERRAIN X Y TYPES CONTENTS
|
|
||||||
[store_locations]
|
[store_locations]
|
||||||
x={X}
|
x={X}
|
||||||
y={Y}
|
y={Y}
|
||||||
@ -241,7 +236,7 @@ message={MSG}
|
|||||||
{CLEAR_VARIABLE IF_TERRAIN_temp}
|
{CLEAR_VARIABLE IF_TERRAIN_temp}
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
#define CREATE_UNIT SIDE TYPE X Y UNIT_ID OTHER
|
||||||
# Creates a unit of TYPE belonging to SIDE at X,Y. UNIT_ID can be used
|
# Creates a unit of TYPE belonging to SIDE at X,Y. UNIT_ID can be used
|
||||||
# when filtering on it. For example, let's create a wose for player 1
|
# when filtering on it. For example, let's create a wose for player 1
|
||||||
# at 4,7
|
# at 4,7
|
||||||
@ -254,8 +249,6 @@ message={MSG}
|
|||||||
# {CREATE_UNIT 1 "Wose" 4 7 "Woselina" (
|
# {CREATE_UNIT 1 "Wose" 4 7 "Woselina" (
|
||||||
# canrecruit=1
|
# canrecruit=1
|
||||||
# )}
|
# )}
|
||||||
|
|
||||||
#define CREATE_UNIT SIDE TYPE X Y UNIT_ID OTHER
|
|
||||||
[unit]
|
[unit]
|
||||||
side={SIDE}
|
side={SIDE}
|
||||||
type={TYPE}
|
type={TYPE}
|
||||||
@ -268,14 +261,14 @@ message={MSG}
|
|||||||
{OTHER}
|
{OTHER}
|
||||||
[/unit]
|
[/unit]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
#define MOVE_UNIT FILTER TO_X TO_Y
|
||||||
# Moves a unit from its current location to the given location along a
|
# Moves a unit from its current location to the given location along a
|
||||||
# relatively straight line displaying the movement just like [move_unit_fake]
|
# relatively straight line displaying the movement just like [move_unit_fake]
|
||||||
# does.
|
# does.
|
||||||
#
|
#
|
||||||
# Note that setting the destination on an existing unit does not kill either
|
# Note that setting the destination on an existing unit does not kill either
|
||||||
# one, but causes the unit to move to the nearest vacant hex instead.
|
# one, but causes the unit to move to the nearest vacant hex instead.
|
||||||
|
|
||||||
#define MOVE_UNIT FILTER TO_X TO_Y
|
|
||||||
[store_unit]
|
[store_unit]
|
||||||
[filter]
|
[filter]
|
||||||
{FILTER}
|
{FILTER}
|
||||||
@ -317,7 +310,7 @@ message={MSG}
|
|||||||
[redraw][/redraw]
|
[redraw][/redraw]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
#define PUT_TO_RECALL_LIST FILTER
|
||||||
# This places a given unit back to the recall list of the side it is on.
|
# This places a given unit back to the recall list of the side it is on.
|
||||||
# Note however, that the unit is not healed to full health, so when
|
# Note however, that the unit is not healed to full health, so when
|
||||||
# recalled (even if not until the next scenario) the unit may have less
|
# recalled (even if not until the next scenario) the unit may have less
|
||||||
@ -335,8 +328,6 @@ message={MSG}
|
|||||||
#
|
#
|
||||||
# {PUT_TO_RECALL_LIST x,y=20,38}
|
# {PUT_TO_RECALL_LIST x,y=20,38}
|
||||||
# [/event]
|
# [/event]
|
||||||
|
|
||||||
#define PUT_TO_RECALL_LIST FILTER
|
|
||||||
[store_unit]
|
[store_unit]
|
||||||
[filter]
|
[filter]
|
||||||
{FILTER}
|
{FILTER}
|
||||||
@ -357,10 +348,8 @@ message={MSG}
|
|||||||
{NEXT i}
|
{NEXT i}
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
|
||||||
#macro to make a side start a scenario with villages
|
|
||||||
|
|
||||||
#define STARTING_VILLAGES SIDE RADIUS
|
#define STARTING_VILLAGES SIDE RADIUS
|
||||||
|
# Macro to make a side start a scenario with villages
|
||||||
[event]
|
[event]
|
||||||
name=prestart
|
name=prestart
|
||||||
[store_starting_location]
|
[store_starting_location]
|
||||||
@ -393,17 +382,12 @@ name=prestart
|
|||||||
[/event]
|
[/event]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#define MENU_IMG_TXT IMG TXT
|
|
||||||
"&"+{IMG}+"="+{TXT}#enddef
|
|
||||||
|
|
||||||
#define MENU_IMG_TXT2 IMG TXT1 TXT2
|
|
||||||
"&"+{IMG}+"="+{TXT1}+"="+{TXT2}#enddef
|
|
||||||
|
|
||||||
#
|
|
||||||
#USAGE {UNIT (Elvish Fighter) (Myname) ( _ "Myname") 1 1 1}
|
|
||||||
#
|
|
||||||
|
|
||||||
#define UNIT TYPE DESCRIPTION UDESCRIPTION SIDE X Y
|
#define UNIT TYPE DESCRIPTION UDESCRIPTION SIDE X Y
|
||||||
|
# Create a unit with the Loyal trait.
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# {UNIT (Elvish Fighter) (Myname) ( _ "Myname") 1 1 1}
|
||||||
|
#
|
||||||
[unit]
|
[unit]
|
||||||
type={TYPE}
|
type={TYPE}
|
||||||
description={DESCRIPTION}
|
description={DESCRIPTION}
|
||||||
@ -418,6 +402,7 @@ name=prestart
|
|||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
#define UNDEAD_UNIT TYPE SIDE X Y
|
#define UNDEAD_UNIT TYPE SIDE X Y
|
||||||
|
# Create a unit with the Undead and Loyal traits.
|
||||||
[unit]
|
[unit]
|
||||||
type={TYPE}
|
type={TYPE}
|
||||||
side={SIDE}
|
side={SIDE}
|
||||||
@ -430,4 +415,12 @@ name=prestart
|
|||||||
[/unit]
|
[/unit]
|
||||||
#enddef
|
#enddef
|
||||||
|
|
||||||
|
# FIXME: Documentation for these is needed.
|
||||||
|
|
||||||
|
#define MENU_IMG_TXT IMG TXT
|
||||||
|
"&"+{IMG}+"="+{TXT}#enddef
|
||||||
|
|
||||||
|
#define MENU_IMG_TXT2 IMG TXT1 TXT2
|
||||||
|
"&"+{IMG}+"="+{TXT1}+"="+{TXT2}#enddef
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user