Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(2 edits) (+1)

Super thanks! very helpful for a noob like me!
I just have 2 questions if its possible:

1. Is it possible to have say "multiple chats" - right now if I first text e.g. Friend A, then later want to text with Friend B, they show up in the same "chat history". So it appears to be one big group chat, insted of multiple 1on1 dialogues. 

A potential option/workaround could be to not save the "chat" history.  So every time the phone is called it starts blank and  you can just manage via the dialogue who is part of the current convo. This part sounds like it should be doable, is there anyone that can point me in the right direction for how to achieve it?

EDIT: nvl clear was the simple answer for this :)


2. If you send pictures, so a stand alone img tag like 
e_nvl "{image=phone/test.png}"

Is it possible to not apply the send/receive_frame? A small picture inside a bigger white area is what happens now. 

the work around I have thought of for this is not having the actual character send the picture, but some generic "picture uploader" character which uses fully transparant background.

This I imagine might be a bit harder, but lets be honest it's more icing on the cake at this point, but nevertheless, if anyone have made some adjustments on this it would be nice to share! :)

Thanks again!

(1 edit) (+2)

Hi, thanks for the kind word!

Multiple chat would be a bit more involved. As you said, the simplest way would be to clear the nvl text; but this way you can't see previous message from past conversation.

I have done something more complexe for a client, but it's a solution that would be hard to make generic enough to fit most people needs. The trick is that the nvl conversation are stored in the nvl_list variable, as a simple list. So you could copy the list before doing the clear, and then restore this list with your copy when you want to open the conversation again.

If I can make something easy to use and generic enough with this principle I'll make it public, but for now this is just the basic idea in case you or someone else want to do it :)

For something even more complexe it's best to not use the nvl screen directly.

And good idea for the transparent images! It would require some tweaks but when I have time to make a V2 that will definitely be on it!

Have a very nice day 🌺

(+3)

I ended up doing this and it worked quite well. Although I ended up not using the copy command and just assigned the nvl_list to a different variable for each contact. It looks something like this:

label SaveContact:
if open_text == contact1:
$ contact1 = nvl_list

label LoadContact1:
$ nvl_list = contact1
$ open_text = "contact1"

(+1)

hi!! i saw that you were able to create multiple contacts, is it okay if you could explain what you did further? id love to know your process!! 

(11 edits) (+2)

I can try my best! So first you need a way to save the history of text. I do this by checking which character was open last and save the text history to a variable.
(replace character 1 and 2 with whatever your character's names are and make sure you have defined each of their nvl names)

label history_save:
    if open_text == "Character 1":         $ character1_history = nvl_list #base renpy variable that already exists     elif open_text == "Character 2":         $ character2_history = nvl_list
    return

Then whenever a text event is called it first updates which character is texting and loads the character's text history. Then after they finish texting it saves.

label Character1_Text1:
    $ nvl_list = character1_history
    $ open_text = "Character 1"#this variable can also be used to give each character different visuals on their messaging screen with if statements
    nvl_narrator "Character 1 added to contacts"
    c1_nvl "Hello. It's me."
    call history_save
    return

That should be all you need for basic texting with multiple characters but if you are like me and want to be able to check back whenever at previous texts you need another way to load their texts. All you need is a contacts screen with buttons for each character(there are plenty of tutorials on how to make gui online). When the player clicks on a button, hide the contacts screen and call the label associated with that character.

label character1_history_load:
    $ nvl_list = character1_history
    $ open_text = "Character 1"
    nvl_narrator "" #just an empty text so the nvl screen shows. I know it's weird but it was the only way I could get it to work.
    $ nvl_list.pop() #removes the empty text
    show screen ContactsScreen #to go back to the previous screen where you have all your characters contacts listed
    return

There are probably more optimized ways to do this but I found this is what worked for me and my game. I also have time based events in place and this worked very well with that!

(+1)

Thank you for your sharing! I think this is what I need, but I try to add the above codes in my game, it just come out  with a lot of errors... And as a complete beginner I just don't know what to do... Could you please upload the screen.rpy and the rpy that holding the above labels? I really want to have the contact list and contact history for different characters... Many thanks!!

(+2)

Hi! Yeah I can probably do that for you but right now this code is part of my full game so I need a bit of time to separate it. In the meantime you should check to make sure all of the variable are defined. You can also send me your code if you'd like and I can take a look.

(+1)

Hi!! I want to thank you so much for sharing how you did your code. ;-; Sorry if I am bothering you but do let me know if you ever make a separate code for making a contact list and contact history for different characters. I myself am a beginner and just can't figure out how to save the nvl text message history so it can be restored later. I just kept getting errors and I am not completely familiar with python yet. No pressure of course! I bet your game will be so cool when it comes out :3

init python:
    character1_history = []
    character2_history = []
define Character1 = Character('Character1', color="#14d114", kind=nvl)
define Character2 = Character('Character2', color="#f6170b", kind=nvl)  
label start:
    scene bg room
    show eileen happy
    Character1 "Вы создали новую игру Ren'Py."
    Character1 "Вы создали новую игру Ren'Py."
    Character1 "Вы создали новую игру Ren'Py."
    Character1 "Вы создали новую игру Ren'Py." 
    call history_save("Character 1")
    Character2 "Добавьте сюжет, изображения и музыку и отправьте её в мир!"
    Character2 "Добавьте сюжет, изображения и музыку и отправьте её в мир!"
    Character2 "Добавьте сюжет, изображения и музыку и отправьте её в мир!"
    Character2 "Добавьте сюжет, изображения и музыку и отправьте её в мир!"
    call history_save("Character 2")
    jump contacts
label history_save(open_text):
    python:         
        for i in nvl_list:
            if open_text == "Character 1":
                character1_history.append(i)
            elif open_text == "Character 2":
                character2_history.append(i)
    nvl clear
    return
label character_history_load(character):
    if character == "Character 1":
        $ nvl_list = character1_history
        nvl_narrator ""
        $ nvl_list.pop()
    elif character == "Character 2":
        $ nvl_list = character2_history
        nvl_narrator ""
        $ nvl_list.pop()
    return
label contacts:
    menu:
        "choose character"
        "Character 1":
            call character_history_load("Character 1")
        "Character 2":
            call character_history_load("Character 2")
    jump contacts