Don't Starve Together

Don't Starve Together

Not enough ratings
Poison [ABANDONED]
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
305.739 KB
Jul 20, 2018 @ 2:23pm
Oct 28, 2018 @ 7:01pm
6 Change Notes ( view )

Subscribe to download
Poison [ABANDONED]

Description
Hello!

This mod is obsolete since a while now. Sorry for those that like the mechanic. If you want you can copy the mod and publish it. Do note that the mod is apparently causing crashes with killer bees. I also believe Webber's rework messed up with the code, so you might want to look into those first.

KNOWN ISSUES
  • Killer bees crash the game or game crashes.

This is more or less a port of the poison mechanic from Shipwrecked. And is a bit closer to an API than a full mod, so feel free to use it to make your monsters apply poison, and to make poison immune armor.

Most mobs can be poisoned, some exceptions include the Ancient Fuelweaver, all shadow creatures, WX-78, rock lobsters and chess robots.

There is physical poison and gas poison.

The entities that can deal physical poison are
  • Killer bee.
  • Spider queen.
  • Hanging spider (white cave spider).
  • Webber. They will also apply poison through blow darts and weapons.
  • Poison spiders.

The entities that can deal gas poison are
  • Toadstool's spore cloud.
  • Napsack's sleep cloud

Items that can protect you from physical poison
  • Snurtle shell armor.
  • Slurtle shell helmet.
  • Marble armor.
  • Wigfrid's helmet.

Mobs that are immune to physical poison
  • Klaus.
  • Toadstool.

Items that can protect you from gas poison
  • Garland.
  • Beekeeper hat.

Mobs that are immune to gas poison
  • Leif.
  • Lureplant.
  • Glommer.

The mod also adds

4 new items

  • Venom gland. Killer bees and hanging spiders have a chance to drop it on death; 25% and 33% chance respectively; and the spider queen is guaranteed to drop 2 on death. Used to heal yourself from venom at the cost of health (you cannot die from it), also used in the crafting of antivenom and poison darts.
  • Antivenom. Crafted with 1 venom gland, 3 green caps, and 2 beard hair. Used to heal yourself from venom and gives you immunity to it for a short time after consumption.
  • Green feather. Sometimes dropped by green parrots (50% chance), used to make poison darts.
  • Poison darts. Deals physical poison on enemies; is crafted with 2 cut reeds, 1 venom gland, and 1 green feather. If parrots are turned off, it will require 1 jet feather instead of 1 green feather.

2 new mobs

  • Green parrot. A new bird that has 50% chance to drop a green feather on death. They spawn on summer instead of red birds similar to snow birds on winter. Can be tweaked to not appear in
  • Poison spider. A venomous spider that poisons on hit. Has 800 health, deals 20 damage, attacks every 4 seconds, and has the same speed as a spider warrior. They can spawn from level 3 spider dens (a minimum of 3), or by spider queens (33% chance every time the spider queen spawns a spider). On death they drop 1 item that can be monster meat (50% chance), spider gland (25% chance), and venom gland (25% chance). They are more likely to drop a venom gland if killed while haunted.

While poisoned, entity does 10% less damage, moves 10% slower, and if it's a player, loses sanity over time and has a faster hunger rate. Poison wears off by itself after 3 regular in-game days (or 24 minutes), but beware, the longer you stay poisoned, the faster and more damage it will deal over time. When bubbles appear on a poisoned target it means they received damage from poison, although barely noticeable: the size of bubbles indicates the poison stage. Total damage is 284.

If you want to use this mod as an API:
For the following functions there is no need to verify if this mod is enabled:
  • If you want to make your entity poisonable just add any of the following tags: smallcreature, largecreature, character, monster, animal, veggie, baby, or player. If the player has your mod and this mod enabled, your creatures should be poisonable; no need to verify if this mod is enabled or not.
  • If you don't want your entity to be poisonable just add any of the following tags: spider, bee, explosive, worm, shadowchesspiece, chess, nightmarecreature, shadowcreature, or rocky. If the player has your mod and this mod enabled, your creatures should be not be poisonable even if it has any of the tags before; no need to verify if this mod is enabled or not.
