Ren'Py Problems taking screenshot

Gagge89

Member
Apr 24, 2020
325
125
Hi to all,
i have a problem when i try to take a screenshot. In Renpy game pressing the key S i can screenshot the game and the screenshot appears on folder game, but the problem is that if i want to take immediately another one screenshot i cannot because the writing of the save path of the screenshot remain for 2 seconds on the screen.
How can I hide the annoying problem that when I press S to take the screenshot, the writing of the save path of the screenshot appears for about 2 seconds and so if i re-press S i see the write of the path?

Please tell me in particular beacuse i'm a programmer and i not so afferate to the programm
Please explain to me what I need to edit and where (in which file) because I'm not a programmer and I know very little about programming :)
Thanks :)

Example of Screenshot
651147_screenshot0004.png
 
Last edited:

Gagge89

Member
Apr 24, 2020
325
125
Capture image 1, go back, go forward and capture image 2 :p
Hi ok, but waiting time to change page is the time that the location disappear ( it remain 2 seconds then go away). But if i want that the write doesn't appear?
So in the code what can i change about the screenshot not to see it?
In few words it is usefull to say you that a program has capture a screenshot, but i don't want to see that notification? How can i hide it?

In games in the folder "renpy" i found the file exports.py. In it if i search the word "screenshot" exit 12 results and 1 of them say :
"
def notify(message):
"""
:doc: other

Causes Ren'Py to display the `message` using the notify screen. By
default, this will cause the message to be dissolved in, displayed
for two seconds, and dissolved out again.

This is useful for actions that otherwise wouldn't produce feedback,
like screenshots or quicksaves.

Only one notification is displayed at a time. If a second notification
is displayed, the first notification is replaced.

This function just calls :var:`config.notify`, allowing its implementation
to be replaced by assigning a new function to that variable.
"""

renpy.config.notify(message) "



I think i had to change something here i don't know what :(
 

Porcus Dev

Engaged Member
Game Developer
Oct 12, 2017
2,582
4,692
Hi ok, but waiting time to change page is the time that the location disappear ( it remain 2 seconds then go away). But if i want that the write doesn't appear?
So in the code what can i change about the screenshot not to see it?
In few words it is usefull to say you that a program has capture a screenshot, but i don't want to see that notification? How can i hide it?

In games in the folder "renpy" i found the file exports.py. In it if i search the word "screenshot" exit 12 results and 1 of them say :
"
def notify(message):
"""
:doc: other

Causes Ren'Py to display the `message` using the notify screen. By
default, this will cause the message to be dissolved in, displayed
for two seconds, and dissolved out again.

This is useful for actions that otherwise wouldn't produce feedback,
like screenshots or quicksaves.

Only one notification is displayed at a time. If a second notification
is displayed, the first notification is replaced.

This function just calls :var:`config.notify`, allowing its implementation
to be replaced by assigning a new function to that variable.
"""

renpy.config.notify(message) "



I think i had to change something here i don't know what :(
I'm not sure, but you can try this:
Look in "screens.rpy" and locate the "screen notify(message)" section, and change the timer value from 3.25 to 0.1
 

Gagge89

Member
Apr 24, 2020
325
125
I'm not sure, but you can try this:
Look in "screens.rpy" and locate the "screen notify(message)" section, and change the timer value from 3.25 to 0.1
i make a search for "screens.rpy" in all folders game but i don't find anything. Where can i find this file?
 

Porcus Dev

Engaged Member
Game Developer
Oct 12, 2017
2,582
4,692
That script is usually inside the "game" folder, but to see the game scripts you have to use UnRen first
 

Gagge89

Member
Apr 24, 2020
325
125
The only one file similar that i find is screen.py in the location renpy/display/screen.py , but not screens.rpy
And in the file that i find screen.py i don't find words with notify.
 

Porcus Dev

Engaged Member
Game Developer
Oct 12, 2017
2,582
4,692
If inside the "game" folder there are ".rpa" files that means the game is encrypted, you need to use UnRen to decrypt and display the scripts (".rpy" files), and there you should see the "screens.rpy" and change that parameter.
 

Gagge89

Member
Apr 24, 2020
325
125
If inside the "game" folder there are ".rpa" files that means the game is encrypted, you need to use UnRen to decrypt and display the scripts (".rpy" files), and there you should see the "screens.rpy" and change that parameter.
I try with another game and infact it works well..

But with the game that i post before the screenshot in game folder i cannot find neither the rpa nor the file screens.rpy ...how can i do?
 

Porcus Dev

Engaged Member
Game Developer
Oct 12, 2017
2,582
4,692
Well, in that game the default location of that function has been changed and it has been put in a script with another name, you will have to search in which one of them is that function.
 

