Basic Message System

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Message
Author
sharikah
Regular
Posts: 139
Joined: Sun Jun 08, 2014 1:36 am
Contact:

Re: Basic Message System

#61 Post by sharikah »

Dragonstar89 wrote:
sharikah wrote: Does this go in the messages part or in the script?
It goes in the messages.rpy file. Look where I commented out the old code in the snippets I shared - that's where you should paste it at.
Another question with the post you put using the phone as the alert for the new messages does it also go in the messages or in the script? So I'm learning but I don't know a lot.
Image

User avatar
Dragonstar89
Regular
Posts: 163
Joined: Mon Aug 12, 2013 11:28 pm
Projects: TBA
Organization: Self
IRC Nick: dstar89
Deviantart: senpai-jake
Skype: dstar_891
Location: West Virginia, USA
Contact:

Re: Basic Message System

#62 Post by Dragonstar89 »

sharikah wrote:
Dragonstar89 wrote:
sharikah wrote: Does this go in the messages part or in the script?
It goes in the messages.rpy file. Look where I commented out the old code in the snippets I shared - that's where you should paste it at.
Another question with the post you put using the phone as the alert for the new messages does it also go in the messages or in the script? So I'm learning but I don't know a lot.
You will use the phone images in your code for the messages.rpy script.
Beginning pre-production work on a project in Renpy. After being away for 5 years, it's time to get back in the game 8)

User avatar
Luxliev
Veteran
Posts: 242
Joined: Sat Feb 07, 2015 11:01 am
Soundcloud: Luxliev
Contact:

Re: Basic Message System

#63 Post by Luxliev »

Thanks for sharing.
Newest classical cover: Advance Wars - Sami Theme: https://www.youtube.com/watch?v=657Jt7hJRVc

Forum with my music: http://luxliev.proboards.com/

CupCakeComedy
Regular
Posts: 26
Joined: Sun Feb 22, 2015 7:46 pm
Contact:

Re: Basic Message System

#64 Post by CupCakeComedy »

This is an example of using a muckup and part of the code to create a complex phone overlay.
I'm working on it (lack some asset), but I also added an animated notifying system, animation of opening/close, an attachment system, the sent date, and a different way to reply (without the need to jump to other labels). Seen messages change icon and color. I drop the delete and draft system, I don't needed them (probably I will restore them later).
Maybe I can post some code example soon. Anyway the style code is strictly tied with the images and mockups you use.
In my code I strictly used textbuttons with Solid(()) backgrounds and paddings to avoid caching problems.
screenshot0108.png
screenshot0109.png
screenshot0110.png

sharikah
Regular
Posts: 139
Joined: Sun Jun 08, 2014 1:36 am
Contact:

Re: Basic Message System

#65 Post by sharikah »

That's great!! Were you able to finish it? I would love to use it..
CupCakeComedy wrote:This is an example of using a muckup and part of the code to create a complex phone overlay.
I'm working on it (lack some asset), but I also added an animated notifying system, animation of opening/close, an attachment system, the sent date, and a different way to reply (without the need to jump to other labels). Seen messages change icon and color. I drop the delete and draft system, I don't needed them (probably I will restore them later).
Maybe I can post some code example soon. Anyway the style code is strictly tied with the images and mockups you use.
In my code I strictly used textbuttons with Solid(()) backgrounds and paddings to avoid caching problems.
screenshot0108.png
screenshot0109.png
screenshot0110.png
Image

CupCakeComedy
Regular
Posts: 26
Joined: Sun Feb 22, 2015 7:46 pm
Contact:

Re: Basic Message System

#66 Post by CupCakeComedy »

sharikah wrote:That's great!! Were you able to finish it? I would love to use it..
I'll do another post (soon). This one belong to a commercial project, so I will do a tutorial more than a code to recycle (nothing too difficult, anyway).

sharikah
Regular
Posts: 139
Joined: Sun Jun 08, 2014 1:36 am
Contact:

Re: Basic Message System

#67 Post by sharikah »

Please let me know when you!!
CupCakeComedy wrote:
sharikah wrote:That's great!! Were you able to finish it? I would love to use it..
I'll do another post (soon). This one belong to a commercial project, so I will do a tutorial more than a code to recycle (nothing too difficult, anyway).
Image

User avatar
Xerofit51
Veteran
Posts: 376
Joined: Thu Jan 09, 2014 12:58 am
Completed: Freak-quency, Harvest-Moon spin off
Projects: Freak-quency
Deviantart: xerofit51
Location: Indonesia
Contact:

Re: Basic Message System

#68 Post by Xerofit51 »

Is it just me or when you load a game, all the messages you read became new messages again?

