Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit)

I know this is years after the fact, but for anyone here in the future, you can just implement the messages via the label and dialogue system rather than placing them in the messages section of the script and trying to pop out the ones you don't want, this allows for modular dialogue to play out, which I think is what the asker was going for here. For example I'm using a hacked together copy of the message system to pop up a fake text screen in the center of the screen, and implement the messages like this : 

$ girl3_message = girl3_message + [messageitem("Hey new guy, asked Liv to grab your number for me.", False, 0)]
$ girl3_msg_count += 1
show screen chat_message(count=girl3_msg_count, girl=3, messageholder=girl3_message, gname=girl3_name)
pause
$ girl3_message = girl3_message + [messageitem("Mind coming to meet me out in the woods? Got a surprise for you.", False, 0)]
$ girl3_msg_count += 1
show screen chat_message(count=girl3_msg_count, girl=3, messageholder=girl3_message, gname=girl3_name)
pause

Adding new messages in that method makes filling out the array rollback safe, and the message isn't added to the chat system until that section of the label is reached, so if you talk to her about something else sooner, or choose to not have this conversation, it won't go into the chat history. 

So are you able to play out the messages sequentially WITHOUT closing and opening the text window? Because thats my only issue with this phone system...

I want to be able to have the text convos live like they are immersive building tension/delivering story with the app staying open.

If you are doing that with this system without having to use nvl or something that would be awesome to know

(1 edit)

Yes and no, technically I am using a fake message screen, one I have set up to show up in the center of the screen. It's in the normal label system, so each click takes you a step forward, and it's rollback safe. You get the texts at set periods of time (It'd be doable to choose to do them at any time, but a bit messy) so you're never actually in the "real" text window.

Here's an imgur gallery of what's happening, between each image is a single click, no phone navigation (Please ignore the separate font on image 3, these were wip images and I fixed up the menu options later, and had decided to swap to the default font for the phone because it's easier to read the smaller text)

To do that I added this to the bottom of mobile.rpy

####################################################
    ########## MESSAGE CHAT ###########
####################################################
transform chatpos:
    xalign .5
    yalign 0.5
screen chat_message(count, girl, messageholder, gname):
    zorder 0
    modal False
    add "Mobile/Backgrounds/phone_msg_bg2.webp" at chatpos
    add "Mobile/Icons/girl[girl]_msg_icon_sign.webp":
        xalign 0.5
        yalign 0.275
    text "[gname]":
        color "#000000"
        xalign 0.55
        yalign 0.275
    vpgrid:
        cols 1
        rows 1
        ymaximum 445
        xmaximum 285
        mousewheel True
        scrollbars "vertical"
        side_xalign 0.5
        side_yalign 0.565
        yfill False
        xfill False
        yinitial 1.0
        hbox:
            style_prefix "msg_style"
            vbox:
                spacing 5
                for i in range(0, count):
                    frame:
                        if messageholder[i].fromMC:
                            background Frame("images/mobile/backgrounds/sent_background.webp", 0,0,0,0)
                        else:
                            background Frame("images/mobile/backgrounds/received_background.webp", 0,0,0,0)
                        vbox:
                            xsize 250
                            if messageholder[i].fromMC:
                                add "images/mobile/backgrounds/nuggetR.webp" size (16, 16) xalign 1.0 yalign 0.0
                            else:
                                add "images/mobile/backgrounds/nuggetL.webp" size (16, 16) xalign 0.0 yalign 0.0
                            text messageholder[i].message
                            if messageholder[i].selfie > 0:
                            #BadMustard 0 = no image 1 - 1million = an image from the list
                                #use the thumb for the button
                                imagebutton idle phone_images[messageholder[i].selfie].thumb:
                                    action Show("phone_closeup", dissolve, phone_images[messageholder[i].selfie].images)
                                    xalign 0.5
                                    yalign 0
########## MESSAGE CHAT STOP ###########


I also added this to screens.rpy, under the choice screen section, which you can find with ctrl+f "screen choice(items):"


screen choice(items):
    if isTexting:
      vpgrid:
       cols 1
       rows 1
       xmaximum 300
       xalign .7
       yalign .6
       hbox:
        style_prefix "msg_style"
        vbox:
            xsize 300
            spacing 10
            for i in items:
                frame: 
                    xalign 1.0
                    background Frame("images/mobile/backgrounds/sent_background.webp", 0,0,0,0)
                    textbutton i.caption action i.action
    else:
        style_prefix "choice"
        vbox:
            for i in items:
                textbutton i.caption action i.action

When you want to use the text message choice screen for menus, you simply add "$ isTexting = True" before the menu choice, and then "$ isTexting = False" when you are done texting.

A full example dialogue (The one in the imgur gallery) looks like this

#Hides the sidebar phone screen
hide screen phoneaway
#Enables Texting Menu Options
$ isTexting = True
#Enables contact info for girl3 on the phone, you only should do this the first time, if you don't enable contact info by default
$ girl3_phone = True
#Adds the message to her text queue
$ girl3_message = girl3_message + [messageitem("Hey new guy, asked Liv to grab your number for me.", False, 0)]
#Makes the message appear in her text screen
$ girl3_msg_count += 1
#Calls my fake phone chat screen
show screen chat_message(count=girl3_msg_count, girl=3, messageholder=girl3_message, gname=girl3_name)
#Makes you need to click to continue
pause
#Adds the second message
$ girl3_message = girl3_message + [messageitem("Mind coming to meet me out in the woods? Got a surprise for you.", False, 0)]
#And makes it appear in her text screen
$ girl3_msg_count += 1
#Hides the old screen to prevent cluttering a bunch of layers
hide screen chat_message
#Brings up the new screen
show screen chat_message(count=girl3_msg_count, girl=3, messageholder=girl3_message, gname=girl3_name)
pause
menu:
    "Jane?":
        $ girl3_message = girl3_message + [messageitem("Is this Jane?", True, 0)]
        $ girl3_msg_count += 1
        hide screen chat_message
        show screen chat_message(count=girl3_msg_count, girl=3, messageholder=girl3_message, gname=girl3_name)
        pause
        $ girl3_message = girl3_message + [messageitem("No it's Santa Claus, now get your butt out here! It's fucking cold away from the fire.", False, 0)]
        $ girl3_msg_count += 1
        hide screen chat_message
        show screen chat_message(count=girl3_msg_count, girl=3, messageholder=girl3_message, gname=girl3_name)
        pause
    "New Phone Who Dis?":
        $ girl3_message = girl3_message + [messageitem("New phone, who dis?", True, 0)]
        $ girl3_msg_count += 1
        hide screen chat_message
        show screen chat_message(count=girl3_msg_count, girl=3, messageholder=girl3_message, gname=girl3_name)
        pause
        $ girl3_message = girl3_message + [messageitem("You've got two minutes to get out here before I start rethinking this idea.", False, 0)]
        $ girl3_msg_count += 1
        show screen chat_message(count=girl3_msg_count, girl=3, messageholder=girl3_message, gname=girl3_name)
hide screen chat_message
#Shows the sidebar phone again
show screen phoneaway
$ isTexting = False

I believe this would be tweakable to work in the "real" phone, but imo I think having the conversation brought up to the center of the screen works better than hiding it off in the corner.

If you want to make it so that you can jump to the conversations from the phone at any time, you'd have to create a label specifically for the conversation, and then some various if statement checks to figure out which label to go to every time you interact with the texting system on the phone. I considered that when I started working on things, but this just ended up being easier for me. You can still open the conversation history on the phone when you want to look back at things.