Skip to content

Conversation

@TheSaddestGoomba
Copy link
Contributor

@TheSaddestGoomba TheSaddestGoomba commented Apr 1, 2025

Summary

Content "Add household pesticide spray cans"

Purpose of change

Spray cans of pesticide are a common household item but are currently absent in game.

Describe the solution

Create a 'spray can of pesticide' item. Place it in the world.
It is based on the existing 'spray can' item that here is renamed to 'spray paint can'
Using it runs an EOC that prompts the player for an adjacent tile and places a field there. The field used is the existing "insecticidal mist" that is already used by the chemical thrower and insecticide gas grenades. The HP reducing effect is hardcode tied to that field_id. The same EOC removes the field after a 1 second delay

The field_id is edited to apply "insecticide in eyes", "insecticide in mouth", and "poison" effects, all taking env_resistance into account.

Seed the item into appropriate item_groups and mapgen.

Describe alternatives you've considered

Adjusting the ammo count, effectiveness, etc.

Testing

The item spawns in debug no problem.
'use' action EOC functions and spawns the desired field, and clears the field a second later.
Ammo count and duration of the gas field both feel comparable to IRL.

Combat tests feel appropriate:

  • 'oversized wasp' can be killed with the item (2-3 sprays).
  • 'oversized cockroaches' likewise take 2-3 sprays.
  • 'giant dragon flies' and 'oversized mantises' barely survived a whole can.
  • 'giant wasp' may lose from 1/2 to 2/3's HP from an entire can and will probably kill you before you even could.
  • 'oversized ant' 1 or 2 sprays depending on exposure.
  • 'giant ant' was similar to the 'giant wasp' but more consistent due to lower mobility.
  • 'super soldier ant'... lol, no. You might as well be spritzing it with water. A full can barely left a mark.

I'm pleased with the state of the item. The above examples hold true for using the item "effectively".
It could be a life-saver early on against the weakest oversized bugs but falls off quickly as the targets get larger. It is also suitably difficult to use properly in a fight. More mobile creatures will take less damage, and ones that flee will be impossible to keep in the gas to finish them off.

Tested item spawn by upping the probability and porting around the map through debug.
Spawning is functioning, although rarer than I would like with the final probabilities. I'm going to leave the numbers as they are for this PR, as I expect they are more frequent than my testing indicates due to hidden items in furniture and containers.

Additional context

Item placements include hardware stores, home garages, janitor's closets, farm chemicals, and trash

@github-actions github-actions bot added [JSON] Changes (can be) made in JSON [C++] Changes (can be) made in C++. Previously named `Code` Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves EOC: Effects On Condition Anything concerning Effects On Condition astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions Spawn Creatures, items, vehicles, locations appearing on map labels Apr 1, 2025
@TheSaddestGoomba TheSaddestGoomba marked this pull request as ready for review April 1, 2025 22:17
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Apr 2, 2025
@Maddremor
Copy link
Contributor

Why would a household bug spray have an effect on animals that are 10kg at minimum?

@Milopetilo
Copy link
Contributor

You might also want to add these to SUS_kitchen_sink so houses have bug spray.

@TheSaddestGoomba
Copy link
Contributor Author

These sprays are more than the simple soapy water method that suffocates insects by blocking their spiracles. It's a combination of neurotoxin and boric acid, typically. Wasp and hornet formulas usually add a paralytic as well but I'm keeping this simple and more generic.

The monsters that it affects most strongly are still small enough to completely saturate with a neurotoxin designed for them. The larger creatures are already much more resilient due to their HP.

@github-actions github-actions bot removed the BasicBuildPassed This PR builds correctly, label assigned by github actions label Apr 2, 2025
@ADekema
Copy link

ADekema commented Apr 2, 2025

I think that household bugspray is a good adition to the game to be a source of chemicals and insecticide. I doubt that spraying a insect the size of a small dog or cat is going to do much. Most likely you would either have to motify the thing into a weak gas grenade that releases all the spay at once so the insect gets a good wif of it, or you would need to spray it on an arrow and shot the arrow into the insect so that the toxin get´s into it´s blood.

@Rabadash94
Copy link

Even if the bug spray isn't fatal due to the weight of the bugs, it should still serve as a repellent and keep them away for some time. Perhaps a few tiles from the point where it's applied. This could be useful in many situations, and even for making some traps.

