Compatibility-breaking changes between 1.16 and 1.17/1.18
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.
- Pentarctagon
- Project Manager
- Posts: 5592
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Compatibility-breaking changes between 1.16 and 1.17/1.18
This lists removed WML functionality and helpful hints for avoiding pitfalls.
A similar thread for changes before 1.16 can be found here.
Compatibility breaking (requires updates to work)
A similar thread for changes before 1.16 can be found here.
Compatibility breaking (requires updates to work)
[heal_unit]
no longer sets theheal_amount
variable, instead supporting thevariable
attribute. This variable will be an array with each element containing the id of the unit healed and the amount that unit was healed for.- The [kill] tag now explicitly no longer accepts [filter].
- Getting a unit's
jamming_cost
now actually returns that value instead of the unit's vision. - [resistance] abilities that don't specify a
max_value
now defaults their max value to 100 instead of 0. - Custom status icons no longer have transparent padding cropped off by the engine. It either needs to be cropped off the image itself, or the
~CROP_TRANSPARENT()
IPF can be added. - Unit sprites:
- Elvish Fighter moved to
units/elves-wood/fighter/fighter.png
. - Naga Fighter moved to
units/nagas/fighter/fighter.png
. - Naga Warrior moved to
units/nagas/fighter/warrior.png
. - Naga Myrmidon moved to
units/nagas/fighter/myrmidon
. - Naga Guardian moved to
units/nagas/guardian/guardian.png
. - Naga Sentinel moved to
units/nagas/guardian/sentinel.png
. - Naga Warden moved to
units/nagas/guardian/warden.png
. - Naga Dirkfang moved to
units/nagas/mixed/dirkfang.png
. - Naga Ophidian moved to
units/nagas/mixed/ophidian.png
. - Naga Ringcaster moved to
units/nagas/mixed/ringcaster.png
. - Naga Sicarius moved to
units/nagas/mixed/sicarius.png
. - Naga Zephyr moved to
units/nagas/mixed/zephyr.png
. units/human-loyalists/spearman-attack-ranged.png
changed tounits/human-loyalists/spearman-attack-ranged1.png
,units/human-loyalists/spearman-attack-ranged2.png
,units/human-loyalists/spearman-attack-ranged3.png
.units/human-loyalists/spearman-attack-ne.png
changed tounits/human-loyalists/spearman-attack-ne1.png
,units/human-loyalists/spearman-attack-ne2.png
,units/human-loyalists/spearman-attack-ne3.png
.units/human-loyalists/swordsman-defend.png
changed tounits/human-loyalists/swordsman-defend1.png
,units/human-loyalists/swordsman-defend2.png
.units/human-loyalists/general-leading.png
changed tounits/human-loyalists/general-leading1.png
,units/human-loyalists/general-leading2.png
,units/human-loyalists/general-leading3.png
.units/human-loyalists/swordsman-attack-*
changed tounits/human-loyalists/swordsman-attack-se-*
.- The
units/human-loyalists/spearman-attack-s-*
images are removed. - The
units/human-loyalists/spearman-attack-se
4-14 images are removed. - The
units/human-loyalists/swordsman-idle-*
images are removed. - Ghost, Nightgaunt, Shadow, Spectre, and Wraith sprites moved from
units/undead/
tounits/undead-spirit/
- Elvish Fighter moved to
- Almost all .jpg story images have been converted to .webp, and their filenames changed to match. However, the engine won't automatically look for the renamed images (it does for .png, but not .jpg).
- Change terrain codes "Irs, Ias, Icr, Ior, and Icn" to "Isr, Isa, Isc, Iwo, and Iwc", respectively.
- Lua function
wesnoth.fire_event
-->wesnoth.game_events.fire
. - Lua function
wesnoth.fire_event_by_id
-->wesnoth.game_events.fire_by_id
. - Lua function
wesnoth.remove_event_handler
-->wesnoth.game_events.remove
. - Terrain macros: a lot - search for "#deprecated 2 1.19.0" in 19fcc1424fd75386e524b9115a42e2804b98dc8c.
- Lua function
helper.set_wml_action_metatable
-->wml.fire.tag
. - Lua script
helper.lua
. Everything in this module has been moved into the core modules. - Unit "Giant Stoat" --> "Frost Stoat".
- FormulaAI (FAI).
- Lua function
wesnoth.print
-->wesnoth.interface.add_overlay_text
. map_file
when passed a .cfg file --> useinclude_file
instead.- All special notes macros.
- Lua function
ai_helper.split
-->stringx.split
.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
- Atreides
- Posts: 1079
- Joined: March 30th, 2019, 10:38 pm
- Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off
Re: Compatibility-breaking changes between 1.16 and 1.17/1.18
Undead ghosty sprites also have moved into spirit subdirectories.
- Elvish_Hunter
- Posts: 1584
- Joined: September 4th, 2009, 2:39 pm
- Location: Lintanir Forest...
Re: Compatibility-breaking changes between 1.16 and 1.17/1.18
As of 28cea58, wmllint is capable of both updating the sprite paths and warning about
[filter]
in [kill]
tags.Current maintainer of these add-ons, all on 1.16:
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
The Sojournings of Grog, Children of Dragons, A Rough Life, Wesnoth Lua Pack, The White Troll (co-author)
- Pentarctagon
- Project Manager
- Posts: 5592
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Compatibility-breaking changes between 1.16 and 1.17/1.18
Added the note about custom status icons.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
-
- Posts: 1285
- Joined: August 26th, 2018, 11:46 pm
- Location: A country place, far outside the Wire
Re: Compatibility-breaking changes between 1.16 and 1.17/1.18
I just spent several minutes searching for this thread (couldn't think of a good search query). Might be nice to add a link to at least the dev branch release announcements like viewtopic.php?t=57624
Seems a little odd being under WML Workshop since there's so much lua included. Not enough to move it since so many are probably used to finding it here, but odd nonetheless.
End rant.
Seems a little odd being under WML Workshop since there's so much lua included. Not enough to move it since so many are probably used to finding it here, but odd nonetheless.
End rant.
Speak softly, and carry Doombringer.
- Pentarctagon
- Project Manager
- Posts: 5592
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Compatibility-breaking changes between 1.16 and 1.17/1.18
Mostly it's just how it's always been - these threads predate there being a Lua Labs forum at all. But also it's because more people use WML Workshop than Lua Labs.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
-
- Posts: 1285
- Joined: August 26th, 2018, 11:46 pm
- Location: A country place, far outside the Wire
Re: Compatibility-breaking changes between 1.16 and 1.17/1.18
What about units/human-loyalists/spearman-attack-ranged.png?
Looks like units/human-loyalists/spearman-attack-ranged2.png is the best fit, but perhaps the idea is to use all three (I don't know anything about animation, I just got an error).
See also units/human-loyalists/spearman-attack-s-*
Looks like units/human-loyalists/spearman-attack-ranged2.png is the best fit, but perhaps the idea is to use all three (I don't know anything about animation, I just got an error).
See also units/human-loyalists/spearman-attack-s-*
Speak softly, and carry Doombringer.
- Pentarctagon
- Project Manager
- Posts: 5592
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Compatibility-breaking changes between 1.16 and 1.17/1.18
It means that the defend animation was expanded from 1 frame to 3 frames, and it looks like the original defend image isn't present anymore.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
-
- Posts: 1285
- Joined: August 26th, 2018, 11:46 pm
- Location: A country place, far outside the Wire
Re: Compatibility-breaking changes between 1.16 and 1.17/1.18
Thanks. I was mostly just concerned if it should be on your list.
And I notice wmllint doesn't catch it, but I've used that like three times so I'm not sure what to expect.
And I notice wmllint doesn't catch it, but I've used that like three times so I'm not sure what to expect.
Speak softly, and carry Doombringer.
- Pentarctagon
- Project Manager
- Posts: 5592
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Compatibility-breaking changes between 1.16 and 1.17/1.18
I've added it - a lot of the sprite file changes weren't documented anywhere or added to wmllint unfortunately.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
-
- Posts: 1285
- Joined: August 26th, 2018, 11:46 pm
- Location: A country place, far outside the Wire
Re: Compatibility-breaking changes between 1.16 and 1.17/1.18
units/human-loyalists/spearman-attack-ne -> ne1, ne1, ne3
units/human-loyalists/spearman-attack-se[4-14] removed
units/human-loyalists/swordsman-attack-[1-2] > se[1-8]
units/human-loyalists/swordsman-defend -> defend-1, defend-2
units/human-loyalists/swordsman-idle-[1-12] removed
units/human-loyalists/general-leading.png -> leading[1-3]
Note that what I list here is just based on filenames. I don't do animations so someone would need to confirm.
units/human-loyalists/spearman-attack-se[4-14] removed
units/human-loyalists/swordsman-attack-[1-2] > se[1-8]
units/human-loyalists/swordsman-defend -> defend-1, defend-2
units/human-loyalists/swordsman-idle-[1-12] removed
units/human-loyalists/general-leading.png -> leading[1-3]
Note that what I list here is just based on filenames. I don't do animations so someone would need to confirm.
Speak softly, and carry Doombringer.
- Pentarctagon
- Project Manager
- Posts: 5592
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Compatibility-breaking changes between 1.16 and 1.17/1.18
Alright, added those as well.
units/human-loyalists/swordsman-attack-[1-2] > se[1-8]
isn't really a compatibility issue though, since the 1 and 2 images still exist?99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
-
- Posts: 1285
- Joined: August 26th, 2018, 11:46 pm
- Location: A country place, far outside the Wire
Re: Compatibility-breaking changes between 1.16 and 1.17/1.18
No, the 1 and 2 (and 3, my bad) are removed. Everything is now attacks-se:
/opt/wesnoth-1.17-git/share/wesnoth/data/core/images/units/human-loyalists/swordsman-attack-se-1.png
/opt/wesnoth-1.17-git/share/wesnoth/data/core/images/units/human-loyalists/swordsman-attack-se-2.png
/opt/wesnoth-1.17-git/share/wesnoth/data/core/images/units/human-loyalists/swordsman-attack-se-3.png
/opt/wesnoth-1.17-git/share/wesnoth/data/core/images/units/human-loyalists/swordsman-attack-se-4.png
/opt/wesnoth-1.17-git/share/wesnoth/data/core/images/units/human-loyalists/swordsman-attack-se-5.png
/opt/wesnoth-1.17-git/share/wesnoth/data/core/images/units/human-loyalists/swordsman-attack-se-6.png
/opt/wesnoth-1.17-git/share/wesnoth/data/core/images/units/human-loyalists/swordsman-attack-se-7.png
/opt/wesnoth-1.17-git/share/wesnoth/data/core/images/units/human-loyalists/swordsman-attack-se-8.png
/usr/share/games/wesnoth/1.16/data/core/images/units/human-loyalists/swordsman-attack-1.png
/usr/share/games/wesnoth/1.16/data/core/images/units/human-loyalists/swordsman-attack-2.png
/usr/share/games/wesnoth/1.16/data/core/images/units/human-loyalists/swordsman-attack-3.png
/opt/wesnoth-1.17-git/share/wesnoth/data/core/images/units/human-loyalists/swordsman-attack-se-1.png
/opt/wesnoth-1.17-git/share/wesnoth/data/core/images/units/human-loyalists/swordsman-attack-se-2.png
/opt/wesnoth-1.17-git/share/wesnoth/data/core/images/units/human-loyalists/swordsman-attack-se-3.png
/opt/wesnoth-1.17-git/share/wesnoth/data/core/images/units/human-loyalists/swordsman-attack-se-4.png
/opt/wesnoth-1.17-git/share/wesnoth/data/core/images/units/human-loyalists/swordsman-attack-se-5.png
/opt/wesnoth-1.17-git/share/wesnoth/data/core/images/units/human-loyalists/swordsman-attack-se-6.png
/opt/wesnoth-1.17-git/share/wesnoth/data/core/images/units/human-loyalists/swordsman-attack-se-7.png
/opt/wesnoth-1.17-git/share/wesnoth/data/core/images/units/human-loyalists/swordsman-attack-se-8.png
/usr/share/games/wesnoth/1.16/data/core/images/units/human-loyalists/swordsman-attack-1.png
/usr/share/games/wesnoth/1.16/data/core/images/units/human-loyalists/swordsman-attack-2.png
/usr/share/games/wesnoth/1.16/data/core/images/units/human-loyalists/swordsman-attack-3.png
Speak softly, and carry Doombringer.
- Pentarctagon
- Project Manager
- Posts: 5592
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: Compatibility-breaking changes between 1.16 and 1.17/1.18
Alright, added as well.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
take one down, patch it around
-2,147,483,648 little bugs in the code
Re: Compatibility-breaking changes between 1.16 and 1.17/1.18
Almost all .jpg story images have been converted to .webp, and their filenames changed to match. However, the engine won't automatically look for the renamed images (it does for .png, but not .jpg).