Pyr0mrcow Posted June 5, 2015 Share Posted June 5, 2015 (edited) I've seen this mentioned elsewhere in default characters, and the patch notes mention an update that was supposed to fix the problem, but I didn't see any specifics about how that was done. Searches didn't bring up anything of the sort, either.It's happening on a mod character I'm working on, but only when she dies in her alternate form. I'm pretty lost regarding what could even be causing this. For anyone interested... Crash log:[00:11:49]: Deleting user minimap from session/0110003F152D18B1/KU_28MOElzB_/minimap[00:11:49]: Deleting user session from session/0110003F152D18B1/KU_28MOElzB_/0000000036[00:11:49]: SAVING Morgue 40[00:11:50]: QueryServerComplete no callback[00:11:52]: Deleting user minimap from session/0110003F152D18B1/KU_28MOElzB_/minimap[00:11:52]: Deleting user session from session/0110003F152D18B1/KU_28MOElzB_/0000000036[00:11:52]: [string "scripts/stategraphs/SGwilson.lua"]:812: Left death state.LUA ERROR stack traceback:=[C]:-1 in (global) assert © <-1--1>scripts/stategraphs/SGwilson.lua:812 in (field) onexit (Lua) <810-813>inst = 133186 - wara (valid:true)scripts/stategraph.lua:456 in (method) GoToState (Lua) <444-505>self =tags = table: 3BFCAAB8mem = table: 2D702490statemem = table: 3BFCAA90currentstate = table: 3E0A4420timelineindex = 1timeinstate = 0.033333335071802sg = Stategraph : wilsoninst = 133186 - wara (valid:true)statestarttime = 215.10001121834bufferedevents = table: 1045C720lastupdatetime = 215.13334455341laststate = table: 2D6F5CB8prevstate = table: 3E0A4420statename = deathparams = nilstate = table: 3E0A4420scripts/stategraphs/SGwilson.lua:416 in (field) fn (Lua) <407-430>inst = 133186 - wara (valid:true)scripts/stategraph.lua:398 in (method) HandleEvents (Lua) <389-409>self =tags = table: 3BFCAAB8mem = table: 2D702490statemem = table: 3BFCAA90currentstate = table: 3E0A4420timelineindex = 1timeinstate = 0.033333335071802sg = Stategraph : wilsoninst = 133186 - wara (valid:true)statestarttime = 215.10001121834bufferedevents = table: 1045C720lastupdatetime = 215.13334455341laststate = table: 2D6F5CB8prevstate = table: 3E0A4420buff_events = table: 1045C720k = 1event = table: 44668A08handler = table: 31225828scripts/stategraph.lua:143 in (method) Update (Lua) <107-146>self =updaters = table: 14636708OnEnterNewState = function - scripts/stategraph.lua:27tickwaiters = table: 0DA9B9E0haveEvents = table: 44659AF8hibernaters = table: 0DA9CB88instances = table: 0DA9BAA8current_tick = 6535waiters = table: 1CFBC928updaters = table: 146365F0evs = table: 14636DC0k = sg="wilson", state="death", time=2.73, tags = "busy,pausepredict,nomorph,"v = truescripts/update.lua:205 in () ? (Lua) <146-219>dt = 0.033333335071802tick = 6535i = 6535[00:11:52]: SCRIPT ERROR! Showing error screen[00:11:53]: QueryServerComplete no callback[00:11:53]: SAVING Morgue 39[00:11:53]: QueryServerComplete no callback[00:11:53]: QueryServerComplete no callback[00:12:03]: Force aborting... Wara prefab: local MakePlayerCharacter = require "prefabs/player_common"local assets = {Asset( "ANIM", "anim/player_basic.zip" ),Asset( "ANIM", "anim/player_idles_shiver.zip" ),Asset( "ANIM", "anim/player_actions.zip" ),Asset( "ANIM", "anim/player_actions_axe.zip" ),Asset( "ANIM", "anim/player_actions_pickaxe.zip" ),Asset( "ANIM", "anim/player_actions_shovel.zip" ),Asset( "ANIM", "anim/player_actions_blowdart.zip" ),Asset( "ANIM", "anim/player_actions_eat.zip" ),Asset( "ANIM", "anim/player_actions_item.zip" ),Asset( "ANIM", "anim/player_actions_uniqueitem.zip" ),Asset( "ANIM", "anim/player_actions_bugnet.zip" ),Asset( "ANIM", "anim/player_actions_fishing.zip" ),Asset( "ANIM", "anim/player_actions_boomerang.zip" ),Asset( "ANIM", "anim/player_bush_hat.zip" ),Asset( "ANIM", "anim/player_attacks.zip" ),Asset( "ANIM", "anim/player_idles.zip" ),Asset( "ANIM", "anim/player_rebirth.zip" ),Asset( "ANIM", "anim/player_jump.zip" ),Asset( "ANIM", "anim/player_amulet_resurrect.zip" ),Asset( "ANIM", "anim/player_teleport.zip" ),Asset( "ANIM", "anim/wilson_fx.zip" ),Asset( "ANIM", "anim/player_one_man_band.zip" ),Asset( "ANIM", "anim/shadow_hands.zip" ),Asset( "SOUND", "sound/sfx.fsb" ),Asset( "SOUND", "sound/wilson.fsb" ),Asset( "ANIM", "anim/beard.zip" ),Asset( "ANIM", "anim/wara.zip" ),Asset( "ANIM", "anim/ghost_wara_build.zip" ),Asset( "ANIM", "anim/waraalt.zip"),}local prefabs = {}local start_inv = {}-- This initializes for both clients and the hostlocal common_postinit = function(inst)-- Minimap iconinst.MiniMapEntity:SetIcon( "wara.tex" )endlocal function applyForm(inst)if inst.form == "demonic" theninst.components.combat:SetDefaultDamage(25)inst.components.hunger:SetRate(TUNING.WILSON_HUNGER_RATE * 1.5)inst.components.locomotor.walkspeed = TUNING.WILSON_WALK_SPEED * 1.3inst.components.locomotor.runspeed = TUNING.WILSON_RUN_SPEED * 1.3inst.components.sanity.dapperness = -1inst.components.sanity.neg_aura_mult = 0.5inst.entity:AddLight()inst.Light:Enable(true)inst.Light:SetRadius(5)inst.Light:SetFalloff(.6)inst.Light:SetIntensity(0.9)inst.Light:SetColour(235/255,12/255,235/255)endif inst.form == "normal" theninst.components.combat:SetDefaultDamage(10)inst.components.hunger:SetRate(TUNING.WILSON_HUNGER_RATE)inst.components.locomotor.walkspeed = (TUNING.WILSON_WALK_SPEED * 1.05)inst.components.locomotor.runspeed = (TUNING.WILSON_RUN_SPEED * 1.05)inst.components.sanity.dapperness = 0.05inst.components.sanity.neg_aura_mult = 0inst.entity:AddLight()inst.Light:Enable(false)inst.Light:SetRadius(0)inst.Light:SetFalloff(0)inst.Light:SetIntensity(0)inst.Light:SetColour(0/255,0/255,0/255)endendlocal function becomenormal(inst, silent)if inst.form == "normal" thenreturnendif inst.demontask theninst.demontask:Cancel()inst.demontask = nilendinst.form = "normal"inst.AnimState:SetBuild("wara")endlocal function becomedemonic(inst, silent)if inst.form == "demonic" thenreturnendinst.demontask = inst:DoPeriodicTask (0.005, function()if inst.components.health theninst.components.health:DoDelta(0.05, true, "Curse")endend)inst.form = "demonic"inst.AnimState:SetBuild("waraalt")endlocal function onsanitychange(inst, data, forcesilent)if inst.sg:HasStateTag("nomorph") orinst:HasTag("playerghost") orinst.components.health:IsDead() thenreturnendlocal silent = inst.sg:HasStateTag("silentmorph") or not inst.entity:IsVisible() or forcesilentif inst.form == "demonic" thenif inst.components.sanity.current > (49) thenbecomenormal(inst, silent)endelseif inst.form == "normal" thenif inst.components.sanity.current < (46) thenbecomedemonic(inst, silent)endendapplyForm(inst)endlocal function onnewstate(inst)if inst._wasnomorph ~= inst.sg:HasStateTag("nomorph") theninst._wasnomorph = not inst._wasnomorphif not inst._wasnomorph thenonsanitychange(inst)endendendlocal function onbecameghost(inst)if inst._wasnomorph ~= nil theninst.form = "normal"inst._wasnomorph = nilinst.talksoundoverride = nilinst.hurtsoundoverride = nilinst:RemoveEventCallback("sanitydelta", onsanitychange)inst:RemoveEventCallback("newstate", onnewstate)endendlocal function onbecamehuman(inst)if inst._wasnomorph == nil theninst.form = "normal"inst._wasnomorph = inst.sg:HasStateTag("nomorph")inst.talksoundoverride = nilinst.hurtsoundoverride = nilinst:ListenForEvent("sanitydelta", onsanitychange)inst:ListenForEvent("newstate", onnewstate)if inst.demontask theninst.demontask:Cancel()inst.demontask = nilendonsanitychange(inst, nil, true)endendlocal function onload(inst)inst:ListenForEvent("ms_respawnedfromghost", onbecamehuman)inst:ListenForEvent("ms_becameghost", onbecameghost)if inst:HasTag("playerghost") thenonbecameghost(inst)elseonbecamehuman(inst)endend-- This initializes for the host onlylocal master_postinit = function(inst)-- This changes the amount of sanity given to Mara by a butterflymuffin-- Special thanks to rezecib!local OldEat = inst.components.eater.Eatinst.components.eater.Eat = function(self, food)if self:CanEat(food) and food.prefab == ("butterflymuffin") thenfood.components.edible.sanityvalue = food.components.edible.sanityvalue + 20endreturn OldEat(self, food)end-- choose which sounds this character will playinst.soundsname = "wickerbottom"-- Statsinst.components.health:SetMaxHealth(125)inst.components.hunger:SetMax(100)inst.components.sanity:SetMax(95)inst.components.hunger:SetRate(TUNING.WILSON_HUNGER_RATE)inst.components.combat:SetDefaultDamage(10)inst.components.sanity.dapperness = 0.05inst.components.sanity.neg_aura_mult = 0inst.components.locomotor.walkspeed = (TUNING.WILSON_WALK_SPEED * 1.05)inst.components.locomotor.runspeed = (TUNING.WILSON_RUN_SPEED * 1.05)inst.form = "normal"inst._wasnomorph = nilinst.talksoundoverride = nilinst.hurtsoundoverride = nilinst.OnLoad = onloadinst.OnNewSpawn = onloadendreturn MakePlayerCharacter("wara", prefabs, assets, common_postinit, master_postinit, start_inv) Other than the alt-form death problem (and some needed adjustments here and there, that regen is insane), everything seems to be working fine. Edited June 5, 2015 by Pyr0mrcow Link to comment https://forums.kleientertainment.com/forums/topic/54837-left-death-state-error/ Share on other sites More sharing options...
DarkXero Posted June 6, 2015 Share Posted June 6, 2015 I blame the task, try using a task like: inst.demontask = inst:DoPeriodicTask (4, function() if inst.components.health then inst.components.health:DoDelta(1, true, "Curse") end end)Then die as a demon. Link to comment https://forums.kleientertainment.com/forums/topic/54837-left-death-state-error/#findComment-644307 Share on other sites More sharing options...
Pyr0mrcow Posted June 6, 2015 Author Share Posted June 6, 2015 Great, that did it! Strange though, the previous one and Phantas-Moon's were both very similar, the only difference being the use of decimals...well, it worked out, that's what's important. Looking at this now and thinking about where I originally got these pieces from, I feel like it's related to the last not-tweaking thing that I definitely want to impliment with her before release. I'm wanting to add an on-hit effect to her 'demon' unarmed attacks that applies a sort of burn; damage over time, for 5 seconds, doing 5 damage per second. I'm trying to make her into someone who specifically benefits from jumping in and out of combat rather than tanking, moreso than other characters.If possible I'd like it to trigger the 'smoldering' animation on the enemy hit, but that's just an ideal. Haven't looked into the process heavily yet, it just seemed related and I felt like rambling. Link to comment https://forums.kleientertainment.com/forums/topic/54837-left-death-state-error/#findComment-644325 Share on other sites More sharing options...
Pyr0mrcow Posted June 6, 2015 Author Share Posted June 6, 2015 Er...well, maybe it didn't.Continual testing doing adjustments, and it came up again. Used the backup with no change but what you suggested, and it still happened. [00:06:39]: [string "scripts/stategraphs/SGwilson.lua"]:812: Left death state.LUA ERROR stack traceback:=[C]:-1 in (global) assert © <-1--1>scripts/stategraphs/SGwilson.lua:812 in (field) onexit (Lua) <810-813> inst = 133215 - wara (valid:true)scripts/stategraph.lua:456 in (method) GoToState (Lua) <444-505> self = tags = table: 3FB38258 mem = table: 0E033718 statemem = table: 3FB38208 currentstate = table: 0E870C80 timelineindex = 1 timeinstate = 0.033333335071802 sg = Stategraph : wilson inst = 133215 - wara (valid:true) bufferedevents = table: 3D2BB0C0 lastupdatetime = 284.5333481729 statestarttime = 284.50001483783 laststate = table: 0E67AB98 prevstate = table: 0E870C80 statename = death params = nil state = table: 0E870C80scripts/stategraphs/SGwilson.lua:416 in (field) fn (Lua) <407-430> inst = 133215 - wara (valid:true)scripts/stategraph.lua:398 in (method) HandleEvents (Lua) <389-409> self = tags = table: 3FB38258 mem = table: 0E033718 statemem = table: 3FB38208 currentstate = table: 0E870C80 timelineindex = 1 timeinstate = 0.033333335071802 sg = Stategraph : wilson inst = 133215 - wara (valid:true) bufferedevents = table: 3D2BB0C0 lastupdatetime = 284.5333481729 statestarttime = 284.50001483783 laststate = table: 0E67AB98 prevstate = table: 0E870C80 buff_events = table: 3D2BB0C0 k = 1 event = table: 4429BB18 handler = table: 0E866CD0scripts/stategraph.lua:143 in (method) Update (Lua) <107-146> self = updaters = table: 442911D0 OnEnterNewState = function - scripts/stategraph.lua:27 tickwaiters = table: 1578C3D0 haveEvents = table: 4483C6B0 hibernaters = table: 1578BD18 instances = table: 1578BD40 current_tick = 8670 waiters = table: 43B90B30 updaters = table: 441AC568 evs = table: 441AD670 k = sg="wilson", state="death", time=4.50, tags = "busy,pausepredict,nomorph," v = truescripts/update.lua:205 in () ? (Lua) <146-219> dt = 0.033333335071802 tick = 8670 i = 8670[00:06:39]: SCRIPT ERROR! Showing error screen [00:06:40]: QueryServerComplete no callback[00:06:40]: QueryServerComplete no callback[00:06:40]: SAVING Morgue 39 [00:06:41]: QueryServerComplete no callback[00:06:56]: Force aborting... As far as I can tell, it's happening or not happening at random... Link to comment https://forums.kleientertainment.com/forums/topic/54837-left-death-state-error/#findComment-644331 Share on other sites More sharing options...
DarkXero Posted June 6, 2015 Share Posted June 6, 2015 Post the mod zipped so I can play it. Also, tell me, what do you do before getting killed? c_setsanity(0.2) or something? Link to comment https://forums.kleientertainment.com/forums/topic/54837-left-death-state-error/#findComment-644334 Share on other sites More sharing options...
Pyr0mrcow Posted June 6, 2015 Author Share Posted June 6, 2015 (edited) I usually spawn a garland or flowers to lower sanity, then either run into a fire or spawn a deerclops to do some testing of unarmed damage. Two birds with one stone.I also forgot that that was even a command. The last few times I've died with no items on me, just to see if it made a difference, but it hasn't.I thought for a bit that it was caused by dying a second time during one world load, but then I died the first time.I died twice after bringing my sanity to 0 with flowers, and was killed by crawiling horror. No crash. Crash if I die to a fire.Crash if I die while on fire and attacked by a crawling horror.Crash if I die to deerclopse. Mod's here:wara.zip Edited June 6, 2015 by Pyr0mrcow Link to comment https://forums.kleientertainment.com/forums/topic/54837-left-death-state-error/#findComment-644350 Share on other sites More sharing options...
DarkXero Posted June 6, 2015 Share Posted June 6, 2015 (edited) I have killed myself many times in normal and demon form and I got no crashes.Killed myself with deerclops.Killed myself on fire with deerclops.Killed myself wearing garland and fire, with a terrorbeak. Nothing. What game mode are you playing at, survival, wilderness?Are you in a dedicated server with the mod loaded or playing as host?Do you have other mods active? If anything, I will remove the unnecessary wolfgang code, like all the _nomorphs hanging around. I believe I got the functionalities right.Try dying with this.waraop.zip Edited June 6, 2015 by DarkXero Link to comment https://forums.kleientertainment.com/forums/topic/54837-left-death-state-error/#findComment-644516 Share on other sites More sharing options...
Pyr0mrcow Posted June 8, 2015 Author Share Posted June 8, 2015 (edited) Sorry about the delayed reply.Died to Deerclops fine a few times.Died to fire (insane, both above and at 0) and it crashed. The crashes only seem to happen when I'm in the alt mode. Deerclops and fire both previously triggering a crash made me think it was something with status effects, however they work, but your changes seem to fix the Deerclops crash...that or I'm just on a lucky spree of dying correctly to it. I've been testing on a self-hosted (not Dedicated) Wilderness server, but tried dying to fire on Endless and the crash still happened.Log from that attempt:[00:09:13]: [string "scripts/stategraphs/SGwilson.lua"]:812: Left death state.LUA ERROR stack traceback:=[C]:-1 in (global) assert © <-1--1>scripts/stategraphs/SGwilson.lua:812 in (field) onexit (Lua) <810-813> inst = 110916 - wara (valid:true)scripts/stategraph.lua:456 in (method) GoToState (Lua) <444-505> self = timelineindex = 1 tags = table: 2F391008 mem = table: 30210340 statemem = table: 2F3879E0 currentstate = table: 2ECAC438 timeinstate = 0.033333335071802 sg = Stategraph : wilson inst = 110916 - wara (valid:true) bufferedevents = table: 2F388188 lastupdatetime = 282.43334806338 statestarttime = 282.40001472831 laststate = table: 16BB2A48 prevstate = table: 2ECAC438 statename = death params = nil state = table: 2ECAC438scripts/stategraphs/SGwilson.lua:416 in (field) fn (Lua) <407-430> inst = 110916 - wara (valid:true)scripts/stategraph.lua:398 in (method) HandleEvents (Lua) <389-409> self = timelineindex = 1 tags = table: 2F391008 mem = table: 30210340 statemem = table: 2F3879E0 currentstate = table: 2ECAC438 timeinstate = 0.033333335071802 sg = Stategraph : wilson inst = 110916 - wara (valid:true) bufferedevents = table: 2F388188 lastupdatetime = 282.43334806338 statestarttime = 282.40001472831 laststate = table: 16BB2A48 prevstate = table: 2ECAC438 buff_events = table: 2F388188 k = 1 event = table: 31236DA0 handler = table: 0DAB6C60scripts/stategraph.lua:143 in (method) Update (Lua) <107-146> self = updaters = table: 31232868 OnEnterNewState = function - scripts/stategraph.lua:27 tickwaiters = table: 10A43E58 haveEvents = table: 3123FE28 hibernaters = table: 10A43EA8 instances = table: 10A43E30 current_tick = 8500 waiters = nil updaters = table: 31235FE0 evs = table: 312360A8 k = sg="wilson", state="death", time=0.93, tags = "busy,pausepredict,nomorph," v = truescripts/update.lua:205 in () ? (Lua) <146-219> dt = 0.033333335071802 tick = 8500 i = 8500[00:09:13]: SCRIPT ERROR! Showing error screen [00:09:13]: QueryServerComplete no callback[00:09:14]: QueryServerComplete no callback[00:09:15]: QueryServerComplete no callback[00:09:19]: Force aborting... Edited June 8, 2015 by Pyr0mrcow Link to comment https://forums.kleientertainment.com/forums/topic/54837-left-death-state-error/#findComment-645125 Share on other sites More sharing options...
DarkXero Posted June 8, 2015 Share Posted June 8, 2015 @Pyr0mrcow, well, I'm stupid. I replicated it. It was the task after all. With the 4 seconds there was a small chance you weren't going to disappear fast enough to trigger an incorrect heal. With that close to 0 number, it was more obvious, I changed it to 1 to trigger the error more easily. The health component wasn't deleted and the curse was giving you health, so you exited death to another state and you crashed. Solution: add an extra condition when going to heal with the task, to avoid this.I also made the task self cancel if you don't have the health component or you are dead.wara.lua Link to comment https://forums.kleientertainment.com/forums/topic/54837-left-death-state-error/#findComment-645135 Share on other sites More sharing options...
Pyr0mrcow Posted June 8, 2015 Author Share Posted June 8, 2015 (edited) I was a little suspicious of it being something to do with the task due to how it was acting between timing changes and the random-seeming nature, but I thought you would've caught it if it was and I wasn't sure of the exact part of it that was causing the problem anyway xD Oh well, I'll be a little more confident next time.Though, I should've been a bit more careful reversing the health tick from from the start.Seems to be working as intended now. Woo! Now I just need to get the alt form onhit burn effect going without being a crash machine. Edited June 8, 2015 by Pyr0mrcow Link to comment https://forums.kleientertainment.com/forums/topic/54837-left-death-state-error/#findComment-645148 Share on other sites More sharing options...
DarkXero Posted June 8, 2015 Share Posted June 8, 2015 Now I just need to get the alt form onhit burn effect going without being a crash machine. What do you mean? You someone to hit you with a fire staff or what? Link to comment https://forums.kleientertainment.com/forums/topic/54837-left-death-state-error/#findComment-645149 Share on other sites More sharing options...
Pyr0mrcow Posted June 8, 2015 Author Share Posted June 8, 2015 (edited) I'd like to make Alt-Mara hit someone, causing the target's health to drain small amounts for a few seconds.Ideally, the effect would only trigger when she attacks while unarmed, and would play the smoldering effect or something similar on the affected individual, but...that's just the ideal. Not sure of how reasonable it is to do those last two parts, still looking into files and posts and whatnot between paperwork. EDIT: Easiest to say it is that I'm going for something that looks like an acidic burning effect. Edited June 8, 2015 by Pyr0mrcow Link to comment https://forums.kleientertainment.com/forums/topic/54837-left-death-state-error/#findComment-645153 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