For the following functions you will need to verify if this mod is enabled:
  • If you want to make your creature to be immune to poison or your equippable item protect from poison:
    entity:AddComponent("poisonblocker") --To be immune to or protect from physical poison you use this code entity.components.poisonblocker.ispoisonblocker = true --To be immune to or protect from gas poison you use this code entity.components.poisonblocker.ispoisongasblocker = true --You can also use both in order to make your creature immune to both poisons or your equippable to protect from both poisons, but if you want to make your creature immune to both poisons I highly recommend just using 1 of the non-poisonable tags
  • If you want to make your creature immune to any poison for a short while (a buff, a protection, or something else), you can use the following code right where the immunity begins: entity.components.poisonable.isimmune = true; and then set it to false once the immunity is over.
  • If you want your item to heal from poison:
    local function PoisonHealingFunction(entity, targetToHeal) entity.components.poisonhealer:CurePoison(targetToHeal) end entity:AddComponent("poisonhealer") --If you want to heal on consumption entity.components.edible.oneaten = PoisonHealingFunction --If you want to heal on equip entity.components.equippable:SetOnEquip(PoisonHealingFunction)
  • If you want your creatures or weapons to deal poison you can do the following:
    local function PoisoningFunction(entity, data) local other = data.target if other.components.poisonable and other.components.poisonable.ispoisoned = false then --If you want to apply physical poison other.components.poisonable:Poison() --If you want to apply gas poison other.components.poisonable:Poison(true) --You can "apply" both poisons. Though I haven't tried it myself yet, I am almost sure it will not stack; it will apply one or the other, but not one on top of the other. It's good to make a creature or weapon that is guaranteed to poison unless you are immune or protected from both poisons end end --For creatures you should use onhit event entity:ListenForEvent("onhitother", PoisoningFunction) --For weapons you should use SetOnAttack entity.components.weapon:SetOnAttack(PoisoningFunction)

Hope that helps in case you want to use this mod for your modding needs.

TODO

I will keep this list for any possible modder that might want to take the mod and make their own, for inspiration

  • Make poisoned enemies drop spoiled food on death.
  • Make Woodie immune to poison while he is in his were-forms.
  • Considering to change poison damage to be health based as right now it deals too little damage in too long of a time.
  • Add speaking lines for each character about all the items added.
  • Add poisoned frogs (suggested by Majoras11235813).
  • Update green parrots visuals because it looks ugly.

Have fun!
15 Comments
nobody Dec 16, 2022 @ 5:52am 
make this mod better please
cortes-e  [author] Jun 26, 2022 @ 12:01am 
BTW, I have not looked at the code, but I believe the crash is likely caused because of conflict between how poison spiders are spawned by the spider queen, and the new nurse spiders added during the Webber re-work. Perhaps even with Webber. Or a conflict with how the tag system, if I remember correctly there is a limit on how many tags something can have, and this mod gives tags to most entities with health, but Klei has been updating the game for a while, so a ther is good chance an entity has more tags than the system can handle.
cortes-e  [author] Jun 26, 2022 @ 12:01am 
Hello! @WolFortune, @TheGoldenDonut_ and @Majoras11235813. I know it's a bit late to respond to you 2, but It's been a while since I updated this mod (nearly 4 years!). And I am not really in the mindset to update it anymore (I barely log in to Steam TBH, let alone DST). Sorry for the inconvenience.

However, feel free to copy this mod as is, upgrade whatever you want, and publish it. You can also ask any modder to update it for you. Hopefully my bad code is easily readable and optimizable. If you do so, don't forget to leave a link in this page for others to use.
☆ mahjongler ☆ May 12, 2022 @ 10:24pm 
Pls ya can add poisonous frogs?
WolFortune Mar 15, 2022 @ 6:27pm 
Crashed :( really like this mechanic, the mod crash running alone
JaccK1618 Dec 20, 2020 @ 6:56pm 
Oh nvm
JaccK1618 Dec 20, 2020 @ 5:59pm 
mod crashes when killer bees come
cortes-e  [author] Oct 28, 2018 @ 7:10pm 
@Jackington Hey, I couldn't get the list of mods you are using as you are friend-locked (sent you a friend request, but never accepted). I have released an update that might fix your issue nonetheless. Let me know if it worked or if it throws another issue... .
Jackington Oct 21, 2018 @ 3:37am 
Sure Can mate, my collection is too big to list here but its on my workshop collection
cortes-e  [author] Oct 21, 2018 @ 1:14am 
@Jackington I see. I think I know what the problem may be. Will start working on a fix by next week. Can I have a list of the other mods you are using?