BraveChicken

  • Content count

    54
  • Joined

  • Last visited

Community Reputation

25 Excellent

1 Follower

About BraveChicken

  • Rank
    Junior Member
  1. how can i modify firestaff?

    Yes, the AddPrefabPostInit is basically a common way to change how some prefabs work in the game. You just use the base: AddPrefabPostInit("PrefabHere", function(inst) if GetPlayer().prefab == "YourCharacterHere" then [Your changes here] end end) The "if GetPlayer().prefab == "YourCharacterHere"" is used there to make sure that the modifications you make will work only with your character. So If you're trying to make a mod that modifies something for everyone no matter what character they pick, then you can just use this base instead: AddPrefabPostInit("PrefabHere", function(inst) [Your changes here] end)
  2. The problem is that you putted the same sanity function 3 times in a row. And all of them work with the same tags, which makes the game flicker between all of them all the time. But reading your script I can see what you were trying to do. So here's how to fix that: inst:AddTag("notactive") local function CheckTime(inst) if GetClock() and GetWorld() then if GetClock():IsDay() and (inst:HasTag("notactive") or inst:HasTag("activedusk") or inst:HasTag("activenight")) and not GetWorld():IsCave() then inst.components.sanity.dapperness = 0.3 inst:AddTag("activeday") inst:RemoveTag("notactive") inst:RemoveTag("activedusk") inst:RemoveTag("activenight") end if GetClock():IsDusk() and (inst:HasTag("notactive") or inst:HasTag("activeday") or inst:HasTag("activenight")) and not GetWorld():IsCave() then inst.components.sanity.dapperness = -0.15 inst:AddTag("activedusk") inst:RemoveTag("notactive") inst:RemoveTag("activeday") inst:RemoveTag("activenight") end if GetClock():IsNight() and (inst:HasTag("notactive") or inst:HasTag("activedusk") or inst:HasTag("activeday")) and not GetWorld():IsCave() then inst.components.sanity.dapperness = -0.4 inst:AddTag("activenight") inst:RemoveTag("notactive") inst:RemoveTag("activedusk") inst:RemoveTag("activeday") end end end inst:DoPeriodicTask( 0.0, function(inst) CheckTime(inst) end) Try using this instead. I simply combined everything into 1. I marked you the Day, Dusk, and Night parts along with your custom sanity perk so you could easily change it if you'd like
  3. how can i modify firestaff?

    To modify the firestaff, head to your modmain.lua and add it there this: GetPlayer = GLOBAL.GetPlayer AddPrefabPostInit("firestaff", function(inst) if GetPlayer().prefab == "YourCharacterHere" then inst:RemoveComponent("finiteuses") inst.components.weapon:SetDamage(15) local function onattack(inst, attacker, target) if target.components.burnable and not target.components.burnable:IsBurning() then if target.components.freezable and target.components.freezable:IsFrozen() then target.components.freezable:Unfreeze() else target.components.burnable:Ignite(true) end end if target.components.freezable then target.components.freezable:AddColdness(-1) if target.components.freezable:IsFrozen() then target.components.freezable:Unfreeze() end end if target.components.sleeper and target.components.sleeper:IsAsleep() then target.components.sleeper:WakeUp() end if target.components.combat then target.components.combat:SuggestTarget(attacker) if target.sg and target.sg.sg.states.hit then target.sg:GoToState("hit") end end if attacker and attacker.components.sanity then attacker.components.sanity:DoDelta(-10) end attacker.SoundEmitter:PlaySound("dontstarve/wilson/fireball_explo") end inst.components.weapon:SetOnAttack(onattack) end end) The 1st marked line removes from the firestaff the ability to lose durability. The 2nd marked line Gives more damage to the target. The "15" in the parenthesis shows how much additional HP your target will lose upon being hit. You can of course change it to the amount you wish the firestaff to deal by increasing/decreasing that number. The last marked line shows the amount of sanity that your character will lose with each firestaff use. Again, you can increase or decrease it if you wish, by changing the "-10" in the parenthesis. I hope this helps. Good luck!
  4. Mod problem

    To wygląda na Don't Starve Together. Spróbuj się zapytać tutaj >> DST Mods and Tools Tam jest więcej ludzi którzy się znają na DST którzy mogli by ci pomóc, chociaż z tego crash log widać że twoja gra ma problem z "heatrock" (kamieniem termicznym). Może niektóre z twoich modów po prostu kolidują ze sobą tworząc ten problem.
  5. I never played around with adding such to a button, so I won't be able to help you out too much with this right now, but I know a mod that did create and use different button commands. Puppy princess Musha You could look around in the files of this mod to see how the buttons there are scripted. (I would have checked it out myself but I do not have that much free time lately. Sorry about that) Edit: Nevermind! I couldn't resist checking it out! Here's what you'll need: Head to your character's prefab file and add in the local fn = function(inst) these lines: local light = inst.entity:AddLight() light:SetFalloff(0.2) light:SetIntensity(0.9) light:SetRadius(6.0) light:SetColour(001/255, 255/255, 050/255) light:Enable(false) inst:AddTag("nvoff") Then head to your modmain.lua and add in there this: GetPlayer = GLOBAL.GetPlayer GLOBAL.TheInput:AddKeyDownHandler(GLOBAL.KEY_F, function() local light = GetPlayer().entity:AddLight() if GetPlayer():HasTag("nvon") then light:Enable(false) GetPlayer():AddTag("nvoff") GetPlayer():RemoveTag("nvon") print("Night vision is OFF.") elseif GetPlayer():HasTag("nvoff") then light:Enable(true) GetPlayer():AddTag("nvon") GetPlayer():RemoveTag("nvoff") print("Night vision is ON.") end end) You can of course change the colors of your night vision (The tutorial explains how to do that) and the button from "F" to another by just changing the "F" in the "GLOBAL.KEY_F" which I marked, to the one which you would like to use. This should be enough to make it work.
  6. Back to nature [DS] [RoG]

    Hmm, that's weird. I don't seem to have any problems running the game with my mod. But I do remember seeing some people complain about having some issues with the mods after the Don't Starve update, so I suppose maybe this could be the issue? (And if it is then I guess it should be fix soon by the developers) Also, You could try enabling only this mod and checking if it still would result in the same issue (if you tend to have more than 1 mod enabled) just to make sure that the problem isn't in the mod's compatibility with some other mods that you might have enabled along with this one. Other than that, I guess I could only recommend trying to re-download the mod or maybe trying getting it on Steam (If you can). I'm sorry, I can't really help more than that
  7. Unexpected symbol

    If you're working on a DST mod, then you might want to ask for help over here >> DST Mods and Tools As this is the forum section for the single-player version.
  8. I'm a bit bothered with what I believe could be categorized as a [Gameplay] bug. (I'm playing on Steam) And the same thing happens with and without mods. (in DS, RoG) --The issue-- All of the characters keep on receiving their "irreplaceable" items which later replace the old ones. Which in Wendy's case can be very bothersome as it also resets Abigail's flower and forces the player to wait until Abigail will be almost ready to spawn again. --Steps to reproduce-- Leaving the character's unique item in a chest or on the ground and then entering a cave (descending to a sinkhole) will immediately spawn the left item back in the character's inventory. Later if going back to the surface with that item, the game will despawn the old item leaving only the new one which the character holds. --How to fix it-- I do realize that you probably, more than anybody else, know how to script and organize this game. But if you'll allow me... I actually know how to easily fix this problem completely, and make the game remember if the character already has his/her specials items or not. I'm sorry if all this came out as "annoying". I just really enjoy this game and I wanted to try and help. I hope that this can be at lest a little bit useful. statuschecker.lua
  9. [SOLVED] Custom speech help needed

    You can also just go to your modmain.lua and add in there this: GetPlayer = GLOBAL.GetPlayer --add this line only if you don't have it in your modmain.lua already. AddPrefabPostInit("FoodHere", function(inst) if GetPlayer().prefab == "YourCharacterHere" then local function nomed (inst, eater) if eater.prefab == "YourCharacterHere" then inst:DoTaskInTime( 0.01, function(inst) GetPlayer().components.talker:Say("What you want your character to say.") end) end end inst.components.edible:SetOnEatenFn(nomed) end end) Or if you want to add this to many different food items then you use this method instead: (This one also goes to your modmain.lua) GetPlayer = GLOBAL.GetPlayer local function OnOmnomnomed(inst) local function nomed (inst, eater) if eater.prefab == "YourCharacterHere" then inst:DoTaskInTime( 0.01, function(inst) GetPlayer().components.talker:Say("What you want your character to say.") end) end end inst.components.edible:SetOnEatenFn(nomed) end AddPrefabPostInit("FoodHere", OnOmnomnomed) Then all you need to do in order to add this to more food items is to copy-paste the line " AddPrefabPostInit("FoodHere", OnOmnomnomed) " as many times as you need and place the prefab name of the food that you want on the marked spot. Example: AddPrefabPostInit("monstermeat", OnOmnomnomed) AddPrefabPostInit("carrot", OnOmnomnomed) AddPrefabPostInit("eggplant", OnOmnomnomed) and so on... This basically simply makes a different speech line appear so fast that it pushed the old one away. I hope that helps. Good luck!
  10. Character transformation

    May I ask: Is the transformation which you're trying to achieve a Character to creature transformation (like for example: Woodie to werebeaver) or is it a simple Character to character transformation? Because if it's the 2nd one then I might be able to help ya. I'm currently working on a mod with a character which can transform into many different characters, so trust me when I say that this is actually a very easy thing to do (It's just simply a bit time-consuming). So if you still need help, and are interested in me helping you out, then send me a private message (As there might be a lot to explain) and we can start from there.
  11. how to create about regen mod

    It's the "local fn = function(inst)" in your character's prefab file, in which your character's stats are. So if you'll place the line: inst.components.health:StartRegen(amount, period) below your character's stats, then that should work.
  12. If you are working on a DST mod, then yes, there are differences in coding between the "normal" DS and the DST. I would gladly help you if I could, but sadly I do not have DST to even be aware of the coding differences that would need to be made there. However, you may want to ask for help in the DST mods and tools forum section, as I'm sure you'll manage to find someone to help you there. I'm sorry that I can't be of more help.
  13. Yes, there is. But if you want to give your character the ability to start/use those items then you would need to modify them in your mod, and remove from them the "characterspecific" component. (This component is used to make an item bounded only to 1 specified character) If you want to do that, then you will need to look into the game's prefab files (in the main don't starve folder, go to data >> scripts >> prefabs) Then you will need to look for the prefab file that you want to modify and copy-paste it into your mod's folder. after you do that simply open the copy of the file that you just made and remove from it the lines: inst:AddComponent("characterspecific") inst.components.characterspecific:SetOwner("woodie") or turn them off by simply placing a " -- " in front of them like that: --inst:AddComponent("characterspecific") --inst.components.characterspecific:SetOwner("woodie") In Abigail's flower file you also will need to look for the line: if not GetPlayer() or GetPlayer().prefab ~= "wendy" then inst:Remove() end and for Wes's ballons the line: inst:DoTaskInTime(0, function() if not GetPlayer() or GetPlayer().prefab ~= "wes" then inst:Remove() end end) and remove it/turn it off as this keeps an eye on the character's prefab file and removes the item if it isn't wendy/wes. Then head to your modmain.lua and add your modified file to the PrefabFiles = { } section along with the prefab file of your character. So it should look something like that: PrefabFiles = { "YourCharacterHere", "lucy" } Then of course you can either create a custom recipe to craft those items or simply make your character start with that item (You can find in the tutorial how to do both of those so you can pick whichever you like)
  14. I actually did try to do that due to the fact that this tutorial is soooo looong. ^-^; (I actually am new to klei forums .... and... forums in general, so I'm still kinda learning how these things work XD) But I'm guessing that maybe I did something wrong, because it didn't want to work the way it should o,o; I guess I can give it another try XD And there is a table of contents at the very top. (I guess I can try to simple it down a bit more o,o) Hopefully I'll manage to make it better. Thanks for the input though! ^-^
  15. I have seen a lot of people which are still new to modding having troubles with the basic character perks, therefore I decided to create a simple tutorial showing you how to create some basic perks for your character. So if you're having trouble and are working on a mod for DS, RoG, or SW (or... all) then hopefully this could help you out at least a little bit! I know that I'm not the best modder out there, and that there can be few different ways to achieve some of these things in this tutorial, but I'm gonna focus mainly on the ways that I learned how to do them. ---------------------------------------------------------------------------------------------------------------- IMPORTANT DST mods differ in their codding from the DS, RoG, and SW. So sadly this tutorial might not help you if you're working on a DST mod. ---------------------------------------------------------------------------------------------------------------- So most of you probably are already using a basic character template, which provides you with a basic modmain.lua file, same as a starter character prefab file which already has the basic list of assets, and character stats for you to manipulate. But just in case you don't have them, then here's where you can get them: Extended Sample Character << Click In this tutorial I'll show you how to: - Set/Change your characters Health, Sanity, and hunger. - Increase/Decrease/Turn off night and dusk sanity drain or how to reverse it. - Set a HP/Sanity/Hunger regen/damage over time. - Set a HP/Sanity/Hunger regen/damage during specified time of the day. - Set a HP/Sanity/Hunger regen/damage during specified season. - Set a HP/Sanity/Hunger regen/damage from rain or while being in caves. - Set a health/sanity/hunger regern/damage from temperature. - Set a health/sanity/hunger regern/damage from moisture. - Set a sanity/health/hunger loss/gain from attacking creatures. - Set a sanity/health/hunger loss/gain from killing creatures. - Set a Sanity regern/damage by equipping an item. - Erase/Increase/Decrease an existing sanity regen/damage on an item. - Add a sanity aura heal/damage to an item/creature. -------------------------- - Change your character's basic defense/attack power/speed. - Change defense/power/speed based on the time of the day. - Change defense/power/speed based on season. - Change defense/power/speed based on rain or caves. - Change defense/power/speed based on temperature. - Change defense/power/speed based on moisture. -------------------------- - Set your character's heat and cold resistance. - Increase/Decrease the HP damage when freezing/overheating. - Make your character fragile/resistant/immune to heat/cold. - Make your character immune to fire. - Turn your character into a monster or make it "not scary to prey". - Make the spiders/merm ignore your character (if unbothered). -------------------------- - Set/Change what your character can/can't eat. - Change the amount of sanity/health/hunger that a specified food gives. - Create a custom food type/group for your character. - Make an non-eatable item eatable to your character. --------------------------- - Give your character starting inventory items. - Make your character always start with a certain custom item (even in adventure mode). - Give your character a night vision/glow. - Unlock recipes for your character. - Change existing recipes. - Give your character custom recipes for existing items. - Remove the sanity gain/loss from picking flowers. - Mute your character. - Make your character unable to trigger spiders when walking on their webs. (All of the sections are in the same order as in the list above) BTW, I know that you'll see me repeat the same things many times in this tutorial, but that's just because I made it for people to be able to head right away to the section that they care to learn, without needing to read the whole thing. So I'm sorry if you'll find that annoying. Anyways, let's start! ========================================================================= Health / Sanity / Hunger ========================================================================= --=====BASIC=====-- -- Set/Change the character's basic stats -- -- Increase/Decrease/Turn off night & dusk sanity drain or reverse it -- --=====REGEN/DAMAGE BASED ON TIME OR SEASON=====-- -- Set a HP/Sanity/Hunger regen/damage over time -- -- Set a HP/Sanity/Hunger regen/damage during specified time of the day -- -- Set a HP/Sanity/Hunger regen/damage during specified season -- --=====REGEN/DAMAGE BASED ON LOCATION OR RAIN=====-- -- Set a HP/Sanity/Hunger regen/damage from rain or while being in caves -- --=====REGEN/DAMAGE BASED ON TEMPERATURE OR MOISTURE=====-- -- Set a health/sanity/hunger regern/damage from temperature -- -- Set a health/sanity/hunger regern/damage from moisture -- --=====REGEN/DAMAGE BASED ON KILL OR ATTACK=====-- -- Set a sanity/health/hunger loss/gain from attacking creatures -- -- Set a sanity/health/hunger loss/gain from killing creatures -- --=====REGEN/DAMAGE BASED ON ITEMS OR CREATURES=====-- -- Set a sanity regern/damage by equipping an item -- -- Erase/Increase/Decrease an existing sanity regen/damage on an item -- -- Add a sanity aura heal/damage to an item/creature -- ========================================================================= Defense / Attack power / Speed ========================================================================= --=====BASIC=====-- -- Change your character's basic defense/attack power/speed -- --=====INCREASE/DECREASE BASED ON TIME OR SEASON=====-- -- Change defense/power/speed based on the time of the day -- -- Change defense/power/speed based on season -- --=====INCREASE/DECREASE BASED ON LOCATION OR RAIN=====-- -- Change defense/power/speed based on rain or caves -- --=====INCREASE/DECREASE BASED ON TEMPERATURE OR MOISTURE=====-- -- Change defense/power/speed based on temperature -- -- Change defense/power/speed based on moisture -- ========================================================================= Sensibility / Numbness / Characteristics ========================================================================= --=====BASIC=====-- -- Set your character's heat and cold resistance -- -- Increase/Decrease the HP damage when freezing/overheating -- --=====FRAGILE / IMMUNE=====-- -- Make your character fragile/resistant/immune to heat/cold -- -- Make your character immune to fire -- -- Turn your character into a monster or make it "not scary to prey" -- -- Make the spiders/merm ignore your character (if unbothered) -- ========================================================================= Food ========================================================================= --=====BASIC=====-- -- Set/Change what your character can/can't eat -- -- Change the amount of sanity/health/hunger that a specified food gives -- --=====CUSTOM=====-- -- Create a custom food type/group for your character -- -- Make an non-eatable item eatable to your character -- ========================================================================= Starter inventory / Night vision / Recipes / Other ========================================================================= --=====ITEMS=====-- -- Give your character starting inventory items -- -- Make your character always start with a certain custom item (even in adventure mode) -- --=====CHARACTER=====-- -- Give your character a night vision/glow -- --=====RECIPES=====-- -- Unlock recipes for your character -- -- Change existing recipes -- --=====CUSTOM=====-- -- Give your character custom recipes for existing items -- --=====OTHER=====-- -- Remove the sanity gain/loss from picking flowers -- -- Mute your character -- -- Make your character unable to trigger spiders when walking on their webs -- ========================================================================= And that would be the end of this tutorial. It took me 5 days to compose all this, so I really hope that at least some of you might find it helpful. However, if any of this parts/sections confused you, then please feel free to ask me whatever it is that you didn't understand, and I'll try to explain it differently to hopefully help you out. Also: Please, do not ask any questions that have nothing to do with this tutorial (nor anything it shows) in here. (Just trying to avoid unnecessary mess) ^^;