Skip to content

Commit

Permalink
Add support for new Noita versions
Browse files Browse the repository at this point in the history
- Add support for Build Dec 29 2023 23:36:18
- Add support for Build Dec 29 2023 23:40:18
  • Loading branch information
Dadido3 committed Dec 30, 2023
1 parent f7426f3 commit e83aa68
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions files/modification.lua
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,24 @@ function Modification.SetMemoryOptions(memory)
},
{_Offset = 0x00F8A9DC, _BuildString = "Build Dec 21 2023 00:07:29", -- Steam dev build.
mPostFxDisabled = function(value) ffi.cast("char*", 0x010F814C)[0] = value end,
mGuiDisabled = function(value) ffi.cast("char*", 0x0010F814D)[0] = value end,
mGuiHalfSize = function(value) ffi.cast("char*", 0x0010F814E)[0] = value end,
mFogOfWarOpenEverywhere = function(value) ffi.cast("char*", 0x0010F814F)[0] = value end,
mGuiDisabled = function(value) ffi.cast("char*", 0x010F814D)[0] = value end,
mGuiHalfSize = function(value) ffi.cast("char*", 0x010F814E)[0] = value end,
mFogOfWarOpenEverywhere = function(value) ffi.cast("char*", 0x010F814F)[0] = value end,
mTrailerMode = function(value) ffi.cast("char*", 0x010F8150)[0] = value end,
mDayTimeRotationPause = function(value) ffi.cast("char*", 0x010F8151)[0] = value end,
mPlayerNeverDies = function(value) ffi.cast("char*", 0x010F8152)[0] = value end,
mFreezeAI = function(value) ffi.cast("char*", 0x010F8153)[0] = value end,
},
{_Offset = 0x00F71DE4, _BuildString = "Build Dec 29 2023 23:36:18", -- Steam dev build.
mPostFxDisabled = function(value) ffi.cast("char*", 0x0111758C)[0] = value end,
mGuiDisabled = function(value) ffi.cast("char*", 0x0111758D)[0] = value end,
mGuiHalfSize = function(value) ffi.cast("char*", 0x0111758E)[0] = value end,
mFogOfWarOpenEverywhere = function(value) ffi.cast("char*", 0x0111758F)[0] = value end,
mTrailerMode = function(value) ffi.cast("char*", 0x01117590)[0] = value end,
mDayTimeRotationPause = function(value) ffi.cast("char*", 0x01117591)[0] = value end,
mPlayerNeverDies = function(value) ffi.cast("char*", 0x01117592)[0] = value end,
mFreezeAI = function(value) ffi.cast("char*", 0x01117593)[0] = value end,
},
},
},
[false] = {
Expand Down Expand Up @@ -214,6 +224,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 = 0x00E14FA0, _BuildString = "Build Dec 29 2023 23:40:18", -- Steam build.
enableModDetection = function(value)
local ptr = ffi.cast("char*", 0x00625FFD)
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 e83aa68

Please sign in to comment.