Page MenuHomeFeedback Tracker

Does function MakeScreenshot working?
Closed, ResolvedPublic


This function defined in game 1_Core/proto.c

makes screenshot and stores it in to a DDS format file if the name begins with '$' the screenshot in stored in the fullpath according to the name parameter otherwise the screenshot is stored in "$profile:ScreenShotes/DATE" where DATE, TIME AND NAME are replaced by actual values

proto native void MakeScreenshot ( string name )

but I can't get any screenshot?
Does this function working? Or I'm doing something wrong? or search result screenshots in wrong place?

Calling function with name, or without, with fullpath (starting with $) or not - nothing works - there is no errors, but there is no result screenshot files...


Operating System
Windows 10 x64
Steps To Reproduce

Call MakeScreenshot function in your screen and look for result screenshots (for there unexistance)

Additional Information

Clean client, no mods

Event Timeline

Geez changed the task status from New to Need More Info.May 23 2022, 4:40 PM
Geez added a subscriber: Geez.

Hello abrakadobr.
Can you please let us know where are you searching for the screenshots and provide us with the script you are executing?

Hi @Geez
My currenct code where I'm using it is a bit complex, so to simplify and check again - I created simplest mod, as described in with example of overriding player jump method, with one change - here I put screenshots tests, so it looks like:

modded class PlayerBase	// modded keyword for modding an existing class
	override void OnJumpStart()	// overriding an existing method
		super.OnJumpStart();			// call the original jump callback method so we don't break stuff
		string fname = string.Format("abc-%1",1); // file name combined
		Print("My first mod, yay!" + fname);	// our modded print
		MakeScreenshot("screen1"); //filename simple
		Print("My first mod, yay! 11");	// our modded print

I'm starting offline singleplayer mission same as described in wiki.
I'm getting no errors or crashes, script-xxx.log have Print function outputs before calling MakeScreenshot and after, but no screenshot files appears on hard drive. (and enfusion scripts editor outpus window also gets this logs)

I'm search in: %localappdata%\DayZ\ScreenShots, in Documents, in Downloads, in Pictures and just full search of *.dss files on drive C - nothing.

What is interesting - if I delete %localappdata%\DayZ\ScreenShots folder - it's recreated on game starts, so it looks like this is place where screenshots should come, but it's empty.

p.s. "search drive C for *.dds", not *.dss (it's typo), and I don't have other drives - C is only one in system.

Also, it will be nice, if there will be arguments to set required area - default is fullscreen, but it can be very possible, that only some area of screenshot is required, so most performace way - not to get full sceen (op1), write result to file (op2) read result file (03) excract required area (op4), save result to file (05), but get required rectangle as 1st BitBlt(/whaever) called (op1) and save to file (op2), or even maybe some flags, to keep screenshot in memory, without saving to file (can imagine such mods easy - polaroid camera)

Geez changed the task status from Need More Info to Reviewed.Wed, Jun 8, 10:32 AM

Hello abrakadobr.
We have tried the provided code and the screenshots are generated in c:\Users\USER\AppData\Local\DayZ\ScreenShots\07.06.2022
The screenshot is made not immediately but in few frames, so when you make multiple calls of MakeScreenshot in a row, you will overwrite the destination path, so screen1 is overwritten with abc-1.

Hi @Geez !
Thanks a lot - now I defenetly know that problem is somewhere on my local machine and will investigate it deep.
I've got exactly what I was asking, and, for sure, task can be closed (I don't have this button)

Geez closed this task as Resolved.Thu, Jun 9, 10:54 AM
Geez claimed this task.