Gagge89

Member
Apr 24, 2020
325
125
Well, in that game the default location of that function has been changed and it has been put in a script with another name, you will have to search in which one of them is that function.
Ok.. I find it.
It was in game/00_Functions/screens.rpy (windows dind't find it :/ )
Howere i open i but it was a quite more complicate respect the other file that i open befare where i had only to cange the value 3.25.

Here there is all this code about screen notify(message) . How i change it?

Code:
screen notify(message):

    zorder 100
    style_prefix "notify"
    if message != "notifList":
        frame at notify_appear:
            ypos 0.2
            text t__(message)
        timer 3.25 action [Hide('notify'), SetVariable("notifList", [])]
    else:
        $ notifOffset = 0
        for msg in notifList:
            frame at notify_appear:
                ypos 0.2
                yoffset notifOffset
                text t__(msg)
            $ notifOffset += notifyLineOffset
#        timer (3.25*len(notifList)) action [Hide('notify'), SetVariable("notifList", [])]
        if len(notifList) > 2:
            $ notifTimerLen = (2.0 * len(notifList))
            if notifTimerLen > 6.0:
                $ notifTimerLen = 6.0
            timer notifTimerLen action [SetVariable("notifList", []), Hide('notify')]
        else:
            timer (3.25) action [SetVariable("notifList", []), Hide('notify')]
 

Porcus Dev

Engaged Member
Game Developer
Oct 12, 2017
2,582
4,692
screen notify(message): zorder 100 style_prefix "notify" if message != "notifList": frame at notify_appear: ypos 0.2 text t__(message) timer 3.25 action [Hide('notify'), SetVariable("notifList", [])] else: $ notifOffset = 0 for msg in notifList: frame at notify_appear: ypos 0.2 yoffset notifOffset text t__(msg) $ notifOffset += notifyLineOffset # timer (3.25*len(notifList)) action [Hide('notify'), SetVariable("notifList", [])] if len(notifList) > 2: $ notifTimerLen = (2.0 * len(notifList)) if notifTimerLen > 6.0: $ notifTimerLen = 6.0 timer notifTimerLen action [SetVariable("notifList", []), Hide('notify')] else: timer (3.25) action [SetVariable("notifList", []), Hide('notify')]
Just change timers...
Python:
screen notify(message):

    zorder 100
    style_prefix "notify"
    if message != "notifList":
        frame at notify_appear:
            ypos 0.2
            text t__(message)
        timer 0.1 action [Hide('notify'), SetVariable("notifList", [])]
    else:
        $ notifOffset = 0
        for msg in notifList:
            frame at notify_appear:
                ypos 0.2
                yoffset notifOffset
                text t__(msg)
            $ notifOffset += notifyLineOffset
#        timer (0.1*len(notifList)) action [Hide('notify'), SetVariable("notifList", [])]
        if len(notifList) > 2:
            $ notifTimerLen = (2.0 * len(notifList))
            if notifTimerLen > 6.0:
                $ notifTimerLen = 0.1
            timer notifTimerLen action [SetVariable("notifList", []), Hide('notify')]
        else:
            timer (0.1) action [SetVariable("notifList", []), Hide('notify')]
Anyway, that script is inside renpy's internal programming, and those scripts normally shouldn't/have to be modified... I still think that in some other file there has to be that function :p
 
  • Like
Reactions: Gagge89

Gagge89

Member
Apr 24, 2020
325
125
Just change timers...
Python:
screen notify(message):

    zorder 100
    style_prefix "notify"
    if message != "notifList":
        frame at notify_appear:
            ypos 0.2
            text t__(message)
        timer 0.1 action [Hide('notify'), SetVariable("notifList", [])]
    else:
        $ notifOffset = 0
        for msg in notifList:
            frame at notify_appear:
                ypos 0.2
                yoffset notifOffset
                text t__(msg)
            $ notifOffset += notifyLineOffset
#        timer (0.1*len(notifList)) action [Hide('notify'), SetVariable("notifList", [])]
        if len(notifList) > 2:
            $ notifTimerLen = (2.0 * len(notifList))
            if notifTimerLen > 6.0:
                $ notifTimerLen = 0.1
            timer notifTimerLen action [SetVariable("notifList", []), Hide('notify')]
        else:
            timer (0.1) action [SetVariable("notifList", []), Hide('notify')]
Anyway, that script is inside renpy's internal programming, and those scripts normally shouldn't/have to be modified... I still think that in some other file there has to be that function :p
uhm.... i dont't know..:LOL: however now it works :D
Thanks a lot!
 

Gagge89

Member
Apr 24, 2020
325
125
Just change timers...
Python:
screen notify(message):

    zorder 100
    style_prefix "notify"
    if message != "notifList":
        frame at notify_appear:
            ypos 0.2
            text t__(message)
        timer 0.1 action [Hide('notify'), SetVariable("notifList", [])]
    else:
        $ notifOffset = 0
        for msg in notifList:
            frame at notify_appear:
                ypos 0.2
                yoffset notifOffset
                text t__(msg)
            $ notifOffset += notifyLineOffset
#        timer (0.1*len(notifList)) action [Hide('notify'), SetVariable("notifList", [])]
        if len(notifList) > 2:
            $ notifTimerLen = (2.0 * len(notifList))
            if notifTimerLen > 6.0:
                $ notifTimerLen = 0.1
            timer notifTimerLen action [SetVariable("notifList", []), Hide('notify')]
        else:
            timer (0.1) action [SetVariable("notifList", []), Hide('notify')]
Anyway, that script is inside renpy's internal programming, and those scripts normally shouldn't/have to be modified... I still think that in some other file there has to be that function :p
And one more thing ... do you know by chance if there is a tool or something to export not only the slides (because they are already in the image folder of the game) but also the associated texts? That is, practically extracting every single slide of a game with the corresponding text?
 

Porcus Dev

Engaged Member
Game Developer
Oct 12, 2017
2,582
4,692
The creation program, renpy, has a utility to extract the lines of text, but separately, not together with the image that is displayed ... I don't know if there's any utility for what you want to do, but one option is to use a screen capture and go capturing all the images with their text, although it's somewhat tedious and not automated, lol
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,318
15,208
I think i had to change something here i don't know what :(

Create a file named, "noNotify.rpy" and write this inside :
Code:
init python:
    def noNotify( *args, **kwargs ):
        return

    config.notify = noNotify
Then, whenever you want to get ride of the notification system, put this file in the "game" folder.


[Note tested, but I really hope that I still have enough mind to not mess something this small]
 

Gagge89

Member
Apr 24, 2020
325
125
The creation program, renpy, has a utility to extract the lines of text, but separately, not together with the image that is displayed ... I don't know if there's any utility for what you want to do, but one option is to use a screen capture and go capturing all the images with their text, although it's somewhat tedious and not automated, lol
probably you are right :(
But other way which could be?
Otherwise I thought of capturing a video and then exporting its frames, only the problem is that too many identical frames come out. So I thought if I set the export of frames every 1 sec it would be okay that every slide should be sure that it lasted 1 second. With Auto-Forward Time I don't have a precise but variable result in time. How could I set slides to change every 1 second complete with their text?


Create a file named, "noNotify.rpy" and write this inside :
Code:
init python:
    def noNotify( *args, **kwargs ):
        return

    config.notify = noNotify
Then, whenever you want to get ride of the notification system, put this file in the "game" folder.


[Note tested, but I really hope that I still have enough mind to not mess something this small]
Hi, but have questions :

1) in which folder i had to put the file that i create named "noNotify.rpy"?
2) and then i have only to create this file and no more? I don't write nothing in other files?
Thanks

