Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Dialogue without shifting from passage to passage

Hey guys,

Very new to Twine but super excited to be able to play around with it. I'm writing a larger story and don't want every dialogue option to go to a new passage, as in the long run this would bloat out the amount of passages immensely. Is there an easy way to dynamically display text upon clicks to simulate the idea of dialogue?

Oh btw, I use sugarcube because of the save function, so switching to another format is basically not an option for me.

Thanks in advance :)

Comments

  • edited June 2015
    I only know the harlowe version, but maybe you can adapt these to sugar cube.

    This creates the clickable links.
    [page text]<c1| 
    [page text]<c2| 
    [page text]<c3| 
    [page text]<c4|
    

    This text appears after the corresponding link is clicked
    (click: ?c1)[page text]
    (click: ?c2)[page text]
    (click: ?c3)[page text]
    (click: ?c4)[page text]
    
  • SugarCube does not have a equivalent of a tagged hook but it does allow you to modify HTML elements that have ID's, which is even more powerful.

    SugarCube also has a <<click>> you could use to ask the Reader things, and macros like <<replace>> and <<removeclass>> which you could use to show dialog.

    The following is a very simple example of one way to do what you want in SugarCube.

    a. Place the following in your Story Stylesheet:
    #passages .hidden {
    	display: none;
    }
    
    b. Place the following in a passage:
    Hello Reader
    
    <span id="question1">
    <<click "Hello Story">><<replace "#question1">>Hello Story
    
    <span id="question2">
    How are you today Reader?
    <<click "Fine">>
    	<<replace "#question2">>I am fine<</replace>>
        <<removeclass "#question3" "hidden">>
    <</click>>
    <<click "No so good">>
    	<<replace "#question2">>I am not felling that good today<</replace>>
        <<removeclass "#question3" "hidden">>
    <</click>>
    </span>
    <</replace>><</click>>
    </span>
    <span id="question3" class="hidden">
    How are you Story?
    
    I am fine Reader, are you ready to begin?</span>
    

    There are two main issues with doing dialog without using passages:
    1. As you can see It gets complex really fast.
    2. The Reader can't use the web-browser's Back button to undo their choices because it only tracks when the Reader changes for one passage to another.
  • Thanks guys, that's exactly what I was looking for. It does indeed get complex fast, yet at the same time you can do a lot more fun stuff like this as I see it. Many thanks :)
  • I posted a conversation in a box macro a while back:

    http://twinery.org/forum/discussion/comment/3002/#Comment_3002

    Written for sugarcane, but just uses links so it might work with sugarcube.

    Idea is you define the conversation in a variable and then the macro just plays through it. The got: tag in the conversation moves you to another passage and ends the conversation. Think I've got a move complex version around that supports setter links as well.



  • Haven't had a chance to give it a go Mykael but looks great, I'll let you know how it works for me :) Thanks for the info.
Sign In or Register to comment.