• Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Kiibie

  • Rank
    Junior Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. URGH omg, sorry, I derped hard on that one. Everything works like a dream now!! You're all the best, thanks to all of you, especially for sticking with me! I'm always here if someone wants advice or help with art in return ~
  2. Oh thanks!--- Hmmm, I tried to change it and it still does not work in game. I tried adding the repair value also, to see if this one would work and I also tried to change sewing_kit to sewingkit. The default values are 5 for all, so I thought I'd double to 10 to see a difference. AddComponentPostInit("sewing_kit", function(inst) inst.components.finiteuses:SetMaxUses( 10 * TUNING.SEWINGKIT_USES) inst.components.finiteuses:SetUses( 10 * TUNING.SEWINGKIT_USES) inst.components.sewing.repair_value = 10 * TUNING.SEWINGKIT_REPAIR_VALUE end)
  3. Aha okayy, I am indeed flying a rocket without knowing how it works I'm learning from my mistakes at the moment, at least. Well, I'm trying my best with your advice, thank you again! It can't be as simple as this in the modmain, right?: AddComponentPostInit("sewing_kit", function(self) inst.components.finiteuses:SetMaxUses( 10 * TUNING.SEWINGKIT_USES) inst.components.finiteuses:SetUses( 10 * TUNING.SEWINGKIT_USES) end) As I tried, it didn't do anything, as I thought ;o;
  4. I put it in the end of MasterPostInit, probably not supposed to be there? (no base knowledge in coding sorry for putting up with me guys;;;)
  5. Thanks a bunch guys! @ptr I was exactly looking for a way to affect all clothing, so what you suggested is perfect. I just tried it and it works like I wanted! I still tried to use the 'AddComponentPostInit' to change the duration/use of the sewing kit, and the game keeps crashing and telling me "the 'AddComponentPostInit' is not declared", obviously I am missing something. Am I supposed to hook something to declare it? With these lines of code to set the Uses: AddComponentPostInit("finiteuses", function(self) self.inst:ListenForEvent("percentusedchange", function(inst, data) local owner = nil if inst.components.inventoryitem then owner = inst.components.inventoryitem.owner end if owner and owner.prefab == "jayden" then inst.components.finiteuses:SetUses(10) end end) end)
  6. I tried to change the event for 'repair', the target to 'tophat' and it still doesn't do anything in game. No crash, it simply does not work. I'm really trying all I can, I'd be really grateful to anyone helping ;_;
  7. Hi! I've been trying to make my character mod gain sanity when using the sewing kit (or gaining sanity when holding it, at the very least). I have succeeded to make my character gain sanity upon catching fireflies, but this code does not seem to work for the sewing kit. inst:ListenForEvent( "finishedwork", function(inst, data) if(data and and"dress") then if(data.action and"SEW") then if(inst and inst.components and inst.components.sanity) then inst.components.sanity:DoDelta(20) -- amount of sanity gain here inst.components.talker:Say("It feels nice to sew after a while...") end end end end ) I tried countless times to make this work with a bunch of references from other codes, but I can't seem to make it work as easy as it seems! I think it's the 'prefab' target that is set wrong, as I want all clothing to be affected, not a specific one. Does anyone have an idea how this works?
  8. AH! After spending all day trying to change the darn duration for the glow, I succeeded!! All I want to do left is to make my character speak when eating the mushrooms. I guess we can end the thread now, as I succeeded the effects! Thanks @ZupaleX for offering your help~ ;v;/
  9. OHH. Omg I'm a potato. The fact that you have no idea what nillocal is, made me realize that it simply was that NIL and LOCAL were into one word while it should've been on two different lines. Has I fixed that, the effects work!!! Now that I tried the effects, I see that like the older post I linked, the cooldown for the blue mushroom is attributed to the Glowberry, which is 90 seconds. I wonder how I can make this shorter, like 10 sec? I don't know how to proceed to code a timer, or effective cooldown... If anyone has advice, hints or ideas about this, I'm all ears! :'D
  10. Ah! Thanks, I'll do that here! Sorry! -- Mushroom boosts local speed_task = nillocal strength_task = nillocal mushroomfns = {} mushroomfns.blue_cap_cooked = function(eater) if eater.wormlight then eater.wormlight.components.spell.lifetime = 0 eater.wormlight.components.spell:ResumeSpell() else local light = SpawnPrefab("wormlight_light") light.components.spell:SetTarget(eater) if not then light:Remove() end light.components.spell:StartSpell() end end mushroomfns.green_cap_cooked = function(eater) local key = "alice speedy mushroom" eater.components.locomotor:SetExternalSpeedMultiplier(eater, key, 1.5) if speed_task then speed_task:Cancel() end speed_task = eater:DoTaskInTime(30, function() eater.components.locomotor:RemoveExternalSpeedMultiplier(eater, key) speed_task = nil end) end mushroomfns.red_cap_cooked = function(eater) eater.components.combat.damagemultiplier = 1.5 if strength_task then strength_task:Cancel() end strength_task = eater:DoTaskInTime(30, function() eater.components.combat.damagemultiplier = 1 strength_task = nil end) end local oldoneat = inst.components.eater.oneatfn inst.components.eater.oneatfn = function(inst, food) if oldoneat then oldoneat(inst, food) end local oneaten = mushroomfns[food.prefab] if oneaten then oneaten(inst) end end And the error file is attached below! client_log.txt
  11. I succeeded in having no negative effects from the mushrooms! Though, I worked all day on trying to make the effects work to no avail. The game crashes after choosing the character and sends the error: "variation nillocal is not declared." I know this is VERY messy, as it is the first time I try to code anything, but if anything seems to be broken, I'd really love to know: *edit* Deleted the picture I took of my code
  12. Alright, thanks! I'll start checking into that, I actually was not sure where to start off without that lead. I'd say I'm pretty good so far, but it is necessary to ask coding help for me ;_; I'd help anyone with art if any pro coder need it Can I come back to you if I have a question after checking all that out?
  13. Hi! I started my first character mod and everything is going fine until I have to make 2 custom abilities! I'm bad with coding so I search threads or existing mods to help me with codes, but I can't seem to find anything up to date for what I look for. My character would have: 1- Sanity unaffected by ghosts 2- Boosting effects from mushrooms / or no bad effects from mushrooms. Now, I wanted to start with the mushroom one, and found an old topic with someone trying to achieve the same thing: link: This is two years old and even though I have been inspiring myself from the codes there, nothing seems to work for Don't Starve Together. I do have the feeling that this Alice character never came to an end or made this ability work, but as time passed I was wondering if anyone had an idea about this in the present? c: I attached the coding that was started back then, to this thread, for reference! Thank you to anyone willing to help! ~ fungusfanatic.lua