Add an autosave and screen shot functionality to ZScript

Moderator: GZDoom Developers

User avatar
Chris
Posts: 2942
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Add an autosave and screen shot functionality to ZScript

Post by Chris »

I'm curious why ZScript would need screenshot functionality. The user is the one that would want to take a screenshot, and they'd do so by the screenshot key (or console command/keybind alias). Since ZScript can't access the screenshot it made, and a user would have to go searching for it outside of GZDoom to look at and/or take care of it, it would just be dumping files onto the user's machine that they have to manually clean up. What's the use-case?
User avatar
Arctangent
Posts: 1235
Joined: Thu Nov 06, 2014 1:53 pm
Contact:

Re: Add an autosave and screen shot functionality to ZScript

Post by Arctangent »

Making a screenshot bot without having to jump through hoops via external programs that can feed ZDoom input to use the screenshot bind, as JPL mentioned in a previous post.
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

Re: Add an autosave and screen shot functionality to ZScript

Post by m8f »

Chris wrote:I'm curious why ZScript would need screenshot functionality. The user is the one that would want to take a screenshot, and they'd do so by the screenshot key (or console command/keybind alias). Since ZScript can't access the screenshot it made, and a user would have to go searching for it outside of GZDoom to look at and/or take care of it, it would just be dumping files onto the user's machine that they have to manually clean up. What's the use-case?
Sometimes the user wants to make screenshots automatically when something interesting happens in the game. Also it allows to easily make videos like this.

I think users understand the consequences of automatic screenshot making in reasonable quantities. When users open the screenshot directory to do what they want with those screenshots, they cannot miss their number.
User avatar
Chris
Posts: 2942
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Add an autosave and screen shot functionality to ZScript

Post by Chris »

m8f wrote:I think users understand the consequences of automatic screenshot making in reasonable quantities.
This isn't for users, it's for modders. The issue I see is mods that think they need to make screenshots because obviously users will want to look back at them later. Users are then the ones that are stuck having to go through their documents folders afterward outside of GZDoom to clear them out (if they even noticed that some were made). At the very least, to me personally, it seems the kind of thing that needs to be allowed by a CVAR or something, and defaults to off.
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

Re: Add an autosave and screen shot functionality to ZScript

Post by m8f »

Chris wrote:needs to be allowed by a CVAR or something, and defaults to off.
I think that's a good idea.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49073
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Add an autosave and screen shot functionality to ZScript

Post by Graf Zahl »

Chris wrote:At the very least, to me personally, it seems the kind of thing that needs to be allowed by a CVAR or something, and defaults to off.
Agreed. I had the same thought already to add an "enable programmatic screenshots" option the user has to enable to make it work. That way it cannot be abused but if someone needs to programmatically needs to create a larger number of screenshots in quick succession they can do it.
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

Re: Add an autosave and screen shot functionality to ZScript

Post by m8f »

So, for this feature to be added do I need to add a bool CVAR "enablescriptscreenshot", defaults to 0 (off), and no more restriction mechanisms to scripted autosaves and screenshots?
Or this CVAR is only a part of the solution?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49073
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Add an autosave and screen shot functionality to ZScript

Post by Graf Zahl »

Scripted autosaves can at worst grind a mod to a halt, because they start to overwrite themselves when the counter wraps around. No need to artificially restrict that.
For screenshots it's different because they are just saved and forgotten about by the engine.
User avatar
m8f
 
 
Posts: 1445
Joined: Fri Dec 29, 2017 4:15 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Manjaro Linux
Location: Siberia (UTC+7)
Contact:

Re: Add an autosave and screen shot functionality to ZScript

Post by m8f »

Made a new PR.
User avatar
Rachael
Posts: 13574
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Add an autosave and screen shot functionality to ZScript

Post by Rachael »

This apparently got added, so I am closing this. https://github.com/coelckers/gzdoom/com ... e8cbd8fde4
User avatar
Enjay
 
 
Posts: 26534
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Add an autosave and screen shot functionality to ZScript

Post by Enjay »

What safeguard was included to prevent the feared spamming of screenshots?
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”