Skip to content

Commit

Permalink
Add compatibility with new beta versions
Browse files Browse the repository at this point in the history
- `Build Dec 30 2023 19:37:04`
- `Build Dec 30 2023 19:40:49`
  • Loading branch information
Dadido3 committed Dec 30, 2023
1 parent e83aa68 commit 9da52a3
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions files/modification.lua
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,16 @@ function Modification.SetMemoryOptions(memory)
mPlayerNeverDies = function(value) ffi.cast("char*", 0x01117592)[0] = value end,
mFreezeAI = function(value) ffi.cast("char*", 0x01117593)[0] = value end,
},
{_Offset = 0x00F74FA8, _BuildString = "Build Dec 30 2023 19:37:04", -- Steam dev build.
mPostFxDisabled = function(value) ffi.cast("char*", 0x0111A5BC)[0] = value end,
mGuiDisabled = function(value) ffi.cast("char*", 0x0111A5BD)[0] = value end,
mGuiHalfSize = function(value) ffi.cast("char*", 0x0111A5BE)[0] = value end,
mFogOfWarOpenEverywhere = function(value) ffi.cast("char*", 0x0111A5BF)[0] = value end,
mTrailerMode = function(value) ffi.cast("char*", 0x0111A5C0)[0] = value end,
mDayTimeRotationPause = function(value) ffi.cast("char*", 0x0111A5C1)[0] = value end,
mPlayerNeverDies = function(value) ffi.cast("char*", 0x0111A5C2)[0] = value end,
mFreezeAI = function(value) ffi.cast("char*", 0x0111A5C3)[0] = value end,
},
},
},
[false] = {
Expand Down Expand Up @@ -231,6 +241,13 @@ function Modification.SetMemoryOptions(memory)
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.
end,
},
{_Offset = 0x00E180E8, _BuildString = "Build Dec 30 2023 19:40:49", -- Steam build.
enableModDetection = function(value)
local ptr = ffi.cast("char*", 0x00626EFD)
Memory.VirtualProtect(ptr, 1, Memory.PAGE_EXECUTE_READWRITE)
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.
end,
},
},
},
}
Expand Down

0 comments on commit 9da52a3

Please sign in to comment.