# How this scene is implemented:
nvl_narrator "Nighten added Eileen to the group"
n_nvl e2m2 "Hey! Welcome to the demo Eileen!"
e_nvl "who's this?"
n_nvl e2m1 "haha, silly you"
n_nvl e1m2 "We talked about showing off the phone the other day, remember?"
e_nvl "it's today? {image=emoji/fear.png}"

A simple messaging system, built on top of the NVL mode and therefore more intuitive to use :)

Instructions:

  • Add the images and PhoneTexting.rpy to your project folder
  • In this file, change the name of the main character to yours (MC_Name)
  • Edit the nvl screen in screen.rpy as follow:
screen nvl(dialogue, items=None):
 
    #### ADD THIS TO MAKE THE PHONE WORK!! :) ###
    if nvl_mode == "phone":
        use PhoneDialogue(dialogue, items)
    else:
    ####
        ## Indent the rest of the screen
        window:
            style "nvl_window"
            # ...
  • Change gui.nvl_list_length in gui.rpy to None, so that all the message are shown 
  • You'll then have to make a nvl character speak!
  • To use the regular nvl screen again, change the nvl_mode variable to something else, like "classic"
  • To include emojis and pictures, you can simply add use an image tag; make sure they are the right size for the phone screen.

Video tutorial by Matthew Vimislik, aka Vimi

Mirror download on my website

Source code on Github

Credits:

The background is made by Uncle Mugen. All the other art assets are done by me, Nighten, and free to use in your project if you want (the sources file are available).

And if you need more help for your project, you can hire me as a programmer! :) ✨

Have a nice day!

StatusReleased
CategoryAssets
Rating
Rated 4.9 out of 5 stars
(17 total ratings)
AuthorNighten
Made withRen'Py
Tagsasset, Ren'Py, sourcecode
Code licenseMIT License
Asset licenseCreative Commons Zero v1.0 Universal
Average sessionDays or more

Download

Download NowName your own price

Click download now to get access to the following files:

yetanotherphone-1.0-mac.zip 39 MB
yetanotherphone-1.0-pc.zip 74 MB

Comments

Log in with itch.io to leave a comment.

How can I make it so the text advances when I click on the phone as opposed to outside of it?

Looks really nice! I’m trying it with my own project right now and I need to ask if anyone has implemented side images/character icons in the system? If not, I might have to give it a shot.

OOP I just checked Vimi’s video.

Hi, I was wondering if there was a way to apply transform effects to the phone itself? Y'know, moving it to the right of the screen, making it half-transparent, turning it 90 degrees, etc...

Thanks in advance :D

hi!! this is working great, im currently altering the code to fit into a discord-style desktop chatroom. im just having issues figuring out how the make the text extend longer rather than be multiple lines (like ----------------- instead of

--------

----)

what would i need to alter?

In the nvl_phonetext screen you can see that the "what" text has a xsize defined, increase this number and it should work :) There is probably other value that need changing but I'm not able to test atm

Let me know!

Hello :D

This is hella amazing hahaha


I'm just having some troubles to get the phone send frame and icon fixed correctly... 


I'm using this on my VN:

    python:

        name = renpy.input("Please, type your character's name.")

        name = name.strip() or "MC"

But I'm not being able to get the phone send frame/icon this way... It's like the MC is actually another person bahaha

I made some tests directly in your code, and got the same results :/



# Main script for the demo!

define n = Character("[name]", image="nighten")

# NVL characters are used for the phone texting

define n_nvl = Character("[name]", kind=nvl, image="nighten", callback=Phone_SendSound)

define e_nvl = Character("Eileen", kind=nvl, callback=Phone_ReceiveSound)

define config.adv_nvl_transition = None

define config.nvl_adv_transition = Dissolve(0.3)

#Skip the main menu

label main_menu:

    return

label start:

    scene bg village with dissolve

    pause 1.0

    show nighten normal e1m1 at center:

        yoffset 1080

        ease 0.7 yoffset 0

    python:

        name = renpy.input("Please, type your character's name. For a more immersive experience it's recommended to use your name.")

        name = name.strip() or "MC"

    n "Hello! Welcome to this demo!"



# Here's the code for the phone!

define nvl_mode = "phone"  ##Allow the NVL mode to become a phone conversation

define MC_Name = "[name]" ##The name of the main character, used to place them on the screen

init -1 python:

    phone_position_x = 0.3

    phone_position_y = 0.5



result .-.


pls, help bahaha I'm very new to programming and I'm not sure if I need to make more changes to your code so that variable works.


Thanks!

(+1)

Hello! Thanks for the detailed question.

After the "name = name.strip() or "MC", add "$ MC_Name = name" and it should work fine. 

Have a nice day!

How can I change phone background mid-game?

Ok, so I have used this with great success, but when the phone needs to close, I get like a glitch where the last message is shown multiple times and even if I load a new scene, for a second the phone appears on the new screen and after that it disappears. What can be the problem here? Did you encounter this problem?

(+2)

I have resolved this issue. It seems nvl hide works just fine if I need to close the phone. Thank you for the script!

(1 edit)

Hello! I tried using the code, but whenever i try to launch the game it reads ; "File "game/screens.rpy", line 1297: end of line expected. if nvl_mode == "phone":" I'm quite new to Renpy so excuse me if this is a stupid question! 

Hello! There's probably a problem with the indentation? It's hard to tell without seeing your code, but make sure it look the same in the original project :)

(1 edit) (+1)