@kevingranade
Copy link
Member

The lethality seems quite high to me, this stuff is at its intended "quick kill" effectiveness when you absolutely douse the target with it, dropping that dosage by an order of magnitude or more seems like it would make it wildly ineffective.

Possibly a starting point would be setting the cloud of gas it produces to disperse even faster, i.e. a half life of 1 leading to it essentially dissipating immediately. This also better reflects how these things work, they don't emit a cloud of gas that lingers for several seconds, they disperse immediately.

In that vein though, "fogger" insecticide cans also exist that ARE intended to saturate an entire room with insecticide, might be worth looking into.

@TheSaddestGoomba TheSaddestGoomba marked this pull request as draft April 3, 2025 19:59
@TheSaddestGoomba
Copy link
Contributor Author

I'm reverting to draft while I work on some changes to, hopefully, make this JSON only.

The original intention was for the ”spray can of insecticide” to simply use the existing insecticidal_gas object, thereby applying all of the same effects.
That did not work out as changing field duration (afaik) requires a new field object, which requires adding that new field to the existing hardcoded effects. On top of that, the existing field represents a cloud of fumigant not a direct spray. Not a good approach.

Instead, I’m going to implement all effects through JSON. Characters will be poisoned through exposed eyes and/or mouth, plus blinding, coughing, irritation, etc.
Monsters and post-threshold mutants will take damage while in the field, at the moment I plan to base the damage numbers on the hardcoded functions.

Addressing efficacy on embiggened bugs, I certainly expect that a larger insect would require a larger dose. I feel that’s well represented here through HP alone.
Most of these sprays use pyrethroids as the active ingredient which permanently shut down neurons. The doses required are incredibly small, even relative to a tiny insect. Higher concentrations provide little benefit, so the bulk of the volume of these sprays is vehicle fluid designed to deliver the neurotoxin more quickly and effectively. They can be absorbed through the cuticle or inhaled through the spiracles that cover a large portion of insect surface area. The arthropod circulatory system (not just size) makes it a very short trip from there to the nervous tissue. It only takes a small amount of blocked neurons to disrupt motor and life functions.
Increased body size only aids resistance by increasing the distance the toxin has to travel and the number of neurons there are to be blocked. That last aspect is also limited by the tissue structure, as you don’t need to block every neuron, just enough in the chain to disrupt signaling.
Generally speaking, neurotoxins take microscopic doses to kill even large animals; they really only need macroscopic assistance in delivery. As an example, VX nerve agent has a lethal dose of less than 700 micrograms for a 200lb human.

@kevingranade
I believe the insecticide gas grenades are meant to represent foggers. That was always my impression at least.

Is it the total sum of damage you feel is too high? Would stretching the same amount out over a few seconds change anything? I could create an effect to represent a target being coated in it and absorbing the poison more slowly.
Agreed on the dispersion for the spray can. There’s some variance between patterns, usually a wide cone or a long stream but little short-lived mist. I’ll cut the duration down to a minimum. Half life 1 was too short to trigger its effect through monmove, I’ll see if attaching the effects to the field in JSON can avoid that.
A better implementation that accounts for surface coverage would likely be possible after #72271

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Apr 14, 2025
TheSaddestGoomba and others added 8 commits April 28, 2025 13:34
Co-authored-by: Milopetilo <78963720+Milopetilo@users.noreply.github.com>
Rework to run in JSON
-field now applies two effects
--one applies to eyes
--the other to the mouth
-second eoc is unfinished now but will apply additional effects based on the two field-applied effects and if the target is an 'insect'
-durations, intensities, etc. not final
Condensed everything into a single EOC that creates the emit and removes it after a 1 sec delay with a new tr_furn_transform object.

With that I was able to use the same field_id that is attached to insecticide hardcode. Removed new, now redundant field_id.

That old field_id was updated to apply the new effects and the assoc. immunity data.

Adjusted duration, Str penalty, and cough chance of effects.

Future commit will include intensity levels for the insecticide in eyes and mouth effects.
The granularity seems unneeded, field intensity handles much of this.
@kevingranade
Copy link
Member

Is it the total sum of damage you feel is too high?

