How to make Holy Bolt pass through and affect everything?

Weekly updated column for helping skill development. Users can't directly post requests but a PM or mail can be sent to Skill-Clinician.

Moderator: Skill Clinician

Post Reply
SponTen
Posts: 13
Joined: Thu Sep 03, 2020 2:42 pm
Australia

How to make Holy Bolt pass through and affect everything?

Post by SponTen » Tue Sep 22, 2020 1:43 pm

I'm trying to make Holy Bolt functions like how it does in PoD, but I'm running into some problems. Here's the Holy Bolt line from Missiles.txt:

Code: Select all

holybolt	55	1	9	1	7																												1	heals allies?	1	"0 = all, 1 = undead, 2 = demons"					1	heals allies?	1	"0 = all, 1 = undead, 2 = demons"									20	20			50		7		222	222	255	1	0	1	HolyBoltMissile	1024	16	16					3	1	1	1		1							1										1	1	1	1			1					Holy Bolt	4																																							1			paladin_holybolt_1	paladin_holybolt_impact_1		healing												teethexplode				0
I've changed it to this:

Code: Select all

holybolt	55	1	9	1	7																												1	heals allies?		"0 = all, 1 = undead, 2 = demons"					1	heals allies?		"0 = all, 1 = undead, 2 = demons"									20	20			50		7		222	222	255	1	0	1	HolyBoltMissile	1024	16	16					3		1	1		1							1											1	1	1			1					Holy Bolt	4																																							1			paladin_holybolt_1	paladin_holybolt_impact_1		healing												teethexplode				0
It's so close, but there are a few problems:
1. It doesn't show its impact when damaging. It seems that pCltHitFunc controls the damage function, so setting to 1, for example, shows a the fireball hit, but leaving on 9 doesn't show the holy hit, and setting to 0 removes its ability to damage.
2. It can either heal or damage; if the first thing it hits is a monster, it only damages everything it hits, but if the first thing it hits is an ally, it only heals everything it hits

Is there a way to fix these two issues? It seems that pSrvHitFunc controls the healing, so I have to leave that on 7. I've played around with various numbers, but they only changes the animation, yet setting either pCltHitFunc/pSrvHitFunc to 0 removes its ability to damage/heal respectively.

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

Re: How to make Holy Bolt pass through and affect everything?

Post by Cypress » Tue Sep 22, 2020 4:32 pm

An interesting question, this is something I've planned on doing myself but I kept putting it off because I hate Holy Bolt's missile functions, but in answering this question I realized that a better solution is to NOT use the Holy Bolt missile functions at all unless you want it to only hurt specific monster types (which you do not). This is because, at least as I determined from my own tests, it seems that Holy Bolt will not do any damage/healing past the first target, regardless of collidekill=0. The only way I managed to allow that is by setting pierce=1 and making Holy Bolt apply a brief aurastate that gives item_pierce 100, but that is a subpar solution given that it is leaky and piercing only works 4 (or maybe it was 5, I can't remember) times for each missile.

What I came up with is a skill that releases two synchronous missiles (Part 2), one which does the healing (Part 3) and another which does the damage (Part 1).

(Part 1) The damage part is easy, it would work like any other damaging missile (so just fill srvmissile/cltmissile, which works with nearly any skill functions, with whatever you want to hurt something with).

(Part 2) As for making a skill shoot two synchronous missiles, use srvdofunc=8,cltdofunc=17. There are a lot of functions that allow the release of a second missile, but this one is desirable thanks to its clcs. Notable columns for this function:
srvmissilea,cltmissilea (released if you are NOT wielding a crossbow)
srvmissileb,cltmissileb (released if you ARE wielding a crossbow; so you probably want to set this to be the same as missilea)
clc1=number of missilea/b to release (note that this does not increase the number of srvmissile/cltmissile released, only srv/cltmissilea/b)
clc2=activation frame (this is how many frames must elapse before srvmissilea/b exist; without this, you will heal yourself each time you cast Holy Bolt, so increase the value by 1 frame each test until it stops healing you)

(Part 3) For the healing missile, you'll need to make use of the missile function pSrvHitFunc=18. This is what Shout uses to apply a state. How it works is whatever skill creates the missile, it will borrow auratargetstate, auralencalc and aurastats1-6. Set auralencalc=1, aurastat1=hpregen and aurastatcalc1=256*(X+rand(Y-X)), where X is the minimum amount of healing and Y is the maximum amount of healing (this emulates the healing range that Holy Bolt has).

Note that this solution still isn't quite as advanced as what PoD pulled off (I presume they just hardcoded Holy Bolt's missile functions to not ignore collidekill=0 so that it can properly pierce through all targets). The significant difference in my solution and PoD's is that you cannot really control the number of missiles (beyond 1) that are released, since srv/cltmissile and srv/cltmissilea/b are only synchronous if only one missile is released (calc1=1) since in my setup only the healing missile can have a variable number of missiles, and only one damaging missile will be released. If you do want to be able to release multiple, synchronous healing and damaging missiles, then I might be able come up with a better solution, but I'm assuming you are fine with a single missile release. If you have any questions about any part of this (I realize it is quite involved), or do want to try for multiple damaging and healing missiles, then just let me know.

SponTen
Posts: 13
Joined: Thu Sep 03, 2020 2:42 pm
Australia

Re: How to make Holy Bolt pass through and affect everything?

Post by SponTen » Wed Sep 23, 2020 5:25 am

Thanks Cypress, you always provide such useful explanations. I'll probably try the double missile approach as that seems like it would achieve what I'm looking for.

I'm not sure how GreenDude did it, because from what I've read, he says he doesn't CE at all. I really wish I could download his source files, as they'd be super handy in understanding how he's done everything.

Post Reply

Return to “Skill Clinic”