Using Raw Html in passage rather than being interpreted by sugar cube?

If you are requesting technical assistance with Twine, please specify:
Twine Version: 2.3.16
Story Format: Sugar Cube 2.36.1

So I am new to Twine and I am trying to make a Adventurer’s Guild management sim.
I managed to make a window to display the quests that the guild has to offer but when I display it,
there is a bunch of breaks where the logic is and it looks terrible. Is there a way for me to remove it?

<<set $herbGathering = {"name": "Gather Medicial Herbs in the Plains outside of Suburbia", "rank" : 1, "repeatable": true

<<set $fenceFixing = {
	"name" : "Fix the Broken Fences around Suburbia",
	"rank" : 1,
	"repeatable" : false

<<set $quests = [$herbGathering, $fenceFixing]>>

<div class="container">
  <div class="content" style="width: 500px; height: 500px; background: #140005; border: #fff double 0.5em;
	border-radius: 1em;
	padding: 1em;">
    <h3>Available Quests</h3>
	<<for _i = 0; _i lt $quests.length ; _i++>>
		<<if $quests[_i].repeatable is true>> 
		This quest is repeatable

You have a few options:

  • You can add the tag nobr to the passage in order to get rid of all line breaks in that passage (documentation).
  • You can also wrap parts of it in <<nobr>> … <</nobr>>, which will get rid of all line breaks in that section (documentation).
  • You can create a script passage and enter Config.passages.nobr to get rid of all line breaks in the story (documentation).

If you need to add line breaks back into the affected text, you can use <br>, or more properly, put paragraphs within <p>…</p>.

In your case, the most straightforward thing to do would be to tag the passage with nobr, then add <br><br> in line 21 of your code, I think.

<br><br>This quest is repeatable

Thank you very much, this perfectly solve my problem.

1 Like