Hey there! I'm trying to use your code but when I put it in my game, I'm having a really weird problem. Despite the history showing that the text is going through for the narrator and the main character, it shows up as blank. However, other characters DO work. Do you happen to know what could be causing this? I'm afraid you might not be able to help because it doesn't seem to do it in a brand-new game, only the one I've been working on for a few months now, but I thought I'd ask, anyway, and see if you have any ideas. Thanks! :)

EDIT: Nvm! I figured it out. It was my padding!

hi! I'm having a similar problem and am wondering if you could explain a bit further what was wrong?

Sure! So basically, I had previously set up NVL mode to be centered in the screen, including from top to bottom. This transferred into the phone version and pushed the name and dialogue down where you couldn't see it anymore. Setting things back to the default fixed it, hence why I didn't have the problem in a fresh project. Does that help?

Yes, it was! Thank you so much!

(+1)

Hey, I want to give you credit for the phone system in my visual novel, what pseudonym or name do you want me to use to refer to you?

(+1)

Hi ! You can simply refer to me as "Nighten" :)

I don't have any social media to promote so you can link to my itch or this page directly

(1 edit)

can you please help mee...? i want to show to the main character name..cuz it only shows eillen name ... what should i do...?

(+1)

Sure!
In PhoneTexting.rpy, make these changes at line ~115

vbox:
                yalign 1.0
                #### Instead of this
                # if d.who != MC_Name and previous_d_who != d.who:
                    # text d.who
                #### Type that:
                if previous_d_who != d.who:
                    if d.who != MC_Name:
                        text d.who
                    else:
                        text d.who:
                            xalign 1.0
                            xoffset -15
                ####
                frame:

Be careful about the indentation!

it works !!! Thank you for your help <3

Hello! Do you have an idea how I can adapt it to a novel in 720p? Thanks so much for reading.

(+2)

Hello, you'd have to make a ton of modification to adapt it to 720p; mainly reduce the size of the images and redefine a lot of values throughout the code. I can't do that easily for you, sorry.

Are you still trying to do this?  It took some playing around but I got a workable model.  LMK

I am trying to do this. Any help would be appreciated 

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.

Hello !

nvl show and nvl hide should fill this function. I hope this answer your question!

Thank you for using my code :)

(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?

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

Hello! So in renpy I made it where the player can insert their name in the story. Which I used as the string [player_name] but when I put "[player_name]" as the MC_Name it doesn"t use the phone send icon like it's supposed to just the phone received icon. As if it's another character in the game and not the main character. Why is this?

Also found out it only works when the player decides to choose their name literally puts in "[player_name]" as their character name

Hello! Yes Ren'Py doesn't replace variable between brackets everywhere, so that's why your example only work when the player input literally [player_name].

I don't have a way to test right now, but simply defining MC_Name = player_name rather than MC_Name = "[player_name]" should work. Let me know if it does! :)

It came up as an error but I decided to put in another variable and it works! :3 Thank you so much for replying though!

Deleted 147 days ago

how did u go around it?
I'm having the same trouble

is it possible to make voice calls with this?

Hum, you could just display the image of the phone and the person you're calling inside it, and just use regular renpy dialogue.

If you meant voice message, it is not built in, although you can technically just display an image of a voice text (like a sound wave) and use renpy to add dub voice to that line. A cheap hack, but one that doesn't require a lot of work.

Don't hesitate if you want to precise what you're looking for!

Have a nice day 

Thanks! This is what I needed to know

Anyone know why the phone in my window is too bigger than expected and how to fix that ?

(+1)

That's probably because your project is in 720p ; this phone is built with 1080p in mind!

¿Pudiste arreglarlo? Tengo la misma duda.

hello I don't know where to find the copy and paste you used in the video

Did you downloaded the project? Everything should be in here, in the game folder :)

(2 edits)

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) (+1)

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 🌺

(+2)

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"

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) (+1)

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!

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!!

Wonderful tool! 10/10! Except... there's a little issue for me. There's something in the code that doesn't allow my game to start in the main menu, I didn't add the label you added to skip the main menu but if you could just tell me which piece of code in which file you put the code in to prevent the user from starting at the main menu? Thanks Nighten!

Hi! Normally the only thing that should skip the main menu is these lines at the top of script.rpy

#Skip the main menu
label main_menu:
    return

In case you still have this problem, make sure to delete script.rpyc (the binary file) to be sure it's up to date. Sorry for the late response, I hope this can at least help someone. Don't hesitate if you have any more question.
Have a nice day!

Thanks Nighten!

hey! thanks so much for this, it's been really useful for my project.

i was wondering if there was a way to implement menu choices inside the phone, to have the player choose what to reply with? thanks so much in advance for your help!

(+1)

Hi ! Someone made a small modification to make it happen, I didn't tested it but it can be useful :)

Thank you for using my code, I'm glad it's useful!

https://lemmasoft.renai.us/forums/viewtopic.php?f=51&t=62837#p550774

perfect, works like a charm! thank you so much :D

Deleted 162 days ago

I love this! Thanks so much for sharing it here. :D

(+1)

I've been looking for a messaging UI for ages TT

Thank you for this, I would offer my soul to you if I could _| ̄|○

I'll make sure to credit you in my project :)))

Thank you so, so much for the easy to implement phone UI! It's so clean and easy! I was wondering if there's a way to customize the little round image icon of the replying person in a text convo based on which character is replying? Like, giving replying characters unique icons, basically. If there is I'm totally blanking on it. Thank you!

Thanks a lot for your kind message :)

I've posted a very simple solution here, hope it help!
https://lemmasoft.renai.us/forums/viewtopic.php?f=51&t=62837#p547613

Thank you so much! I really appreciate it!!

how do i put it in where?