Skip to content

Commit 47d5700

Browse files
committed
Make addon compatible with newest Noita beta
1 parent 421f897 commit 47d5700

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

files/modification.lua

+17
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,16 @@ function Modification.SetMemoryOptions(memory)
188188
mPlayerNeverDies = function(value) ffi.cast("char*", 0x0111A5C2)[0] = value end,
189189
mFreezeAI = function(value) ffi.cast("char*", 0x0111A5C3)[0] = value end,
190190
},
191+
{_Offset = 0x0117091C, _BuildString = "Build Feb 2 2024 14:29:06", -- Steam dev build.
192+
mPostFxDisabled = function(value) ffi.cast("char*", 0x0130585C)[0] = value end,
193+
mGuiDisabled = function(value) ffi.cast("char*", 0x0130585D)[0] = value end,
194+
mGuiHalfSize = function(value) ffi.cast("char*", 0x0130585E)[0] = value end,
195+
mFogOfWarOpenEverywhere = function(value) ffi.cast("char*", 0x0130585F)[0] = value end,
196+
mTrailerMode = function(value) ffi.cast("char*", 0x01305860)[0] = value end,
197+
mDayTimeRotationPause = function(value) ffi.cast("char*", 0x01305861)[0] = value end,
198+
mPlayerNeverDies = function(value) ffi.cast("char*", 0x01305862)[0] = value end,
199+
mFreezeAI = function(value) ffi.cast("char*", 0x01305863)[0] = value end,
200+
},
191201
},
192202
},
193203
[false] = {
@@ -248,6 +258,13 @@ function Modification.SetMemoryOptions(memory)
248258
ptr[0] = value -- This basically just changes the value that Noita forces to the "mods_have_been_active_during_this_run" member of the WorldStateComponent when any mod is enabled.
249259
end,
250260
},
261+
{_Offset = 0x00FECE94, _BuildString = "Build Feb 2 2024 14:33:26", -- Steam build.
262+
enableModDetection = function(value)
263+
local ptr = ffi.cast("char*", 0x006AD407)
264+
Memory.VirtualProtect(ptr, 1, Memory.PAGE_EXECUTE_READWRITE)
265+
ptr[0] = value -- This basically just changes the value that Noita forces to the "mods_have_been_active_during_this_run" member of the WorldStateComponent when any mod is enabled.
266+
end,
267+
},
251268
},
252269
},
253270
}

0 commit comments

Comments
 (0)