Well-met Posted May 18, 2024 Share Posted May 18, 2024 hello Before the hunting update last summer (varg forks), I had a block of code that produced extra hunt beasts (hunt surprises) and it worked correctly. After the update it does not produce any error however it no longer functions. I cannot figure out what's wrong, please help here is the block in question -- New hunts local UpvalueHacker = require("tools/upvaluehacker") AddComponentPostInit("hunter", function(self) local _SpawnHuntedBeast = UpvalueHacker.GetUpvalue(self.OnDirtInvestigated, "SpawnHuntedBeast") local ALTERNATE_BEASTS = UpvalueHacker.GetUpvalue(_SpawnHuntedBeast, "_alternate_beasts") if ALTERNATE_BEASTS ~= nil then table.insert(ALTERNATE_BEASTS, "claywarg") table.insert(ALTERNATE_BEASTS, "gingerbreadwarg") table.insert(ALTERNATE_BEASTS, "mermking") table.insert(ALTERNATE_BEASTS, "shadowthrall_horns") end UpvalueHacker.SetUpvalue(_SpawnHuntedBeast, ALTERNATE_BEASTS, "_alternate_beasts") end) Link to comment https://forums.kleientertainment.com/forums/topic/156187-hunts-surprises/ Share on other sites More sharing options...
Well-met Posted May 23, 2024 Author Share Posted May 23, 2024 bump I still dont understand what changed Link to comment https://forums.kleientertainment.com/forums/topic/156187-hunts-surprises/#findComment-1716562 Share on other sites More sharing options...
_zwb Posted May 24, 2024 Share Posted May 24, 2024 ALTERNATE_BEASTS is now defined outside of SpawnHuntedBeast function. There's also a GetHuntedBeast function you can use to determine the mob spawned(defined at line 370 of hunter.lua). 1 Link to comment https://forums.kleientertainment.com/forums/topic/156187-hunts-surprises/#findComment-1716651 Share on other sites More sharing options...
Well-met Posted May 24, 2024 Author Share Posted May 24, 2024 thank you, i will investigate this Link to comment https://forums.kleientertainment.com/forums/topic/156187-hunts-surprises/#findComment-1716724 Share on other sites More sharing options...
Well-met Posted May 30, 2024 Author Share Posted May 30, 2024 On 5/24/2024 at 7:56 AM, _zwb said: ALTERNATE_BEASTS is now defined outside of SpawnHuntedBeast function. There's also a GetHuntedBeast function you can use to determine the mob spawned(defined at line 370 of hunter.lua). how can I use GetUpvalue without specifying a function? since ALTERNATE_BEASTS is defined globally now UpvalueHacker.GetUpvalue(_GetHuntedBeast, "_alternate_beasts") Link to comment https://forums.kleientertainment.com/forums/topic/156187-hunts-surprises/#findComment-1718081 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now