blazerdrive09

  • Content Count

    16
  • Joined

  • Last visited

Community Reputation

0 Neutral

About blazerdrive09

  • Rank
    Junior Member
...

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Enable
  1. I have the same issue in one of my worlds. I went into sandbox and was able to get it down to this where batteries connected to a transformer with batteries on the other end will overload. The load on the left stated 1kw where as the load on the right was 1000 watts. Edit: Additional Discovery -- The overload only occurs if there are 3 or more batteries of any type before the transformer. I was able to do use one or two total batteries and able to avoid the overload.
  2. So I was wondering in general, how do you make a placeable world structure burnable? Essentially, I have a item similar to a chest that you can place like a chest and has an inventory and so forth. However, though it works like I intended, the one issue I am having is allowing it so that it can burn similar to a crockpot, drying rack, or a chest, like its a burnable camp item with the execption that it dissappears fully after it has burned and drops whatever is within it.
  3. Wait so does the game spawn, the prefab then change its location with the food then remove the food so it spawns two prefabs as a result of the code running twice? i thought goop was just the prefab that would be spawned in.
  4. I am currently making a composter mod to help increase the rate at which food spoils. I am also making it possible for the food to turn into guano if it rots inside the composter. I have successfully made it possible to do so in don't starve single player as well as in Don't Starve Together. However, I noticed that an extra rot spawns in the world on the ground when a food item decays within the composter and turns into guano. This didn't happen in Don't Starve single player and this doesn't happen when a food item simply rots inside a player inventory (and turns into rot and not guano in the player inventory). If somebody can help me figure out why an extra rot spawns in the world when a food item rots in the composter that would helpful. Here is the code i modified in the perishable lua file for this to occur. function Perishable:Perish() if self.updatetask ~= nil then self.updatetask:Cancel() self.updatetask = nil end if self.perishfn ~= nil then self.perishfn(self.inst) end if self.inst:IsValid() then self.inst:PushEvent("perished") end --NOTE: callbacks may have removed this inst! if self.inst:IsValid() and self.onperishreplacement ~= nil then local goop = SpawnPrefab(self.onperishreplacement) if goop ~= nil then local owner = self.inst.components.inventoryitem ~= nil and self.inst.components.inventoryitem.owner or nil if owner:HasTag("composter") then goop = SpawnPrefab("guano") end if goop.components.stackable ~= nil and self.inst.components.stackable ~= nil then goop.components.stackable:SetStackSize(self.inst.components.stackable.stacksize) end local holder = owner ~= nil and (owner.components.inventory or owner.components.container) or nil if holder ~= nil then local slot = holder:GetItemSlot(self.inst) self.inst:Remove() holder:GiveItem(goop, slot) else local x, y, z = self.inst.Transform:GetWorldPosition() self.inst:Remove() goop.Transform:SetPosition(x, y, z) end end end end
  5. Thanks! It worked, I knew it had something to due with the replica that needs to made for the clients but I couldn't figure out what was causing the problem or what needed to be done or how.
  6. Currently, I am developing a custom mod for Don't Starve together. It is a composter that increases the rate at which things rot inside. I was able to successfully make the a placable structure using animations from another steam mod temporarily just to see if it works before i make my own designs and animations for the composter. The host is able to open it as well and put items in it and it also successfully increases the rate at which things compost inside of it. However, if another person joins the server with the mod installed, and tries to open the composter, or any composter no matter who made it, the client crashes while the host is still able to open it and the server is still able to run. The error seems to be due to a widget or something of that nature I can include a screenshot later. Here is the prefab for the composter: require "prefabutil" local assets= { Asset("ANIM", "anim/cellar.zip"), Asset("ANIM", "anim/ui_chest_3x3.zip"), } 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("wood") 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() end local function onbuilt(inst) inst.AnimState:PlayAnimation("place") inst.AnimState:PushAnimation("closed") end local function itemtest(inst, item, slot) return (item.components.edible and item.components.perishable) or item.prefab == "spoiled_food" or item.prefab == "rottenegg" end local function onsave(inst, data) if inst:HasTag("burnt") or (inst.components.burnable ~= nil and inst.components.burnable:IsBurning()) then data.burnt = true end end local function onload(inst, data) if data ~= nil and data.burnt and inst.components.burnable then inst.components.burnable.onburnt(inst) end end local function fn(Sim) local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddSoundEmitter() inst.entity:AddNetwork() local minimap = inst.entity:AddMiniMapEntity() minimap:SetIcon( "cellar.tex" ) MakeObstaclePhysics(inst, 1.0) inst:AddTag("composter") inst:AddTag("structure") inst.AnimState:SetBank("cellar") inst.AnimState:SetBuild("cellar") inst.AnimState:PlayAnimation("closed", true) MakeSnowCoveredPristine(inst) inst.entity:SetPristine() if not TheWorld.ismastersim then return inst end inst:AddComponent("inspectable") inst:AddComponent("container") inst.components.container:WidgetSetup("icebox") 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(1) inst.components.workable:SetOnFinishCallback(onhammered) inst.components.workable:SetOnWorkCallback(onhit) AddHauntableDropItemOrWork(inst) MakeSnowCovered(inst) inst.OnSave = onsave inst.OnLoad = onload return inst end return Prefab( "common/cellar", fn, assets), MakePlacer("common/cellar_placer", "cellar", "cellar", "closed")