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.
Andredron
Miko-Class Veteran
Posts: 719 Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:
#1
Post
by Andredron » Fri May 18, 2018 10:01 am
1 version
(Obsolete)
Update to 'Messenger 1.1' (Telegram Emulator)
GitHub
Google Drive
Features:
Sending a Picture Message (Click open to full screen);
Sending an Audio Message (Audio Player);
Typewriter Mode (typing emulation);
Make Choices (inside the message bubble)
Message Search (Magnifier Icon);
In Search '#pic' - show all Picture Messages;
In Search '#audio' - show all Audio Messages.
The project uses the Python module 'mutagen' (for Audio Player)
autor Valentin Bez'chanuk
https://m.vk.com/sota6 and
memberlist.php?mode=viewprofile&u=44990
The license is free, but I'll be glad if ty specify the author
_________________________________________
Autor: Ruslan Nebykov
2 version message telegram
(Obsolete)
Gui Renpy
http://renpyfordummies.blogspot.com/201 ... i.html?m=1
Alt version Renpy
http://renpyfordummies.blogspot.com/201 ... t.html?m=1
_________________________________________
3 version message
https://github.com/shawna-p/mysterious-messenger
(New!)
A messenger program with many features such as phone calls, text messages, chatrooms, emails, and Visual Novel sections. This is an ongoing project intended to give me practice experimenting with the Ren'Py engine and its capabilities
https://mysterious-messenger.readthedocs.io/en/stable/
_________________________________________
4 version message
https://github.com/Elckarow/Better-EMR-Phone
A Ren'Py 7.4.9+ phone framework inspired by the phone used in the DDLC mod, Doki Doki Exit Music Redux.
Last edited by
Andredron on Sun Oct 29, 2023 11:53 pm, edited 16 times in total.
gas
Miko-Class Veteran
Posts: 842 Joined: Mon Jan 26, 2009 7:21 pm
Contact:
#2
Post
by gas » Sat May 19, 2018 10:08 am
Thanks to both you and your friend.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.
10 ? "RENPY"
20 GOTO 10
RUN
DragonKnight
Regular
Posts: 51 Joined: Sun Nov 12, 2017 10:16 am
Projects: Taboo Hearts
Contact:
#3
Post
by DragonKnight » Sun May 20, 2018 5:43 am
Thanks
Currently working on Taboo Hearts
Currently working on Forbidden
gas
Miko-Class Veteran
Posts: 842 Joined: Mon Jan 26, 2009 7:21 pm
Contact:
#4
Post
by gas » Sun May 20, 2018 10:24 am
There's a bug in the remove last message function!
It throw an empty list error if you erase the first message in a sequence.
I don't have the exqct code right there, but it lack a check for an empty list before apply del[-1].
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.
10 ? "RENPY"
20 GOTO 10
RUN
Andredron
Miko-Class Veteran
Posts: 719 Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:
#5
Post
by Andredron » Tue May 22, 2018 10:37 am
gas wrote: ↑ Sun May 20, 2018 10:24 am
There's a bug in the remove last message function!
It throw an empty list error if you erase the first message in a sequence.
I don't have the exqct code right there, but it lack a check for an empty list before apply del[-1].
I understood, I will write to him about the error
Andredron
Miko-Class Veteran
Posts: 719 Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:
#6
Post
by Andredron » Tue May 22, 2018 10:54 am
Code: Select all
def del_last_msg():
if len(store.m_msg) > 0:
del store.m_msg[-1]
link updated
Saiffyros
Newbie
Posts: 14 Joined: Sun May 21, 2017 10:13 pm
Contact:
#7
Post
by Saiffyros » Fri Jun 01, 2018 6:16 pm
I added a way to include pictures on it. Code and example bellow.
The dimensions of the pic: 200x200
Thank you for sharing it
Code: Select all
yadj = ui.adjustment()
# Добавление нового сообщения
def msg(txt, who=False, image1=False, sound=False):
store.m_msg.append((who, txt, image1, sound))
store.yadj.value = store.yadj.range+300
renpy.restart_interaction()
if who:
renpy.play("new_message.mp3", "sound")
renpy.pause()
# Удаление последнего сообщения
def del_last_msg():
if len(store.m_msg) > 0:
del store.m_msg[-1]
# Удаление всех сообщений
def del_all_msg():
store.m_msg = []
#################################################################################
# Экран сообщения
screen telegram():
frame background "messenger/back.png" xysize (600,975) align (0.9,.5):
frame background None xysize (560, 810) align (0.5,0.58):
viewport id "vp_msg" mousewheel True yadjustment yadj:
vbox spacing 15 xsize 550 xalign 0.4 box_reverse True:
for message in m_msg[::-1]:
$ who, txt, image1, sound = message
$ xgn = 0.0 if who else 1.0
if sound:
imagebutton auto "messenger/sound_%s.png" xalign xgn action Play("sound", sound)
if image1:
imagebutton idle image1 hover image1 xalign xgn action NullAction()
else:
button xalign xgn xmaximum 580 xpadding 20 ypadding 10 background Frame("messenger/box.png", 25, 25):
text "%s"%(txt) style "txt_base"
# Имя собеседника
text "%s"%(msg_name) style "txt_base" size 35 xalign 0.31 xanchor 0.0 yalign 0.04
# Аватарка собеседника
add "messenger/av/"+msg_name.lower().replace(' ', '_')+".png" pos (100,27)
# Стрелка
imagebutton auto "messenger/arr_%s.png" pos (10, 33) action NullAction()
# Стереть сообщения
button background style_button_inst hover_background style_button_hovr xalign 0.99 yalign 0.03 action Function(del_all_msg) xysize (60,60):
text " x " style "txt_base" size 40 pos (36, -2)
# Ползунок прокрутки
vbar value YScrollValue("vp_msg") style "bar_vert"
Andredron
Miko-Class Veteran
Posts: 719 Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:
#8
Post
by Andredron » Sat Jun 02, 2018 4:58 am
Saiffyros wrote: ↑ Fri Jun 01, 2018 6:16 pm
I added a way to include pictures on it. Code and example bellow.
The dimensions of the pic: 200x200
Thank you for sharing it
Code: Select all
yadj = ui.adjustment()
# Добавление нового сообщения
def msg(txt, who=False, image1=False, sound=False):
store.m_msg.append((who, txt, image1, sound))
store.yadj.value = store.yadj.range+300
renpy.restart_interaction()
if who:
renpy.play("new_message.mp3", "sound")
renpy.pause()
# Удаление последнего сообщения
def del_last_msg():
if len(store.m_msg) > 0:
del store.m_msg[-1]
# Удаление всех сообщений
def del_all_msg():
store.m_msg = []
#################################################################################
# Экран сообщения
screen telegram():
frame background "messenger/back.png" xysize (600,975) align (0.9,.5):
frame background None xysize (560, 810) align (0.5,0.58):
viewport id "vp_msg" mousewheel True yadjustment yadj:
vbox spacing 15 xsize 550 xalign 0.4 box_reverse True:
for message in m_msg[::-1]:
$ who, txt, image1, sound = message
$ xgn = 0.0 if who else 1.0
if sound:
imagebutton auto "messenger/sound_%s.png" xalign xgn action Play("sound", sound)
if image1:
imagebutton idle image1 hover image1 xalign xgn action NullAction()
else:
button xalign xgn xmaximum 580 xpadding 20 ypadding 10 background Frame("messenger/box.png", 25, 25):
text "%s"%(txt) style "txt_base"
# Имя собеседника
text "%s"%(msg_name) style "txt_base" size 35 xalign 0.31 xanchor 0.0 yalign 0.04
# Аватарка собеседника
add "messenger/av/"+msg_name.lower().replace(' ', '_')+".png" pos (100,27)
# Стрелка
imagebutton auto "messenger/arr_%s.png" pos (10, 33) action NullAction()
# Стереть сообщения
button background style_button_inst hover_background style_button_hovr xalign 0.99 yalign 0.03 action Function(del_all_msg) xysize (60,60):
text " x " style "txt_base" size 40 pos (36, -2)
# Ползунок прокрутки
vbar value YScrollValue("vp_msg") style "bar_vert"
or make a button in the background frame to click on the picture and the transformation to an enlarged image worked
the author wrote
Nanahs
Veteran
Posts: 310 Joined: Wed Aug 22, 2018 5:50 pm
Contact:
#9
Post
by Nanahs » Fri Aug 24, 2018 10:00 pm
This is amazing! Thank you so much for sharing!
I have one question though. Is there a way I can give the player options of anwers?
I mean, the character asks you in a message "How are you doing?". Then a menu choice pops up with answers options like "I'm fine, and you?" and "I'm booored". Then, depending on your choice, his answer is going to be different as well. Thank you
Andredron
Miko-Class Veteran
Posts: 719 Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:
#10
Post
by Andredron » Sun Aug 26, 2018 2:14 pm
Nanahs wrote: ↑ Fri Aug 24, 2018 10:00 pm
This is amazing! Thank you so much for sharing!
I have one question though. Is there a way I can give the player options of anwers?
I mean, the character asks you in a message "How are you doing?". Then a menu choice pops up with answers options like "I'm fine, and you?" and "I'm booored". Then, depending on your choice, his answer is going to be different as well. Thank you
Valentin said:
Nanahs
Veteran
Posts: 310 Joined: Wed Aug 22, 2018 5:50 pm
Contact:
#11
Post
by Nanahs » Mon Aug 27, 2018 5:44 pm
Thank you so much Andredom! If I use the codes, I'll give you credit
Andredron
Miko-Class Veteran
Posts: 719 Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:
#12
Post
by Andredron » Mon Aug 27, 2018 6:23 pm
Nanahs wrote: ↑ Mon Aug 27, 2018 5:44 pm
Thank you so much Andredom! If I use the codes, I'll give you credit
Please do not need to publish me, he's an author Valentin Bez'chanuk, he's just busy, that would personally write in the forum
Nanahs
Veteran
Posts: 310 Joined: Wed Aug 22, 2018 5:50 pm
Contact:
#13
Post
by Nanahs » Mon Aug 27, 2018 8:13 pm
Andredron wrote: ↑ Mon Aug 27, 2018 6:23 pm
Nanahs wrote: ↑ Mon Aug 27, 2018 5:44 pm
Thank you so much Andredom! If I use the codes, I'll give you credit
Please do not need to publish me, he's an author Valentin Bez'chanuk, he's just busy, that would personally write in the forum
That's ok. Thank you
Nanahs
Veteran
Posts: 310 Joined: Wed Aug 22, 2018 5:50 pm
Contact:
#14
Post
by Nanahs » Mon Aug 27, 2018 8:28 pm
Oh! One more question I have. Sorry to bother you. I was just wondering, is it possible to add more people in the chat?
I mean, if I wanted to pretend it's a group chat. Like, let's just say the group is called "friends". And add more people chatting. Is it possible? Thank you.
Nanahs
Veteran
Posts: 310 Joined: Wed Aug 22, 2018 5:50 pm
Contact:
#15
Post
by Nanahs » Thu Aug 30, 2018 6:25 pm
Andredron wrote: ↑ Mon Aug 27, 2018 6:23 pm
Nanahs wrote: ↑ Mon Aug 27, 2018 5:44 pm
Thank you so much Andredom! If I use the codes, I'll give you credit
Please do not need to publish me, he's an author Valentin Bez'chanuk, he's just busy, that would personally write in the forum
Hello! Silly question, but how can I place the phone in the middle of the screen?
Whenever I try to do that I get an error message.
Users browsing this forum: Ahrefs [Bot] , Amazon [Bot] , Google [Bot]