Compatibility-breaking changes between 1.14 and 1.15/1.16

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.
Shiki
Developer
Posts: 344
Joined: July 13th, 2015, 9:53 pm
Location: Germany

Re: Compatibility-breaking changes between 1.14 and 1.15/1.16

Post by Shiki »

Celtic_Minstrel wrote: October 16th, 2021, 3:29 pm Edit: I think I somehow got confused about the purpose of this thread, sorry.

I don't think so. The purpose of this thread is to be a porting guide, not only about breaking changes (=minimum to change guide).
At least that is was I had in mind when I wrote it.

Updated the post about the new macros regarding overlays/heroes. Also, there's the new tag [remove_trait]
Btw, I think you all have permission to edit the post.
Try out the dark board theme.
User avatar
Gwledig
Posts: 568
Joined: March 30th, 2009, 5:10 pm
Location: UK

Re: Compatibility-breaking changes between 1.14 and 1.15/1.16

Post by Gwledig »

Afraid I can't figure out the maps thing, tried to reference map map_file="{wesnoth.map}" and trying map_file="{maps/wesnoth.map}", also adding additional path in binary e.g.

Code: Select all

[binary_path]
path=data/add-ons/Conquest_original_gameplay
path=data/add-ons/Conquest_original_gameplay/maps
[/binary_path]
Just get errors any ideas appreciated...
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
vghetto
Posts: 755
Joined: November 2nd, 2019, 5:12 pm

Re: Compatibility-breaking changes between 1.14 and 1.15/1.16

Post by vghetto »

Try removing the curly braces { } from around the file name and remove that extra path line that you added.
User avatar
Gwledig
Posts: 568
Joined: March 30th, 2009, 5:10 pm
Location: UK

Re: Compatibility-breaking changes between 1.14 and 1.15/1.16

Post by Gwledig »

Basically you just change it to something like
map_file=europe.map
The path picks up from the main scenario path defined in main.cfg
I'm afraid I struggle to understand the way wesnoth is explained sometimes, to me the WML is almost undocumented e.g. someone was passing me help with unit_type and told me to enclose a new [unit_type] in [+units], then put it in main.cfg, however most modders make custom macros & then declare these in main.cfg such as a units directory containing [unit_types], so I put [units] aronund my [unit_type] stuff in the units directory. Also, there's no such markup as [+units] I saw this [+units] stuff before and totally confused me... I learned WML by dissembling other mods and trial and error I'm afraid I find the explainations and help guides pretty awful....
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
vghetto
Posts: 755
Joined: November 2nd, 2019, 5:12 pm

Re: Compatibility-breaking changes between 1.14 and 1.15/1.16

Post by vghetto »

Well, that person was me. The same person that replied to you over the map issue.
Enclosing the [unit_type] in [+units] is not what I told you to do.
In your _main.cfg file it should be something like this.

Code: Select all

[+units]
{path to your units folder}
[/units]
The + means append these units declaration to the rest of the core units declarations, or something to that effect.
User avatar
Celtic_Minstrel
Developer
Posts: 2158
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Compatibility-breaking changes between 1.14 and 1.15/1.16

Post by Celtic_Minstrel »

Gwledig wrote: December 11th, 2021, 2:12 pm Afraid I can't figure out the maps thing, tried to reference map map_file="{wesnoth.map}" and trying map_file="{maps/wesnoth.map}", also adding additional path in binary e.g.
You've mixed up the methods. You need one of the following:

Code: Select all

map_file="wesnoth.map"
map="{maps/wesnoth.map}"
I recommend the first.
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
vghetto
Posts: 755
Joined: November 2nd, 2019, 5:12 pm

Re: Compatibility-breaking changes between 1.14 and 1.15/1.16

Post by vghetto »

variation_id being mandatory should be included in the compatibility-breaking list.
https://wiki.wesnoth.org/UnitTypeWML#Other_tags

The wiki should also reflect this change.

It took me a good part of an hour trying to figure out why the Wesband player unit on 1.14 held a sword or bow, while the one on 1.16 did not hold anything :/
User avatar
Gwledig
Posts: 568
Joined: March 30th, 2009, 5:10 pm
Location: UK

Re: Compatibility-breaking changes between 1.14 and 1.15/1.16

Post by Gwledig »

Ok so the idea of using a custom fog_clearer replacement is a bit duff, because using a custom type, you have to specify the unique ID, so if you create mutliple units on the fly during game with this type, they all need code to generate a unique ID using rnd method, which is a total nightmare to be honest, so I now have to go thro 100s of unit related WML to add in these unique ID things, which could be done, but is still a bit of a nightmare.... Just don't have time to do this now so likely reverting back to previos save unfortunately...
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
User avatar
Pentarctagon
Project Manager
Posts: 5496
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: Compatibility-breaking changes between 1.14 and 1.15/1.16

Post by Pentarctagon »

vghetto wrote: December 13th, 2021, 7:39 am variation_id being mandatory should be included in the compatibility-breaking list.
https://wiki.wesnoth.org/UnitTypeWML#Other_tags
I've added it to the list.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
Post Reply