• Announcements

    • JoeW
    • JanH

      Rhymes with Play 153 - Oxygen Not Included: Outbreak Upgrade Launch Stream   08/23/2017


      This week on the Rhymes with Play Dev Cast, join us as we play, discuss, and answer questions about the incoming Outbreak Upgrade for Oxygen Not Included! As always, the live stream will be going live Thursday (August 24) at 3:30 PM Pacific / 10:30 PM UTC. Outbreak Upgrade is coming to Oxygen Not Included August 24th, 2017. More information: https://forums.kleientertainment.com/topic/81341-upgrade-imminent/ Where is it? 
      On our official Twitch Channel: https://www.twitch.tv/kleientertainment When is it?
      Twitch Stream Date: August 24, 2017
      3:30 PM PDT (Pacific Time)
      10:30 PM UTC (Coordinated Universal Time) Here is a handy tool you can use to figure out what time that means for you. Check out the stream announce thread for discussions!

Lumina

Registered Users
  • Content count

    1,771
  • Joined

  • Last visited

Community Reputation

1,295 Excellent

6 Followers

About Lumina

  • Rank
    Senior Member

Badges

Don't Starve
  • Contributor
Don't Starve Together
  • Contributor
Oxygen Not Included
  • Alpha Contributor
  1. She opens it when she travel with wormhole as far as i remember.
  2. Sparkless Rain Damage

    What happen if you remove the : SpawnPrefab("sparks").Transform:SetPosition(x, y, z) Lines ?
  3. If it's in lower case, keep it in lower case. If it's in upper case, keep it in upper case. STRINGS.CHARACTER_TITLES.esctemplate = "The Sample Character" -- lower case STRINGS.CHARACTER_NAMES.esctemplate = "Esc" -- lower case STRINGS.CHARACTER_DESCRIPTIONS.esctemplate = "*Perk 1\n*Perk 2\n*Perk 3" -- lower case STRINGS.CHARACTER_QUOTES.esctemplate = "\"Quote\"" -- lower case STRINGS.CHARACTERS.ESCTEMPLATE = require "speech_esctemplate" -- upper case. Note : if you change the "require "speech_esctemplate" into "require "speech_yourcharacter", you also need to change the file's name in /scripts -- The character's name as appears in-game STRINGS.NAMES.ESCTEMPLATE = "Esc" -- upper case The list of things to change isn't complete, of course.
  4. PLEASE HELP.

    Are you sure ? There is a known problem with windows 10 and dst mods, isn't just this the problem here ?
  5. Did you add the item to the prefab list in modmain ? Should be something like this : PrefabFiles = { "mystrawroll", }
  6. Ok. First, i would suggest to make your custom roll item using the existing animation, and making your custom code. When the code will work fine, then move to make custom anim (or resking of existing anim). Of course, this way to do will work only if your item is close enough of the existing rolls, not totally different. This will probably be easy to test, and you could ask help for the different steps.
  7. Thanks. I didn't know the order was important, i never got this problem before. All seems to work fine now
  8. I made a custom prefab based on grave. When this prefab is dug, i want it to "refill" after some time. I made a function for this, but i encounter a problem : when the even trigger, the function seems to work strangely. The anim is ok, i can try to dig the prefab, but i obtain no result. If i quit the game and log again, i can dig the prefab normally. Here is the code i'm using : local assets = { Asset("ANIM", "anim/gravestones.zip"), } local prefabs = { "ghost", "amulet", "redgem", "gears", "bluegem", "nightmarefuel", } for k = 1, NUM_TRINKETS do table.insert(prefabs, "trinket_"..tostring(k)) end local LOOTS = { nightmarefuel = 1, amulet = 1, gears = 1, redgem = 5, bluegem = 5, } local function OnNewDayFn(inst, data) print("function counter") if inst.components.workable == nil then inst.counter = inst.counter - 1 if inst.counter <= 0 then inst.AnimState:PlayAnimation("gravedirt") inst:AddComponent("workable") inst.components.workable:SetWorkAction(ACTIONS.DIG) inst.components.workable:SetWorkLeft(1) end end end local function onfinishcallback(inst, worker) inst.AnimState:PlayAnimation("dug") inst:RemoveComponent("workable") inst.counter = 1 local num = math.random(1,20) local buried = {"log","twigs","cutgrass","rocks","flint","mudroot"} local commontreasure = {"redgem","bluegem","marble","goldnugget","papyrus"} local treasure = {"purplegem","onemanband","whistle","nightmarefuel","umbrella","commontreasuremap"} local raretreasure = {"gears","yellowgem","orangegem","greengem","armor_sanity","nightsword","livinglog","raretreasuremap"} local trinket = PickRandomTrinket() if worker ~= nil then if worker:HasTag("treasurehunter") and worker:HasTag("luckyfinder") then if num <= 4 then inst.components.lootdropper:SpawnLootPrefab(commontreasure[math.random(1,#commontreasure)]) print("extra loot common both tag") -- so you know if the loot isn't spawning for some reason elseif num > 4 and num <= 5 then inst.components.lootdropper:SpawnLootPrefab(trinket) elseif num > 5 and num <= 6 then inst.components.lootdropper:SpawnLootPrefab(treasure[math.random(1,#treasure)]) elseif num > 6 and num <= 8 then inst.components.lootdropper:SpawnLootPrefab(raretreasure[math.random(1,#raretreasure)]) else inst.components.lootdropper:SpawnLootPrefab(buried[math.random(1,#buried)]) end elseif worker:HasTag("treasurehunter") then if num <= 1 then inst.components.lootdropper:SpawnLootPrefab(commontreasure[math.random(1,#commontreasure)]) elseif num > 1 and num <= 2 then inst.components.lootdropper:SpawnLootPrefab(trinket) elseif num > 2 and num <= 3 then inst.components.lootdropper:SpawnLootPrefab(treasure[math.random(1,#treasure)]) elseif num > 3 and num <= 4 then inst.components.lootdropper:SpawnLootPrefab(raretreasure[math.random(1,#raretreasure)]) else inst.components.lootdropper:SpawnLootPrefab(buried[math.random(1,#buried)]) end elseif worker:HasTag("luckyfinder") then if num <= 1 then inst.components.lootdropper:SpawnLootPrefab(commontreasure[math.random(1,#commontreasure)]) elseif num > 1 and num <= 2 then inst.components.lootdropper:SpawnLootPrefab(trinket) elseif num > 2 and num <= 3 then inst.components.lootdropper:SpawnLootPrefab(treasure[math.random(1,#treasure)]) elseif num > 3 and num <= 4 then inst.components.lootdropper:SpawnLootPrefab(raretreasure[math.random(1,#raretreasure)]) else inst.components.lootdropper:SpawnLootPrefab(buried[math.random(1,#buried)]) end else end end end local function GetStatus(inst) if not inst.components.workable then return "DUG" end end local function OnSave(inst, data) if inst.components.workable == nil then data.dug = true end end local function OnLoad(inst, data) if data ~= nil and data.dug or inst.components.workable == nil then inst:RemoveComponent("workable") inst.AnimState:PlayAnimation("dug") end end local function fn() local inst = CreateEntity() inst.entity:AddTransform() inst.entity:AddAnimState() inst.entity:AddNetwork() inst.AnimState:SetBank("gravestone") inst.AnimState:SetBuild("gravestones") inst.AnimState:PlayAnimation("gravedirt") inst.entity:SetPristine() if not TheWorld.ismastersim then return inst end inst.counter = 0 inst:AddComponent("inspectable") inst.components.inspectable.getstatus = GetStatus inst:AddComponent("workable") inst.components.workable:SetWorkAction(ACTIONS.DIG) inst.components.workable:SetWorkLeft(1) inst:AddComponent("lootdropper") inst.components.workable:SetOnFinishCallback(onfinishcallback) inst:WatchWorldState("isday", OnNewDayFn) inst.OnSave = OnSave inst.OnLoad = OnLoad return inst end return Prefab("mudhole", fn, assets, prefabs) Here is the function : local function OnNewDayFn(inst, data) print("function counter") if inst.components.workable == nil then inst.counter = inst.counter - 1 if inst.counter <= 0 then inst.AnimState:PlayAnimation("gravedirt") inst:AddComponent("workable") inst.components.workable:SetWorkAction(ACTIONS.DIG) inst.components.workable:SetWorkLeft(1) end end end If i try to add this line : inst.components.workable:SetOnFinishCallback(onfinishcallback) The game crash (variable "onfinishcallback" is not declared). I probably need something to properly "refresh" the state of the prefab, but i don't know what. Any help will be welcome Note : at the moment the counter is 1 for testing purpose; Some parts of the code could be a little messy, sorry for that, i didn't find a best way to manage it. Let me know if i should attach the mod : since it's a part of a work in progress i can't attach the entire mod, but i could make a small mod with only this prefab if it's really needed. Thanks for your help.
  9. There is already a similar topic, i suggest to lock one of them, maybe ? Or merge them if possible @ImDaMisterL ?
  10. How to Start Coding

    Not sure, i think it replace an existing animation but i'm not familiar with it. Priority is used when you use ingredients that could be used in multiple recipes. For example, if i use mandrake, i will end with a mandrake soup, because the recipe has a high priority (10). If i use only veggies, i will end with ratatouille (priority 0), only if no other recipe is possible, because any other recipe will have higher priority (for example, stuffed eggplant (priority 1). It's testing the tags/names you need to make the recipe. It's here you'll put the requirement of the recipe. Some examples : test = function(cooker, names, tags) return (names.pumpkin or names.pumpkin_cooked) and tags.sweetener and tags.sweetener >= 2 end, Pumpkin cookies needs pumpkin, and at least ingredients with a sweetener value of minimum 2. Usually, honey, but you can add custom ingredient with a sweetener tag. So you need at least 1 pumpkin (cooked or not) and a value of 2 sweetener (2 honey, or one ingredient with 2 sweetener value, or...) test = function(cooker, names, tags) return tags.meat and tags.veggie and tags.meat >= 1.5 and tags.veggie >= 1.5 end, Hot chili needs meat and veggies, each with at least a total value of 1.5. So for example, it could be a monster meat + a small meat, a monster meat and a meat, two meats. For veggies, most veggies have a value of 1, but mushrooms and cactus flower seems to have a value of 0.5. So one recipe could be "monster meat + small meat + blue cap + carrot". Look at preparedfoods.lua and cooking.lua (in scripts) for examples of recipes and tags.
  11. How to Start Coding

    I don't know. But there is an API (a little outdated possibly) here with some example of function : Another good way to know what a function is doing is to search in game file for similar function. A text editor often has an option for this, allowing you to search in an entire folder. So you can search other examples of one function, for example.
  12. How to Start Coding

    Yes, usually post give solution, rather than a process. I guess it's mainly because most people are modding with an idea in mind and try to do what is needed to make this idea. At least i know it's how i'm working : i have an idea, and i try to find a way to make it. And because of this, it's hard for people like me to give advices about where to start, because i don't know where to start : i started with what i wanted to do (a recipe for an item, adding a new resource...), rather than in a way that is methodical or organized.
  13. Yes, a lot of things here could help someone else a day or another. I bookmark the topic about things i could use later, and when i have a problem with a crash or something, i try to google it to find topics with similars issues.