#Command for written book with backslashes

1 messages · Page 1 of 1 (latest)

tacit moat
#

I'm trying to get a villager trader for a book with some ascii art that involves a lot of backslashes and other symbols that might cause problems. Does anyone know how escaping certain symbols and stuff all work?

I've got the book all written up in minecraft just struggling to get the command for it.

As an example here is the first page which is the most problematic:
{raw: " /-------/\\-------\\\n | //\\\\ |\n |, ⌬ ///\\\ ⏧ ,|\n | ////\\\\ |\n |' /// .\/. \\\ '|\n =====--------=====\n | ///𝐓𝐡𝐞 𝐆𝐮𝐚𝐦𝐢𝐭𝐡\\\, |\n | \\\. 𝐋𝐞𝐱𝐢𝐜𝐨𝐧 ///' |\n =====----.----=====\n |, \\\ '/\' /// ,|\n | \\\\//// |\n |' ⎈' \\\/// ⏿ '|\n | \\// |\n \-------\/-------/\n"}`

sonic mauveBOT
#

<@&1201956957406109788>

Someone will come and help soon!

💬 While you wait, take this time to provide more context and details.

🙇 If nobody has answered you by <t:1725271733:t>, feel free to use the Summon Helpers button to ping our helper team.

✅ Once your question has been resolved (or you no longer need it), please click Resolve Question or run /resolve

#
⚠️ You already have a question open!

Don't forget to close or resolve your old questions once you're done with them. It makes our lives much easier! :D

Open question: #1280066186159067136

vestal urchin
#

You can escape a backslash with a backslash

#

For example, \ by itself may not work, but \\ will turn into just one backslash (\)

vestal urchin
tacit moat
#

Yeah that's what ive done but because of the many backslashes it's not working, doesn't three backalashes also escape stuff? Like an apostrophe

vestal urchin
#

3 backslashes just counts as one escaped backslash plus another backslash which wouldn’t be escaped

tacit moat
royal heart
#

Escaping is more complicated when you're making a command that gives a book, that's why

tacit moat
#

ok so it works differently in the /summon command rather than /data modify modifying a villagers trades

tacit moat
#

yes, like I said that's how I got the page which I posted in my original question, but it doesn't work to paste back into the game because of all the backslashes in the ascii art

#

hence why I'm trying to figure out how escaping works

#

or is it different for written books vs book and quill?

vestal urchin
#

It is, yeah

#

Book and quills are just normal text strings whereas written books use json text, so it may be formatted slightly differently

tacit moat
#

Oooooh that's where I was going wrong thanks man, I really was assuming they were the same

#

Yeah I can see now each backslash is written as 3 backslashes

#

new line is \\n quotation marks are \\" apostrophes are \' backslashes are \\\

#

and that's all the escaped characters I can see

#

Thankyou thankyou!