Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Shaker Bot Studio

7
Posts
75
Followers
A member registered Aug 15, 2020 · View creator page →

Creator of

Recent community posts

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.

(11 edits)

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"

Ended up just showing a blank message to bring up the screen and then using the list.pop() function to remove it after

(1 edit)

I tried that out in both my code and editing the base code and nvl hide seems to work but nvl show doesn't.  Maybe I'm doing something wrong?

Thank you so much for this! I was able to integrate it into my game quite well! I just have a quick question. 

How do you open and close the screen without adding new texts? I tried show/hide screen PhoneDialogue but it doesn't seem to work cause it needs an input.

Hey there! Thanks so much for the interest! Also we've now posted our Youtube trailer and our kickstarter was just live today so those links are available now :)

Our email is shakerbotstudio@gmail.com!

Thanks for all the heads up, appreciate it! And we hope you enjoy the demo!