# 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 5.0 out of 5 stars
(34 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.

Viewing most recent comments 1 to 40 of 53 · Next page · Last page

I just realized that I had rated the wrong messenger code, no matter now you get another 5 :)
Regards 

Tom

How do I remove text history? My VN has multiple perspectives, so it wouldn't really make sense for them to have the same text history as each other.

nvl clear

Hello, I was wondering if it's possible to add videos besides pictures.
I tried with a gif but it shows a static picture, do you know if there's a way? :)

Hi! I'm having a bit of an issue with the Phone on Android builds, the protagonist's messages don't show up on the screen (only the background block color shows up). It works perfectly on the other builds (PC, Linux, and Mac). Could you help me with that? Let me know if you need more details or screenshots to better understand the issue. Thank you!

(11 edits) (+1)

Here is a little "hack" that worked for me:

Find these lines in PhoneTexting.rpy:

if d.who == MC_Name:
    color "#FFF"
    text_align 1.0
    xpos -580
else:
    color "#000"

Replace the xpos -580 with this:

if renpy.variant("small"):
    xpos -1067 # adjust this number as you see fit
else:
    xpos -580

Now the whole code should look like this:

if d.who == MC_Name :
    color "#FFF"
    text_align 1.0
    if renpy.variant("small"):
        xpos -1067
    else:
        xpos -580
else:
    color "#000"

Hi, I was wondering how to keep the phone animation when it pops on screen. The first time it shows the animation of it sliding in but the second and third time it skips the animation all together! Thank you so much!

Hi! The animation is tied to the length of the conversation; basically I made it so it slides in only when there is one message, so either when the game start or after a "novel clear".