Yes, it's total damage, it taking a dozen seconds instead of a few still seems off. If you do cut the duration of the field and leave the rest unchanged that should lower it plenty, if you chased a dog sized insect around spraying it constantly yes I'd expect it to have significant impact, it's just it getting re-dosed over and over again via the field lingering that I think ratchets things up too far.

If you want to be convincing about your "it's a neurotoxin so size doesn't matter" argument get me a reference that agrees with you, because it contradicts what I understand about toxins in general.

@TheSaddestGoomba TheSaddestGoomba marked this pull request as ready for review April 28, 2025 18:38
@TheSaddestGoomba
Copy link
Contributor Author

Yes, it's total damage, it taking a dozen seconds instead of a few still seems off. If you do cut the duration of the field and leave the rest unchanged that should lower it plenty, if you chased a dog sized insect around spraying it constantly yes I'd expect it to have significant impact, it's just it getting re-dosed over and over again via the field lingering that I think ratchets things up too far.

If you want to be convincing about your "it's a neurotoxin so size doesn't matter" argument get me a reference that agrees with you, because it contradicts what I understand about toxins in general.

Roger that on the damage. The newest version uses an EOC to remove the field 1 second after creating it which will limit the damage rate.

My argument was never that "size doesn't matter because it's a neurotoxin." I stated in the same comment that I expect a larger creature would be more resistant due to body mass (higher cell count), represented in-game with their higher HP.
My point was that size scaling can be tricky with regard to toxicity, with application method and the core mechanisms often having more impact on lethality than size.
Here's an NIH article that covers the mechanism of action for pyrethroids:
https://pmc.ncbi.nlm.nih.gov/articles/PMC10707950/
Another that examines the entry method (apparently cutaneous absorption is milder, inhaled is most effective):
https://pmc.ncbi.nlm.nih.gov/articles/PMC5073107/

@Maddremor
Copy link
Contributor

In practical terms, how does this compare to using a stick in terms of weaponry? Given it's a spray can you aren't getting extra range out of it, and the size of the target is 1000 times the mass at minimum. If it wouldn't work, I don't see the need for inclusion as a weapon as opposed to a chemical component.

@TheSaddestGoomba
Copy link
Contributor Author

In practical terms, how does this compare to using a stick in terms of weaponry? Given it's a spray can you aren't getting extra range out of it, and the size of the target is 1000 times the mass at minimum. If it wouldn't work, I don't see the need for inclusion as a weapon as opposed to a chemical component.

I'll start looking at how to make it 'harvestable' for the chemical component.

I don't think its comparable fitness as a weapon is really at issue. It's not intended to be weaponry per se, not any more than in real life. It should do in game what it does in real life. The real question is how should it affect the things that don't exist IRL?

I'm still searching articles for information on lethal doses for insects and the effect of size on those doses. 1000 times the body mass doesn't necessarily equate to a 1000 times increase in volume for a lethal dose. Also consider that these household sprays don't have concentrations right at a lethal dose for natural insects. They're designed for overkill to ensure an effective product.

As an example, this Raid product (https://a.co/d/1xsCGB5) has an approximate pyrethroid content of 70.2 grams, or 70,200,000 micrograms.
This fact sheet states 'as little as 0.02 micrograms [of pyrethrin] sufficient to kill a bee'. 1000 times the lethal dose given is then 20 micrograms.
https://web.archive.org/web/20150319214346/http://www.xerces.org/wp-content/uploads/2009/12/xerces-organic-approved-pesticides-factsheet.pdf

@Maddremor
Copy link
Contributor

What is the LD50 for an insect, and what is the LD50 for a human? I have a suspicion that we shouldn't have insecticide as a weapon in the game at all, just poison gas that works roughly the same for everyone living.

@TheSaddestGoomba
Copy link
Contributor Author

I've not found much clear information on the LD50 for various insects but I do know that it does vary quite a lot with species.

The LD50 for a human isn't going to tell us anything about effects on an arthropod. Pyrethroids are used because of their significantly lower toxicity to mammals. That's not just a size thing, it's anatomical differences at the macro and micro scales.

It absolutely should not have the same effect on every living thing. That is not how these chemicals work and not a good representation of the real item.

I'm not really sure why you're referring to it as a weapon or what bearing that has?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` EOC: Effects On Condition Anything concerning Effects On Condition Fields / Furniture / Terrain / Traps Objects that are part of the map or its features. Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Spawn Creatures, items, vehicles, locations appearing on map

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants