Wakarimasen Posted January 2 Report Posted January 2 Hello, as the title states I'm asking if VTML can be utilised in player written books. I saw on the Wiki page for Books that VTML can be used, but in my personal experience I can't get any of the mark-up to render in-game. It might be user error but before I try in vain, thought I would ask here. I'm specifically trying to use coloured text and text size changes. Thank you!
Brady_The Posted January 2 Report Posted January 2 (edited) 1 hour ago, Wakarimasen said: Hello, as the title states I'm asking if VTML can be utilised in player written books. I saw on the Wiki page for Books that VTML can be used, but in my personal experience I can't get any of the mark-up to render in-game. It might be user error but before I try in vain, thought I would ask here. I'm specifically trying to use coloured text and text size changes. Thank you! You are most likely running into the problem of escaping certain characters. Quotes in particular. This will break the language string: Because quotes are used in starting and ending a key, but are also used in certain VTML values, which when improperly used will confused the game because it assumes something is ending or starting when it really isn't. "lore-miller-piece1": "<font color="#b5e61d">The</font> <font size="25" weight="bold" color="#c36">Pond</font>[...] This will not: With a backslash you will tell the game to ignore or interpret any following character differently. "lore-miller-piece1": "<font color=\"#b5e61d\">The</font> <font size=\"25\" weight=\"bold\" color=\"#c36\">Pond</font>[...] You might find this mod interesting: https://mods.vintagestory.at/vtmleditor (Edit: The mod works with any language string loaded in the game, so mods should theoretically supported.) Spoiler The editor is somewhat basic, because you have to still have to manually write the tags you are interested in, but it has a nice preview window and the option to copy your work into the clipboard. Edited January 2 by Brady_The
Wakarimasen Posted January 3 Author Report Posted January 3 Thank you for your reply, I really appreciate it I think your suggestion might be more related to the handbook UI and not my player written book attempt. It turns out my issue was as simple as not signing the book, which I went into creative mode to try out. Unfortunately I'm experiencing a new issue where the final content is being split across pages... I suspect due to automatic pagination when the VTML gets too long for a single page. I've attached screenshots of my attempts but they might be out of order, so I labelled them 1 to 6. Any ideas if there is a way to deal with this somehow?
Wakarimasen Posted January 3 Author Report Posted January 3 I should add that this is intended for use on an un-modded vanilla server.
Solution Brady_The Posted January 3 Solution Report Posted January 3 3 hours ago, Wakarimasen said: Any ideas if there is a way to deal with this somehow? The VTML code could be counting towards the character limit per site. I'd do some testing with and without the code and see if there's a difference. There most likely will be. Then I would report my findings on https://github.com/anegostudios/VintageStory-Issues/issues. The devs most likely didn't think that VTML would be that heavily used. That should be an easy enough fix on their end, though.
Wakarimasen Posted January 4 Author Report Posted January 4 Yeah it's definitely counting towards the character limit in the editor instead of just the rendered view. Without the formatting I can fit all of the content on the page no problem. I'll log it on Github and hope the developers can account for this in the future. Thanks for your help! 1
Recommended Posts