From 6065c262667895a894c77048f7e420630696e0a5 Mon Sep 17 00:00:00 2001 From: David Vogel Date: Sun, 3 Nov 2019 23:13:55 +0100 Subject: [PATCH] Prevent monitor standby & Update README.md --- README.md | 22 ++++++++++++++-------- files/capture.lua | 3 +++ files/external.lua | 7 +++++++ 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 55c3b09..f4efbca 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Addon that captures the map and saves it as image. ![missing image](images/example1.png) -A resulting image with close to 3 gigapixels can be [seen here](https://easyzoom.com/image/158284/album/0/4) (Warning: Spoilers). +A resulting image with 3.8 gigapixels can be [seen here](https://easyzoom.com/image/159431) (Warning: Spoilers). ## System requirements @@ -80,26 +80,32 @@ For the best experience and result, follow these steps: internal_size_w="840" window_h="840" window_w="840" + fullscreen="0" framerate="600" ... > ``` -3. Start `.../Noita/noita_dev.exe` - - If it's not there, copy it from `.../Noita/tools_modding/noita_dev.exe` - - If it's there, check if it is recent. If not, also copy it. + If that file doesn't exist do step 3 and 5, and come back here. + +3. Copy `.../Noita/tools_modding/noita_dev.exe` to `.../Noita/noita_dev.exe`. + - Also copy it again, if there was an update. + +4. Patch your `.../Noita/noita_dev.exe` with [Large Address Aware](https://www.techpowerup.com/forums/threads/large-address-aware.112556/) or a similar tool. + +5. Start `.../Noita/noita_dev.exe`. - Click `Ignore always` on the `ASSERT FAILED!` requester. -4. When the game is loaded (When you can control your character): +6. When the game is loaded (When you can control your character): - Press `F5`, `F8` and `F12` (In that order). - Press `F7`, and disable `mTrailerMode` in the menu. (This should reduce chunk loading problems) - Press `F7` again to close the menu. -5. Press the `>> Start capturing full map <<` button. +7. Press the `>> Start capturing full map <<` button. -6. Wait a few hours until it's complete. +8. Wait a few hours until it's complete. -7. Stitch the image as described above. +9. Stitch the image as described above. ## License diff --git a/files/capture.lua b/files/capture.lua index 746a67e..3b53f69 100644 --- a/files/capture.lua +++ b/files/capture.lua @@ -54,6 +54,9 @@ local function captureScreenshot(x, y, rx, ry) UiCaptureProblem = "Screen capture failed. Please restart Noita." end UiHide = false + + -- Reset monitor and PC standby each screenshot + ResetStandbyTimer() end function startCapturingSpiral() diff --git a/files/external.lua b/files/external.lua index 8487784..bcb5e43 100644 --- a/files/external.lua +++ b/files/external.lua @@ -20,6 +20,8 @@ ffi.cdef [[ bool GetRect(RECT* rect); bool Capture(int x, int y); + + int SetThreadExecutionState(int esFlags); ]] function TriggerCapture(x, y) @@ -35,3 +37,8 @@ function GetRect() return rect end + +-- Reset computer and monitor standby timer +function ResetStandbyTimer() + ffi.C.SetThreadExecutionState(3) -- ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED +end