Compatibility-breaking changes between 1.18 and 1.19/1.20

The place to post your WML questions and answers.

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.
Post Reply
User avatar
Ravana
Forum Moderator
Posts: 3313
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Compatibility-breaking changes between 1.18 and 1.19/1.20

Post by Ravana »

This lists removed WML functionality and helpful hints for avoiding pitfalls.

A similar thread for changes before 1.18 can be found here.

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.
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:WhatLi ... eature1.19)
  • StandardAbilityFilter, including https://github.com/wesnoth/wesnoth/pull/7814/files
  • [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]
  • [effect][remove_specials]
  • #8829 Expose unit pick dialog to Lua as a simple API call
  • [fire_event][data] can be accessed from other event as $data
  • Unit Type Editor
Post Reply