I have the same question.
telegram messenger (4 version)
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.
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.
-
- Veteran
- Posts: 339
- Joined: Wed Sep 24, 2014 5:03 pm
- Organization: Wild Rose Interactive
- Contact:
Re: telegram messenger (2 version)
- sDextra
- Regular
- Posts: 40
- Joined: Fri Oct 12, 2018 2:06 am
- Organization: Event Horizon Games
- Github: sDextra
- Location: Kazakhstan
- Contact:
Re: telegram messenger (2 version)
I've already answered that question.
sDextra wrote: ↑Fri Oct 04, 2019 10:28 amYeah, of course.
You just need to add a new function in messenger.rpy:Update messenger.rpy on GitHub.Code: Select all
init python: # ... def switch_dialogue(name='sDextra', dialogue=store.messages): store.interlocutor_name = name store.messages = dialogue
Usage example:Code: Select all
$ dialogue_one = [] #Poe $ dialogue_two = [] #sDextra $ switch_dialogue(name='Poe', dialogue=dialogue_one) $ msg ("Hi. This is the first dialogue.", who=1) pause $ switch_dialogue(name='sDextra', dialogue=dialogue_two) $ msg ("This is the second dialogue.", who=1) pause $ switch_dialogue(name='Poe', dialogue=dialogue_one) ...
-
- Veteran
- Posts: 339
- Joined: Wed Sep 24, 2014 5:03 pm
- Organization: Wild Rose Interactive
- Contact:
Re: telegram messenger (2 version)
Oh, sorry. I was actually thinking of switching conversations by clicking a button.sDextra wrote: ↑Thu Mar 05, 2020 1:10 amI've already answered that question.
sDextra wrote: ↑Fri Oct 04, 2019 10:28 amYeah, of course.
You just need to add a new function in messenger.rpy:Update messenger.rpy on GitHub.Code: Select all
init python: # ... def switch_dialogue(name='sDextra', dialogue=store.messages): store.interlocutor_name = name store.messages = dialogue
Usage example:Code: Select all
$ dialogue_one = [] #Poe $ dialogue_two = [] #sDextra $ switch_dialogue(name='Poe', dialogue=dialogue_one) $ msg ("Hi. This is the first dialogue.", who=1) pause $ switch_dialogue(name='sDextra', dialogue=dialogue_two) $ msg ("This is the second dialogue.", who=1) pause $ switch_dialogue(name='Poe', dialogue=dialogue_one) ...
- sDextra
- Regular
- Posts: 40
- Joined: Fri Oct 12, 2018 2:06 am
- Organization: Event Horizon Games
- Github: sDextra
- Location: Kazakhstan
- Contact:
Re: telegram messenger (2 version)
textbutton "Poe" action Function(switch_dialogue, name='Poe', dialogue=dialogue_one)verysunshine wrote: ↑Thu Mar 05, 2020 2:46 pmOh, sorry. I was actually thinking of switching conversations by clicking a button.sDextra wrote: ↑Thu Mar 05, 2020 1:10 amI've already answered that question.
sDextra wrote: ↑Fri Oct 04, 2019 10:28 am
Yeah, of course.
You just need to add a new function in messenger.rpy:Update messenger.rpy on GitHub.Code: Select all
init python: # ... def switch_dialogue(name='sDextra', dialogue=store.messages): store.interlocutor_name = name store.messages = dialogue
Usage example:Code: Select all
$ dialogue_one = [] #Poe $ dialogue_two = [] #sDextra $ switch_dialogue(name='Poe', dialogue=dialogue_one) $ msg ("Hi. This is the first dialogue.", who=1) pause $ switch_dialogue(name='sDextra', dialogue=dialogue_two) $ msg ("This is the second dialogue.", who=1) pause $ switch_dialogue(name='Poe', dialogue=dialogue_one) ...
textbutton "sDextra" action Function(switch_dialogue, name='sDextra', dialogue=dialogue_two)
Re: telegram messenger (2 version)
Hi there! Love this thing, it's fantastic!
I was wondering, is there a way to re-arrange everything in such format:
<time> <nickname>: message
Basically for group chat/private chat always have time and nickname in front, kinda like IRC.
Also sent you a message, Dextra. Thank you for your hard work!
I was wondering, is there a way to re-arrange everything in such format:
<time> <nickname>: message
Basically for group chat/private chat always have time and nickname in front, kinda like IRC.
Also sent you a message, Dextra. Thank you for your hard work!
-
- Newbie
- Posts: 9
- Joined: Wed Apr 29, 2020 3:27 pm
- Contact:
Re: telegram messenger (2 version)
Hi,
First of all thanks for your work.
I tried to put the messenger on a icon. so when you click in the game on a icon (in this case mobile phone icon) the messenger shows up. No matter what i did i miserable failed.
Would you be so kind and show me how to do it?
Thanks in advanced
First of all thanks for your work.
I tried to put the messenger on a icon. so when you click in the game on a icon (in this case mobile phone icon) the messenger shows up. No matter what i did i miserable failed.
Would you be so kind and show me how to do it?
Thanks in advanced
- sDextra
- Regular
- Posts: 40
- Joined: Fri Oct 12, 2018 2:06 am
- Organization: Event Horizon Games
- Github: sDextra
- Location: Kazakhstan
- Contact:
Re: telegram messenger (2 version)
Can u show me your code with that?creativechaos wrote: ↑Thu Apr 30, 2020 5:29 am Hi,
First of all thanks for your work.
I tried to put the messenger on a icon. so when you click in the game on a icon (in this case mobile phone icon) the messenger shows up. No matter what i did i miserable failed.
Would you be so kind and show me how to do it?
Thanks in advanced
-
- Newbie
- Posts: 9
- Joined: Wed Apr 29, 2020 3:27 pm
- Contact:
Re: telegram messenger (2 version)
It have set the imagebutton
But i get this error:
I want to use the option group or dialogue. I am completly lost at the moment
Code: Select all
imagebutton:
top_margin .01
right_margin .01
xalign 1.0 ypos 0.2
focus_mask True
idle "mobile-icon-idle"
hover "mobile-icon-hover"
action Jump("groupchat_or_dialogue")
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 15140, in script
$ show_messenger()
File "game/script.rpy", line 15140, in <module>
$ show_messenger()
File "game/messenger.rpy", line 51, in show_messenger
renpy.pause(1.0, hard=True)
File "game/messenger.rpy", line 340, in execute
screen messenger():
File "game/messenger.rpy", line 340, in execute
screen messenger():
File "game/messenger.rpy", line 341, in execute
if under_messenger:
File "game/messenger.rpy", line 342, in execute
add '#00000090' at blackout
File "game/messenger.rpy", line 342, in keywords
add '#00000090' at blackout
NameError: name 'blackout' is not defined
- sDextra
- Regular
- Posts: 40
- Joined: Fri Oct 12, 2018 2:06 am
- Organization: Event Horizon Games
- Github: sDextra
- Location: Kazakhstan
- Contact:
Re: telegram messenger (2 version)
But this code works fine for me.creativechaos wrote: ↑Thu Apr 30, 2020 8:23 am It have set the imagebutton
But i get this error:Code: Select all
imagebutton: top_margin .01 right_margin .01 xalign 1.0 ypos 0.2 focus_mask True idle "mobile-icon-idle" hover "mobile-icon-hover" action Jump("groupchat_or_dialogue")
I want to use the option group or dialogue. I am completly lost at the momentCode: Select all
I'm sorry, but an uncaught exception occurred. While running game code: File "game/script.rpy", line 15140, in script $ show_messenger() File "game/script.rpy", line 15140, in <module> $ show_messenger() File "game/messenger.rpy", line 51, in show_messenger renpy.pause(1.0, hard=True) File "game/messenger.rpy", line 340, in execute screen messenger(): File "game/messenger.rpy", line 340, in execute screen messenger(): File "game/messenger.rpy", line 341, in execute if under_messenger: File "game/messenger.rpy", line 342, in execute add '#00000090' at blackout File "game/messenger.rpy", line 342, in keywords add '#00000090' at blackout NameError: name 'blackout' is not defined
Probably a mistake elsewhere.
Check your script 'images.rpy'
Code: Select all
transform blackout():
alpha 1
on show:
alpha 0
easein .5 alpha 1
on hide:
easeout .5 alpha 0
-
- Newbie
- Posts: 9
- Joined: Wed Apr 29, 2020 3:27 pm
- Contact:
Re: telegram messenger (2 version)
Here the complete error script.
Code: Select all
I'm sorry, but an uncaught exception occurred.
While running game code:
File "game/script.rpy", line 15140, in script
$ show_messenger()
File "game/script.rpy", line 15140, in <module>
$ show_messenger()
File "game/messenger.rpy", line 51, in show_messenger
renpy.pause(1.0, hard=True)
File "game/messenger.rpy", line 340, in execute
screen messenger():
File "game/messenger.rpy", line 340, in execute
screen messenger():
File "game/messenger.rpy", line 341, in execute
if under_messenger:
File "game/messenger.rpy", line 342, in execute
add '#00000090' at blackout
File "game/messenger.rpy", line 342, in keywords
add '#00000090' at blackout
NameError: name 'blackout' is not defined
-- Full Traceback ------------------------------------------------------------
Full traceback:
File "game/script.rpy", line 15140, in script
$ show_messenger()
File "F:\Progs\renpy-7.3.5-sdk\renpy\ast.py", line 914, in execute
renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
File "F:\Progs\renpy-7.3.5-sdk\renpy\python.py", line 2028, in py_exec_bytecode
exec bytecode in globals, locals
File "game/script.rpy", line 15140, in <module>
$ show_messenger()
File "game/messenger.rpy", line 51, in show_messenger
renpy.pause(1.0, hard=True)
File "F:\Progs\renpy-7.3.5-sdk\renpy\exports.py", line 1480, in pause
rv = renpy.ui.interact(mouse='pause', type='pause', roll_forward=roll_forward)
File "F:\Progs\renpy-7.3.5-sdk\renpy\ui.py", line 297, in interact
rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
File "F:\Progs\renpy-7.3.5-sdk\renpy\display\core.py", line 2702, in interact
repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs)
File "F:\Progs\renpy-7.3.5-sdk\renpy\display\core.py", line 3094, in interact_core
root_widget.visit_all(lambda i : i.per_interact())
File "F:\Progs\renpy-7.3.5-sdk\renpy\display\core.py", line 541, in visit_all
d.visit_all(callback, seen)
File "F:\Progs\renpy-7.3.5-sdk\renpy\display\core.py", line 541, in visit_all
d.visit_all(callback, seen)
File "F:\Progs\renpy-7.3.5-sdk\renpy\display\core.py", line 541, in visit_all
d.visit_all(callback, seen)
File "F:\Progs\renpy-7.3.5-sdk\renpy\display\screen.py", line 430, in visit_all
callback(self)
File "F:\Progs\renpy-7.3.5-sdk\renpy\display\core.py", line 3094, in <lambda>
root_widget.visit_all(lambda i : i.per_interact())
File "F:\Progs\renpy-7.3.5-sdk\renpy\display\screen.py", line 440, in per_interact
self.update()
File "F:\Progs\renpy-7.3.5-sdk\renpy\display\screen.py", line 625, in update
self.screen.function(**self.scope)
File "game/messenger.rpy", line 340, in execute
screen messenger():
File "game/messenger.rpy", line 340, in execute
screen messenger():
File "game/messenger.rpy", line 341, in execute
if under_messenger:
File "game/messenger.rpy", line 342, in execute
add '#00000090' at blackout
File "game/messenger.rpy", line 342, in keywords
add '#00000090' at blackout
File "<screen language>", line 342, in <module>
NameError: name 'blackout' is not defined
Windows-8-6.2.9200
Ren'Py 7.3.5.606
Lets Start 1.0
Thu Apr 30 17:05:19 2020
- sDextra
- Regular
- Posts: 40
- Joined: Fri Oct 12, 2018 2:06 am
- Organization: Event Horizon Games
- Github: sDextra
- Location: Kazakhstan
- Contact:
Re: telegram messenger (2 version)
Sorry, I'm talking about your script with the button.creativechaos wrote: ↑Thu Apr 30, 2020 11:15 am Here the complete error script.Code: Select all
I'm sorry, but an uncaught exception occurred. While running game code: File "game/script.rpy", line 15140, in script $ show_messenger() File "game/script.rpy", line 15140, in <module> $ show_messenger() File "game/messenger.rpy", line 51, in show_messenger renpy.pause(1.0, hard=True) File "game/messenger.rpy", line 340, in execute screen messenger(): File "game/messenger.rpy", line 340, in execute screen messenger(): File "game/messenger.rpy", line 341, in execute if under_messenger: File "game/messenger.rpy", line 342, in execute add '#00000090' at blackout File "game/messenger.rpy", line 342, in keywords add '#00000090' at blackout NameError: name 'blackout' is not defined -- Full Traceback ------------------------------------------------------------ Full traceback: File "game/script.rpy", line 15140, in script $ show_messenger() File "F:\Progs\renpy-7.3.5-sdk\renpy\ast.py", line 914, in execute renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store) File "F:\Progs\renpy-7.3.5-sdk\renpy\python.py", line 2028, in py_exec_bytecode exec bytecode in globals, locals File "game/script.rpy", line 15140, in <module> $ show_messenger() File "game/messenger.rpy", line 51, in show_messenger renpy.pause(1.0, hard=True) File "F:\Progs\renpy-7.3.5-sdk\renpy\exports.py", line 1480, in pause rv = renpy.ui.interact(mouse='pause', type='pause', roll_forward=roll_forward) File "F:\Progs\renpy-7.3.5-sdk\renpy\ui.py", line 297, in interact rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs) File "F:\Progs\renpy-7.3.5-sdk\renpy\display\core.py", line 2702, in interact repeat, rv = self.interact_core(preloads=preloads, trans_pause=trans_pause, **kwargs) File "F:\Progs\renpy-7.3.5-sdk\renpy\display\core.py", line 3094, in interact_core root_widget.visit_all(lambda i : i.per_interact()) File "F:\Progs\renpy-7.3.5-sdk\renpy\display\core.py", line 541, in visit_all d.visit_all(callback, seen) File "F:\Progs\renpy-7.3.5-sdk\renpy\display\core.py", line 541, in visit_all d.visit_all(callback, seen) File "F:\Progs\renpy-7.3.5-sdk\renpy\display\core.py", line 541, in visit_all d.visit_all(callback, seen) File "F:\Progs\renpy-7.3.5-sdk\renpy\display\screen.py", line 430, in visit_all callback(self) File "F:\Progs\renpy-7.3.5-sdk\renpy\display\core.py", line 3094, in <lambda> root_widget.visit_all(lambda i : i.per_interact()) File "F:\Progs\renpy-7.3.5-sdk\renpy\display\screen.py", line 440, in per_interact self.update() File "F:\Progs\renpy-7.3.5-sdk\renpy\display\screen.py", line 625, in update self.screen.function(**self.scope) File "game/messenger.rpy", line 340, in execute screen messenger(): File "game/messenger.rpy", line 340, in execute screen messenger(): File "game/messenger.rpy", line 341, in execute if under_messenger: File "game/messenger.rpy", line 342, in execute add '#00000090' at blackout File "game/messenger.rpy", line 342, in keywords add '#00000090' at blackout File "<screen language>", line 342, in <module> NameError: name 'blackout' is not defined Windows-8-6.2.9200 Ren'Py 7.3.5.606 Lets Start 1.0 Thu Apr 30 17:05:19 2020
Full version of this screen:
Code: Select all
imagebutton:
top_margin .01
right_margin .01
xalign 1.0 ypos 0.2
focus_mask True
idle "mobile-icon-idle"
hover "mobile-icon-hover"
action Jump("groupchat_or_dialogue")
-
- Newbie
- Posts: 9
- Joined: Wed Apr 29, 2020 3:27 pm
- Contact:
Re: telegram messenger (2 version)
Code: Select all
screen mc_room_map:
imagemap:
vbox:
textbutton "{b}[clock.time]{/b}"
textbutton "{b}[clock.weekday]{/b} {b}[clock.day]{/b}"
hbox:
imagebutton:
top_margin .01
left_margin .15
xalign 0.0 ypos 0
focus_mask True
idle "time-icon-idle"
hover "time-icon-hover"
action Function(clock.advance)
imagebutton:
top_margin .01
right_margin .01
xalign 1.0 ypos 0
focus_mask True
idle "map-icon-idle"
hover "map-icon-hover"
action Jump("morrison_navigation")
imagebutton:
top_margin .01
right_margin .01
xalign 1.0 ypos 0.2
focus_mask True
idle "mobile-icon-idle"
hover "mobile-icon-hover"
action Jump("lb_groupchat")
- sDextra
- Regular
- Posts: 40
- Joined: Fri Oct 12, 2018 2:06 am
- Organization: Event Horizon Games
- Github: sDextra
- Location: Kazakhstan
- Contact:
Re: telegram messenger (2 version)
Can u send me your project via PM? I'll try to fix the error.creativechaos wrote: ↑Sat May 02, 2020 7:19 amYou mean this?Code: Select all
screen mc_room_map: imagemap: vbox: textbutton "{b}[clock.time]{/b}" textbutton "{b}[clock.weekday]{/b} {b}[clock.day]{/b}" hbox: imagebutton: top_margin .01 left_margin .15 xalign 0.0 ypos 0 focus_mask True idle "time-icon-idle" hover "time-icon-hover" action Function(clock.advance) imagebutton: top_margin .01 right_margin .01 xalign 1.0 ypos 0 focus_mask True idle "map-icon-idle" hover "map-icon-hover" action Jump("morrison_navigation") imagebutton: top_margin .01 right_margin .01 xalign 1.0 ypos 0.2 focus_mask True idle "mobile-icon-idle" hover "mobile-icon-hover" action Jump("lb_groupchat")
There may be an error in the incorrect call of the screen.
-
- Miko-Class Veteran
- Posts: 793
- Joined: Fri Feb 09, 2018 12:05 am
- Location: Canada
- Contact:
Re: telegram messenger
open sms.rpy
find and change
Code: Select all
# положение окна с смс
sms_xalign, sms_yalign = .75, .25
Re: telegram messenger (2 version)
i was breaking my head a few months ago trying to achieve something like this, and i came up with a very decent result, but this one seems better, ill give it a try thank you.
Who is online
Users browsing this forum: Andredron