In a previous version it was tied to a variable that you would turn on and off to play the slide animation once (or else it would play for every message). It was just way too many repetition since you would need to change the variable a lot throughout the game; but ping me again later and I will give you the instruction to edit the code, so that you can play the animation when you want to (I can't at the moment, but I would be happy to help later)

Hey! If you have the time today, could you should me how to do it? I was also wondering if there was a way to clear the phone messages so when the phone pops up next it doesn't show the old texts? Thanks for getting back to me!

Hi, I was wondering if anyone else has issues with using speech bubbles in Ren'py 8.1.1 with the phone and if anyone has found a workaround. Here is the exception:

raise Exception("A speech bubble is being used, but bubble.properties has not been set."

Hello! This code has been published long before Ren'py added the speech bubble feature. 

Games made before the release of Ren'Py 8.1 won't include the default screens and settings required for the speech bubble system. 

You can refer to the documentation here to add support to this project:

https://www.renpy.org/doc/html/bubble.html#adding-bubble-support-to-a-game

(+1)

Used it for https://azurecoffin.itch.io/magicalgirldndzoom! Thank you so much! We couldn't have completed our game without your help!!

In my game phone appears twice. First time for just a moment fixed on the spot, immediately after appears for the 2nd time from the bottom.

(+2)

Is there a way to make the text from the MC align to the left instead?

(+1)

Hi, while I can't give you the answer, I can give hope :) I have done exactly what you asked long ago while messing with the texting. Control f search "align" and it should be located wherever the Players chat box is ran

Phone is not showed in my game. Am I doing something wrong?

(+1)

You have to add the "PhoneTexting.rpy" to your "game" folder. Then you have to replace the nvl screen in the screens.rpy with the nvl section from the asset pack. look for the comment

#### ADD THIS TO MAKE THE PHONE WORK!! :) ###


and then add the phone image files from the asset pack as well.

(3 edits) (+1)

Thank you! 

if anyone knows how to change the font and icon sizes please let me know.

(+1)

Hello, thank you for the awesome work! It really helps me but i have a question.

is it possible to change the text size of the dialogue on the phone?

(2 edits)

if you go to the PhoneTexting.rpy file there is a screen called nvl_phonetext. look for vbox about 42 lines down. now find text d.who and simply add the size attribute, like this:

text d.who:
    size 30

this changes the characters name size displayed on the phone, if you liked the size before, simply don't add the code above.

for the text sizes in the messages it's basically the same except it's text d.what. you can find this a little further down. it already has attributes assigned, so just add the size underneath those.

text d.what:
    pos (0,0)
    xsize 350
    slow_cps False
    size 28

the sizes i put in there are just suggestions, you can put in whatever you like best.

hope this helped!

Hey! Awesome work! :)
May I ask how did you manage to create a "chat log"? I mean, how did you manage to make the messages stay on screen and scroll?
Thank you in advance!

(2 edits)

Hello, anyone know why i don't see my MC name  ? 

define nvl_mode = "phone"
define MC_Name = "Me"
init -1 python:
    phone_position_x = 0.3
    phone_position_y = 0.5
    def Phone_ReceiveSound(event, interact=True, **kwargs):
        if event == "show_done":
            renpy.sound.play("audio/sound/002_notifText.ogg")
    def Phone_SendSound(event, interact=True, **kwargs):
        if event == "show_done":
            renpy.sound.play("audio/sound/002_notifText.ogg")
    def print_bonjour():
        print("bonjour")
transform phone_transform(pXalign=0.5, pYalign=0.5):
    xcenter pXalign
    yalign pYalign
transform phone_appear(pXalign=0.5, pYalign=0.5): #Used only when the dialogue have one element
    xcenter pXalign
    yalign pYalign
    on show:
        yoffset 1080
        easein_back 1.0 yoffset 0
transform message_appear(pDirection):
    alpha 0.0
    xoffset 50 * pDirection
    parallel:
        ease 0.5 alpha 1.0
    parallel:
        easein_back 0.5 xoffset 0
transform message_appear_icon():
    zoom 0.0
    easein_back 0.5 zoom 1.0
transform message_narrator:
    alpha 0.0
    yoffset -50
    parallel:
        ease 0.5 alpha 1.0
    parallel:
        easein_back 0.5 yoffset 0
screen PhoneDialogue(dialogue, items=None):
    style_prefix "phoneFrame"
    frame at phone_transform(phone_position_x, phone_position_y):
        if len(dialogue) == 1:
            at phone_appear(phone_position_x, phone_position_y)
        viewport:
            draggable True
            mousewheel True
            # cols 1
            yinitial 1.0
            # scrollbars "vertical"
            vbox:
                null height 20
                use nvl_phonetext(dialogue)
                null height 100
screen nvl_phonetext(dialogue):
    style_prefix None
    $ previous_d_who = None
    for id_d, d in enumerate(dialogue):
        if d.who == None: # Narrator
            text d.what:
                xpos -335
                ypos 0.0
                xsize 330
                text_align 0.0
                #italic True
                size 20
                slow_cps False
                id d.what_id
                if d.current:
                at message_narrator
        else:
            if d.who == MC_Name:
                $ message_frame = "images/(sg)01nvl_phone/004_send_frame.png"
            else:
                $ message_frame = "images/(sg)01nvl_phone/003_received_frame.png"
            hbox:
                spacing 10
                if d.who == MC_Name:
                    box_reverse False
                if previous_d_who != d.who:
                    if d.who == MC_Name:
                        $ message_icon = "images/(sg)01nvl_phone/icon/phone_hero_icon.png"
                    else:
                        $ message_icon = "images/(sg)01nvl_phone/icon/phone_"+d.who+"_icon.png"
                    add message_icon:
                        if d.current:
                            at message_appear_icon()
                else:
                    null width 50
                vbox:
                    yalign 1.0
                    if d.who != MC_Name and previous_d_who != d.who:
                        text d.who :
                            size 25
                    frame:
                        padding (10,2)
                        background Frame(message_frame, 23,23,23,23)
                        xsize 330
                        if d.current:
                            if d.who == MC_Name:
                                at message_appear(1)
                            else:
                                at message_appear(-1)
                        text d.what:
                            pos (0,0)
                            xsize 330
                            slow_cps False
                            if d.who == MC_Name :
                                size 20
                                color "#d3d7da"
                                text_align 0.0
                            #    xpos -580
                            else:
                                size 20
                                color "#d3d7da"
                            id d.what_id
        $ previous_d_who = d.who
style phoneFrame is default
style phoneFrame_frame:
    background Transform("images/(sg)01nvl_phone/002_phone_bkg.png", xcenter=0.5,yalign=0.5)
    foreground Transform("images/(sg)01nvl_phone/001_phone_frg.png", xcenter=0.5,yalign=0.5)
    ysize 815
    xsize 495
style phoneFrame_viewport:
    yfill True
    xfill True
    yoffset 30
    xoffset 40
style phoneFrame_vbox:
    spacing 10
    xfill True
<img src="https://img.itch.zone/aW1nLzEyMjkzNTQzLnBuZw==/original/OphwF2.png" style="background-color: rgb(255, 255, 255); color: inherit; font-family: inherit; font-size: inherit; white-space: normal;">

You would see your Mc's name in the script file,  not in the phone file.
define the mc for the nvl mode
example:
define mc_nvl = Character("Mc_name", kind=nvl, image="me", callback=Phone_ReceiveSound)

something like that...

scripthii! could you help me with using a custom name for mc? im kind of familiar with coding but not that good.

Deleted 125 days ago
Deleted 125 days ago
Deleted 126 days ago
Deleted 126 days ago
Deleted 127 days ago
(1 edit)

Hey!

I also want to clean up the messages to change the conversation...

If you find the solution, I want it too please.

@Léa#2516

(+5)

At the end of the conversation, you have to write nvl clear

Thanks lea for the cleaner :)

