Jump to content

Search the Community

Showing results for tags 'farming' or 'food'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Hot Lava
    • [Hot Lava] - General Discussion
    • [Hot Lava] - Suggestions and Feedback
    • [Hot Lava] - Bug Tracker
    • [Hot Lava] - Strats and Records
    • [Hot Lava] - Developer Log
    • Hot Lava Latest Update
  • Griftlands
    • [Griftlands] - General Discussion
    • [Griftlands] - Suggestions and Feedback
    • [Griftlands] - Mods and Tools
    • [Griftlands] - Localization
    • [Griftlands] - Bug Tracker
    • [Griftlands] - Developer log
  • Oxygen Not Included
    • Oxygen Not Included FAQ
    • [Oxygen Not Included] - Developer log
    • [Oxygen Not Included] - General Discussion
    • [Oxygen Not Included] - Bug Tracker
    • [Oxygen Not Included: Spaced Out!] - Bug Tracker
    • [Oxygen Not Included] - Mods and Tools
    • [Oxygen Not Included] - Suggestions and Feedback
    • [Oxygen Not Included] Art, Music & Lore
    • Community Challenges
    • [Oxygen Not Included] - Latest Content Update
    • [Oxygen Not Included] - Latest Animated Short
    • Oxygen Not Included DLC Alpha
  • 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] Beta Branch
    • [Don't Starve Together] PlayStation
    • [Don't Starve Together] Xbox One
    • [Don't Starve Together] Nintendo Switch
    • [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
    • [DS + DST] Art, Music and Lore
    • [Don't Starve Together] Suggestions and Feedback
    • [Don't Starve Together] The Forge
    • [Don't Starve Together] The Gorge
    • [Archived Bugs]
  • 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
    • Other Klei Services

Categories

  • Oxygen Not Included
  • Oxygen Not Included: Spaced Out!
  • Griftlands
  • Don't Starve: Hamlet
  • Don't Starve: Hamlet Early Access
  • Don't Starve Together
  • Don't Starve Together: Beta Branch
  • [Don't Starve Together] Nintendo Switch
  • [Don't Starve Together] PlayStation
  • 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] 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
  • Oxygen Not Included: Spaced Out!
  • Griftlands
  • Hot Lava
  • Don't Starve Together
  • [Nintendo Switch] Don't Starve Together
  • [PlayStation] Don't Starve Together
  • [Xbox One] Don't Starve Together
  • Don't Starve: Hamlet
  • Don't Starve: Shipwrecked

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Biography


Location


Interests


Occupation


Favorite Game


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

  1. I think its unfortunate that some crops are overshadowed by others and how some dont have a special dish at all. They all roughly require the same effort to grow theres no reason why there should be as big of a disparity between them as there is now in terms of usefulness and stat values when eaten on their own or through dishes. This is also an attempt to make vegetarian options as versatile and fun as meat options. This wouldnt benefit just Wurt but anyone who enjoys farming, cooking and having alternatives. Crops: (these are suggestions for the cooked versions, raw versions would have to be adjusted accordingly where appropriate) Dishes: Tweaks to old ones: New dishes:
  2. Anyone else annoyed by the Friendly Fruit Fly? Seems every time I plant anything, that thing can't wait to get in my way, preventing me from placing anything else until I've either shoved it out of the way (disrupting alignment and spacing), or requiring me to carry the Friendly Fruit Fly Fruit a screen away and bring it back after I'm done. It's hard to consider it much of a boon when its troublesome behavior is at times no less tedious to deal with than simply tending the plants yourself. I think it'd really help matters a lot if it had an aversion to plants and tilled soil that a player is close to, thus keeping it out of the way of any players working in the garden. Critters could benefit from such a modification too, that being the main reason I stopped using in-game pets.
  3. The title is pretty self explanatory. I beleve being able to use fire pumps placed on the on Docks, would be a great addition. It could bring little more life into this greate underutilized item as well as provide some utility for people who like making the water based bases. Additionally i would love to be able to use them as a way to water My plants... You technically can allready do this but it is very inefficient, You just splatter water around and hope that some end up on the plot. I believe changing this a little so it targets the plots, could give hudge potential for efficient farming, while still fitting in game
  4. Plase don't nerf this (edit: might be worth building on lunar island to avoid sanity problems) harpunnik.mp4 templariusz strzela z armaty.mp4
  5. Sorry about all the follower-related threads. Just can't seem to resolve this problem. Anyway, as I've mentioned before, my character (same one) has a problem with his code that works with followers. This time (and hopefully the last time), it has to do with garden plants. Since he has a One-man Band-type ability, him doing work such as digging, etc. near plants should count as talking to them but it instead causes a crash. Here is the log: server_log_plants.txt And, for the sake of convenience and hoping the problem can be fixed, I'll paste just the follower code here too: This is the function for it: local function OnWorked(inst, data) local x,y,z = inst.Transform:GetWorldPosition() -- Get the player's location local ents = TheSim:FindEntities(x,y,z, TUNING.ONEMANBAND_RANGE, nil, {"werepig"}, {"pig", "merm", "farm_plant", "player"}) -- Find things near the player's location for k,target in pairs(ents) do -- For each valid found entity run the following code if target:HasTag("player") or target.components.follower:GetLeader() == inst then -- If the target is a player or a creature that follows you target:AddDebuff("buff_kk", "buff_kk") -- apply the buff elseif target.components.follower and not target.components.follower.leader and not inst.components.leader:IsFollower(target) and inst.components.leader.numfollowers < 10 then if target:HasTag("merm") then if target:HasTag("mermguard") then if inst:HasTag("merm") and not inst:HasTag("mermdisguise") then inst.components.leader:AddFollower(target) end else if inst:HasTag("merm") or (TheWorld.components.mermkingmanager and TheWorld.components.mermkingmanager:HasKing()) then inst.components.leader:AddFollower(target) end end else inst.components.leader:AddFollower(target) end elseif target.components.farmplanttendable ~= nil then target.components.farmplanttendable:TendTo(inst) end end end This is in the master_postinit: inst.onFollowerDeath = function(follower) -- create a function and add it to the character if inst.prefab == "kk" then -- Double check that the leader is playing KK, there should be no case where this can fail, but just in-case inst.components.sanity:DoDelta(-15) --Remove 15 sanity print ("inst.onFollowerDeath") end end inst.onFollowerLeave = function(follower) -- create a function and add it to the character follower:RemoveEventCallback("death", inst.onFollowerDeath) --Remove our ListenForEvent so we don't lose sanity from past-followers dieing follower:RemoveEventCallback("stopfollowing", inst.onFollowerLeave) --Same idea here end if inst.components.leader then --Make sure we are not messing with something that doesn't exist (For custom gamemodes and such) local oldAddFollower = inst.components.leader.AddFollower -- Store a backup of the AddFollower function for later use inst.components.leader.AddFollower = function(self, follower) -- Replace the AddFollower function with our own oldAddFollower(self, follower) -- Run the stored backup of the AddFollower function so we don't miss out on the original functionality of it follower:ListenForEvent("death", inst.onFollowerDeath) --Run the "onFollowerDeath" function when the follower dies follower:ListenForEvent("stopfollowing", inst.onFollowerLeave) --Run the "onFollowerLeave" function when the follower stops following us end end And this is the buff function itself for lowering K_K's own and other players' hunger drain in range while working: local function OnAttached(inst, target) if target and target.components.hunger ~= nil then -- Check if the target has the hunger component so we don't try messing with something that doesn't exist target.components.hunger.burnratemodifiers:SetModifier(inst, 0.1) print("Activate Hunger Drain Buff") end end local function OnDetached(inst, target) end local function OnExtended(inst, target) inst.components.timer:SetTimeLeft("buffover", 5) end local function OnTimerDone(inst, data) if data.name == "buffover" then inst.components.debuff:Stop() inst:Remove() end end local function buff_fn() local inst = CreateEntity() if not TheWorld.ismastersim then --Not meant for client! inst:DoTaskInTime(0, inst.Remove) return inst end inst.entity:AddTransform() --[[Non-networked entity]] --inst.entity:SetCanSleep(false) inst.entity:Hide() inst.persists = false inst:AddTag("CLASSIFIED") inst:AddComponent("debuff") inst.components.debuff:SetAttachedFn(OnAttached) inst.components.debuff:SetDetachedFn(OnDetached) inst.components.debuff:SetExtendedFn(OnExtended) inst.components.debuff.keepondespawn = true inst:AddComponent("timer") inst.components.timer:StartTimer("buffover", 5) inst:ListenForEvent("timerdone", OnTimerDone) return inst end Thank you for any help!
  6. Hey there, I'm working on a mod right now that will add a custom food item, internally called curry. It's technically fully functional except for one problem: It doesn't appear in the crock pot. I've tried all sorts of fixes, but I'm not sure I understand things. I've also found forum posts on it, like this one, but I don't understand it well enough to really implement it. Could someone help me figure this out, or at least explain the fix to me?
  7. IMPORTANT: The code should work in both DS and DST, but it was primarily written for DST, so I will leave a disclaimer here saying it might not be 100% the same code that is needed for DS. Please tell me of any problems you run into with these code snippets. How To Use The Examples Below IMPORTANT: The code snippets in the sections below all alter either a character or a food. Look for the parenthesis in the titles for the code snippets to see which type of entity each code snippet is for, and then consult the application methods in this section to apply them to the entities you want (or in some other way, if you know what you're doing). Applying Changes Specific To Your Own Food Item Mod Put the code snippet in the prefab Lua code for your food, at the bottom of the fn function, after adding the edible component to it. Applying Changes To A Specific Food Entity Put this code in your modmain.lua, and put the code snippet you want where the comment says to put it: -- Replace FOOD_PREFAB_NAME with the name of the food prefab you want to change. AddPrefabPostInit("FOOD_PREFAB_NAME", function(inst) -- Put the code snippet here. end) Applying THE SAME Values To Several Food Entities Put this code in your modmain.lua, and put the code snippet you want where the comment says to put it, and fill in the list of affected food prefabs: local affected_foods = { "monstermeat", "corn" } for i, v in ipairs(affected_foods) do AddPrefabPostInit(v, function(inst) -- Put the code snippet here. end) end Applying DIFFERENT Values To Several Food Entities Put this code in your modmain.lua, and change the values in the food_stat_dict. NOTE that this approach needs none of the code snippets below. Just change the values in food_stat_dict. -- food_stat_dict is a dictionary with food prefab names as keys and stat-dictionaries as values. -- The stat-dictionaries have stat-names as keys and the effect on each stat as values. -- If you want a stat not to be affected, you can just omit it from the stat-dictionary. local food_stat_dict = { twigs = { sanity = 10 }, monsterlasagna = { health = 25, sanity = -10, hunger = -10 }, fishsticks = { health = 20, sanity = 20, hunger = 20 }, } for food_prefab, food_stats in pairs(food_stat_dict) do AddPrefabPostInit(food_prefab, function(inst) inst.components.edible.healthvalue = food_stats["health"] or 0 inst.components.edible.hungervalue = food_stats["hunger"] or 0 inst.components.edible.sanityvalue = food_stats["sanity"] or 0 end) end Applying Changes Specific To Your Own Character Mod Put the code snippet in the prefab Lua code for your character, at the bottom of the master_postinit function. Applying Changes To One Particular Character That Is Not Your Own Character Mod Put the code snippet in the prefab Lua code for your character, at the bottom of the master_postinit function. -- Replace CHARACTER_PREFAB_NAME with the name of the character prefab you want to change. AddPrefabPostInit("CHARACTER_PREFAB_NAME", function(inst) -- Put the code snippet here. end) Applying Changes To Several Characters Put the code snippet in the prefab Lua code for your character, at the bottom of the master_postinit function. local affected_characters = { "wilson", "webber" } for i, v in ipairs(affected_characters) do AddPrefabPostInit(v, function(inst) -- Put the code snippet here. end) end Applying Changes To All Characters Put this code in your modmain.lua, and put the code snippet you want where the comment says to put it: AddPlayerPostInit(function(inst) -- Put the code snippet here. end) Making Certain Foods Inedible (CHARACTER) You can extend the Eater:CanEat function of the eater component on your character (or entity), and return false early if it has a certain tag or foodtype, or if it is a specific food. Making All Foods With A Tag Or Specific Foodtype Inedible To make all foods with a certain tag or food type inedible for a character, use this code snippet. You can replace "mushroom" with the tag you want to make inedible or remove the tag check, just like you can replace "VEGGIES" with whatever foodtype you want to exclude or remove the foodtype check. You can add as many of both kinds of checks as you'd like. Now, not all food items have an appropriate tag or foodtype to single them out. In the example above, not all mushroom items have the "mushroom" tag, so if you want to make your character unable to eat more foods incl. all the mushrooms, you can always make a list of inedible food items and keep them from being eaten using similar code. Making Specific Foods Inedible Removing ONLY Negative Stat Effects From Certain Foods (CHARACTER) There are a few ways to go about this. Lets start with the least specific one, since it is the easiest to implement. There is a special function in the eater component called DoFoodEffects, which checks whether to apply any negative effect on sanity or health (so not negative hunger effects) from eating certain food items. If we take a cooked green mushroom cap as an example, it adds health but removes some sanity. We can make that negative sanity not be added at all, while still keeping the positive health effect. To be clear, this code removes all negative sanity and health effects from the foods in the "protected_foods" list, while still allowing any positive sanity and health effects that the food applies. Changing Food Values (CHARACTER) I only recently thought of this "new" solution to this problem. In the past, I have said that you can only "change" food values for your character by manually applying the altered effects AFTER the original food values have been applied by the game. This was because the "oneat" event is called on the character AFTER the original effects have already been added, and I did not see a way to affect this before that happened. But I completely missed this "new" way of changing the food values BEFORE the original food values are applied, so sorry to those people I have given more difficult solutions in the past. Again, we alter a function on the entity, but his time it's the Eat function on the eater component. We intercept the eater as they are eating the food, see if we have a set of special stats we would like this food to have for our character, and if we do, we change the food to have these stats, then eat it, and then revert the food stats back to normal immediately afterwards. Note that the values you enter REPLACE the value given by the food, so they are not an ADDITION. The values you enter, are the values your character will be given from eating that food. Changing Food Values Based On Whatever You Want E.g. Foodtype (CHARACTER) In the code-snippet below, you will find an example which removes the positive sanity- and health-effects of all foods with the foodtype "VEGGIES", while still allowing negative effects of the foods to be applied. Again, we alter the Eat function on the eater component. We intercept the eater as they are eating the food, see if we have a set of special stats we would like this food to have for our character, and if we do, we change the food to have these stats, then eat it, and then revert the food stats back to normal immediately afterwards. Note that the values you enter REPLACE the value given by the food, so they are not an ADDITION. The values you enter, are the values your character will be given from eating that food. Changing Food Values (FOOD) Changing the stats given by a particular food to all entities eating it is pretty straight-forward. You can set the values to whatever you want. NOTE that if you use this code-snippet to change several foods by using the Applying THE SAME Values To Several Food Entities approach at the top of this post, all the foods in your list will get the same values, which is usually not what you want. See the Applying DIFFERENT Values To Several Food Entities approach above for how to set different food values for many foods at once. I hope this helps some people
  8. I have a character that I have made able to eat rot and become stronger over eating large amounts of it, similarly to wx78. He is kind of a slime as of now, rot has the correct functionality and values when spawned in through console, however if rot is spawned via and item spoiling, it seems to behave such like normal rot and harms my character. is there a way to access the naturally generating rot as well as when it spawns in the console? I would appreciate any tips or examples on how to do this Thank you in advance to anyone who takes the time to help a young modder modmain.lua slurg.lua
  9. I am making a food, that when eaten, reduces fire damage taken. liquor = { test = function(cooker, names, tags) return tags.frozen and (names.pepper or names.pepper_cooked) == 2 and (names.tomato or names.tomato_cooked) end, priority = 30, foodtype = FOODTYPE.VEGGIE, health = -TUNING.HEALING_SMALL, hunger = TUNING.CALORIES_MED, sanity = TUNING.SANITY_SMALL, perishtime = TUNING.PERISH_SLOW, cooktime = 0.75, potlevel = "low", tags = { "masterfood" }, prefabs = { "buff_fireimmunity" }, oneatenfn = function(inst, eater) if eater.components.debuffable ~= nil and eater.components.debuffable:IsEnabled() and not (eater.components.health ~= nil and eater.components.health:IsDead()) and not eater:HasTag("playerghost") then eater.components.debuffable:AddDebuff("buff_fireimmunity", "buff_fireimmunity") end end, --floater = {nil, 0.1, 0.7}, }, This is my code for the crockpot recipe. In modmain: local function fire_attach(inst, target) if target.components.health ~= nil then target.components.health.fire_damage_scale = 0.1 end end local function fire_detach(inst, target) if target.components.health ~= nil then target.components.health.fire_damage_scale = 1 end end local function create_fire_buff(inst) MakeBuff("fireimmunity", fire_attach, nil, fire_detach, TUNING.BUFF_MOISTUREIMMUNITY_DURATION, 2) end AddPrefabPostInit("foodbuffs", create_fire_buff) When I cook the food, it has no texture, and when I harvest the crockpot, it disappears.
  10. I would like to make it Warly get a small amount of sanity, and maybe says some random quote every time he starts cooking in his portable crockpot. I have no idea how to do this, so I haven't tried anything. How would I go about doing this?
  11. Hi everyone! I am very new to the modding thing. I am trying to make a character mod for Don't Starve Together. He's gonna be a Rock person. Following along with the tutorial on the Klei website, it all seems fairly straightforward. However, I've run into a little snag (being that I have no coding experience, and don't want to screw up my game) I need help with a few things. Firstly, a slightly slower sanity drain, I set his sanity to 50, but i'd like it to drain a bit slower. Found someone else's thread to help here! Secondly, how to make it so he can mine boulder and etc, with his fists. Thirdly, how he can give off a warmth aura exactly like a thermal stone. Fourthly, how to drain his sanity near pickaxes. And lastly, how to make food non edible, but minerals edible for him. Any help would be appreciated.
  12. Hello! I'm very sorry for the inconvenience. I am creating a character for DST. I want to make the character unable to eat meat, something like Wormwood. I'm quite a novice so I don't know how to look at the code of characters that are already part of the game. Any help would greatly appreciate it.
  13. What is the file path, or where can I find the source code for crockpot food. I have been searching but can not find it. Specifically, I want to find the code for jellybeans. But knowing the code for all the foods can also help with future mods.
  14. 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.
  15. This mod gives a slight buff to underrated crock pot food in the form of effects. This hopes to make the underrated food standout, give variety to cooking and has a reason to be eaten. As people only choose food for the best stat like meatballs or pierogi. I get my inspiration from the item coffee and WX's upgrade stat. What do you guys think of this mod? Is it too OP? or is it a good idea? Feel free to leave a suggestion on balancing or add ideas. Why you should eat it. [Combat] Spicy Chili-grants 0.25x damage multiplier for 2 minutes [changed] Fruit Medley- grants 10% movement speed for 3 minutes (cave exploration) Guacamole-grants 25% protection for 5 minutes "thick skin" Kabobs-grants AoE splash damage of 10% of the damage dealt for 1 minute (good for killing bees) [changed] [Quality of life] Turkey dinner- grants reduce hunger loss by 10% for 3 minutes (+ 40% belt of hunger = 50%) Stuffed Eggplant- Grants 20 extra health for 5 minutes Balancing note: -Multiple effects at the same time. -Same effects, don't stack. It only refreshes the timer. -Effects only given when it's fresh "Green". Motivates players to eat fast, wear an insulated pack, bring snow Chester, and rush bundle wraps.
  16. Hello Everyone! Im working on a character that automaticly eats everything he has on him when his hunger gets too low until his hunger is full again. I have everything in place exept for the part where he actually eats any food he has. And i have no idea how to do this to be fair. Would someone be willing to lend me a hand?
  17. I was wanting to have an food item, that upon being eaten, gives the player an object This is what I am working with, but nothing happens. local function OnEaten(inst, eater) inst.components.inventory:GiveItem(GLOBAL.SpawnPrefab("drupe")) end And, I would prefer that it only works if the eater is a player, so that if another mob eats the food, they don't get the item.
  18. Hello there! I've been trying to make a custom crockpot burger food recipe for my character mod, by following this item sample: https://forums.kleientertainment.com/files/file/202-sample-mods/ Following this and even going to check out mods that succeeded the same doesn't quite work for me? The item DOES exist it the game, as I can spawn it in my inventory (using c_give, as c_spawn doesn't work for it), but it is impossible to put on the ground (it disappears instantly and doesn't exist at all anymore) And it also does not cook in the crockpot with the recipe I made. I assume it has to probably do with the way I get the anim.zip to work. I didn't really find a tutorial that shows how to proceed once the art is done to make the zips and all, so I made a spriter in the exported folder to get it to compile the anim automatically. I don't really know if I do it properly, so any help would be amazing! I have attached my whole mod folder as a zip to this topic, (below the gif) if anyone is willing to help me! Thanks for reading! Here's a gif of the issue in-game:
  19. I tried to make my DST Character better at healing and succeeded. but now it also aplies when i eat any health restoring food item. Does anyone know a way to change this code to where it only affects healer items such as spider glads and haling salves? under charactername.lua: local function _newHealthDoDelta(self, amount, cause, ...) local MULT = 1.5 if amount > 0 then amount = amount * MULT end return self.inst._oldHealthDoDelta(self, amount, cause, ...) end under master_postinit: inst:ListenForEvent("_newHealthDoDelta", _newHealthDoDelta) inst._oldHealthDoDelta = inst.components.health.DoDelta inst.components.health.DoDelta = _newHealthDoDelta
  20. I have two similar problems. Tagging cooked items: I'd like to tag all foodstuffs prepared by a specific character I'm making, to mark that it was prepared by her for later use. I thought to wrap the existing ACTIONS.COOK.fn function, but it doesn't return the prepared item. I'd rather not replace it altogether since that is more likely to clash with other mods. I'd also rather not modify each of the components capable of cooking, also to allow support with other mods that may add more cooking options. It seems like the most sensible place to make the change would be with the COOK action somehow, but like I said, I don't know how to do that in a non-invasive manner. Is there some OnFinishedCooking function or something of the sort somewhere that gives the created product and the chef who made it? I think the lesser evil here would be to modify the cooker and stewer components (how do I do that, by the way?), but I'd appreciate some experienced input here. Tagging built items: The same thing, really, just for items being built (crafted). I'd also like to add a tag saying they were crafted by a specific (different) character. There's a BUILD action, but it doesn't return the created product either, same as with the COOK action. Even more problematic is that here I think I have to change Builder:DoBuild (i.e. overwrite it completely to make the modifications to it), which once again, is not as compatible with other mods as wrapping. Actually, it's also more likely to require changing when the game is updated, since any change to the overridden function would require changing the overriding function as well. So how do you think I should go about doing these two things? Thanks in advance.
  21. I've spent the last day and a half trying to make a character who can only consume 3 things, Gears, Transistors, and Gold nuggets, to restore Hunger and Health. I've been lurking around in various forums and places trying to add this functionality but so far no luck. I have this line added in my modmain.lua; ---- local FOODTYPE = GLOBAL.FOODTYPE FOODTYPE.GEM = "GEM" function GemPostInit(inst) inst:AddTag("edible_"..FOODTYPE.GEM) end AddPrefabPostInit("gears", GemPostInit) AddPrefabPostInit("goldnugget", GemPostInit) AddPrefabPostInit("gears", GemPostInit) ---- And this in my character.lua; ---- inst.components.eater:SetDiet({ FOODGROUP.GEM }, { FOODGROUP.GEM }) inst.components.eater:SetOnEatFn(foodbonus) ---- local function foodbonus(inst, food) if inst.components.eater and food.prefab == "gears" then inst.components.sanity:DoDelta(15) inst.components.health:DoDelta(150) inst.components.hunger:DoDelta(25) end if inst.components.eater and food.prefab == "goldnugget" then inst.components.sanity:DoDelta(5) inst.components.health:DoDelta(60) end if inst.components.eater and food.prefab == "transistor" then inst.components.hunger:DoDelta(100) end end ---- After many crashes and troubleshooting, the game now plays without crashing, but I cannot consume any of these three items. I would like to add the custom foodgroup to these specifically so that other characters don't gain the same benefits, as only this character will be able to consume from the foodgroup. (Note, the name of the foodtype 'GEM' is arbitrary) The idea behind this character is that they cannot consume food as they are a robot without a mouth, (Or a chemical Engine) so they must utilize transistors to power themselves back up like batteries, and use Gears and Gold nuggets to repair themselves.
  22. I was wondering if it would be possible to create a character who only eats nightmare fuel to sustain his hunger, but loses a little sanity every time he eats it. Would this be possible?
  23. I am trying to allow juicy berries to be dried on the drying rack... I've already got the animation worked out for when the berries are hanging, But I need to insert these lines into the prefab for "berries_juicy" inst:AddComponent("dryable") inst.components.dryable:SetProduct("raisins") inst.components.dryable:SetDryTime(TUNING.DRY_FAST) I've tried various methods, but keep getting errors Any advice?
  24. I want to harvest 3 units of plants from one Farm Plot. How to do this?
  25. Heyo, I made a custom prefab that can be eaten. (ie it's a food.) I tried to change the values of health, hunger and sanity given when it's eaten, but I only get the stats for Cooked Morsel. (i think). So can anyone help? Heres my item.lua
×
×
  • Create New...