-
-
Notifications
You must be signed in to change notification settings - Fork 990
/
image-utils.cfg
324 lines (295 loc) · 7.28 KB
/
image-utils.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
#textdomain wesnoth
# Utility macros for images, overlays, and display effects.
# These don't depend on any other macros. Please don't change this.
#define COLOR_HEAL
color="0,255,0"
#enddef
#define COLOR_HARM
color="255,0,0"
#enddef
#define COLOR_WHITE
color="255,255,255"
#enddef
## TODO: this was moved to the loyal trait but a few codes used with witouht the loyal trait,
## so i'll leave it for now. since this icon is afaik not transparent though should not be a problem.
#define IS_HERO
# Embed this into a unit declaration to add a hero icon to the unit.
overlays="misc/hero-icon.png"
ellipse="misc/ellipse-hero"
#enddef
#define IS_LOYAL
# Embed this into a unit declaration to add a loyalty icon to the unit.
overlays="misc/loyal-icon.png"
#enddef
#define IS_EXPENDABLE_LEADER
# Embed this into a unit declaration to add an expendable leader icon to the unit.
overlays="misc/leader-expendable.png"
#enddef
#define NEW_JOURNEY X Y
# Make a new journey mark on a tracking map
[image]
x,y={X},{Y}
file=misc/new-journey.png
delay=500
centered=yes
[/image]
#enddef
#define OLD_JOURNEY X Y
# Make an old journey mark on a tracking map
[image]
x,y={X},{Y}
file=misc/dot-white.png
centered=yes
[/image]
#enddef
#define NEW_BATTLE X Y
# Make a new battle mark on a tracking map, with a blinking animation.
# Because of the animation, generally you should only use this as the final
# journey marker in any given story screen.
[image]
x,y={X},{Y}
file=misc/new-battle2.png
delay=500
centered=yes
[/image]
[image]
x,y={X},{Y}
file=misc/new-battle.png
delay=500
centered=yes
[/image]
[image]
x,y={X},{Y}
file=misc/new-battle2.png
delay=500
centered=yes
[/image]
[image]
x,y={X},{Y}
file=misc/new-battle.png
delay=500
centered=yes
[/image]
[image]
x,y={X},{Y}
file=misc/new-battle2.png
delay=500
centered=yes
[/image]
#enddef
#define OLD_BATTLE X Y
# Make an old battle mark on a tracking map
[image]
x,y={X},{Y}
file=misc/cross-white.png
centered=yes
[/image]
#enddef
#define NEW_REST X Y
# Make a new rest mark on a tracking map, with a blinking animation.
# Because of the animation, generally you should only use this as the final
# journey marker in any given story screen.
[image]
x,y={X},{Y}
file=misc/flag-red.png
delay=500
centered=yes
[/image]
[image]
x,y={X},{Y}
file=misc/flag-red2.png
delay=500
centered=yes
[/image]
[image]
x,y={X},{Y}
file=misc/flag-red.png
delay=500
centered=yes
[/image]
[image]
x,y={X},{Y}
file=misc/flag-red2.png
delay=500
centered=yes
[/image]
[image]
x,y={X},{Y}
file=misc/flag-red.png
delay=500
centered=yes
[/image]
#enddef
#define OLD_REST X Y
# Make an old rest mark on a tracking map
[image]
x,y={X},{Y}
file=misc/flag-white.png
centered=yes
[/image]
#enddef
#define PLACE_IMAGE IMAGE X Y
# Place an image at a specified location on the map.
[item]
x={X}
y={Y}
image={IMAGE}
[/item]
#enddef
#define REMOVE_IMAGE X Y
# Removes a previously set image from a tile.
#
# Example:
#! {REMOVE_IMAGE 14 5}
[remove_item]
x,y={X},{Y}
[/remove_item]
#enddef
#define TEAM_COLOR_OVERRIDE FILTER TEAMCOLOR_ID
# Override the team color of filtered units.
[object]
silent=yes
[filter]
{FILTER}
[/filter]
[effect]
apply_to=image_mod
add=RC(magenta>{TEAMCOLOR_ID})
[/effect]
[/object]
#enddef
#define MAKE_NONLOYAL ID_STRING
[remove_trait]
id={ID_STRING}
trait_id=loyal
[/remove_trait]
#enddef
#define MAKE_LOYAL_HERO ID_STRING
## remove previous loyal trait if they exist.
[remove_trait]
id={ID_STRING}
trait_id=loyal
[/remove_trait]
[modify_unit]
[filter]
id={ID_STRING}
[/filter]
{TRAIT_LOYAL_HERO}
canrecruit=no
[/modify_unit]
#enddef
#define MAKE_LOYAL_NORMAL ID_STRING
## remove previous loyal trait if they exist.
[remove_trait]
id={ID_STRING}
trait_id=loyal
[/remove_trait]
[modify_unit]
[filter]
id={ID_STRING}
[/filter]
{TRAIT_LOYAL}
canrecruit=no
[/modify_unit]
#enddef
#define MAKE_LOYAL_LEADER ID_STRING
## remove previous loyal trait if they exist.
[remove_trait]
id={ID_STRING}
trait_id=loyal
[/remove_trait]
[modify_unit]
[filter]
id={ID_STRING}
[/filter]
canrecruit=yes
[/modify_unit]
#enddef
#define MAKE_HERO ID_STRING
# Give an existing unit a hero overlay
[unit_overlay]
id={ID_STRING}
image=misc/hero-icon.png
[/unit_overlay]
[object]
silent=yes
duration=forever
[filter]
id={ID_STRING}
[/filter]
[effect]
apply_to=ellipse
ellipse="misc/ellipse-hero"
[/effect]
[/object]
#enddef
#define UNMAKE_HERO ID_STRING
# Remove the hero overlay from a unit
[remove_unit_overlay]
id={ID_STRING}
image=misc/hero-icon.png
[/remove_unit_overlay]
[object]
silent=yes
duration=forever
[filter]
id={ID_STRING}
[/filter]
[effect]
apply_to=ellipse
ellipse="misc/ellipse"
[/effect]
[/object]
#enddef
#define FLAG_VARIANT NAME
# Enable the specified flag variant: knalgan, loyalist, ragged,
# long, undead, or wood-elvish. Use within a [side] block; only
# affects that side.
# Since the ragged variant has six frames instead of the usual four,
# for that flag it's better to use FLAG_VARIANT6 below instead.
# wmlscope: start ignoring
flag=flags/{NAME}-flag-[1~4].png:150
flag_icon=flags/{NAME}-flag-icon.png
# wmlscope: stop ignoring
#enddef
#define FLAG_VARIANT6 NAME
# Like FLAG_VARIANT, but this supports flags with six frames.
# Currently only the ragged flag has six frames.
# wmlscope: start ignoring
flag=flags/{NAME}-flag-[1~6].png:150
flag_icon=flags/{NAME}-flag-icon.png
# wmlscope: stop ignoring
#enddef
#define ANIMATED_MAUSOLEUM X Y
# Embed this at scenario toplevel, not within an event.
# Note that it will freeze while dialogue popups are onscreen.
[terrain_graphics]
x={X}
y={Y}
[tile]
x=0
y=0
set_flag=mausoleum
[/tile]
[/terrain_graphics]
[terrain_graphics]
map="
, *
* , *
, 1
* , *
, *"
[tile]
pos=1
has_flag=mausoleum
[/tile]
[image]
layer=0
center=92,138
# wmlscope: start ignoring
# FIXME: More implicit-path breakage
name="../scenery/mausoleum[01~18].png:140"
# wmlscope: stop ignoring
[/image]
[/terrain_graphics]
#enddef