wayward
Regular
Posts: 41
Joined: Tue Jun 30, 2015 9:53 pm
Contact:

Re: Basic Message System

#69 Post by wayward »

This is a really cool idea.

User avatar
namastaii
Eileen-Class Veteran
Posts: 1350
Joined: Mon Feb 02, 2015 8:35 pm
Projects: Template Maker for Ren'Py, What Life
Github: lunalucid
Skype: Discord: lunalucid#1991
Soundcloud: LunaLucidMusic
itch: lunalucid
Location: USA
Contact:

Re: Basic Message System

#70 Post by namastaii »

Someone posted in the questions forums using your code and asking if there's a way to make it so some text messages can open a photo link or attachment type of feature. Would this be possible?

User avatar
MindlessLogic
Newbie
Posts: 5
Joined: Mon Feb 03, 2014 7:44 pm
Contact:

Re: Basic Message System

#71 Post by MindlessLogic »

namastaii wrote:Someone posted in the questions forums using your code and asking if there's a way to make it so some text messages can open a photo link or attachment type of feature. Would this be possible?
I would try using the hyperlink text tag functionality: http://www.renpy.org/doc/html/text.html ... -text-tags

User avatar
meyaoi
Regular
Posts: 61
Joined: Thu Dec 03, 2015 6:07 am
Tumblr: meyaoigames
Deviantart: meyaoi
Contact:

Re: Basic Message System

#72 Post by meyaoi »

Thank you for making this, it is a really great example to start learning coding.

However, I experience a bit of problem with it (which I don't know if it happens only to me or what), but whenever I save, exit the game, and reload the save file, the text messages aren't retained (it went missing from the phone screen).

I would appreciate any kind of help, thank you!


Nevermind, I was being stupid and missed a line of code.
In case someone experience the same thing:
It's this line here:

Code: Select all

    $ mail = []
    $ mail_queue = []

LyannaCore
Newbie
Posts: 22
Joined: Wed Jun 21, 2017 1:45 pm
Contact:

Re: Basic Message System

#73 Post by LyannaCore »

I realize this systems is a bit old now, so it's probably just something that has changed with Renpy updates, but trying to use it messes up my existing menus.

With the messages.rpy included and integrated as required, they are aligned to the left and have no change when moused over:
Image.

Without the message framework, it looks like this:
Image

The beginning of my script code is like this while using the messages.rpy framework:

Code: Select all

label start: 

## Message Stuff ##
    $ mail = []
    $ mail_queue = [] # for message delay
    $ contacts = []  # for draft feature

    scene black
    with fade
    
    show screen mailbox_overlay
    
    "Where would you like to start?"
    menu:
        "Intro":
            jump start1
        "Waking up":
            jump wake1
        "Laundry":
            $ pcfirstname = "Lyanna"
            $ pclastname = "Core"
            jump laundryservice
        "Ship Paperwork":
            $ pcfirstname = "Lyanna"
            $ pclastname = "Core"
            $ laundrychoice = 1
            jump creation1
        "Ship Start":
            $ pcfirstname = "Lyanna"
            $ pclastname = "Core"
            jump shipstart1
        "System Map":
            $ pcfirstname = "Lyanna"
            $ pclastname = "Core"
            jump system_map
Any ideas what the issue could be?

User avatar
SgurrDearg
Newbie
Posts: 2
Joined: Thu Jul 13, 2017 6:00 pm
Projects: "Kissing Aliens" <-- working title
Location: UK
Contact:

Re: Basic Message System

#74 Post by SgurrDearg »

LyannaCore wrote: Wed Jun 21, 2017 2:03 pm I realize this systems is a bit old now, so it's probably just something that has changed with Renpy updates, but trying to use it messes up my existing menus.
...
With the messages.rpy included and integrated as required, they are aligned to the left and have no change when moused over:
...
Any ideas what the issue could be?
Hi, I encountered this issue too, and managed to fix it. It's a bit of a temporary fix and might cause issues if you plan to use the email drafts & replies though, I haven't tested for that as it's not applicable to me.

However! If you go into the messages.rpy script and hash out (or delete) all the lines from "Updated Choice Screen" down (line 200), it should return to normal.

I realise this is a month late but if you were still struggling I thought I'd share my quick solution, as I've been fretting about it for a week or so now too :lol:

LyannaCore
Newbie
Posts: 22
Joined: Wed Jun 21, 2017 1:45 pm
Contact:

Re: Basic Message System

#75 Post by LyannaCore »

Thank you, I set the whole thing aside when I couldn't figure it out, so this helps a lot.

Post Reply

Who is online

Users browsing this forum: No registered users