Test to disable mod detection

This commit is contained in:
David Vogel 2022-08-08 02:54:48 +02:00
parent 85144f4b8f
commit baea6292f1
2 changed files with 25 additions and 2 deletions

View File

@ -96,7 +96,7 @@ function Modification.SetMemoryOptions(memory)
local lookup = {
[true] = {
Windows = {
[0x00F77B0C] = { _BuildString = "Build Apr 23 2021 18:36:55", -- GOG build.
[0x00F77B0C] = { _BuildString = "Build Apr 23 2021 18:36:55", -- GOG dev build.
mPostFxDisabled = 0x010E3B6C,
mGuiDisabled = 0x010E3B6D,
mGuiHalfSize = 0x010E3B6E,
@ -106,7 +106,7 @@ function Modification.SetMemoryOptions(memory)
mPlayerNeverDies = 0x010E3B72,
mFreezeAI = 0x010E3B73,
},
[0x00F80384] = { _BuildString = "Build Apr 23 2021 18:40:40", -- Steam build.
[0x00F80384] = { _BuildString = "Build Apr 23 2021 18:40:40", -- Steam dev build.
mPostFxDisabled = 0x010EDEBC,
mGuiDisabled = 0x010EDEBD,
mGuiHalfSize = 0x010EDEBE,
@ -118,6 +118,15 @@ function Modification.SetMemoryOptions(memory)
},
},
},
[false] = {
Windows = {
[0x00E1C550] = { _BuildString = "Build Apr 23 2021 18:44:24", -- Steam build.
--enableModDetection = 0x0063D8AD, -- 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.
-- The page this is in is not writable, so this will crash Noita.
-- This modification can be applied manually with some other tool that changes the permission prior to writing, like Cheat Engine.
},
},
},
}
-- Look up the tree and set options accordingly.
@ -231,6 +240,12 @@ function Modification.RequiredChanges()
memory["mTrailerMode"] = 1 -- Is necessary for chunks to correctly load when DEBUG_PAUSE_GRID_UPDATE is enabled.
end
if ModSettingGet("noita-mapcap.disable-mod-detection") then
memory["enableModDetection"] = 0
else
memory["enableModDetection"] = 1
end
-- Disables or hides most of the UI.
-- The game is still somewhat playable this way.
if ModSettingGet("noita-mapcap.disable-ui") then

View File

@ -314,6 +314,14 @@ modSettings = {
value_default = false,
scope = MOD_SETTING_SCOPE_RUNTIME,
},
{
id = "disable-mod-detection",
ui_name = " Disable mod detection",
ui_description = "If enabled, Noita will behave as if no mods are enabled.\nTherefore secrets like the cauldron will be generated.",
hidden = true,
value_default = false,
scope = MOD_SETTING_SCOPE_RUNTIME,
},
}
},
}