deprecation of message in [option]?
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.
deprecation of message in [option]?
Hi another worrying thing I have seen in logs getting my MP mods uptodate for 1.14 is this:
I use the message in option to show an icon and description for things like recruitment menus, shop menus, spell menus, upgrade menus.
Here is an example in conquest from one of the recruitment menus:
I've had a look at options WML and have tried things like [option][message]... but no luck.
When using label= I end up with the text part of the message but the images I had been including don't show up, it looks like tag can't be used to display an icon and message next to it... I'm kinds of guessing there must be some option to show an image in this way but it certainly doesn't look as easy as it was with message=...
Code: Select all
20190713 21:01:01 warning deprecation: [option]message= has been deprecated and may be removed in version 1.15.0.
Use label= instead.
Here is an example in conquest from one of the recruitment menus:
Code: Select all
[option]
message=_ "&"+"units/human-loyalists/spearman.png~RC(magenta>red)"+"="+"Militia - 1 Gold
HP: 25
10-2 Damage
7 Movement"
When using label= I end up with the text part of the message but the images I had been including don't show up, it looks like tag can't be used to display an icon and message next to it... I'm kinds of guessing there must be some option to show an image in this way but it certainly doesn't look as easy as it was with message=...
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
- Pentarctagon
- Project Manager
- Posts: 5527
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: deprecation of message in [option]?
See here.
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: deprecation of message in [option]?
Hm I did see https://wiki.wesnoth.org/DescriptionWML#WML_Format, this would be a massive update as each message would need a new bit of code with a separate image element, I certainly hope this doesn't happen in 1.15
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
- Pentarctagon
- Project Manager
- Posts: 5527
- Joined: March 22nd, 2009, 10:50 pm
- Location: Earth (occasionally)
Re: deprecation of message in [option]?
It just means that:
becomes:
Code: Select all
message=_ "&"+"units/human-loyalists/spearman.png~RC(magenta>red)"+"="+"Militia - 1 Gold
HP: 25
10-2 Damage
7 Movement"
Code: Select all
image="units/human-loyalists/spearman.png~RC(magenta>red)"
description=_"Militia - 1 Gold
HP: 25
10-2 Damage
7 Movement"
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: deprecation of message in [option]?
thanks although description caused a big indent, managed to do this kindof thing with search & replace
Code: Select all
image=_ "units/human-peasants/peasant.png~RC(magenta>red)"
label=" Worker - 4 Gold
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)
Re: deprecation of message in [option]?
The translation mark (the underscore) should be on " Worker - 4 Gold", rather than on the image filename. This won't cause problems until you try to translate your add-on, but it will cause wmllint warnings now.
Re: deprecation of message in [option]?
ah of course thanks for that
Maintainer of Conquest (Original Gameplay), Conquest+, Conquest+ Space/Ranged, Chaoz Battle of the Wizards, Lazersquad (squad game), WesCraft (building MP game)