Angle Brackets
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.
Angle Brackets
Hello all:
I am adjusting the WML in War of the Dragon campaign to Wesnoth 1.10. I have a couple of questions for anyone who can help me.
The angle brackets in message text aren't properly recognized as text.
Everything after (sniff) doesn't show up in the message box. Is there a workaround for this? I want to keep the angle brackets.
Also, is there a good way to make corner brackets that would be recognized by the game? For example,
But the game again doesn't recognize the corner brackets or anything inside them as text. They don't show up in the message box.
I am adjusting the WML in War of the Dragon campaign to Wesnoth 1.10. I have a couple of questions for anyone who can help me.
The angle brackets in message text aren't properly recognized as text.
Code: Select all
[message]
id=wleader
message= _ "(sniff) <Snarl!> <Snap!> <Growl!>"
[/message]
Also, is there a good way to make corner brackets that would be recognized by the game? For example,
Code: Select all
[message]
id=wleader
message= _ "「guttural growling」"
[/message]
Re: Angle Brackets
This almost surely has to do with Pango: http://wiki.wesnoth.org/InterfaceActionsWML#Formatting
I think the right way to get <'s and >'s to show up is to use escape codes `<` and `>` for these, respectively, just like in HTML. I'm pretty sure I've actually done that before.
As for the corner boxes, I don't know what the right way to escape those is but I would guess that you could google for a comprehensive guide to escaping things in Pango and see what you find. It's also possible that for some reason you can't do this.
You could also try running wmllint on your campaign like the wiki suggests, and see what it does with these characters, if anything.
I think the right way to get <'s and >'s to show up is to use escape codes `<` and `>` for these, respectively, just like in HTML. I'm pretty sure I've actually done that before.
As for the corner boxes, I don't know what the right way to escape those is but I would guess that you could google for a comprehensive guide to escaping things in Pango and see what you find. It's also possible that for some reason you can't do this.
You could also try running wmllint on your campaign like the wiki suggests, and see what it does with these characters, if anything.
Re: Angle Brackets
how did you fix the string with the "corner brackets"? my guess would be that they show up just fine (that is if the font supports them) if you make sure your text-editor saves the file in utf-8 encoding.
Re: Angle Brackets
Code: Select all
[message]
id=wleader
message= _ "⌈guttural growling⌋"
[/message]
Re: Angle Brackets
my guess is still that your text editor didn't save the file in utf8 encoding. pango handles utf8 string just fine, otherwise languages that consist of multi-byte chars wouldn't work.