v1.9 Syntax Changes
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
v1.9 Syntax Changes
As an official thread has not been made for all the WML syntax changes from 1.8 to 1.9, I decided it would be good to make a thread. If any devs would like to make an official thread instead, feel free to lock this one.
All the changes are separated by version; the "important ones" (a.k.a. tags/values you MUST CHANGE to make 1.8 compatible with 1.9) are in bold.
If there are any you feel also need to be included and/or need to be in bold/separated from the others please tell me.
1.9 in General
* Divisions are now floating point
* [recall] requires a fire_event=yes attribute to fire a "name=recall" event.
* If a unit is made to advance when stored, [unstore_unit] now requires "fire_event=yes" instead of "advance=yes"
1.9.3:
* WML engine:
* New [petrify] tag to auto-petrify the target unit (uses SUF)
* [unpetrify][filter]<SUF> -> [unpetrify]<SUF>
* New [floating_text] tag for creating floating text similar to the damage
and healing numbers.
* Deprecated the following macros: FLOATING_TEXT, CAPTURE_FILTERED_VILLAGES,
SET_OBJECTIVES, VICTORY_CONDITION, DEFEAT_CONDITION, ON_EVENT, ON_PRESTART,
ON_START, ON_SIDETURN, ON_TURN, ON_VICTORY, ON_DEFEAT, ALLOW_UNDO,
ON_TILE_ONCE, SIDE_PLAYER, SIDE_COMPUTER, AMLA_TOUGH, ITM_BOOK1, ITM_TREE1,
RECALL_OR_CREATE_UNIT, RECALL_OR_CREATE, ITM_GLOWING_BRAZIER, and REDRAW.
1.9.2:
* id= in SUFs now accepts a comma-separated list.
* events can be fired depending on a condition using [filter_condition].
* Renamed [removeitem] to [remove_item].
* New [store_reachable_locations] tag for storing the locations reachable (by
movement, attack or vision) of units.
1.9.1:
* Added tag [kill][secondary_unit] for specifying the killing unit.
* Added event: side turn X
* Added event: turn X refresh
* Added events: turn end and turn X end_text
* Added events: side turn end, side X turn end, side turn X end,
and side X turn Y end
1.9.0:
* Added wml action tag: [modify_unit]
* Added wml action tag: [move_unit]
* Deprecated [set_variable]'s random key, use rand instead
* Renamed [unit][status] healable to unhealable so it can default to 'no'
* Added 'side X turn refresh' and 'side X turn Y refresh' event
* Add [replace_schedule] tag, which replaces the time of day schedule
* Added #ifhave/#ifnhave for testing existence of files and directories
* Added [volume] tag, which allows game volume to be changed during scenarios
* Prototype support for [set_global_variable]
* Prototype support for [get_global_variable]
* Prototype support for [clear_global_variable]
* Added [move_units_fake] tag
* Rename all "colour" keys to "color" (in [side] and [label]), same for
"colour_lock"
* New WML macros: ON_DIFFICULTY (a macro that makes using different values
based on difficulty simpler), ON_SIGHTING (a substitute for sighted events)
* Removed WML macros: NEUTRAL_SIDE
All the changes are separated by version; the "important ones" (a.k.a. tags/values you MUST CHANGE to make 1.8 compatible with 1.9) are in bold.
If there are any you feel also need to be included and/or need to be in bold/separated from the others please tell me.
1.9 in General
* Divisions are now floating point
* [recall] requires a fire_event=yes attribute to fire a "name=recall" event.
* If a unit is made to advance when stored, [unstore_unit] now requires "fire_event=yes" instead of "advance=yes"
1.9.3:
* WML engine:
* New [petrify] tag to auto-petrify the target unit (uses SUF)
* [unpetrify][filter]<SUF> -> [unpetrify]<SUF>
* New [floating_text] tag for creating floating text similar to the damage
and healing numbers.
* Deprecated the following macros: FLOATING_TEXT, CAPTURE_FILTERED_VILLAGES,
SET_OBJECTIVES, VICTORY_CONDITION, DEFEAT_CONDITION, ON_EVENT, ON_PRESTART,
ON_START, ON_SIDETURN, ON_TURN, ON_VICTORY, ON_DEFEAT, ALLOW_UNDO,
ON_TILE_ONCE, SIDE_PLAYER, SIDE_COMPUTER, AMLA_TOUGH, ITM_BOOK1, ITM_TREE1,
RECALL_OR_CREATE_UNIT, RECALL_OR_CREATE, ITM_GLOWING_BRAZIER, and REDRAW.
1.9.2:
* id= in SUFs now accepts a comma-separated list.
* events can be fired depending on a condition using [filter_condition].
* Renamed [removeitem] to [remove_item].
* New [store_reachable_locations] tag for storing the locations reachable (by
movement, attack or vision) of units.
1.9.1:
* Added tag [kill][secondary_unit] for specifying the killing unit.
* Added event: side turn X
* Added event: turn X refresh
* Added events: turn end and turn X end_text
* Added events: side turn end, side X turn end, side turn X end,
and side X turn Y end
1.9.0:
* Added wml action tag: [modify_unit]
* Added wml action tag: [move_unit]
* Deprecated [set_variable]'s random key, use rand instead
* Renamed [unit][status] healable to unhealable so it can default to 'no'
* Added 'side X turn refresh' and 'side X turn Y refresh' event
* Add [replace_schedule] tag, which replaces the time of day schedule
* Added #ifhave/#ifnhave for testing existence of files and directories
* Added [volume] tag, which allows game volume to be changed during scenarios
* Prototype support for [set_global_variable]
* Prototype support for [get_global_variable]
* Prototype support for [clear_global_variable]
* Added [move_units_fake] tag
* Rename all "colour" keys to "color" (in [side] and [label]), same for
"colour_lock"
* New WML macros: ON_DIFFICULTY (a macro that makes using different values
based on difficulty simpler), ON_SIGHTING (a substitute for sighted events)
* Removed WML macros: NEUTRAL_SIDE
Last edited by bigkahuna on February 26th, 2011, 4:45 pm, edited 6 times in total.
Re: v1.9 Syntax Changes
This list is getting rather large, and looks like a change-log. Do you think it would be better to only post the things that break old code (such as a deprecated macro)?
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
Re: v1.9 Syntax Changes
EDIT: Altered to only include the major new tags and such. And, as it is a developer version, it MUST be in changelog form for those who haven't uploaded the newest version.
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: v1.9 Syntax Changes
I do - only compatibility-breaking changes. Deprecated macros aren't that important too since the 1.9 preprocessor chokes on unresolved macros (and wmlscope detects them too).doofus-01 wrote:Do you think it would be better to only post the things that break old code (such as a deprecated macro)?
also
[unpetrify][filter]<SUF> -> [unpetrify]<SUF>
Other good place to look (than the full changelog's wml engine section) is wmllint (open in a text editor) (or apply it). And wmlscope will detect if you have unresolved resource references (e.g. some core soundfile you're using got renamed and you didn't notice (how could you).)
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
Re: v1.9 Syntax Changes
All the more reason to fix them before the processor chokesAnonymissimus wrote:Deprecated macros aren't that important too since the 1.9 preprocessor chokes on unresolved macros (and wmlscope detects them too).
Seriously though, a lot of people (cough) can't or don't know how to use wmllint/scope. My wmllint breaks for some reason whenever I try to use it.
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: v1.9 Syntax Changes
Even then one can interprete the list of renamings and such given in wmllint.bigkahuna wrote:Seriously though, a lot of people (cough) can't or don't know how to use wmllint/scope. My wmllint breaks for some reason whenever I try to use it.
Code: Select all
# Changes just before 1.9.1
("[colour_adjust]", "[color_adjust]"),
("[/colour_adjust]", "[/color_adjust]"),
("colour=", "color="),
("colour_lock=", "color_lock="),
# Changes just before 1.9.2
("[removeitem]", "[remove_item]"),
("[/removeitem]", "[/remove_item]"),
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
Re: v1.9 Syntax Changes
I've followed the examples and I have the correct paths, my comp just doesn't process it well for some reason. This is just a handy list for those who need it. I think making a list like this is better than telling everyone to just figure out how to use wmllint, making them install python and having to path everything.Anonymissimus wrote:(You weren't around when I started using wmllint btw - there was not even a single example on how to do it on win; now there are several in the forum and wiki.)
-
- Inactive Developer
- Posts: 2461
- Joined: August 15th, 2008, 8:46 pm
- Location: Germany
Re: v1.9 Syntax Changes
In 1.8, [recall] and [unstore_unit]advance=yes (when a unit advances) did forcefully fire the according events. In 1.9 you need to insert fire_event=yes if you relied on this.
[teleport]ignore_passability= (default no) -> [teleport]check_passability= (default yes)
[teleport]ignore_passability= (default no) -> [teleport]check_passability= (default yes)
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
A Simple Campaign: campaign draft for wml starters • Plan Your Advancements: mp mod
The Earth's Gut: sp campaign • Settlers of Wesnoth: mp scenario • Wesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign
- Alarantalara
- Art Contributor
- Posts: 786
- Joined: April 23rd, 2010, 8:17 pm
- Location: Canada
Re: v1.9 Syntax Changes
I don't recall when it happened, but terrain animation start points were randomized at some point in 1.9
I went looking through the code yesterday and saw that there is a new random_start key for [image] and [variant] in terrain. If your animated terrain is breaking visually, you can set this to no to restore old behaviour.
I went looking through the code yesterday and saw that there is a new random_start key for [image] and [variant] in terrain. If your animated terrain is breaking visually, you can set this to no to restore old behaviour.