Atena Posted January 28, 2016 Share Posted January 28, 2016 Hello! I create a new mod call "Security Box" to lock items, like "Ownership" mod, but I wish to do new item and add new function.(look figures). I test it normally at Host game and I publish it to Steam Workshop. When I download it from Steam workshop and install it in my dedicated server. It happen error and crash my DST client, Please anyone tell me what 's happen? Spoiler Error message: [00:03:12]: ReceiveResumeNotification [00:03:12]: Movement prediction enabled [00:03:12]: Could not find anim build FROMNUM [00:03:12]: Could not find anim bank [FROMNUM] [00:03:12]: Could not find anim build FROMNUM [00:03:12]: Could not find anim bank [FROMNUM] [00:03:12]: WARNING! Could not find region 'FROMNUM' from atlas 'FROMNUM'. Is the region specified in the atlas? [00:03:12]: Looking for default texture 'FROMNUM' from atlas 'FROMNUM'. [00:03:12]: Loading minimap: session/E130E9C8E4031E60/KU_lQu0NN53_/minimap [00:03:12]: Deserializing cached icon data: 11 [00:03:12]: Deserializing tile data (425 x 425) [00:03:16]: [string "scripts/widgets/containerwidget.lua"]:29: attempt to index local 'widget' (a nil value) LUA ERROR stack traceback: scripts/widgets/containerwidget.lua:29 in (method) Open (Lua) <24-132> self = callbacks = table: 1268A8F8 slotsperrow = 3 inst = 101065 - (valid:true) focus = false children = table: 12689958 focus_flow_args = table: 126932A0 focus_target = false isopen = false owner = 100106 - mitsuru (valid:true) open = false can_fade_alpha = true inv = table: 12693278 parent = name = Container bgimage = Image - : focus_flow = table: 12693228 enabled = true bganim = UIAnim shown = true container = 100940 - securitybox (valid:true) doer = 100106 - mitsuru (valid:true) widget = nil scripts/screens/playerhud.lua:191 in (upvalue) OpenContainerWidget (Lua) <188-193> self = fireover = FireOver beefbloodover = BeefBloodOver shown = true overlayroot = overlays clouds = UIAnim controls = Controls inst = 100107 - (valid:true) focus = true handlers = table: 0E3D3500 children = table: 0E3D3208 heatover = HeatOver enabled = true focus_target = false eventannouncer = EventAnnouncer vig = UIAnim under_root = under_root owner = 100106 - mitsuru (valid:true) can_fade_alpha = true iceover = IceOver root = root name = HUD focus_flow_args = table: 0E3D34D8 focus_flow = table: 0E3D34B0 parent = screenroot callbacks = table: 0E3D3258 bloodover = BloodOver container = 100940 - securitybox (valid:true) side = false containerwidget = Container scripts/screens/playerhud.lua:201 in (method) OpenContainer (Lua) <195-203> self = fireover = FireOver beefbloodover = BeefBloodOver shown = true overlayroot = overlays clouds = UIAnim controls = Controls inst = 100107 - (valid:true) focus = true handlers = table: 0E3D3500 children = table: 0E3D3208 heatover = HeatOver enabled = true focus_target = false eventannouncer = EventAnnouncer vig = UIAnim under_root = under_root owner = 100106 - mitsuru (valid:true) can_fade_alpha = true iceover = IceOver root = root name = HUD focus_flow_args = table: 0E3D34D8 focus_flow = table: 0E3D34B0 parent = screenroot callbacks = table: 0E3D3258 bloodover = BloodOver container = 100940 - securitybox (valid:true) side = false scripts/components/container_replica.lua:204 in (method) Open (Lua) <190-211> self = ondetachclassified = function - scripts/components/container_replica.lua:64 acceptsstacks = true _numslots = 0 _isopen = false issidewidget = false _cannotbeopened = net_bool (50DCEAD8) classified = 101064 - container_classified (valid:true) inst = 100940 - securitybox (valid:true) doer = 100106 - mitsuru (valid:true) scripts/components/container_replica.lua:58 in (field) fn (Lua) <56-59> inst = 100940 - securitybox (valid:true) self = ondetachclassified = function - scripts/components/container_replica.lua:64 acceptsstacks = true _numslots = 0 _isopen = false issidewidget = false _cannotbeopened = net_bool (50DCEAD8) classified = 101064 - container_classified (valid:true) inst = 100940 - securitybox (valid:true) scripts/scheduler.lua:194 in (method) OnTick (Lua) <168-225> self = running = table: 331F6F50 waitingfortick = table: 331F26F8 tasks = table: 331FD990 waking = table: 4237D678 attime = table: 331FF010 hibernating = table: 331F9728 tick = 130 k = PERIODIC 100940: 0.000000 v = true already_dead = false scripts/scheduler.lua:406 in (global) RunScheduler (Lua) <404-412> tick = 130 scripts/update.lua:166 in () ? (Lua) <150-223> dt = 0.033333335071802 tick = 130 i = 130 [00:03:16]: [string "scripts/widgets/containerwidget.lua"]:29: attempt to index local 'widget' (a nil value) LUA ERROR stack traceback: scripts/widgets/containerwidget.lua:29 in (method) Open (Lua) <24-132> scripts/screens/playerhud.lua:191 in (upvalue) OpenContainerWidget (Lua) <188-193> scripts/screens/playerhud.lua:201 in (method) OpenContainer (Lua) <195-203> scripts/components/container_replica.lua:204 in (method) Open (Lua) <190-211> scripts/components/container_replica.lua:58 in (field) fn (Lua) <56-59> scripts/scheduler.lua:194 in (method) OnTick (Lua) <168-225> scripts/scheduler.lua:406 in (global) RunScheduler (Lua) <404-412> scripts/update.lua:166 in () ? (Lua) <150-223> [00:03:20]: Force aborting... Security box prefab code following: Spoiler require "prefabutil" require "tuning" local assets = { Asset("ANIM", "anim/securitybox.zip"), Asset("ANIM", "anim/ui_chest_3x3.zip"), Asset("ATLAS", "images/inventoryimages/securitybox.xml"), Asset("IMAGE", "images/inventoryimages/securitybox.tex"), } local prefabs = { "collapse_small", } local function onopen(inst) inst.SoundEmitter:PlaySound("dontstarve/wilson/chest_open") inst.AnimState:PlayAnimation("open") end local function onclose(inst) inst.AnimState:PlayAnimation("closed") inst.SoundEmitter:PlaySound("dontstarve/wilson/chest_close") end local function onhammered(inst, worker) inst.components.lootdropper:DropLoot() inst.components.container:DropEverything() local fx = SpawnPrefab("collapse_small") fx.Transform:SetPosition(inst.Transform:GetWorldPosition()) fx:SetMaterial("metal") inst:Remove() -- inst.components.lootdropper:DropLoot() -- inst.components.container:DropEverything() -- inst.SoundEmitter:PlaySound("dontstarve/common/destroy_metal") -- inst:Remove() end local function onhit(inst, worker) inst.AnimState:PlayAnimation("hit") inst.components.container:DropEverything() inst.AnimState:PushAnimation("closed", false) inst.components.container:Close() -- inst.AnimState:PlayAnimation("closed") -- inst.components.container:DropEverything() -- inst.components.container:Close() end local function onbuilt(inst) inst.AnimState:PlayAnimation("place") inst.AnimState:PushAnimation("closed", false) -- inst.AnimState:PushAnimation("closed") end local function fn(Sim) local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddSoundEmitter() inst.entity:AddNetwork() -- MakeObstaclePhysics(inst, 1.5) -- local minimap = inst.entity:AddMiniMapEntity() -- minimap:SetIcon( "cellar.tex" ) inst:AddTag("securitybox") inst:AddTag("structure") inst.entity:SetPristine() inst.AnimState:SetBank("icebox") inst.AnimState:SetBuild("securitybox") inst.AnimState:PlayAnimation("closed", true) if not TheWorld.ismastersim then return inst end inst:AddComponent("inspectable") inst:AddComponent("container") inst.components.container:WidgetSetup("treasurechest") inst.components.container.onopenfn = onopen inst.components.container.onclosefn = onclose inst:AddComponent("lootdropper") inst:AddComponent("workable") inst.components.workable:SetWorkAction(ACTIONS.HAMMER) inst.components.workable:SetWorkLeft(5) inst.components.workable:SetOnFinishCallback(onhammered) inst.components.workable:SetOnWorkCallback(onhit) AddHauntableDropItemOrWork(inst) inst:ListenForEvent("onbuilt", onbuilt) MakeSnowCovered(inst) return inst end return Prefab( "common/securitybox", fn, assets), MakePlacer("common/securitybox_placer", "icebox", "securitybox", "closed") Link to comment Share on other sites More sharing options...
Muche Posted January 28, 2016 Share Posted January 28, 2016 This looks (almost) the same as http://forums.kleientertainment.com/topic/61867-help-custom-containers/#comment-705569, wherein DarkXero has some helpful notes. Link to comment 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