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.
Shaker Bot Studio
Creator of
Recent community posts
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!
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"