From Wesnoth
|
edit
WML Tags
|
| A:
abilities,
about,
advanced_preference,
advancefrom,
advancement,
advances,
ai,
allow_recruit,
allow_undo,
and,
animate_unit,
animation,
array,
attack,
attack_filter,
attacks,
avoid;
|
| B:
base_unit, binary_path, bold, brush;
|
| C:
campaign,
capture_village,
case,
choose,
clear_variable,
colour_adjust,
command(action, replay);
|
| D:
damage,
deaths,
debug_message,
defend,
defends,
defense,
delay,
destination,
disallow_recruit,
do;
|
| E:
editor_group,
editor_music,
editor_times,
editor_tool_hint,
effect,
else,
endlevel,
end_turn (action, replay),
era,
event,
expenses;
|
| F:
filter,
filter,
filter_attack,
filter_attack,
filter_location,
filter_second,
filter_second,
filter_second_attack,
filter_second_attack,
filter_vision,
filter_wml,
fire_event,
format,
frame;
|
| G:
game_config,
generator,
gold,
gold;
|
| H:
have_location,
have_unit,
header,
heal_unit,
hide_help,
hide_unit;
|
| I:
if,
illuminated_time,
image,
img,
income,
init_side,
insert_tag,
inspect,
italic,
item;
|
| J:
jump,
join;
|
| K:
kill,
killed;
|
| L:
label (map, theme),
language,
leader_goal,
lua;
|
| M:
main_map,
menu,
message,
mini_map,
missile_frame,
modifications,
modify_side,
modify_turns,
move,
move_unit_fake,
movement costs,
movetype,
multiplayer,
multiplayer_side,
music;
|
| N:
neighbour_unit_filter,
not,
not,
num_units;
|
| O:
object,
objectives,
objective,
observers,
open_help,
option,
or;
|
| P:
panel, part, place_shroud, position,
print, protect_location, protect_unit;
|
| R:
race, random, recall (action,
replay), recalls,
recruit, recruits, redraw,
ref, remove_shroud, remove_unit_overlay,
removeitem, remove_sound_source,
replace_map replay, replay_start,
resistance, resolution, results, role;
|
| S:
save, scenario,
scroll, scroll_to,
scroll_to_unit, secondary_attack_filter, secondary_unit_filter, section,
set_menu_item, set_recruit,
set_variable, set_variables, show_objectives,
side, side_playing, snapshot,
sound, sound_source, source, special_filter, special_filter_second,
split,
statistics,
status, stone, store_gold, store_locations,
store_map_dimensions,
store_side, store_starting_location, store_time_of_day, store_unit, store_villages story,
switch;
|
| T:
target,
team,
teleport, teleport_anim,
terrain(define, create), terrain_graphics, terrain_mask, test,
textdomain, text_input, theme, then,
tile, time, time_area (action, scenario),
time_of_day,
topic, toplevel, trait, turn, tutorial;
|
| U:
unhide_unit, unit (define, create),
unit_abilities, unit_alignment, unit_description, unit_filter, unit_hp, unit_image, unit_level, unit_moves,
unit_overlay, unit_profile, unit_status,
unit_traits, unit_type, unit_weapons, unit_xp,
units, unstone, unstore_unit, upkeep;
|
| V:
variable,
variables,
village,
villages;
|
| W:
while,
wml_message;
|
The time of day influences damage done by lawful and chaotic units; this makes timing of your attack important.
Graphically time of day is represented by a picture (landscape with sun or moon) in the status table, and by darkening the screen during night turns.
Scenario author can schedule the times of day in scenario; use the pre-defined time macros, or create new times of day.
The [time] and [illuminated_time] tags
The [time] tag is a subtag of the [scenario] tag. However, most scenarios do not use these directly, but usually use the ready macros {DAWN}, {MORNING}, {AFTERNOON}, {DUSK}, {FIRST_WATCH}, {SECOND_WATCH} and {UNDERGROUND} to specify the day-night cycle.
See data/core/macros/schedules.cfg for the definitions of these IDs.
The [time] tag describes a single turn of a day/night sequence. When a scenario is played, the first turn is described by the first [time] tag; the second described by the second, until there are no more. After all the tags have described a turn, the next turn is described by the first tag again.
The [time] tag recognizes the following keys:
- id: the id by which you can reference this time, e.g. in the time_of_day tag of AiWML.
- name: (translatable) the name displayed when the cursor is over the day/night image.
- image: the image displayed at the top of the Status Table during turns of this type.
- mask: the image displayed over all hexes during turns of this type.
- lawful_bonus: units with alignment=lawful do +//lawful_bonus % damage during turns of this type. Units with alignment=chaotic do -lawful_bonus % damage. Units with alignment=neutral are unaffected by this key. lawful_bonus can be a negative number. This is useful if you want to give Chaotic units an advantage instead of Lawful ones.
- red, green, blue: describe the tint of the screen during the time period. Appears to be an integer value from -255 to 255. See schedules.cfg for examples.
- sound: a sound to play (in sounds/) when changing into this time of day.
Scheduling time
The [scenario] tag contains a few [time] tags (or macros).
These time tags are used in a loop, that is: first time tag is used during the first turn, then second one,... and when all time tags passed then again the first one, second one, etc.
The typical day/night cycle looks like this:
{DAWN}
{MORNING}
{AFTERNOON}
{DUSK}
{FIRST_WATCH}
{SECOND_WATCH}
To avoid day/night cycle, use a neutral time of day, for example:
{DAWN}
In underground, use a special time of day.
It works like night; that is it gives advantage to chaotic units and disadvantage to lawful units.
{UNDERGROUND}
See Also
This page was last modified on 4 January 2010, at 14:59.