Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Good lightning or electrocution interaction?  (Read 2091 times)

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Good lightning or electrocution interaction?
« on: July 26, 2015, 02:48:09 pm »

Hey guys, I was just wondering if someone came up with a good way to simulate lightning hits or electrocuting enemies. Some sort of chain-lightning spell or similar. Best I can think of is pain+short term paralyzis, but maybe I missed a nice script or finished spell.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

smakemupagus

  • Bay Watcher
  • [CANOPENDOORS]
    • View Profile
Re: Good lightning or electrocution interaction?
« Reply #1 on: July 26, 2015, 05:22:41 pm »

I like the addition of a chance for a CE_IMPAIR_FUNCTION BY_CATEGORY:HEART, along with the pain & paralysis too, which i saw first in Dwarf Chocolate iirc.

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: Good lightning or electrocution interaction?
« Reply #2 on: July 26, 2015, 10:07:52 pm »

I've been at this for a while now and I've yet to come up with anything really good. The oldest one I used had a momentary unconsciousness effect. It didn't work out so well, because it was delivered directly as an interaction, rather than through material syndromes. So, the interaction would take place every time the game loaded a new area. An adventurer struck by lightning once in their life would spontaneously fall over and take a ten minute intermittent nap every time they dropped out of travel mode, for instance. The cycle could not be broken.

Right now, I deliver it through a material syndrome. This is the current version:

Spoiler (click to show/hide)

So paralysis, blisters, pain, and dizziness. The material template is liquid at 1 urist, and boils at 2 urists, so it effectively explodes the tick after contact. It's dispersed as a liquid glob, so as to be effective at range. And also because, as a vapor flow, it would have a higher chance (near 100%) to infect the caster than the target unless literally on top of them, and material syndrome immunities apparently don't recognize interaction syn_classes, or something. For instance, if LIGHTNING_IMMUNE is a SYN_CLASS added to the caster by the interaction or syndrome that gave them the spell, they don't get the immunity, but if it's an inherent creature class, through the [CREATURE_CLASS:x] token, they do. So, I've only been able to create an immunity the creature doesn't already have by going through a transformation into a creature that is immune, which isn't ideal. I also used a web spray in one test. Again, not good for the caster.

This doesn't cause any direct structural damage to the target on impact, just the syndrome, which is often fatal due to the paralysis in adventure mode. Might not want it set that long?
Logged
I make Spellcrafts!
I have no idea where anything is. I have no idea what anything does. This is not merely a madhouse designed by a madman, but a madhouse designed by many madmen, each with an intense hatred for the previous madman's unique flavour of madness.

Teneb

  • Bay Watcher
  • (they/them) Penguin rebellion
    • View Profile
Re: Good lightning or electrocution interaction?
« Reply #3 on: July 27, 2015, 09:27:49 am »

Putnam did this for Nchardahrk, which I later turned into an inorganic to facilitate the use of.

Spoiler (click to show/hide)
no chain effect though.

Having just seen it though, I like Eric Blank's version due to a greater range of effects, with the exception that it is pretty much non-lethal from what I can see.
Logged
Monstrous Manual: D&D in DF
Quote from: Tack
What if “slammed in the ass by dead philosophers” is actually the thing which will progress our culture to the next step?

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Good lightning or electrocution interaction?
« Reply #4 on: July 27, 2015, 10:22:51 am »

Thanks guys. These are still all interactions with the same old tags, I was mostly wondering if someone made a dfhack script or so. I know indigofenix had a thundercoil that electrocutes enemies, but I think it mostly just insta-kills them. A bit strong for what I had in mind.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Good lightning or electrocution interaction?
« Reply #5 on: July 27, 2015, 05:35:33 pm »

AFAIK the thunder coil actually spawns !!dragon fire!! randomly in a certain radius, not at all what you want.
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Good lightning or electrocution interaction?
« Reply #6 on: July 27, 2015, 11:35:23 pm »

Putnam did this for Nchardahrk, which I later turned into an inorganic to facilitate the use of.

Spoiler (click to show/hide)
no chain effect though.

Having just seen it though, I like Eric Blank's version due to a greater range of effects, with the exception that it is pretty much non-lethal from what I can see.

i... think i didn't make that? but calling the solid "electron degenerate matter" seems like my kinda style

