Don't Starve Together

Don't Starve Together

Domestication Plus [Abandoned]
F i s h 14 Nov, 2017 @ 9:52am
Crash Log when Riding (might help)
[02:11:51]: SendRemoteExecute(local player = UserToPlayer('KU_TMPDXbYT') if not player or player:HasTag("playerghost") then return end local inv = player.components.inventory local x, y, z = player.Transform:GetWorldPosition() local ents = TheSim:FindEntities(x, y, z, 30, { "_inventoryitem" }, { "INLIMBO", "NOCLICK", "catchable", "fire" }) local baits = { ["powcake"] = true, ["pigskin"] = true, ["winter_food4"] = true, } local function Wall(item) local xx, yy ,zz = item.Transform:GetWorldPosition() local nents = TheSim:FindEntities(xx, yy, zz, 3) local targets = 0 for _, vv in ipairs(nents) do if vv:HasTag("wall") and vv.components.health then targets = targets + 1 end end return targets end for _, v in ipairs(ents) do local c = v.components if c.inventoryitem ~= nil and c.inventoryitem.canbepickedup and c.inventoryitem.cangoincontainer and not c.inventoryitem:IsHeld() and not v:HasTag("flower") and not v:HasTag("trap") and not v:HasTag("mine") and not v:HasTag("cage") and not string.find(v.prefab, "mooneye") and inv and inv:CanAcceptCount(v, 1) > 0 then if c.trap ~= nil and c.trap:IsSprung() then c.trap:Harvest(player) else if baits[v.prefab] then if Wall(v) < 7 then inv:GiveItem(v) end else if c.bait then if not c.bait.trap then inv:GiveItem(v) end else inv:GiveItem(v) end end end end end, -278.093536, 15.945419) [02:12:03]: SendRemoteExecute(local player = UserToPlayer('KU_TMPDXbYT') local x,y,z = player.Transform:GetWorldPosition() local beef = c_spawn('beefalo') beef.components.domesticatable:DeltaDomestication(1) beef.components.domesticatable:DeltaObedience(1) beef.components.domesticatable:DeltaTendency(TENDENCY.PUDGY, 1) beef:SetTendency() beef.components.domesticatable:BecomeDomesticated() beef.components.hunger:SetPercent(0.5) beef.components.rideable:SetSaddle(nil, SpawnPrefab('saddle_race')) beef.Transform:SetPosition(x,y,z), -302.442444, -2.207712) [02:12:07]: Failed [02:12:07]: [string "scripts/widgets/badge.lua"]:28: calling 'SetBank' on bad self (string expected, got table) LUA ERROR stack traceback: =[C]:-1 in (method) SetBank (C) <-1--1> scripts/widgets/badge.lua:28 in (upvalue) constructor (Lua) <6-38> self = enabled = true focus_target = false anim = UIAnim focus_flow_args = table: 82E90F50 shown = true owner = health pulse = UIAnim can_fade_alpha = true warning = UIAnim callbacks = table: 82E91130 inst = 115702 - (valid:true) focus = false focus_flow = table: 82E91108 name = Badge children = table: 82E91248 percent = 1 anim = 100288 - wes (valid:true) owner = health scripts/modutil.lua:147 in (field) _ctor (Lua) <146-149> self = enabled = true focus_target = false anim = UIAnim focus_flow_args = table: 82E90F50 shown = true owner = health pulse = UIAnim can_fade_alpha = true warning = UIAnim callbacks = table: 82E91130 inst = 115702 - (valid:true) focus = false focus_flow = table: 82E91108 name = Badge children = table: 82E91248 percent = 1 arg = nil scripts/widgets/healthbadge.lua:11 in (field) _ctor (Lua) <10-61> self = enabled = true focus_target = false anim = UIAnim focus_flow_args = table: 82E90F50 shown = true owner = health pulse = UIAnim can_fade_alpha = true warning = UIAnim callbacks = table: 82E91130 inst = 115702 - (valid:true) focus = false focus_flow = table: 82E91108 name = Badge children = table: 82E91248 percent = 1 owner = health art = 100288 - wes (valid:true) ../mods/workshop-810294417/scripts/widgets/beefalohealthbadge.lua:4 in (field) _ctor (Lua) <3-5> self = enabled = true focus_target = false anim = UIAnim focus_flow_args = table: 82E90F50 shown = true owner = health pulse = UIAnim can_fade_alpha = true warning = UIAnim callbacks = table: 82E91130 inst = 115702 - (valid:true) focus = false focus_flow = table: 82E91108 name = Badge children = table: 82E91248 percent = 1 owner = 100288 - wes (valid:true) scripts/class.lua:181 in (upvalue) BeefaloHealthBadge (Lua) <171-184> class_tbl = table: 0E173D20 arg = nil obj = Badge ../mods/workshop-810294417/scripts/widgets/beefalowidget.lua:23 in (upvalue) constructor (Lua) <9-51> self = shown_position = (580.00, -60.00, 0.00) shown = true slotsperrow = 3 hidden_position = (580.00, -200.00, 0.00) inst = 115700 - (valid:true) focus = false children = table: 82E90578 controller_bump = (0.00, 45.00, 0.00) focus_flow_args = table: 82E90B68 focus_target = false owner = 100288 - wes (valid:true) can_fade_alpha = true inv = table: 82E90988 name = Beefalo bg = Image - images/hud.xml:craftingsubmenu_fullvertical.tex focus_flow = table: 82E90B90 bump_for_controller = false enabled = true callbacks = table: 82E907A8 owner = 100288 - wes (valid:true) scripts/modutil.lua:147 in (field) _ctor (Lua) <146-149> self = shown_position = (580.00, -60.00, 0.00) shown = true slotsperrow = 3 hidden_position = (580.00, -200.00, 0.00) inst = 115700 - (valid:true) focus = false children = table: 82E90578 controller_bump = (0.00, 45.00, 0.00) focus_flow_args = table: 82E90B68 focus_target = false owner = 100288 - wes (valid:true) can_fade_alpha = true inv = table: 82E90988 name = Beefalo bg = Image - images/hud.xml:craftingsubmenu_fullvertical.tex focus_flow = table: 82E90B90 bump_for_controller = false enabled = true callbacks = table: 82E907A8 arg = nil scripts/modutil.lua:155 in (upvalue) BeefaloWidget (Lua) <151-158> class_tbl = table: 0E173CD0 arg = nil obj = Beefalo [02:12:07]: [string "scripts/widgets/badge.lua"]:28: calling 'SetBank' on bad self (string expected, got table) LUA ERROR stack traceback: =[C]:-1 in (method) SetBank (C) <-1--1> scripts/widgets/badge.lua:28 in (upvalue) constructor (Lua) <6-38> scripts/modutil.lua:147 in (field) _ctor (Lua) <146-149> scripts/widgets/healthbadge.lua:11 in (field) _ctor (Lua) <10-61> ../mods/workshop-810294417/scripts/widgets/beefalohealthbadge.lua:4 in (field) _ctor (Lua) <3-5> scripts/class.lua:181 in (upvalue) BeefaloHealthBadge (Lua) <171-184> ../mods/workshop-810294417/scripts/widgets/beefalowidget.lua:23 in (upvalue) constructor (Lua) <9-51> scripts/modutil.lua:147 in (field) _ctor (Lua) <146-149> scripts/modutil.lua:155 in (upvalue) BeefaloWidget (Lua) <151-158> ../mods/workshop-810294417/scripts/patches/beefalodomestication.lua:224 in (method) OpenBeefalo (Lua) <222-232> ../mods/workshop-810294417/scripts/patches/beefalodomestication.lua:174 in (local) fn (Lua) <172-178> scripts/entityscript.lua:1030 in (method) PushEvent (Lua) <1017-1044> scripts/mainfunctions.lua:331 in () ? (Lua) <328-333>

Hopefully that might help you
< >
Showing 1-2 of 2 comments
DavidDavid 15 Nov, 2017 @ 11:38am 
You can fix it by removing the "health" from the call to HealthBadge._ctor in BeefaloHealthBadge and BeefaloHungerBadge:

Change scripts/widgets/beefalohealthbadge.lua from:

local BeefaloHealthBadge = Class(HealthBadge, function(self, owner) HealthBadge._ctor(self, "health", owner) end)

to
local BeefaloHealthBadge = Class(HealthBadge, function(self, owner) HealthBadge._ctor(self, owner) end)

(Same for BeefaloHungerBadge.lua)

That way it matches the definition in healthbadge.lua. This bug was silently working until we added a new "art" argument and your "owner" was being passed as "art".
Serp 17 Nov, 2017 @ 7:55am 
thx DavidDavid :)
I think "owner, "health"" does also work, like here:
https://github.com/rezecib/Rezecib-s-Rebalance/commit/e1d5c7d8f7d11e0777343ec6f562406c028b171e
< >
Showing 1-2 of 2 comments
Per page: 1530 50