mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
(Hopefully) Randomize perks for players
This commit is contained in:
parent
6d7f5385cf
commit
e0d3fe7380
3 changed files with 19 additions and 0 deletions
11
quant.ew/files/system/randomize_perks/override_perk_list.lua
Normal file
11
quant.ew/files/system/randomize_perks/override_perk_list.lua
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
local orig_perk_get_spawn_order = perk_get_spawn_order
|
||||||
|
|
||||||
|
function perk_get_spawn_order( ignore_these_ )
|
||||||
|
SetRandomSeed(1, 2 + CrossCall("ew_per_peer_seed"))
|
||||||
|
local orig_SetRandomSeed = SetRandomSeed
|
||||||
|
function SetRandomSeed(x, y) end
|
||||||
|
|
||||||
|
orig_perk_get_spawn_order( ignore_these_ )
|
||||||
|
|
||||||
|
SetRandomSeed = orig_SetRandomSeed
|
||||||
|
end
|
|
@ -0,0 +1,3 @@
|
||||||
|
ModLuaFileAppend("data/scripts/perks/perk.lua", "mods/quant.ew/files/system/randomize_perks/override_perk_list.lua")
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,10 @@ ModLuaFileAppend("data/scripts/gun/gun_actions.lua", "mods/quant.ew/files/resour
|
||||||
|
|
||||||
ModMagicNumbersFileAdd("mods/quant.ew/files/magic.xml")
|
ModMagicNumbersFileAdd("mods/quant.ew/files/magic.xml")
|
||||||
|
|
||||||
|
np.CrossCallAdd("ew_per_peer_seed", function()
|
||||||
|
return tonumber(ctx.my_id, 16)
|
||||||
|
end)
|
||||||
|
|
||||||
local function load_modules()
|
local function load_modules()
|
||||||
ctx.dofile_and_add_hooks("mods/quant.ew/files/system/item_sync.lua")
|
ctx.dofile_and_add_hooks("mods/quant.ew/files/system/item_sync.lua")
|
||||||
|
|
||||||
|
@ -94,6 +98,7 @@ local function load_modules()
|
||||||
ctx.load_system("spectate")
|
ctx.load_system("spectate")
|
||||||
ctx.load_system("effect_data_sync")
|
ctx.load_system("effect_data_sync")
|
||||||
ctx.load_system("gen_sync")
|
ctx.load_system("gen_sync")
|
||||||
|
ctx.load_system("randomize_perks")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function is_suitable_target(entity)
|
local function is_suitable_target(entity)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue