You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
functionOnWorldInitialized() -- 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.]]--localffi=require("ffi")
ifDebugGetIsDevBuild() ==falsethenGamePrint("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?elseifffi.os=="Windows" thenifffi.string(ffi.cast("char*", 0x00F77B0C)) =="Build Apr 23 2021 18:36:55" then-- GOG buildffi.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)elseifffi.string(ffi.cast("char*", 0x00F80384)) =="Build Apr 23 2021 18:40:40" then-- Steam buildffi.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)elseGamePrint("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.")
endelseGamePrint("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.")
endendend
The text was updated successfully, but these errors were encountered:
This is awesome. Did you use cheat engine to find these addresses?
I'm currently adding a settings menu, once that is done i will look into adding this. There will be advanced options to enable/disable a lot of stuff, and this will be a nice addition to the options.
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.
The text was updated successfully, but these errors were encountered: