Jump to content

Recommended Posts

Hi to anyone reading this thread, am hoping you could help me out somehow. Relatively new to coding. Two questions:

1.) There's a lot of prefabs in in DST/databundles/scripts. Where can I find the cooked food items? Could only locate veggies so far.

2.) With watermelon, you use the edible.temperaturedelta and duration to set a small chill buff. Jellybeans give a heal over time of sorts. How would I go about doing both here, but heating up instead and also healing over time:

elseif inst:HasTag("JD") then --inst is a custom use item, function is a hook from "ondrink", component is "Drinkable"
      drinker.components.locomotor:SetExternalSpeedMultiplier(drinker, "mychar_speed_mod", 1 + 3.5 )      
      drinker:DoTaskInTime(0.5, function()
      drinker.components.locomotor:RemoveExternalSpeedMultiplier(drinker, "mychar_speed_mod")end)
      ShakeAllCameras(CAMERASHAKE.SIDE, 0.5, 0.03, 1.5, inst, 40)

   -- insert jellybean heal buff and temp warm up here
    end


Would really appreciate any help with any of the above questions. Cheers!

P.S. Saw another thread about regeneration a couple posts down consider that part handled.

Edited by SourNVitriol

1)scripts/prefabs/preparedfood.lua

scripts/prefabs/meats.lua

2)

drinker.components.temperture:SetTempertureInBelly(10, 7.5) -- 10 temp in 7.5 seconds 

drinker.components.debuffable:AddDebuff("healthregenbuff","healthregenbuff") --copy paste jelly beans 

 

Edited by Argonium
  • Like 1

Thanks for the help; found the foods as well as the temperature component and saw that in there. Though I needed an instant heat up so I did a delta instead. Didn't know that temp was an inherent component to player chars so whoop.

Again, thanks for the answer, cheers!

Edited by SourNVitriol

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...