• Content Count

  • Joined

  • Last visited

Community Reputation

45 Excellent

About Combustiblemon

  • Rank
    Junior Member

Recent Profile Visitors

260 profile views
  1. It's been 10 days after iOS version of DS:PE got update but no signs of Android one. How long we have to wait to get update of Android version? Of course I know Klei is busy now about updating other ports of DS, DST, etc... But still I'm curious about release date.
  2. finally!!!!!!!!!!!!!!!!!!!!!!!!!!! it's here!!!!!!!!!!!!!!!!!!!!!! now i wait for android!!!!!!!!!!!!!!!!!!!!!
  3. local function WelnyelOnEat(inst) This line, should be: local function WelnyelOnEat(inst, data) this one. if inst.food_counter ~= nil then inst.food_counter = 0 --this creates and initializes the food_counter variable if there isn't one already end Also this one keeps initializing if food_counter exists. I think that's typo. if inst.food_counter == nil then inst.food_counter = 0 --this creates and initializes the food_counter variable if there isn't one already end This will work. I didn't knew function does initialize counter, you can just delete "inst.food_counter = 0" in onload or common_postinit.
  4. adding "inst.food_counter = 0" on local function onload should work then.
  5. You have to add "inst.food_counter = 0" in your character's common_postinit.
  6. 1. idk anything about foodaffinity, but if you use foodaffinity with upper codes, you will have effect on fourth food, because function(that adds foodaffinity) will called after you actually eat and affected by something. so you'd better use: local food = local foodhunger = food.components.edible:GetHunger(inst)/2 inst.components.hunger:DoDelta(foodhunger) on that code, because it will add extra 50% hunger of original food to your character. 2. Counter does resets, if inst.food_counter == 3 then -- once we hit 3, we need to apply the bonus When this line is called(=means it is third food you eat), inst.food_counter = 0 --we reset the counter afterwards this line will reset food_counter to zero (@QuartzBeam kindly added remarks each line), and if you follow my lines wrote in upper section, it would work without problems because bonus hunger will 'added' when only food_counter is 3. But if you really want to use foodaffinity, you would want to make another line that removes foodaffinity on next eat so bonus will not work everytime you eat. 3. Instead of listenforevent, you can just add this line. inst.components.eater.oneatfn = MyCharacterOnEat
  7. Then maybe you could force-add owner that will not reset on dropped or removed to item? like adding these codes: local function onequip(inst, owner) inst._owner = owner --codes end local function ondrop(inst) if inst._owner then --codes inst._owner = nil end end local function onremoved(inst) inst._owner = nil end
  8. item will(probably?) remember it's owner. you could access it by: inst.components.inventoryitem.owner so code will be like: local function OnDropLostInsulation(inst) local owner = inst.components.inventoryitem.owner or nil if owner == nil then print("oopsie") return end --codes about losing insulation end ============================================ inst.components.inventoryitem:SetOnDroppedFn(OnDropLostInsulation)
  9. more interesting cooking mechanic like the gorge. or rework crock pot(I'm not talking about rebalancing dishes, I want total overhaul). also nerf the p o t a t o e s
  10. onequip and onunequip should be out of function fn I guess?
  11. for current amount, inst.components.sanity.current This will give you current sanity. inst.components.sanity:GetPercent() Also this will return percentage of your sanity (if you have sanity of 50% => returns 0.5). inst.components.sanity:GetPercentWithPenalty() And this one will return percent but calculates with max sanity penalty, like Maxwell summoned shadows or somehow you made changes with max sanity. Example) if you have 150 max sanity and have penalty of 50(so effectively max is 150-50=100 now) and current sanity is 50, then using GetPercentWithPenalty will return 0.5(50/100), but GetPercent will not regard penalty and will return 0.33(50/150). So you could use one of these codes. 1. if inst.components.sanity and inst.components.sanity.current >= 100 then --codes end 2. if inst.components.sanity and inst.components.sanity:GetPercent() >= 0.66 then --codes end 3. if inst.components.sanity and inst.components.sanity:GetPercentWithPenalty() >= 0.66 then --codes end
  12. local function HealthDeltaPlus(inst, amount, overtime, cause, ignore_invincible, afflicter, ignore_absorb) if not ignore_invincible and (self.invincible or self.inst.is_teleporting) then return 0 elseif amount < 0 and not ignore_absorb then amount = amount * math.clamp(1 - (self.playerabsorb ~= 0 and afflicter ~= nil and afflicter:HasTag("player") and self.playerabsorb + self.absorb or self.absorb), 0, 1) * math.clamp(1 - self.externalabsorbmodifiers:Get(), 0, 1) * 1.5 end local old_percent = + amount, cause, afflicter) local new_percent = inst:PushEvent("healthdelta", { oldpercent = old_percent, newpercent = new_percent, overtime = overtime, cause = cause, afflicter = afflicter, amount = amount }) if ~= nil then, old_percent, new_percent) end return amount end ================================ = HealthDeltaPlus You're right, absorb/playerabsorb/externalmodifiers can only "absorb" damage(because they has math.clamp), so I had to redirect entire healthdelta.
  13. maybe this? absorb and playerabsorb are deprecated, as written in health.lua.
  14. Instead of uploading as hidden, you could upload mod as friends-only in workshop to use together with friends, without sending mod files to them. and thank you for using hidden/friends-only to upload mods. seriously i never seen someone uploading private mods in hidden(because it is hidden lol).
  15. Do they regrow? I never heard about that. and why they are not re-plant-able for decoration purpose