empty side= and no [filter_side] is deprecated

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

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
boru
Posts: 788
Joined: November 19th, 2009, 11:02 pm

empty side= and no [filter_side] is deprecated

Post by boru » May 11th, 2011, 1:08 am

There's a puzzling new deprecated message appearing in many scenarios of my UMC campaign. (Puzzling to me, although probably completely intuitive to everyone else.)

Code: Select all

"<WML> Error: empty side= and no [filter_side] is deprecated"
Sometimes this message is accompanied by a number in parenthesis at the end, probably indicating multiple instances of the same error. In one scenario, I actually racked up a 5!

I have a grand total of 14 of these errors. I managed to make one of them go away by inserting [filter_side] tags inside a [gold] tag, of all things. The other 13 are less easily dispatched.

A hint would be greatly appreciated at this time. Thanks.
“It is written in my life-blood, such as that is, thick or thin; and I can no other.” - J.R.R. Tolkien

My campaign: Swamplings - Four centuries before the founding of Wesnoth, the first wolf rider emerges from a tribe of lowly swamp goblins.

Anonymissimus
Inactive Developer
Posts: 2458
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: empty side= and no [filter_side] is deprecated

Post by Anonymissimus » May 11th, 2011, 1:31 am

The best option is to wait for wmllint support for this I guess. (Actually, I suggested to wait with the release but I got beaten. There is need to test the Khalifate. You get what you deserve 8) :eng: :mrgreen: .) The default behavior won't change for a long time for sure so no need to worry something will break anytime soon because of this deprecation message.

Basically, there's transition from "default side=1" to "default all sides and support for the new StandardSideFilter" in all wml action tags that take a side as an argument. To make the message go away one can insert side=1 in affected tags (gold, modify_side, modify_ai, allow_recruit, remove_shroud, place_shroud, set_recruit, disallow_recruit). But as I said, wmllint should be able to do that soon.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign

User avatar
boru
Posts: 788
Joined: November 19th, 2009, 11:02 pm

Re: empty side= and no [filter_side] is deprecated

Post by boru » May 11th, 2011, 3:32 am

Thanks, that was v helpful.
“It is written in my life-blood, such as that is, thick or thin; and I can no other.” - J.R.R. Tolkien

My campaign: Swamplings - Four centuries before the founding of Wesnoth, the first wolf rider emerges from a tribe of lowly swamp goblins.

Anonymissimus
Inactive Developer
Posts: 2458
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: empty side= and no [filter_side] is deprecated

Post by Anonymissimus » May 16th, 2011, 9:11 pm

At the moment I strongly recommend to not do something about this until it is clear what will come. If you must, insert side=1 to make the warning go away. Behavior may change again in 1.9.7.
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign

User avatar
boru
Posts: 788
Joined: November 19th, 2009, 11:02 pm

Re: empty side= and no [filter_side] is deprecated

Post by boru » July 14th, 2011, 2:49 am

Anonymissimus wrote:At the moment I strongly recommend to not do something about this until it is clear what will come. If you must, insert side=1 to make the warning go away. Behavior may change again in 1.9.7.
I'm bumping this just to see if there are any new developments. Behavior did change slightly in 1.9.7 in the following ways:

- the error message is slightly different: "Error: empty side= is deprecated, use side=1"
- it seems to be affecting different tags now, although I still can't determine which ones. Or maybe it's fixed in a different way than it was in 1.9.6? I had all these vanquished in 1.9.6

I'm aware that deprecated code messages are very minor, unfortunately some players are not, so that's why I'm being a bit of a pest again.
“It is written in my life-blood, such as that is, thick or thin; and I can no other.” - J.R.R. Tolkien

My campaign: Swamplings - Four centuries before the founding of Wesnoth, the first wolf rider emerges from a tribe of lowly swamp goblins.

Anonymissimus
Inactive Developer
Posts: 2458
Joined: August 15th, 2008, 8:46 pm
Location: Germany

Re: empty side= and no [filter_side] is deprecated

Post by Anonymissimus » July 14th, 2011, 3:46 pm

currently affected tags, "currently" is in the trunk source at the moment I'm writing this:
"remove_shroud"*, "place_shroud"*, "gold"*, "modify_side"*, "modify_ai"*, "allow_recruit", "disallow_recruit", "set_recruit", "store_gold"

All of these tags will no longer support default side=1. The * marked ones support a [filter_side] subtag which gets priority over inline side= if present (and removes the error message too).
There is a wmllint patch in the queue which esr didn't yet apply (if he did all umc authors could easily update their stuff...). http://gna.org/patch/?2666 However, I updated mine using my patch locally so I'm not pestered by related "bug reports" in my campaign thread.

The goal is to transform all wml action tags taking a side as an argument from default side=1 to default side=<all sides> + SSF support. Unfortunately some tags got unneccessarily added a [filter_side] tag for this which means they have SSF support at once but will allow for redundant side information once the deprecation period is over.
Also, esr recently added a related conversion to wmllint for some of these tags (but it isn't released yet IIRC).
projects (BfW 1.12):
A Simple Campaign: campaign draft for wml startersPlan Your Advancements: mp mod
The Earth's Gut: sp campaignSettlers of Wesnoth: mp scenarioWesnoth Lua Pack: lua tags and utils
updated to 1.8 and handed over: A Gryphon's Tale: sp campaign

User avatar
boru
Posts: 788
Joined: November 19th, 2009, 11:02 pm

Re: empty side= and no [filter_side] is deprecated

Post by boru » July 14th, 2011, 6:16 pm

Thanks for the info. It seems that placing [filter_side] inside the wrong tags will generate the identical message in 1.9.7. As I take them out of the x_recruit tags I get fewer messages.
“It is written in my life-blood, such as that is, thick or thin; and I can no other.” - J.R.R. Tolkien

My campaign: Swamplings - Four centuries before the founding of Wesnoth, the first wolf rider emerges from a tribe of lowly swamp goblins.

Post Reply