Search the Community
Showing results for tags 'resolved'.
-
(Translated by DeepL) I was playing ONI the other day and this happened. When the airlock between the two airlocks was dismantled, natural tiles of airlock material were generated there. This could be used to create a metal mass with several tiles vertically and horizontally made of natural tiles. Has someone already found this? Thank you.
-
Hi, I am trying to edit a shared loot table (volt goats, specifically). My questions around this are thus: 1: is this table set every time a prefab loads? (does spawning a goat reset the table? Or is it set once, and once only?) 2. If the answer is the latter, where could I put my edit such that it is performed after the table has been set? I could put it in a AddPrefabPostInit function, but it seems wasteful to do that every time a goat spawns. I might just be over complicating this, but I am genuinely interested to know how you would do this for general knowledge. Does anyone have a link handy for what systems load in what order in DST?
-
Hi, hoping someone can lend me a hand with this. TL;DR: I replaced a function, and the arguments passed into it are nil. Why? Context I am trying to edit the standard evergreens prefab so that trees drop more logs. Problem is that all of the functions in evergreens.lua are local functions, and the variable I need to change is the builds variable (which contains all of the potential loot pools for trees when they transition between growth states). So I abandoned the idea of editing any of that (if there is a way to edit local variables, please let me know), and instead decided to try intercept the lootpool change under inst.components.lootdropper (to be clear, I am still editing the evergreens.lua prefab). The Problem When I try to extend/replace inst.components.lootdropper.SetLoot, the arguments passed in to the new function are nil. Is this a LUA scoping issue that I am not understanding? I remember seeing a post from one of the big posters (rezecib?) about how to override functions, but cannot for the life of me find it again. Code local function SetLootPool(inst) -- only run on the server if not GLOBAL.TheWorld.ismastersim then return end -- make sure we have the right component if (inst.components.lootdropper == nil) then return end -- Remember the old function OldSetLoot = inst.components.lootdropper.SetLoot -- Replace the function inst.components.lootdropper.SetLoot = function(loots) print(OldSetLoot) print(inst.components.lootdropper.SetLoot) print(loots[1]) -- This outputs: -- [00:01:20]: function: 0B2D2310 -- [00:01:20]: function: 05E98F20 -- [00:01:20]: nil -- Call the old function now. Obviously, this sets the loot pool to nil OldSetLoot(loots) end end -- Just testing on the "normal" evergreens for the time being. -- I spawn one in, and use Wicker's book to trigger the above AddPrefabPostInit("evergreen_normal", SetLootPool)
-
Hello, I have a mod which creates additional food items, however if I try to add spices to them using Warly's station, I end up with spiced wet goop. I have looked at spicedfoods.lua and I cant see any reason for this, but admittedly my Lua knowledge is limited. I had thought maybe adding GenerateSpicedFoods(require("mod_foods")) -- Insert modded_foods into food spicer local function ModDSTSpicer(inst) GenerateSpicedFoods(require("mod_foods")) end AddPrefabPostInit("spicedfoods", ModDSTSpicer) However, this didn't result in any change, either because it doesn't matter, or perhaps is coded wrong. I am at a bit of a loss. Any advice would be appreciated, thank you.
-
I'm trying to make a custom character but I don't know how to code some parts. One of those parts is changing the damage multiplier and the speed multiplier based on the percentage of sanity the character has. I thought of a way to make this but I don't know how to translate this to code that DST can use. I also want to add the visual effect from the ancient walking cane when sanity is very low but I don't know how. I posted some unusable code down below to make it a bit more clear what I am trying to achieve. (Most of the multiplier values used below will most likely change after play testing.) Any help will be greatly appreciated. if (Current.SANITY <= 10% && Current.SANITY >= 0%) { speedmultiplier = 0.5 damagemultiplier = 1.75 add ancient walking cane effect } if (Current.SANITY <= 25% && Current.SANITY > 10%) { speedmultiplier = 0.8 damagemultiplier = 1.25 remove ancient walking cane effect } if (Current.SANITY <= 75% && Current.SANITY > 25%) { speedmultiplier = 1 damagemultiplier = 1 } if (Current.SANITY <= 90% && Current.SANITY > 75%) { speedmultiplier = 1.2 damagemultiplier = 0.75 } if (Current.SANITY <= 100% && Current.SANITY > 90%) { speedmultiplier = 1.60 damagemultiplier = 0.45 }
-
I started up a vanilla-esque modded server with a friend. Nothing too crazy, just a few mods here and there for a vanilla-ish experience with just a few tweaks for quality of life purposes. Automatic Health Adjust, Epic Healthbar, Simple Healthbar DST, Global Positions, Trinket Variety, PartyHUD and AFK Detection. And yet when I go into the game, I automatically have god mode on, and have creative mode enabled. Additionally, when I was able to try and get it to turn off, I found myself unable to build structures such as the Science Machine, and god mode kept forcing itself on, on me. I really have no idea why this would be the case. Any ideas?