also I tried chain lightning for my megabeast in the succession mod, it wasn't worth the trouble

that's also the last time I did raw modding and now i'm rusty, so, heh.....

Eric Blank

  • Bay Watcher
  • *Remain calm*
    • View Profile
Re: Good lightning or electrocution interaction?
« Reply #7 on: July 28, 2015, 01:11:35 am »

Having just seen it though, I like Eric Blank's version due to a greater range of effects, with the exception that it is pretty much non-lethal from what I can see.

In adventure mode time frames, the paralysis lasts long enough that any human-sized or smaller victims affected by it will suffocate. So at least then its pretty lethal. But other than that it won't cause lasting harm, no. Best used to incapacitate or slow an opponent for easier pickings.
Logged
I make Spellcrafts!
I have no idea where anything is. I have no idea what anything does. This is not merely a madhouse designed by a madman, but a madhouse designed by many madmen, each with an intense hatred for the previous madman's unique flavour of madness.

Atomic Chicken

  • Bay Watcher
    • View Profile
Re: Good lightning or electrocution interaction?
« Reply #8 on: July 28, 2015, 03:40:03 am »

Didn't Roses' wrapper script have a "chain" option for determining script targets? You might find that useful for creating chain lightning.

Maybe you could try something like this:

The "shoot chain lightning" interaction is linked to interaction-trigger such that it activates the projectile script, creating a "lightning bolt" projectile which hits the interaction target. By combining the projectile script with the wrapper script, the lightning projectile can be chained such that it hits another unit if it is within a defined radius of the first target. Using the wrapper script would also allow for "lightning-immune" creatures to not be targeted at all via the -iclass argument. The "lightning bolt" projectile can be linked to projectile-trigger so that it activates another script at the target unit, such as the spawn-flow script to spawn "lightning" at the unit's location. The lightning is your gaseous syndrome-causing material.

Or you could just eliminate the projectile altogether and chain the spawn-flow script directly using the same method. I think.
Logged
As mentioned in the previous turn, the most exciting field of battle this year will be in the Arstotzkan capitol, with plenty of close-quarter fighting and siege warfare.  Arstotzka, accordingly, spent their design phase developing a high-altitude tactical bomber. 

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Good lightning or electrocution interaction?
« Reply #9 on: July 28, 2015, 06:19:12 am »

I thought about making projectiles that have two syndromes, first one does the damage, the second one gives the ability to shoot more projectiles to targets nearby, simulating the chain-lightning element. Both get the LOCATION:IN_WATER requirements, that way it should simulate electrocuting people that stand in water.

But I'll see how well it goes.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Roses

  • Bay Watcher
    • View Profile
Re: Good lightning or electrocution interaction?
« Reply #10 on: July 28, 2015, 05:23:22 pm »

I thought about making projectiles that have two syndromes, first one does the damage, the second one gives the ability to shoot more projectiles to targets nearby, simulating the chain-lightning element. Both get the LOCATION:IN_WATER requirements, that way it should simulate electrocuting people that stand in water.

But I'll see how well it goes.

My wrapper script can handle chaining. It does this by loading a script (in this case item/projectile if we are talking about my scripts) getting the source and target, calculating all acceptable targets within a given distance (user defined) and then running the script again with the first target as the new source and the second target as the new target. As for the location requirement, I haven't currently implemented that into my wrapper script but it is planned.

Of course, as per our previous discussion, while the wrapper script should be currently usable, it is best to wait until I have uploaded the new version.
Logged

IndigoFenix

  • Bay Watcher
  • All things die, but nothing dies forever.
    • View Profile
    • Boundworlds: A Browser-Based Multiverse Creation and Exploration Game
Re: Good lightning or electrocution interaction?
« Reply #11 on: August 03, 2015, 06:08:43 am »

Depends, are you looking for realistic stop-your-heart-and-burn-to-death lightning or DND magical-damage-plus-stun lightning?

If you're looking for the second type, you can copy it from the ROTMK mod.  It stuns and does some bleeding damage and can kill after enough hits but is pretty balanced overall.  It also does extra damage to creatures with a specific class.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Good lightning or electrocution interaction?
« Reply #12 on: August 03, 2015, 07:56:03 am »

I think I'll do both, to varying degrees. ;) Thanks for the hint. :)
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::