CompatibilityBreakingChanges
From The Battle for Wesnoth Wiki
This lists removed WML functionality and helpful hints for avoiding pitfalls.
The previous list is available here.
Contents
Compatibility breaking changes between 1.18 and 1.19/1.20
Compatibility breaking (requires updates to work)
- [kill] now reduces target unit hitpoints to 0 before triggering last_breath, die events. This affects mentioned events that rely on [have_unit] conditions.
- WFL Removed properties unit.side and terrain.owner. Use unit.side_number and terrain.owner_side instead. They return 1-indexed side, removed properties returned 0-indexed side.
- Abilities with both add and sub now calculate value differently
- rotate_loc_around formula now works
- [era] with id=era_dunefolk does not exist anymore
- [side]'s leader attribute has been removed
- [side]'s [variables] tag is now used to set side variables. Use [side]'s [leader] tag to set a unit variable.
- Setting gold to decimal value fails with error. Previously it was converted to int automatically. As of 1.19.21, automatic conversion is only done in [gold], but not in Lua or [modify_side].
- The following macros were removed (#11126)
- EARLY_FINISH_BONUS_NOTE
- NO_EARLY_FINISH_BONUS_NOTE
- NO_GOLD_CARRYOVER_NOTE
- NEW_GOLD_CARRYOVER_NOTE_100
- NEW_GOLD_CARRYOVER_NOTE_40
- NEW_GOLD_CARRYOVER_NOTE_20
- MISSILE_FRAME_FIREBALL
- MESSAGE
- STORY_PART_SPEECH
- LOYAL_UNDEAD_UNIT
- ON_SIGHTING
- MAKE_AI_SIDE_PERSISTENT
- DRAKE_FLYING_ANIM
- NO_INTERRUPT_NO_UNDO
- ENABLE_NIGHTBLADE
Deprecations (will continue to work for now)
- rechange [experimental_filter_ability/active] and [experimental_filter_specials] to [filter_ability] and [filter_specials] and make "experimental_" deprecated.
New features (help fill this list, https://wiki.wesnoth.org/Special:WhatLinksHere/Template:DevFeature1.19)
- StandardAbilityFilter, including 7814
- [resistance] min_value
- [attack] alignment
- New events unit_hits, unit_misses
- Positive attack_weight now affects weapon selection
- Unit attack [effect]+Lua+formula API min_range and max_range
- Lua unit attributes fearless and healthy
- wesnoth.game_config shows some color-related values
- wesnoth.units.rebuild
- stringx.ends_with, stringx.starts_with
- Unit formula new attributes objects, advancements_taken, traits_count, objects_count, advancements_taken_count, fearless, healthy
- Formula functions lerp_index, ends_with, replace_all, starts_with, get_palette
- Custom themes https://wiki.wesnoth.org/GUIToolkit#Custom_themes
- Abilities and specials now support [event] (does not work correctly due to [issue]10819[/issue])
- Ability & Weapon specials registry (10644) (does not work correctly if ability contains [event] due to [issue]10819[/issue])
- [effect][remove_specials]
- Expose unit pick dialog to Lua as a simple API call (8829)
- [fire_event][data] can be accessed from other event as $data
- Unit Type Editor
- [era]auto_sort allows to use custom faction ordering
- [terrain_defaults] formula is now working as expected in case formula evaluates to null
- [set_menu_item] description substitutes variables when rightclick is used
- [defense]
- [resistance_defaults] is not causing OOS in random maps anymore
- Ability/weapon special descriptions support po variables in descriptions like $add, $sub etc that contain the value of the relevant key. (10053, 10293, 10749)
- Ability/weapon special help page ids now follow the format: ability_<unique_id> or weaponspecial_<unique_id> (11012).
- A lot more functions were added to https://wiki.wesnoth.org/LuaAPI/types/widget with https://wiki.wesnoth.org/index.php?title=LuaAPI%2Ftypes%2Fwidget&type=revision&diff=74843&oldid=74842