MF99K

  • Content Count

    1161
  • Joined

  • Last visited

Community Reputation

2761 Excellent

About MF99K

  • Rank
    hec
...

Badges

Recent Profile Visitors

8048 profile views
  1. if you look at the screenshot I posted with the initial bug report, you can see that I have already received all the drops from twitch so the issue is not if drops are enabled or not for the stream I was watching. the keyword here was "on" and not "to" my account was linked to the klei website but not on the klei website issue has been fixed but requiring a two-way link is a bit odd
  2. Its been over a week at this point, and myself and several others have not yet received the leviathan chest items in-game. Is there any way to get them? A bug? all relevant accounts are connected to Twitch and I've received other skins from twitch before
  3. this seems like a lot of people are having the same issue. Any Klei devs around who can look into this?
  4. uhh so twitch says I've claimed all the drops but I have yet to receive any of them in-game steam and klei accounts are and have been connected to twitch.
  5. currently this is the purple staff postinit local UpvalueHacker = GLOBAL.require "upvaluehacker" --UpvalueHacker.SetUpvalue(GLOBAL.Prefabs.staff.fn, onblink, "onblink") AddPrefabPostInit("telestaff", function(inst) print("postinit on") local function teleport_start(teleportee, staff, caster, loctarget, target_in_ocean) local ground = TheWorld --V2C: Gotta do this RIGHT AWAY in case anything happens to loctarget or caster local locpos = teleportee.components.teleportedoverride ~= nil and teleportee.components.teleportedoverride:GetDestPosition() or loctarget == nil and getrandomposition(caster, teleportee, target_in_ocean) or loctarget.teletopos ~= nil and loctarget:teletopos() or loctarget:GetPosition() if teleportee.components.locomotor ~= nil then teleportee.components.locomotor:StopMoving() end staff.components.finiteuses:Use(1) if ground:HasTag("cave") then -- There's a roof over your head, magic lightning can't strike! ground:PushEvent("ms_miniquake", { rad = 3, num = 5, duration = 1.5, target = teleportee }) return end local isplayer = teleportee:HasTag("player") if isplayer then teleportee.sg:GoToState("forcetele") else if teleportee.components.health ~= nil then teleportee.components.health:SetInvincible(true) end if teleportee.DynamicShadow ~= nil then teleportee.DynamicShadow:Enable(false) end teleportee:Hide() end --#v2c hacky way to prevent lightning from igniting us local preventburning = teleportee.components.burnable ~= nil and not teleportee.components.burnable.burning if preventburning then teleportee.components.burnable.burning = true end ground:PushEvent("ms_sendlightningstrike", teleportee:GetPosition()) if preventburning then teleportee.components.burnable.burning = false end if caster ~= nil and caster.components.sanity ~= nil and not caster:HasTag("warptraveller") then caster.components.sanity:DoDelta(-TUNING.SANITY_HUGE) print("not warper") end if caster ~= nil and caster.components.sanity ~= nil and caster:HasTag("warptraveller") then caster.components.sanity:DoDelta(TUNING.SANITY_TINY) print("warper") end ground:PushEvent("ms_deltamoisture", TUNING.TELESTAFF_MOISTURE) if isplayer then teleportee.sg.statemem.teleport_task = teleportee:DoTaskInTime(3, teleport_continue, locpos, loctarget) else teleport_continue(teleportee, locpos, loctarget) end end UpvalueHacker.SetUpvalue(GLOBAL.Prefabs.telestaff.fn, teleport_start, "teleport_start") end) Alborgo on the discord pointed out that the correct prefab name is "telestaff" so I fixed that, but the code still appears to do nothing and doesn't provide the prints inside the function
  6. I'd assume adding a print here would be a good place to start? AddPrefabPostInit("purplestaff", teleport_start, function(inst) print("postinit on") local function teleport_start(teleportee, staff, caster, loctarget, target_in_ocean)
  7. most of the crashes I get are usually syntax errors, so if that is what is happening, something about the context of the error is what's preventing an error log. I don't know enough about when stuff is accessed to know why there are different kinds of crashes. I've added several prints, and none of them have showed up in console, which shows me something isn't connected. As it currently stands, this is the purple staff postinit stuff: local UpvalueHacker = GLOBAL.require "upvaluehacker" --UpvalueHacker.SetUpvalue(GLOBAL.Prefabs.staff.fn, onblink, "onblink") AddPrefabPostInit("purplestaff", teleport_start, function(inst) local function teleport_start(teleportee, staff, caster, loctarget, target_in_ocean) local ground = TheWorld --V2C: Gotta do this RIGHT AWAY in case anything happens to loctarget or caster local locpos = teleportee.components.teleportedoverride ~= nil and teleportee.components.teleportedoverride:GetDestPosition() or loctarget == nil and getrandomposition(caster, teleportee, target_in_ocean) or loctarget.teletopos ~= nil and loctarget:teletopos() or loctarget:GetPosition() if teleportee.components.locomotor ~= nil then teleportee.components.locomotor:StopMoving() end staff.components.finiteuses:Use(1) if ground:HasTag("cave") then -- There's a roof over your head, magic lightning can't strike! ground:PushEvent("ms_miniquake", { rad = 3, num = 5, duration = 1.5, target = teleportee }) return end local isplayer = teleportee:HasTag("player") if isplayer then teleportee.sg:GoToState("forcetele") else if teleportee.components.health ~= nil then teleportee.components.health:SetInvincible(true) end if teleportee.DynamicShadow ~= nil then teleportee.DynamicShadow:Enable(false) end teleportee:Hide() end --#v2c hacky way to prevent lightning from igniting us local preventburning = teleportee.components.burnable ~= nil and not teleportee.components.burnable.burning if preventburning then teleportee.components.burnable.burning = true end ground:PushEvent("ms_sendlightningstrike", teleportee:GetPosition()) if preventburning then teleportee.components.burnable.burning = false end if caster ~= nil and caster.components.sanity ~= nil and not caster:HasTag("warptraveller") then caster.components.sanity:DoDelta(-TUNING.SANITY_HUGE) print("not warper") end if caster ~= nil and caster.components.sanity ~= nil and caster:HasTag("warptraveller") then caster.components.sanity:DoDelta(TUNING.SANITY_TINY) print("warper") end ground:PushEvent("ms_deltamoisture", TUNING.TELESTAFF_MOISTURE) if isplayer then teleportee.sg.statemem.teleport_task = teleportee:DoTaskInTime(3, teleport_continue, locpos, loctarget) else teleport_continue(teleportee, locpos, loctarget) end end UpvalueHacker.SetUpvalue(GLOBAL.Prefabs.staff.fn, teleport_start, "teleport_start") end) right now, this code does not crash, but also does nothing
  8. thing is, it doesn't crash the bracket is lower down in the code, it just doesn't do anything at all
  9. I tried both AddPrefabPostInit("purplestaff", teleport_start, function(inst) and AddPrefabPostInit("purplestaff", function(inst) neither of them crash the game, but neither of them use the modded function either The actual crash is that the game reverts to the character select screen and then freezes. I know that this type of crash doesn't usually produce error logs, but the same thing occurs for both the postinits I posted earlier
  10. I was able to get the code for the wormhole and orangestaff to work fine, but the purple staff and lazy deserter code causes an errorless crash this is the code for those local UpvalueHacker = GLOBAL.require "upvaluehacker" --UpvalueHacker.SetUpvalue(GLOBAL.Prefabs.staff.fn, onblink, "onblink") AddPrefabPostInit("purplestaff" teleport_start, function(inst) local function teleport_start(teleportee, staff, caster, loctarget, target_in_ocean) local ground = TheWorld --V2C: Gotta do this RIGHT AWAY in case anything happens to loctarget or caster local locpos = teleportee.components.teleportedoverride ~= nil and teleportee.components.teleportedoverride:GetDestPosition() or loctarget == nil and getrandomposition(caster, teleportee, target_in_ocean) or loctarget.teletopos ~= nil and loctarget:teletopos() or loctarget:GetPosition() if teleportee.components.locomotor ~= nil then teleportee.components.locomotor:StopMoving() end staff.components.finiteuses:Use(1) if ground:HasTag("cave") then -- There's a roof over your head, magic lightning can't strike! ground:PushEvent("ms_miniquake", { rad = 3, num = 5, duration = 1.5, target = teleportee }) return end local isplayer = teleportee:HasTag("player") if isplayer then teleportee.sg:GoToState("forcetele") else if teleportee.components.health ~= nil then teleportee.components.health:SetInvincible(true) end if teleportee.DynamicShadow ~= nil then teleportee.DynamicShadow:Enable(false) end teleportee:Hide() end --#v2c hacky way to prevent lightning from igniting us local preventburning = teleportee.components.burnable ~= nil and not teleportee.components.burnable.burning if preventburning then teleportee.components.burnable.burning = true end ground:PushEvent("ms_sendlightningstrike", teleportee:GetPosition()) if preventburning then teleportee.components.burnable.burning = false end if caster ~= nil and caster.components.sanity ~= nil and not caster:HasTag("warptraveller") then caster.components.sanity:DoDelta(-TUNING.SANITY_HUGE) end if caster ~= nil and caster.components.sanity ~= nil and caster:HasTag("warptraveller") then caster.components.sanity:DoDelta(TUNING.SANITY_TINY) end ground:PushEvent("ms_deltamoisture", TUNING.TELESTAFF_MOISTURE) if isplayer then teleportee.sg.statemem.teleport_task = teleportee:DoTaskInTime(3, teleport_continue, locpos, loctarget) else teleport_continue(teleportee, locpos, loctarget) end end UpvalueHacker.SetUpvalue(GLOBAL.Prefabs.staff.fn, teleport_start, "teleport_start") end) --lazy deserter (townportal) local function OnStartChanneling(inst, channeler) inst.AnimState:PlayAnimation("turn_on") inst.AnimState:PushAnimation("idle_on_loop") StartSoundLoop(inst) TheWorld:PushEvent("townportalactivated", inst) inst.MiniMapEntity:SetIcon("townportalactive.png") inst.MiniMapEntity:SetPriority(20) if inst.icon ~= nil then inst.icon.MiniMapEntity:SetIcon("townportalactive.png") inst.icon.MiniMapEntity:SetPriority(20) inst.icon.MiniMapEntity:SetDrawOverFogOfWar(true) end inst.channeler = channeler.components.sanity ~= nil and channeler or nil if inst.channeler ~= nil and inst.channeler:HasTag("warptraveller") then inst.channeler.components.sanity:DoDelta(-TUNING.SANITY_SMALL) inst.channeler.components.sanity.externalmodifiers:SetModifier(inst, -TUNING.DAPPERNESS_TINY) else if inst.channeler ~= nil then inst.channeler.components.sanity:DoDelta(-TUNING.SANITY_MED) inst.channeler.components.sanity.externalmodifiers:SetModifier(inst, -TUNING.DAPPERNESS_SUPERHUGE) end end) AddPrefabPostInit("townportal", function(inst) inst.components.channelable.onchannelfn = OnStartChanneling end)
  11. ah yea, I had a feeling it was something along those lines, where if it was a function called from within another function (or object) it would need to be set up differently I would assume this also means that only teleport_start would need the upvalue hacker?
  12. So from what I understand, whether the upvalue hacker is needed depends on where the function is getting called? so any function that's called with something along the lines of "inst.components.[component].[component function] = [function name]" shouldn't need it?
  13. So I'm assuming then that the orangestaff postinit would look like this? local function onblink(staff, pos, caster) if caster ~= nil and caster.components.sanity ~= nil and not caster:HasTag("warptraveller") then caster.components.sanity:DoDelta(-TUNING.SANITY_MED) end if caster ~= nil and caster.components.sanity ~= nil and caster:HasTag("warptraveller") then caster.components.sanity:DoDelta(TUNING.SANITY_TINY) end staff.components.finiteuses:Use(1) end AddPrefabPostInit("orangestaff", function(inst) inst.components.blinkstaff.onblinkfn = onblink end) with the function to be changed and then the postinit? And it doesn't need the upvalue hacker in this case? What determines whether that is needed or not?
  14. I can already tell I'm doing something wrong with setting this up for the purple staff code, but this is what I have so far for the orange staff code and I want to make sure I'm doing this right: local UpvalueHacker = GLOBAL.require "upvaluehacker" AddPrefabPostinit("staff" onblink(staff, pos, caster) local function onblink(staff, pos, caster) if caster ~= nil and caster.components.sanity ~= nil and not caster:HasTag("warptraveller") then caster.components.sanity:DoDelta(-TUNING.SANITY_MED) end if caster ~= nil and caster.components.sanity ~= nil and caster:HasTag("warptraveller") then caster.components.sanity:DoDelta(TUNING.SANITY_TINY) end staff.components.finiteuses:Use(1) end UpvalueHacker.SetUpvalue(GLOBAL.Prefabs.staff.fn, onblink, "onblink") end) From what I understand, I put the upvaluehacker.lua into the scripts folder and then reference it in modmain, is this the correct way to do that?