Is Chain Heal possible?

Post here about all aspects of D2 mod making whether it's information, problems or whatever. Please specify whether your post is relating to Classic D2 or the Expansion.

Moderator: Nizari

blizzardcon10
Posts: 9
Joined: Tue Jul 11, 2017 2:09 pm
Bulgaria

Is Chain Heal possible?

Post by blizzardcon10 » Sun Mar 21, 2021 7:20 pm

Hello, fellow mod makers! So here is my question: Is it possible to modify Chain Lightning so that it bounces off allies instead of enemies and heals them, if you have player World of Warcraft the shaman there has a spell called Chain Heal, so that's where I got my idea from. I can replicate the Holy Bolt's healing however I don't know how to make it target allies only, the missile is currently being killed as it hits an ally.

User avatar
Cypress
Moderator
Champion of the Light
Posts: 446
Joined: Fri Dec 01, 2017 2:08 am

Re: Is Chain Heal possible?

Post by Cypress » Mon Mar 22, 2021 3:46 pm

Not easily. As far as I can tell, Chain Lightning, Lightning Fury and Fist of the Heavens cannot be set up to target allies. As such, the only solution I can think of is:
(1) Make a missile that simultaneously spawns an invisible monster and applies aurastats to said monster which tells it what your skill level is.
(2) Give the monster an AI which only acts once and does nothing else, and set up all its stats/appearance/etc so that you cannot tell that it exists
(3) The monster immediately casts a Chain Lightning variant which targets enemies (e.g. you and your allies, since the monster is unaligned with you)
(4) This Chain Lightning variant has srcdam>1 so that it can trigger chance to cast on striking skills
(5) The monster has a monprop which gives it 100% chance to cast healing on striking, with the healing scaling based on the stat given by the aurastats from (1)
(6) You'd also want to put in some self-destructing behavior, so that these invisible monsters don't accumulate (the easiest solution is setting in monstats2.txt restore=0 so that the game doesn't bother remembering them for long).

It'd be clumsy, but it should work. If you are interested in attempting this, I can provide more advice, since I have some experience making similarly complex skills.

blizzardcon10
Posts: 9
Joined: Tue Jul 11, 2017 2:09 pm
Bulgaria

Re: Is Chain Heal possible?

Post by blizzardcon10 » Tue Mar 23, 2021 11:42 am

wow that does sound complicated.. if you could provide some more information it would be great, on the point of AI that acts only once I can only think of trap chests, perhaps a modification of that?

User avatar
Cypress
Moderator
Champion of the Light
Posts: 446
Joined: Fri Dec 01, 2017 2:08 am

Re: Is Chain Heal possible?

Post by Cypress » Tue Mar 23, 2021 9:59 pm

The trap AI wouldn't be good for this case, since it dies after casting. I think Vilemother AI would be the best, since it has a definable number of casts.

I also realized that my previous approach has a few major flaws. So instead, I recommend this system (note that when I say "intangible", I refer to a kind of monster that is invisible, size=0 and set up to only carry out very specific, hidden functions):

(1) Create a skill which produces a single missile with missile settings srvdofunc=6, hitpar1=(ID of your intangible1 monster), hitpar2=1; this creates intangible1

(2) Intangible1 uses a monseq for its skill1 anim which is as fast as possible (I like to use mode=A1, frame=0, event=1); this allows it to act very quickly

(3) Intangible1's Skill1 releases a nova that shoots out invisible missiles with srcdam=1 and with collidetype=1 (only collides with players); this allows it to interact with the player

(4) In monprops, intangible1 is given:
a. A hit-skill (ctc on striking) with srvdofunc=30 (like on curses), which uses itemtgtdo=1 such that it will make the target (the player) cast the curse on the owner (intangible1); this will give intangible1 the information it needs from the player such as skill levels and synergies
b. A hit-skill which uses an invisible Fist of the Heavens clone with itemtgtdo=1, which will again make it so the player casts the skill against the intangible1, the FOTH is set up such that it ignores all immunities; this kills intangible1 so that it can cast a ctc-on-death-skill
c. A death-skill which makes intangible1 summon a pet, intangible2: intangible2 gains all the stat information carried over by its creator intangible1, working similarly to how Hydras gain fire skill damage%/-% enemy fire res stat information from Council Members and players; intangible2 will cast the Chain Healing

(5) Intangible2 is given monprop hit-skill which casts an aurastate applying skill (srvdofunc=30 might work) which gives hpregen, with its calc set up such that the healing scales based on intangible2's stat information, which it gained by the transfer from player to intangible1 to intangible2; this enables the actual healing part of Chain Healing

(6) Intangible2 quickly (via a very fast monseq) releases a Chain Lightning clone with srcdam=1 so that it can trigger ctc; this triggers the healing on everything it hits

(7) Intangible2 uses vilemother AI, which can be given a limited number of casts, in our case set it to only cast once (look up the AI compendium for more information on this AI); this will let it cast Chain Healing only once

Logically, this system should work, although a lot of the minute details will need fine-tuning. I also posted a guide (viewtopic.php?f=4&t=67101) which should explain some of the implementation in better detail, although it's only somewhat related to your skill (it mostly covers intangibles in general). If there are still some parts that aren't quite clear, just let me know, it'll help out with re-writing my guide as well.

Return to “General Mod Making”