-
Posts
76 -
Joined
-
Last visited
Reputation
9 NeutralConverted
-
Location
Germany
-
Interests
Don't Starve modding, obviously..
Recent Profile Visitors
4165 profile views
-
ListenForEvent with Client-Only mod
s1m13 replied to s1m13's topic in [Don't Starve Together] Mods and Tools
Thanks @CarlZalph, I will give it a try. -
ListenForEvent with Client-Only mod
s1m13 replied to s1m13's topic in [Don't Starve Together] Mods and Tools
My code does not work. I was asking for whether I made principle mistake, or whether it's impossible generally. -
Hey ho, is it correct, that it is not possible to register for events using ListenForEvent in a client only mod?: AddComponentPostInit("health", function(Health, inst) inst:ListenForEvent("healthdelta", function(inst, data) if inst.components.health then ----- end end) end) Would be happy for any confirmation in any direction. Thanks a lot!
-
Hey devs, I have a new mod: https://steamcommunity.com/sharedfiles/filedetails/?id=1755351523 It's running fine as long as there are no Caves - and I don't know why. My mod includes a custom container which is defined this way: local compostpileparams = { widget = { slotpos = { Vector3(0,32+4,0), Vector3(-(32+4), -(32+4),0), Vector3((32+4), -(32+4),0), Vector3(-(32+4), -(64+32+8+4),0), Vector3((32+4), -(64+32+8+4),0) }, animbank = "ui_compostpile1c6x3", animbuild = "ui_compostpile1c6x3", pos = Vector3(200, 0, 0), side_align_tip = 100, buttoninfo = { text = "Fill", position = Vector3(0, -170, 0), } }, acceptsstacks = false, type = "cooker", } function compostpileparams.itemtestfn(container, item, slot) return composting.IsCompostIngredient(item.prefab) and not container.inst:HasTag("burnt") end function compostpileparams.widget.buttoninfo.fn(inst) if inst.components.container ~= nil then BufferedAction(inst.components.container.opener, inst, ACTIONS.COMPOST):Do() elseif inst.replica.container ~= nil and not inst.replica.container:IsBusy() then SendRPCToServer(RPC.DoWidgetButtonAction, ACTIONS.COMPOST.code, inst, ACTIONS.COMPOST.mod_name) end end -- "can 'Fill' be clicked?" function compostpileparams.widget.buttoninfo.validfn(inst) local num = 0 for k,v in pairs (inst.components.container.slots) do num = num + 1 end return inst.replica.container ~= nil and num > 2 end inst:AddComponent("container") inst.components.container:WidgetSetup("compostpile", compostpileparams) inst.components.container.onopenfn = onopen inst.components.container.onclosefn = onclose I also tried using inst.components.container:WidgetSetup("cookpot") which doesn't change a thing... When clicking the container, I receive the following stacktrace: [00:11:35]: [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-143> self = callbacks = table: 6C6BE580 slotsperrow = 3 inst = 101081 - (valid:true) focus = false children = table: 6C6BE3F0 focus_flow_args = table: 6C6BE4E0 focus_target = false isopen = false owner = 100182 - wickerbottom (valid:true) open = false can_fade_alpha = true inv = table: 6C6BE670 parent = name = Container bgimage = Image - : focus_flow = table: 6C6BE3A0 enabled = true bganim = UIAnim shown = true container = 100113 - compostpile (valid:true) doer = 100182 - wickerbottom (valid:true) widget = nil scripts/screens/playerhud.lua:262 in (upvalue) OpenContainerWidget (Lua) <259-264> self = fireover = FireOver sandover = SandOver beefbloodover = BeefBloodOver parent = screenroot overlayroot = overlays sailing_alpha = 0 handlers = table: 80C97630 mindcontrolover = UIAnim enabled = true under_root = under_root eventannouncer = EventAnnouncer name = HUD flareover = FlareOver focus_flow = table: 80C97338 bloodover = BloodOver storm_root = storm_root over_root = over_root callbacks = table: 80C96DC0 popupstats_root = popupstats_root sanddustover = UIAnim inst = 100184 - (valid:true) focus = true children = table: 80C97018 heatover = HeatOver focus_flow_args = table: 80C97360 focus_target = false vig = UIAnim controls = Controls owner = 100182 - wickerbottom (valid:true) clouds = UIAnim can_fade_alpha = true iceover = IceOver fumeover = FumeOver is_screen = true storm_overlays = storm_overlays shown = true gogglesover = GogglesOver sailing_vig = UIAnim root = root container = 100113 - compostpile (valid:true) side = false containerwidget = Container scripts/screens/playerhud.lua:272 in (method) OpenContainer (Lua) <266-274> self = fireover = FireOver sandover = SandOver beefbloodover = BeefBloodOver parent = screenroot overlayroot = overlays sailing_alpha = 0 handlers = table: 80C97630 mindcontrolover = UIAnim enabled = true under_root = under_root eventannouncer = EventAnnouncer name = HUD flareover = FlareOver focus_flow = table: 80C97338 bloodover = BloodOver storm_root = storm_root over_root = over_root callbacks = table: 80C96DC0 popupstats_root = popupstats_root sanddustover = UIAnim inst = 100184 - (valid:true) focus = true children = table: 80C97018 heatover = HeatOver focus_flow_args = table: 80C97360 focus_target = false vig = UIAnim controls = Controls owner = 100182 - wickerbottom (valid:true) clouds = UIAnim can_fade_alpha = true iceover = IceOver fumeover = FumeOver is_screen = true storm_overlays = storm_overlays shown = true gogglesover = GogglesOver sailing_vig = UIAnim root = root container = 100113 - compostpile (valid:true) side = false scripts/components/container_replica.lua:290 in (method) Open (Lua) <276-297> self = ondetachclassified = function - scripts/components/container_replica.lua:106 acceptsstacks = true _numslots = 0 _isopen = false issidewidget = false _cannotbeopened = net_bool (3D9C6D08) classified = 101080 - container_classified (valid:true) inst = 100113 - compostpile (valid:true) doer = 100182 - wickerbottom (valid:true) scripts/components/container_replica.lua:95 in (field) fn (Lua) <87-101> inst = 100113 - compostpile (valid:true) self = ondetachclassified = function - scripts/components/container_replica.lu [00:11:35]: [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-143> scripts/screens/playerhud.lua:262 in (upvalue) OpenContainerWidget (Lua) <259-264> scripts/screens/playerhud.lua:272 in (method) OpenContainer (Lua) <266-274> scripts/components/container_replica.lua:290 in (method) Open (Lua) <276-297> scripts/components/container_replica.lua:95 in (field) fn (Lua) <87-101> scripts/scheduler.lua:177 in (method) OnTick (Lua) <155-207> scripts/scheduler.lua:371 in (global) RunScheduler (Lua) <369-377> scripts/update.lua:178 in () ? (Lua) <157-236> I tried to understand the container:WidgetSetup routines (same with container_replica) but I cannot see how this may be a problem with Caves... Maybe it's because of the multi-server setup... Can someone help me? Thanks in advance compsting-together.zip
-
Hey pals, I just finished another mod: https://steamcommunity.com/sharedfiles/filedetails/?id=1757258298 It's a client mod for one simple automation which I thought was helpful. In the last couple days I forgot to choose a nice new skin I received for a firepit. So I looked up the code and saw, that the default skin is chosen even if there is a new skin. So why not choosing it automatically? So now - using this mod - you don't have to click the right arrow in the item skins spinner. The logic is: CallTheOldRefreshMethod() local preferred = 2 if there are item options then while iterating over options i do if option has a new_indicator then preferred = i break end i = i + 1 end local skin_index = spinner:GetSelectedIndex() if skin_index is default then self.skins_spinner.spinner:SetSelectedIndex(preferred) end end I achieved that using the AddClassPostConstruct method. Do you think this is helpful? I find the default items skins too boring compared to every item skin!
-
Damage Indicators Together - Update
s1m13 replied to s1m13's topic in [Don't Starve Together] Mods and Tools
I just added new indicators for hunger and sanity. Those are turned off by default, so you have to head to the settings to turn them on. Have fun! -
Hey pals, I just updated a new version of my good old damage indicators mod here: https://steamcommunity.com/sharedfiles/filedetails/?id=1750657150 I improved the size of numbers. It now scales with damage. Higher damage is larger font. What do you think? Do you have any more wishes? I am looking forward to add some new features in the next couple weeks - feel free to provide any ideas! Thanks in advance. PS: Don't forget to subscribe!
-
Thanks for your advice!
-
Hello guys, I found this thread by looking for a solution to publish a mod with multiple authors. Currently I am working on new features of a Don't Starve Together Mod and some other guy is the original author. I am therefore not able to update the game files. Is there any possibility to achieve that?
-
Hey there, everyone interested in my Don't Starve Together-Mod "Damage Indicators Together" can now visit this Github-Page to get noticed of updates and much more information: https://github.com/dont-starve-modding/damage-indicators-together Help and suggestions are very welcome! What do you guys think of a mod displaying more than damage? I had values such as hunger and sanity in mind. Steam: http://steamcommunity.com/sharedfiles/filedetails/?id=543945797 http://steamcommunity.com/sharedfiles/filedetails/?id=220511926 DamageIndicatorsTogether-0.7.0.zip
-
- damage
- indicators
-
(and 1 more)
Tagged with: