Howdy, Stranger!

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

Conversations like in a chat(sugarcube 2)

Hello nice people!
I'm using sugarcube 2 and I would like to do something like this, but in a clever way. Can anybody help me, please?

<<replacelink>>Me: "Hi!"
<<becomes>>Me: "Hi!"
She: "Hallo!"
<<becomes>>Me: "Hi!"
She: "Hallo!"
Me: "What's going on here?"
<<becomes>>Me: "Hi!"
She: "Hallo!"
Me: "What's going on here?"
She: "I don't know!"
<<becomes>>Me: "Hi!"
She: "Hallo!"
Me: "What's going on here?"
She: "I don't know!"
Me: "Everything what we are talking about is looking... like in a chat..."
<<becomes>>Me: "Hi!"
She: "Hallo!"
Me: "What's going on here?"
She: "I don't know!"
Me: "Everything what we are talking about looks like in a chat..."
She:"Yes... that 's mysterious!"
<<becomes>>Me: "Hi!"
She: "Hallo!"
Me: "What's going on here?"
She: "I don't know!"
Me: "Everything what we are talking about looks like in a chat..."
She:"That 's mysterious!"
Me: "LOOK THERE IS A UFO landing!!!!!!!!!!!!!!!!11eleven!!!111!!"
<</replacelink>>

I don't want to c&p every sentence again and again. The last sentence should be the link to the next sentence. If this somehow works.

Comments

  • Some of the following examples contain backslashes, if you're not familiar with them, they're the line continuation markup.


    The quick solution would be to use <<gains>>, rather than <<becomes>>. For example:
    <<replacelink>>Me: "Hi!"
    <<gains>>She: "Hallo!"
    <<gains>>Me: "What's going on here?"
    <<gains>>She: "I don't know!"
    <<gains>>Me: "Everything what we are talking about is looking... like in a chat..."
    <<gains>>She:"Yes... that 's mysterious!"
    <<gains>>Me: "LOOK THERE IS A UFO landing!!!!!!!!!!!!!!!!11eleven!!!111!!"
    <</replacelink>>\
    
    That makes the whole chat a link until the last <<gains>>, however, which is fairly awkward.


    Alternatively, you could try the <<continuelink>> macro from the same add-on. For example:
    Me: "Hi!"
    <<continuelink "(next)">>She: "Hallo!"
    <<continuelink "(next)">>Me: "What's going on here?"
    <<continuelink "(next)">>She: "I don't know!"
    <<continuelink "(next)">>Me: "Everything what we are talking about looks like in a chat..."
    <<continuelink "(next)">>She: "That's mysterious!"
    <<continuelink "(next)">>Me: "LOOK THERE IS A UFO landing!!!!!!!!!!!!!!!!11eleven!!!111!!"
    
    That does require a separate link to continue, however, so it's not as seamless as simply clicking on the text.


    As another alternative, you could use the SugarCube 2 native <<linkappend>> macro. For example:
    <<linkappend "Me: <q>Hi!</q>" t8n>>
    <<linkappend "She: <q>Hallo!</q>" t8n>>
    <<linkappend "Me: <q>What's going on here?</q>" t8n>>
    <<linkappend "She: <q>I don't know!</q>" t8n>>
    <<linkappend "Me: <q>Everything what we are talking about looks like in a chat…</q>" t8n>>
    <<linkappend "She: <q>That's mysterious!</q>" t8n>>
    Me: <q>LOOK THERE IS A UFO landing!!!!!!!!!!!!!!!!11eleven!!!111!!</q>
    \<</linkappend>>
    \<</linkappend>>
    \<</linkappend>>
    \<</linkappend>>
    \<</linkappend>>
    \<</linkappend>>
    
    Since the link_text argument to <<linkappend>> must be quoted, you will either need to elide the same quotes within the text, escape them, use HTML character references, or the quote markup—I used the latter in the above example.


    As yet another alternative, you could make the reveal of each line of text automatic with the <<timed>> macro. For example:
    Me: "Hi!"
    <<timed 1.5s t8n>>She: "Hallo!"
    <<next>>Me: "What's going on here?"
    <<next>>She: "I don't know!"
    <<next>>Me: "Everything what we are talking about looks like in a chat..."
    <<next>>She: "That's mysterious!"
    <<next>>Me: "LOOK THERE IS A UFO landing!!!!!!!!!!!!!!!!11eleven!!!111!!"
    <</timed>>\
    
    I wouldn't do large conversations with this, since there's no easy way to skip the timed reveal.
  • Wow! That 's great! :)
    Thank you very, very much!
  • I tried them all in different ways now. But everyone of them has positive and negative aspects.

    1. gains
    That makes the whole chat a link until the last <<gains>>, however, which is fairly awkward.
    That 's really a problem.

    2.continueLink
    After I tried them all I tried this one:
    <<continuelink "Me: <q>What's going on here?</q>">>Me: "What's going on here?"
    <<continuelink "She:<q>I don't know!</q>">>She: "I don't know!"
    <<continuelink "Me:<q>Everything what we are talking...</q>">>Me: "Everything what we are talking..."
    First I thougt it's doing a good job. But then I did it with a span class. But it seems that I really don't know where to put the span class here. I tried different things but I can't figure it out. For some reason the "</span>" always shows up in the running game. Can you tell me where I should put the span-class?

    3. linkappend
    I tried this. But the problem here was, that the site doesn't scroll automatically. Is there a way do it with scrolling ?

    4. timed
    This one I knowed before but I really would like to do it with a link.
  • Is there really no way to customize the look of this type of link?
    <<continuelink "I don't know!">><q>I don't know!</q>

    Span classes don't work, right? Or am I just doing it in the wrong way?
  • For all who want to do the same thing:
    I'm really happy, because I have a perfect answer now (I know.... it's nothing for long conversations, but it works and looks like you want it to look.):

    <<replacelink>><span class="Me">Me: "Finally we got it!!!!"</span>
    <<gains>><span class="She">She: "Yeahh!"</span>
    <<gains>><span class="Me">Me: "You are great!"</span>
    <<gains>><span class="She">She: "No, You are great!"</span>
    <<gains>><span class="Me">Me: "No...hahah... you...!"</span>
    <<gains>><span class="She">She: "No! You!"</span>
    <<gains>><span class="Me">Me: "No, you are great!"</span>
    <<gains>><span class="She">She: "Pffff... I hate you! I hate you so much!!!"</span>
    <</replacelink>>\

    Important:
    The "span classes" AND "a" should all have this of course (if you don't like the underline - like me):
    text-decoration: none;


    @ TheMadExile
    Thank you for your help again! :)
  • Any idea how this would work in Harlowe?
  • DairynGM wrote: »
    Any idea how this would work in Harlowe?
    See the Chat like Conversations for Harlowe thread in the Workshop category.
Sign In or Register to comment.