Edit : i've try to create only the file and put it in folder game but exit this error :

Code:
[code]
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/noNotify.rpy", line 1, in script
    init python:
  File "game/noNotify.rpy", line 5, in <module>
    config.notify = noNotify
Exception: config.notify is not a known configuration variable.

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/noNotify.rpy", line 1, in script
    init python:
  File "E:\JDown\Fairy Tail\K2k\Triangle-10-pc\Triangle-1.0-pc\renpy\ast.py", line 862, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "E:\JDown\Fairy Tail\K2k\Triangle-10-pc\Triangle-1.0-pc\renpy\python.py", line 1912, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/noNotify.rpy", line 5, in <module>
    config.notify = noNotify
  File "E:\JDown\Fairy Tail\K2k\Triangle-10-pc\Triangle-1.0-pc\renpy\defaultstore.py", line 93, in __setattr__
    raise Exception('config.%s is not a known configuration variable.' % (name))
Exception: config.notify is not a known configuration variable.

Windows-8-6.2.9200
Ren'Py 7.0.0.196
 
Fri May 01 00:01:03 2020
[/CODE]
 

anne O'nymous

I'm not grumpy, I'm just coded that way.
Modder
Donor
Respected User
Jun 10, 2017
10,318
15,208
1) in which folder i had to put the file that i create named "noNotify.rpy"?
I said it, in the "game" folder ; the folder named "game".


2) and then i have only to create this file and no more? I don't write nothing in other files?
You just have to do what I said, otherwise I would have said it.

I don't guaranty that it will works 100% of the times, some devs like to mess with Ren'py and, thinking that they are improving it, in fact break it, but globally it should works often enough.
 
  • Like
Reactions: Hamfist