How to turn off auto-parantheses in [difficulty]label
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.
How to turn off auto-parantheses in [difficulty]label
Hello,
Today I updated my campaign's difficulty descriptions from the old
However, I did notice then, that the label tag automatically adds parentheses, "()" around the text, which is not exactly optimal. I understand the reason, the usual stuff you'd write here is something along the lines of (Beginner), (Novice),... so the standard parentheses make sense.
I however wish to add a little flavour text as well, see the attached screenshot, and the parentheses look really unnecessary. Is there any way to turn them off/make them go away?
Today I updated my campaign's difficulty descriptions from the old
difficulties=
, and difficulty_descriptions=
to the new [difficulty]
tags, due to the report of issue #3983.However, I did notice then, that the label tag automatically adds parentheses, "()" around the text, which is not exactly optimal. I understand the reason, the usual stuff you'd write here is something along the lines of (Beginner), (Novice),... so the standard parentheses make sense.
I however wish to add a little flavour text as well, see the attached screenshot, and the parentheses look really unnecessary. Is there any way to turn them off/make them go away?
- Attachments
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Re: How to turn off auto-parantheses in [difficulty]label
https://github.com/wesnoth/wesnoth/blob ... #L137-L141
You can use
edit: added missing "not"
You can use
old_markup=yes
to do this. That's not documented in https://wiki.wesnoth.org/CampaignWML, but it should be possible to have a mode where parentheses are aren't auto-added so I think we should just document it...edit: added missing "not"
Re: How to turn off auto-parantheses in [difficulty]label
Thanks, it works fine Added this key to the wiki then.
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
- Celtic_Minstrel
- Developer
- Posts: 2222
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: How to turn off auto-parantheses in [difficulty]label
I disagree, we shouldn't document things that are intended solely as backwards compatibility. If we want to keep that feature going forward, it should be documented as a different key that makes its meaning clearer.
Re: How to turn off auto-parantheses in [difficulty]label
I do think we should keep that feature going forward. I don't mind documenting it under a different key, only we'll need to make the C++ accept such a key.
- Celtic_Minstrel
- Developer
- Posts: 2222
- Joined: August 3rd, 2012, 11:26 pm
- Location: Canada
- Contact:
Re: How to turn off auto-parantheses in [difficulty]label
Another possibility would be to just not auto-add the parentheses - with the new layout, perhaps they're not needed anymore even for standard difficulty names.
I reverted the documentation for that key, by the way. I don't think it should be put back, but perhaps it could be mentioned in passing in the documentation for the hypothetical new key.
I reverted the documentation for that key, by the way. I don't think it should be put back, but perhaps it could be mentioned in passing in the documentation for the hypothetical new key.
Re: How to turn off auto-parantheses in [difficulty]label
I'm a fan of that - if the house-style maintains parantheses or if someone wants them, it's not that difficult to include it into their description text in the first place While letting people omit it is cool.Celtic_Minstrel wrote: ↑March 23rd, 2019, 12:40 am Another possibility would be to just not auto-add the parentheses
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Re: How to turn off auto-parantheses in [difficulty]label
Yeah, the code adds
<small>
unconditionally, so maybe we should just remove the parentheses altogether? Small print and parentheses is redundant. I guess we can even do that for 1.14.7, even if that would break addons that embed valid Lisp programs in the difficulty descriptions... Re: How to turn off auto-parantheses in [difficulty]label
Actually. I think your screenshot above looks quite neat.
Try out the dark board theme.
Re: How to turn off auto-parantheses in [difficulty]label
This is what I prefer: But then again, it's a matter of personal preference. So yes, removing auto-parantheses (and the auto-grey text as well...?) would be cool
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Re: How to turn off auto-parantheses in [difficulty]label
I see, that's neater
Try out the dark board theme.
Re: How to turn off auto-parantheses in [difficulty]label
Implemented in c44aa311587ef5a5e57150226b10d03d432e147d and documented.
Re: How to turn off auto-parantheses in [difficulty]label
Awesome, thank you
Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Re: How to turn off auto-parantheses in [difficulty]label
Double post, for there is another issue with this At the moment, still using 1.14.5 with
However, in the load game menu, the difficulty description is still shown with parentheses (no grey text though... ). It doesn't look that odd here, however, it's strange that the markup key is ignored here.
Will
old_markup=yes
, which makes the description look like the screenshot some posts ago, so without parentheses.However, in the load game menu, the difficulty description is still shown with parentheses (no grey text though... ). It doesn't look that odd here, however, it's strange that the markup key is ignored here.
Will
auto_markup
in 1.15 affect this text in the load game menu as well? I think it would be great if the two were linked, so the key would set both to the same markup.Main UMC campaigns: The Ravagers - now for 1.16, with new bugs!
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny
Old UMC works: The Underness Series, consisting of 5 parts: The Desolation of Karlag, The Blind Sentinel, The Stone of the North, The Invasion Of The Western Cavalry, Fingerbone of Destiny