Search the Community

Showing results for tags 'solved'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Oxygen Not Included
    • Oxygen Not Included FAQ
    • [Oxygen Not Included] - Developer log
    • [Oxygen Not Included] - General Discussion
    • [Oxygen Not Included] - Mods and Tools
    • [Oxygen Not Included] - Suggestions and Feedback
    • [Oxygen Not Included] - Bug Tracker
    • [Oxygen Not Included] Art, Music & Lore
    • Community Challenges
    • [Oxygen Not Included] - Latest Content Update
    • [Oxygen Not Included] - Latest Animated Short
  • Don't Starve Together
    • Don't Starve Together FAQ
    • [Don't Starve Together] Developer log
    • [Don't Starve Together] General Discussion
    • [Don't Starve Together] Return of Them
    • [Don't Starve Together] PS4
    • [Don't Starve Together] Xbox One
    • [Don't Starve Together] Bug Tracker
    • [Don't Starve Together] Trading
    • [Don't Starve Together] Server Bulletin
    • [Don't Starve Together] Dedicated Server Discussion
    • [Don't Starve Together] Mods and Tools
    • [Don't Starve Together] Tales of Life and Death
    • [Don't Starve Together] Suggestions and Feedback
    • [Don't Starve Together] The Forge
    • [Don't Starve Together] The Gorge
    • [Archived Bugs]
  • Hot Lava
    • [Hot Lava Beta] - General Discussion
    • [Hot Lava Beta] - Suggestions and Feedback
    • [Hot Lava Beta] - Bug Tracker
    • [Hot Lava Beta] - Strats and Records
    • [Hot Lava Beta] - Developer Log
    • Hot Lava Beta Latest Update
  • Griftlands
    • [Griftlands] - General Discussion
  • Don't Starve
    • Don't Starve FAQ
    • [Don't Starve: Pocket Edition] iOS / Android
    • [Don't Starve] General Discussion
    • [Don't Starve] Mods and tools
    • [Don't Starve] Art, Music & Lore
    • [Don't Starve] Suggestions and Feedback
    • [Don't Starve] Videos
    • [Don't Starve] Bug Tracker
    • [Don't Starve] Trading
    • [Don't Starve] Testing Discussion (archive)
  • Klei Entertainment Games
    • Eets Munchies
    • [Invisible, Inc.] General Discussion and Strategies
    • Mark of the Ninja
    • Shank
  • Other Stuff
    • The Off-Topic Area
    • Forum Upgrade

Categories

  • Don't Starve
    • Custom Character and Skins
    • Game Modifications
    • Language Packs
    • Modding Tools, Tutorials & Examples
    • Custom Maps

Categories

  • Oxygen Not Included - [Early Access]
  • Don't Starve: Hamlet
  • Don't Starve: Hamlet Early Access
  • Don't Starve Together
  • Don't Starve Together: Return of Them
  • Don't Starve Together: The Gorge
  • Don't Starve Together: The Forge
  • Don't Starve Together: The Forge (Archive)
  • [Don't Starve Together] PS4
  • [Don't Starve Together] Xbox One
  • Don't Starve: Shipwrecked
  • Don't Starve: Shipwrecked [archive]
  • [Don't Starve Together] PS4 (archive)
  • [iOS] Don't Starve: Shipwrecked
  • Don't Starve: Hamlet Closed Beta (ARCHIVE)

Categories

  • Oxygen Not Included - [Early Access]
  • Don't Starve: Hamlet
  • Don't Starve Together
  • [PS4] Don't Starve Together
  • [Xbox One] Don't Starve Together
  • Don't Starve: Shipwrecked
  • Hot Lava - [Open Beta]

Categories

  • Hot Lava - Beta Reports


Biography


Location


Interests


Occupation


Modder


Chester Kickstarter


Chester Kickstarter


Chester Kickstarter


Chester Kickstarter


Chester Kickstarter


Klei Featured Artist


Early Supporter


Early Supporter


Don't Starve


Don't Starve Together


Oxygen Not Included

Found 4 results

  1. within the Shadowmeteor.lua is a function [ local function SetSize (inst, sz, mod ) ] which determines what items get spawned from meteor impact. local function SetSize(inst, sz, mod) end In the section for the large items, I would like to insert this.. ... elseif rand <= 0.05 * mod then rand = math.random() -- Randomize which chessjunk inst.loot = { { prefab = (rand <= .33 and "chessjunk1") or (rand <= .67 and "chessjunk2") or "chessjunk3", chance = 1, }, } ... However, I haven't been able to figure out how to modify an existing function. Any idea? Thank you
  2. Heya, It looks like the murals have some sort of pattern as human language doa. For example here we can see that the has got some pattern as a language would. Is it really possible that theres english ecrypted within the symbols? Perhaps the Tab in the picture means a single sentence?
  3. I have been making a mod character and have made the item I want to be character specific (a bedroll.) I tried looking around in the vanilla game's scripts for other character specific items, but they don't seem to have much. So I began reading through a thread, which I linked below. I decided to start where the original poster in that thread started by using the script he originally posted and tailoring it to my character with the idea that I could trouble shoot any problems the same way the users in the thread did. Although the script doesn't crash my game and does cause characters to be unable to hold the item, it makes all characters including my own drop it. I tried a couple things mostly going to the (if player.prefab ~= "wisia" then) code and changing what is set in the quotation marks. What i found is that when the prefab name is set to that of my character, they won't spawn with the item or say the text for being unable to hold the item, but if the value is set to something else such as "wilson" I will start with the item dropping off my character and them saying the appropriate text. The short of it is, does any one know how to fix this issue, or a better set of code that would garner the same results without the hassle? Thank you for your time. I also added the item's prefab if you want to poke around in there. My friend wanted me to hurry up making the mod like 6 months back and got someone who knew what they were doing to write the bed roll code since i was having trouble so i can only kind of guess and assume what each part of the code does but not why or how it affects other parts. meaperroll.luameaperroll.lua inst:AddComponent("inspectable") inst:AddComponent("inventoryitem") inst.components.inventoryitem.imagename = "meaperroll" inst.components.inventoryitem.atlasname = "images/inventoryimages/meaperroll.xml" inst.components.inventoryitem.cangoincontainer = false inst.components.inventoryitem.onputininventoryfn = function(inst, player) if player.prefab ~= "wisia" then inst:DoTaskInTime(0.1, function() player.components.inventory:DropItem(inst) player.components.talker:Say("It seems to slip right out of my hands!") end) end end
  4. Hi all! I'm currently trying to create a sort of "clown car" chest, meaning a chest that can store more items than initially expected. To do this, the chest iterates over every item in the container once it is closed, and rolls a chance for that item to disappear from the main chest storage and instead get saved in a hidden "vault" that players cannot access. The next time the chest is opened, any empty slots have a chance to be filled in with a random item from the chest's hidden vault. The resulting effect is that items sort of just disappear and reappear at random times, often leaving empty spaces to stuff more items in. Currently, all of that is working fine. What I'm having trouble with is saving that hidden vault so it's loaded in the next session. I made an attempt at it, but I'm just taking ineffective shots in the dark here. Hopefully someone more familiar with the game's data structures will be able to help. I tried saving the vault as-is, and saving the save records in a table, but neither seems to work properly. Thanks guys! I've included the relevant code snippets below. OnOpen local function onopen (inst) local opener = inst.components.container.opener -- Require sanity tribute and set perishable multiplier back to normal -- Chance to restore items from vault if opener.components.sanity and not opener.components.sanity:IsCrazy() then opener.components.sanity:DoDelta(-TUNING.SANITY_SMALL) local inv = inst.components.container for i = 1, inv:GetNumSlots() do local item = inv:GetItemInSlot(i) if item then if item.components.perishable then item.components.perishable:SetLocalMultiplier(1) end elseif #inst.vault > 0 then if math.random() < SHUFFLECHANCE then local vaultindex = math.random(1,#inst.vault) local founditem = table.remove(inst.vault, vaultindex) if founditem.components.perishable then founditem.components.perishable:StartPerishing() end inv:GiveItem(founditem, i) end end end -- If insufficient sanity, prevent from opening else opener.components.talker:Say("Huh? Th-there's a box here right?") inst.components.container:Close() return end -- [additional code redacted for brevity] -- [basically a chance to spawn a few random items on open] end OnClose local function onclose(inst) if not inst:HasTag("burnt") then inst.AnimState:PlayAnimation("close") inst.AnimState:PushAnimation("closed", false) inst.SoundEmitter:PlaySound("dontstarve/wilson/chest_close") local inv = inst.components.container for i = 1, inv:GetNumSlots() do local item = inv:GetItemInSlot(i) if item then -- Chance to disappear into chest vault if not item:HasTag("irreplaceable") and math.random() < SHUFFLECHANCE then if item.components.perishable then item.components.perishable:StopPerishing() end table.insert (inst.vault, inv:RemoveItemBySlot(i)) elseif item.components.perishable then item.components.perishable:SetLocalMultiplier(0.25) end end end end end Non-functional OnSave and OnLoad local function onsave(inst, data) if inst.components.burnable ~= nil and inst.components.burnable:IsBurning() or inst:HasTag("burnt") then data.burnt = true end data.vault = {} for k,v in ipairs(inst.vault) do if v:IsValid() and v.persists then --only save the valid items table.insert(data.vault, v:GetSaveRecord()) end end end local function onload(inst, data) if data ~= nil and data.burnt and inst.components.burnable ~= nil then inst.components.burnable.onburnt(inst) end if data and data.vault then for k,v in ipairs(data.vault) do local item = SpawnSaveRecord(v) if item then table.insert(inst.vault, item) end end end end Main Function local function fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddSoundEmitter() inst.entity:AddLight() inst.entity:AddMiniMapEntity() inst.entity:AddNetwork() inst.MiniMapEntity:SetIcon("pandoraschest.png") inst:AddTag("structure") inst:AddTag("chest") inst:AddTag("fridge") inst.Light:SetFalloff(1) inst.Light:SetIntensity(0.5) inst.Light:SetRadius(2) inst.Light:SetColour(180/255, 195/255, 150/255) inst.Light:Enable(true) inst.Light:EnableClientModulation(true) inst._fadeval = net_float(inst.GUID, "fireflies._fadeval") inst._faderate = net_smallbyte(inst.GUID, "fireflies._faderate", "onfaderatedirty") inst._fadetask = nil inst.AnimState:SetBank("pandoras_chest") inst.AnimState:SetBuild("pandoras_chest") inst.AnimState:PlayAnimation("closed") MakeSnowCoveredPristine(inst) inst.entity:SetPristine() if not TheWorld.ismastersim then inst:ListenForEvent("onfaderatedirty", OnFadeRateDirty) inst:DoTaskInTime(0.1, function(inst) inst.replica.container:WidgetSetup("shadowchester") end) return inst end inst:AddComponent("playerprox") inst.components.playerprox:SetOnPlayerNear(onplayerprox) inst.components.playerprox:SetOnPlayerFar(fadeout) inst.components.playerprox:SetDist(3,4) inst:AddComponent("inspectable") inst:AddComponent("container") inst.components.container:WidgetSetup("shadowchester") inst.components.container.onopenfn = onopen inst.components.container.onclosefn = onclose inst:AddComponent("sanityaura") inst.components.sanityaura.aura = -TUNING.SANITYAURA_TINY 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) inst:AddComponent("hauntable") inst.components.hauntable:SetHauntValue(TUNING.HAUNT_TINY) inst.vault = {} inst:ListenForEvent("onbuilt", onbuilt) MakeSnowCovered(inst) inst.OnSave = onsave inst.OnLoad = onload updatelight(inst) return inst end Error log from last session [string "../mods/Pandora - prealpha/scripts/prefabs/..."]:598: bad argument #2 to 'insert' (number expected, got table) LUA ERROR stack traceback: =[C]:-1 in (field) insert (C) <-1--1> ../mods/Pandora - prealpha/scripts/prefabs/strangebox.lua:598 in (field) OnSave (Lua) <590-601> inst = 107566 - strangebox (valid:true) data = table: 07CD99F0 k = 1 v = 113492 - cutreeds (valid:true) scripts/entityscript.lua:1521 in (method) GetPersistData (Lua) <1489-1538> self (valid:true) = GUID = 107566 Transform = Transform (1F72EFC8) inlimbo = false actionreplica = table: 1F8D53E0 _faderate = net_smallbyte (1F8E4618) actioncomponents = table: 1F8D5228 event_listening = table: 1F8D5FC0 lower_components_shadow = table: 1F8D52A0 loot = table: 07257A60 lootaggro = table: 07257AD8 entity = Entity (1F855120) AnimState = AnimState (1F72EE68) prefab = strangebox Light = Light (1F72EE88) children = table: 1F8F0358 OnSave = function - ../mods/Pandora - prealpha/scripts/prefabs/strangebox.lua:590 Network = Network (1F72EF68) persists = true OnLoad = function - ../mods/Pandora - prealpha/scripts/prefabs/strangebox.lua:603 MiniMapEntity = MiniMapEntity (1F72EEE8) pendingtasks = table: 1F8D5818 SoundEmitter = SoundEmitter (1F72EFE8) vault = table: 1F8D67E0 _fadeval = net_float (1F8E4880) name = Ornate Chest last_prox_sfx_time = 0.43333335593343 replica = table: 1F8D52C8 spawntime = 0 components = table: 1F8D5200 event_listeners = table: 1F8D59D0 references = table: 07CD9E00 data = table: 07CD99F0 scripts/entityscript.lua:288 in (method) GetSaveRecord (Lua) <243-293> self (valid:true) = GUID = 107566 Transform = Transform (1F72EFC8) inlimbo = false actionreplica = table: 1F8D53E0 _faderate = net_smallbyte (1F8E4618) actioncomponents = table: 1F8D5228 event_listening = table: 1F8D5FC0 lower_components_shadow = table: 1F8D52A0 loot = table: 07257A60 lootaggro = table: 07257AD8 entity = Entity (1F855120) AnimState = AnimState (1F72EE68) prefab = strangebox Light = Light (1F72EE88) children = table: 1F8F0358 OnSave = function - ../mods/Pandora - prealpha/scripts/prefabs/strangebox.lua:590 Network = Network (1F72EF68) persists = true OnLoad = function - ../mods/Pandora - prealpha/scripts/prefabs/strangebox.lua:603 MiniMapEntity = MiniMapEntity (1F72EEE8) pendingtasks = table: 1F8D5818 SoundEmitter = SoundEmitter (1F72EFE8) vault = table: 1F8D67E0 _fadeval = net_float (1F8E4880) name = Ornate Chest last_prox_sfx_time = 0.43333335593343 replica = table: 1F8D52C8 spawntime = 0 components = table: 1F8D5200 event_listeners = table: 1F8D59D0 record = table: 07CD93B0 references = nil scripts/mainfunctions.lua:678 in (global) SaveGame (Lua) <658-786> isshutdown = true cb = function - scripts/mainfunctions.lua:1060 save = table: 06C7A708 nument = 1319 saved_ents = table: 06C7A398 references = table: 06C7A550 k = 107566 v = 107566 - strangebox (valid:true) x = -113.06099700928 y = 0 z = 203.61099243164 scripts/saveindex.lua:343 in (method) SaveCurrent (Lua) <332-344> self = data = table: 09BE8FF0 current_slot = 1 onsavedcb = function - scripts/mainfunctions.lua:1060 isshutdown = true slotdata = table: 09BE8ED8 scripts/mainfunctions.lua:1591 in () ? (Lua) <1582-1593> [00:01:56]: [string "../mods/Pandora - prealpha/scripts/prefabs/..."]:598: bad argument #2 to 'insert' (number expected, got table) LUA ERROR stack traceback: =[C]:-1 in (field) insert (C) <-1--1> ../mods/Pandora - prealpha/scripts/prefabs/strangebox.lua:598 in (field) OnSave (Lua) <590-601> scripts/entityscript.lua:1521 in (method) GetPersistData (Lua) <1489-1538> scripts/entityscript.lua:288 in (method) GetSaveRecord (Lua) <243-293> scripts/mainfunctions.lua:678 in (global) SaveGame (Lua) <658-786> scripts/saveindex.lua:343 in (method) SaveCurrent (Lua) <332-344> scripts/mainfunctions.lua:1591 in () ? (Lua) <1582-1593> strangebox.lua Pandora.zip