Important v1.6 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.
Important v1.6 Syntax Changes
(unit description disambiguation):
(unit disambiguation)
when defining a unit type and NOT spawning a unit:
(filter concordance)
when filtering:
Note: the wmllint utility can help you make these changes automatically.
Code: Select all
description --> id
user_description --> name
unit_description --> description
when defining a unit type and NOT spawning a unit:
Code: Select all
[unit] --> [unit_type]
when filtering:
Code: Select all
[special_filter] --> [filter_attack]
[wml_filter] --> [filter_wml]
[unit_filter] --> [filter]
[secondary_unit_filter] --> [filter_second]
[attack_filter] --> [filter_attack]
[secondary_attack_filter] --> [filter_second_attack]
[special_filter_second] --> [filter_second_attack]
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
Re: Important v1.5 Syntax Changes
(less important) In themeWML, to be consistent with the above :
Code: Select all
[unit_description] -> [unit_name]
"Ooh, man, my mage had a 30% chance to miss, but he still managed to hit! Awesome!" -- xtifr
Re: Important v1.5 Syntax Changes
So that means that[multiplayer_side]:
-name, no longer takes a complex set of characters to provide both an image and some text (MENU_IMG_TXT), just a single translatable string.
new tags:
-image, to take up the functionality stripped from name. Note that no ~RC is needed because the images are automatically team-coloured based on actual team now.
-flag_rgb, better known as MAGENTA_IS_THE_TEAM_COLOR, for automatic team-colouring.
Code: Select all
name={MENU_IMG_TXT "minotaurs/shaman.png~RC(magenta>red)" _"Minotaurs"}
Code: Select all
name= _"Minotaurs"
image=minotaurs/shaman.png
{MAGENTA_IS_THE_TEAM_COLOR}
Last edited by AI on November 1st, 2008, 9:51 pm, edited 1 time in total.
Reason: Cleared up which tag the post is about.
Reason: Cleared up which tag the post is about.
Re: Important v1.5 Syntax Changes
one change you should be careful of in 1.5.6... empty attributes are now filterable
so [filter] level={OPTIONAL_VALUE} # won't work anymore
and level="$null" will always be false in 1.5.6, while previously it was ignored
this change will allow you to filter things that are empty. also it's more intuitive in my view and makes some bugs easier to diagnose
so [filter] level={OPTIONAL_VALUE} # won't work anymore
and level="$null" will always be false in 1.5.6, while previously it was ignored
this change will allow you to filter things that are empty. also it's more intuitive in my view and makes some bugs easier to diagnose
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."
Re: Important v1.5 Syntax Changes
The advanceto= attribute for [unit_type] was renamed in Wesnoth 1.5.4 to advances_to= .
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
Re: Important v1.5 Syntax Changes
Oh, and somebody finally removed backwards compatibility for letter= in [terrain]
Last edited by Iris on March 23rd, 2009, 12:33 pm, edited 1 time in total.
Reason: [terrain], not [modify_terrain]
Reason: [terrain], not [modify_terrain]
CHKDSK has repaired bad sectors in CHKDSK.EXE
Re: Important v1.5 Syntax Changes
in attack filters of events, you now must use name= to filter for the name of the weapon (not weapon= )
http://www.wesnoth.org/wiki/User:Sapient... "Looks like your skills saved us again. Uh, well at least, they saved Soarin's apple pie."