dadido3 / noita-mapcap Goto Github PK
View Code? Open in Web Editor NEWA tool to capture a Noita world as a huge image
License: MIT License
A tool to capture a Noita world as a huge image
License: MIT License
Stitch completely ignores the output flag
stitch -output asdf.png
still outputs a output.png
Just using
stitch
and entering the filename there doesn't work either.
PS C:\Games\Noita\mods\noita-mapcap> .\bin\stitch\stitch.exe -cleanup 0.999 -input output
2022/07/16 14:54:46 Starting to read tile information at "output"
2022/07/16 14:54:47 Got 2592 tiles
2022/07/16 14:54:47 Total size of the possible output space is (-18816,-32128)-(18304,41856)
2022/07/16 14:54:47 Cleaning up 2592 tiles at (-18816,-32128)-(18304,41856)
10546 / 10585 [----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------->] 99.63% 192 p/s ETA 0s2022/07/16 14:55:40 Couldn't get image: png: invalid format: not enough pixel data
panic: Couldn't get image: png: invalid format: not enough pixel data
goroutine 1 [running]:
log.Panic(0xc0001cbc38, 0x1, 0x1)
C:/Users/travis/.gimme/versions/go1.15.3.windows.amd64/src/log/log.go:351 +0xb7
main.main()
C:/Users/travis/gopath/src/github.com/Dadido3/noita-mapcap/bin/stitch/stitch.go:185 +0x77d
PS C:\Games\Noita\mods\noita-mapcap>
I haven't looked at the source code, but it might be possible to use the new Noita lua API function DoesWorldExistAt( min_x, min_y, max_x, max_y ) to detect when an area is ready for capture.
Hey there, I just downloaded MapCap 2.2.0 and I am getting those errors:
Noita (Apr 23 2021) - 20220827-222431
-------------------------------------------
Error loading lua script - file doesn't exist: mods/noita-mapcap/files/libraries/mod_settings.lua
Error loading lua script - file doesn't exist: mods/noita-mapcap/files/libraries/mod_settings/init.lua
Error loading lua script - file doesn't exist: mods/noita-mapcap/files/libraries/coroutines/init.lua
Error loading lua script - file doesn't exist: mods/noita-mapcap/files/libraries/noita-api/camera/init.lua
Error loading lua script - file doesn't exist: data/scripts/lib/noita-api/camera.lua
Any idea how to fix this?
When I was looking to capture map in noita dev build, this goes into an infinite loop:
Lua error: [string "mods/noita-mapcap-master/init.lua"]:10: attempt to call global 'wake_up_waiting_threads' (a nil value).
Running on the last update. I launch this program no problem a couple days ago.
I wanted to share some settings that significantly sped up the map capture process for me. Works best on a 1440p display, or higher.
The settings show only values I modified after applying the recommendations in the README.md. They extend or override them.
WORLD_SEED="119984861"
: Make sure that a new game always starts the same world. Very convenient due to the many crashes that happen during map capture.VIRTUAL_RESOLUTION_X="1280"
: Improve capture speed on a 1440p monitor.VIRTUAL_RESOLUTION_Y="1280"
: Improve capture speed on a 1440p monitor.AUDIO_MUSIC_VOLUME_DEFAULT="0"
: Keeps Noita quiet during map capture.STREAMING_CHUNK_TARGET="24"
: Seemed to give better performance, although I did not measure it.<MagicNumbers
WORLD_SEED="119984861"
VIRTUAL_RESOLUTION_X="1280"
VIRTUAL_RESOLUTION_Y="1280"
AUDIO_MUSIC_VOLUME_DEFAULT="0"
STREAMING_CHUNK_TARGET="24"
...
>
</MagicNumbers>
window_h="1280"
: Must be same as VIRTUAL_RESOLUTION_Y
.window_w="1280"
: Must be same as VIRTUAL_RESOLUTION_X
.internal_size_h="1280"
: Must be same as VIRTUAL_RESOLUTION_Y
.internal_size_w="1280"
: Must be same as VIRTUAL_RESOLUTION_X
.backbuffer_height="1280"
: Must be same as VIRTUAL_RESOLUTION_Y
.backbuffer_width="1280"
: Must be same as VIRTUAL_RESOLUTION_X
.rendering_filmgrain="0"
: No noise in image for improved stitching.rendering_low_quality="0"
: Ensure high quality rendering.rendering_low_resolution="0"
: Ensure high quality rendering.rendering_pixel_art_antialiasing="0"
: Not needed because we take pixel pefect images.screenshake_intensity="0"
: Just in case.audio_effects_volume="0.3"
: Reduce audio effects volume for quieter map capture.<Config
window_h="1280"
window_w="1280"
internal_size_h="1280"
internal_size_w="1280"
backbuffer_height="1280"
backbuffer_width="1280"
rendering_filmgrain="0"
rendering_low_quality="0"
rendering_low_resolution="0"
rendering_pixel_art_antialiasing="0"
screenshake_intensity="0"
audio_effects_volume="0.3"
...
>
</Config>
Suggestions welcome.
While the mod overall worked fine, Noita was a bit slow loading the map fully before the screenshot was made. This results in some faulty chunks on the stitched image.
Is there a way around it (like waiting for the screen portion to fully load or speeding up the map generation/loading on Noitas side)? I was using the the settings on noita-dev.exe given in README.md.
My image looks like shit in comparison to the example one.
My PC specs are pretty beefy (on the CPU side at least):
I don't think my specs are an issue.
It seems that only already visited chunks are captured properly, otherwise the chunks seem to be the ones from the main world resulting in a partly corrupt map output. I wanted to capture the aftermath of my current NG++ map.
Tested on the latest version of Noita (Dev Build Dec 1 2020). No other mods beside mapcap were active.
I set custom_activation="0"
in Noita/mods/nightmare/mod.xml
, to make the Nightmare mode available in the mod menu. Starting a new (normal) game then actually starts the Nightmare mode.
But the mapcap mod is not working if the Nightmare mod is active.
(When I click Start capturing full map or Start capturing map around view, the Mod-UI just hides and nothing happens.
I can fly around freely but the mod is not doing its thing.
This does disable shaders, GUI and AI. Because it writes to the processes memory, it works only on builds where we know the exact memory address. It also only works on the dev build, because the release build is missing the code that disables the AI.
This effectively replaces pressing F5, F8 and F12.
It also helps with getting a better screen cap, because it stops entities from moving, if the motion is caused by AI.
function OnWorldInitialized() -- This is called once the game world is initialized. Doesn't ensure any world chunks actually exist. Use OnPlayerSpawned to ensure the chunks around player have been loaded or created.
--[[
The following code disables shaders, GUI and AI.
While shaders and GUI can be disabled in the release build as well, only the dev build has the debugging feature to disable the AI.
Due to direct memory address write operations, only known builds on known operating systems are supported.
Adding new builds or operating systems is easy, if someone supports us with the research.
]] --
local ffi = require("ffi")
if DebugGetIsDevBuild() == false then
GamePrint("This mod cannot be run in the release build. You must run the dev build (noita_dev.exe) to capture a map!")
GamePrint("If you like to capture the world of your current run, read the README for instructions on how to copy the savegame to the dev build.")
-- exit mod init somehow?
else
if ffi.os == "Windows" then
if ffi.string(ffi.cast("char*", 0x00F77B0C)) == "Build Apr 23 2021 18:36:55" then -- GOG build
ffi.cast("char*", 0x010E3B6C)[0] = 1 -- disable shaders (Debug: mPostFxDisabled)
ffi.cast("char*", 0x010E3B6D)[0] = 1 -- disable GUI (Debug: mGuiDisabled)
ffi.cast("char*", 0x010E3B73)[0] = 1 -- freeze AI (Debug: mFreezeAI)
elseif ffi.string(ffi.cast("char*", 0x00F80384)) == "Build Apr 23 2021 18:40:40" then -- Steam build
ffi.cast("char*", 0x010EDEBC)[0] = 1 -- disable shaders (Debug: mPostFxDisabled)
ffi.cast("char*", 0x010EDEBD)[0] = 1 -- disable GUI (Debug: mGuiDisabled)
ffi.cast("char*", 0x010EDEC3)[0] = 1 -- freeze AI (Debug: mFreezeAI)
else
GamePrint("You are running a currently unsupported Noita build.")
GamePrint("We would appreciate your help to add support for this build. Please open a ticket at https://github.com/Dadido3/noita-mapcap.")
end
else
GamePrint("You are running a currently unsupported OS.")
GamePrint("We would appreciate your help to add support for this OS. Please open a ticket at https://github.com/Dadido3/noita-mapcap.")
end
end
end
I tried out the new version of this mod on a clean install of Noita today and encountered the following errors when starting a new game with the dev build:
setup_noita_20210423-1929_(46552).exe
, ingame: Apr 23 2021 - 18:36:55
) .mods
folder.noita_dev.exe
.I believe the root cause of this issue is that the luanxml
library is not included in the release file, probably because it is imported as a Git submodule. I was only able to use the new version of this mod after manually downloading the nxml.lua
file here and placing it in C:\Games\Noita\mods\noita-mapcap\files\libraries\luanxml\
.
Very cool mod
The map capturing process proceeds smoothly until around 4,627/14,400, at which point the game starts crashing and spitting out error messages at seemingly arbitrary intervals.
Would it be possible to capture coordinates of items like wands during map capture?
Perhaps EntityGetInRadius could be used to output coordinates and item type (wand, spell, chest, etc.) to a file, before or after each screen capture?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.