Hi! Forgive me for being a bit of a noob, but when I tried to download it, the zip file refuses to open as anything but an app. I can't seem to access the files??

Thank you! 

Deleted 126 days ago

if youre using mac, u should be able to open it with "open package contents" not sure how it is on windows tho

I used this in my game! :D It's amazing, simple, and easy to customize. Thanks so much!

https://aquariumaesthetic.itch.io/sunmoon-verse-demo

It fits perfect to my project but the problem is that sending and receiving messages in white color, not like sender-receiver in the video. Any help?

Idk if you figured it out yet, but you have to define who the main character is in the 'PhoneTexting.rpy' file. This is the line you have to edit. 

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

Change this to the name of your main character and make sure it matches what you have in your main script file!

(+2)

I have the same issue as a previous poster but I haven't been able to find an answer.  I am trying to use the system for multiple characters (more than 1 MC).  I have it set up so that each character has a separate image for both the send and receive icons and gave them unique variables to call for each.  The ONLY way the code seems to work is if I manually type the character's name.  For example: 
mc1_nvl = "Steve"  and nvl_mc1 = Character("Steve") -- this works
mc1_nvl = "Steve"  and steve = Character("Steve") and nvl_mc1 = Character("[steve]") -- this works
mc1_nvl = "[steve]"  and steve = Character("Steve") and nvl_mc1 = Character("[steve]") -- this does not work
Essentially, if the name comes from a user-defined name it doesn't work.  It ONLY works if the default name is used.  I've tried using the variable by itself, the variable with quotes and square bracers, but nothing works.  It will show the name properly but shows the default icon and always shows the receive not the send (as that's the default for unknown).  The only way I can seem to get this to work is if I remove the variable names and have all names static, which isn't a good option.

Helloo !

I don't know if this will help you but here's how I did it.

In PhoneTexting : define MC_Name = "Me".

Then in script : define n = Character("[name]", image="mc", color="#0e7a38")

define n_nvl = Character("Me", kind=nvl, image="mc", callback=Phone_SendSound)

It doesn't mark the MC name, but it's on the sender's side.

(+1)

HOW TO ADD THIS TO A PROJECT WITH A SIZE OF 1280x720

(+1)

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

in phonetexting.rpy, change "draggable" to false.

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!

Unsure if you still check up on this, but I'm trying to do a similar thing and changing the xsize under nvl_phonetext didn't change it. Were either of you able to figure it out? I feel like I've messed with everything and still haven't figured it out.

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!

(+2)(-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!

Hey there! :)
I encountered the same problem aswell. Do you mind sharing how you solved the issue? Thanks in advance!

(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

Viewing most recent comments 1 to 40 of 53 · Next page · Last page