Closed m-hynek closed 2 months ago
I'll double check it as soon as I can. I might have fucked up something before pushing the update. I don't think BetterSort has anything to do with it. Also, thanks for the tidy issue, it's always helpful :)
Forgot to specify that I was testing it on dedicated MP server
Ok the issue is in sandbox variable, its false no matter the settings in config.
if not SandboxVars.TOC.EnableZombieAmputations then return end
TOC = {
-- Minimum=1 Maximum=10 Default=1
CicatrizationSpeed = 1,
-- Minimum=0 Maximum=5 Default=1
WoundDirtynessMultiplier = 1,
-- Minimum=1 Maximum=3 Default=2
SurgeonAbilityImportance = 2,
EnableZombieAmputations = true,
-- Minimum=0 Maximum=10 Default=4
ZombieAmputationDamageThreshold = 4,
-- Minimum=0 Maximum=100 Default=25
ZombieAmputationDamageChance = 25,
},
but TOC_DEBUG.print("EnableZombieAmputations value: " .. tostring(SandboxVars.TOC.EnableZombieAmputations))
prints
[DEBUG_TheOnlyCure] [TOC][ZombiesAmputation] EnableZombieAmputations value: false
Should be fixed in #113. Keep in mind that this feature is still experimental and I haven't tested it thoroughly
I enabled that feature with patch yesterday and no issues so far other than left hand is always cut first. I added ugly rand condition to solve that. Also I want to implement amputations for shotgun and high caliber guns, because its so much fun. Are you interested in feature PR or nah?
Anyway thanks for the updates. And the mod ofc!
I enabled that feature with patch yesterday and no issues so far other than left hand is always cut first. I added ugly rand condition to solve that. Also I want to implement amputations for shotgun and high caliber guns, because its so much fun. Are you interested in feature PR or nah?
Anyway thanks for the updates. And the mod ofc!
I'm always open for PR! About the bug, that's not something I ever noticed, it should be completely random.
it always checks if left is free to amputate (if i understand correctly)
-- Check left or right
if not zombieInv:containsEval(PredicateAmputationItemLeft) then
SpawnAmputation(zombie, "L")
elseif not zombieInv:containsEval(PredicateAmputationItemRight) then
SpawnAmputation(zombie, "R")
end
my ugly tweak (i couldnt get dynamic method name call to work)
if ZombRand(0, 2) == 0 then
if not zombieInv:containsEval(PredicateAmputationItemLeft) then
SpawnAmputation(zombie, "L")
elseif not zombieInv:containsEval(PredicateAmputationItemRight) then
SpawnAmputation(zombie, "R")
else
return
end
else
if not zombieInv:containsEval(PredicateAmputationItemRight) then
SpawnAmputation(zombie, "R")
elseif not zombieInv:containsEval(PredicateAmputationItemLeft) then
SpawnAmputation(zombie, "L")
else
return
end
end
and added return in case both codition fails so we dont spawn timer with bloodsplat
You're completely right, I didn't notice it at all. I'll push a tweak in a minute
no rush, not critical
Not critical but you never know when you have some free time to mess around with stuff like this. I've pushed it right now, it's just a simple if else after all.
About the guns, it should be fairly easy to implement, just to give you a heads up. In theory, you'd just need to tweak the acceptable weapon categories in line 78
I'll open another issue to keep track of the enhancements. #118
Tried various sandbox setting configurations, I was unable to proc amputation on zombies
Logs Nothing useful in log (no debug print)
Additional context I am using better sort, maybe it makes categories different, so condition wont ever be true?
if not (weaponCategories:contains("Axe") or weaponCategories:contains("LongBlade")) then return end
Or is
OnWeaponHitCharacter
right event when there isOnHitZombie
?Idea Some weapons can be sharp, even if its blunt (spiked bat for example). Comma-separated sandbox field for additional weapons that should be considered for this feature would be awesome. Patch is fine too, up to you