How to add melee splash damage?
Moderator: Skill Clinician
Re: How to add melee splash damage?
ok, its working, i extrated your file with a website special link.........
function is 4 8
function is 4 8
Re: How to add melee splash damage?
is it possible to modify the radius of splash with another item?
It seems impossible to put formulea in missile.txt... the only thing not numerical working is "lvl" but its not what i want (means lvl 90 you hit all the screen lol...)
I tried to put the splash stat on other item with different radius but its only working on weapons... maybe i just need to modify something in "item stat cost.txt" ?
It seems impossible to put formulea in missile.txt... the only thing not numerical working is "lvl" but its not what i want (means lvl 90 you hit all the screen lol...)
I tried to put the splash stat on other item with different radius but its only working on weapons... maybe i just need to modify something in "item stat cost.txt" ?
Re: How to add melee splash damage?
If you make any progress, please do let us know. I am working on a very similar problem here: How to add splash damage to melee and make it skill-dependent?ascar wrote: ↑Sun Sep 12, 2021 10:44 pmis it possible to modify the radius of splash with another item?
It seems impossible to put formulea in missile.txt... the only thing not numerical working is "lvl" but its not what i want (means lvl 90 you hit all the screen lol...)
I tried to put the splash stat on other item with different radius but its only working on weapons... maybe i just need to modify something in "item stat cost.txt" ?
-
- Champion of the Light
- Posts: 448
- Joined: Fri Dec 01, 2017 2:08 am
Re: How to add melee splash damage?
Hi ascar and Spectrum, you can do that with Radial Splash.
skills.txt
missiles.txt
Particular benefits of using Radial Splash:
(1) Easy to control radius, defined by aurarangecalc which allows calculations (in the examples above, I gave it a basic calc that gives more radius with strength and dexterity).
(2) Large control over how it deals damage. You can prevent it from gaining +damage% entirely if you want, making it behave kind of like Vengeance's elemental damage in that it only uses your base damage values (i.e. if you have 100 physical damage and +500% damage, your splash will still only deal 100 damage). You could prevent +damage% from applying, then re-apply only the pieces of +damage% you want. For example, you could make it so that only strength and dexterity (but not other sources of +damage% like might and fanaticism) increase splash damage.
(3) Does not use nextdelay. Melee splash that uses nextdelay is really awkward, since any other source of nextdelay will interrupt it. For example, Stormlash in a mod with Nextdelay Splash is almost worthless, since each Tornado it produces has nextdelay=25, which would prevent you from dealing melee splash for 25 frames. This also means that Nextdelay Splash can't really be given to minions or hirelings, otherwise the player will be competing with their own melee splash. Radial Splash does not have this issue, since it is instantaneous radial damage.
There are a few oddities/drawbacks as well:
(1) You can't really have a custom splash shape when using radial splash, it will always be a circular explosion from a specified point in space (in the example skills.txt given, it will spawn from the enemy attacked). Nextdelay methods can, for example, shoot out specific patterns of missiles. From playing around with Radial Splash, I think the shape feels good as long as the radius isn't absurdly huge.
(2) The way it appends +damage% is funky. It will ONLY apply +damage% IF the missile hits a target. Moreover, sources of specific +damage% versus a monster, like +damage% vs undead, will apply to everyone within radius if the target hit is of the same type. The settings I have in my above missiles.txt example is purposely made to ensure that it will hit a target almost always. As such, there are a few possibilities for what will happen. Let's take an example of 100 physical damage, +50% damage from Strength and strbonus, and +50% damage vs undead:
(a) Splash-creating missile misses. No damage is dealt, the splash isn't even created.
(b) Splash-creating missile hits nothing, detonating in the air. Only base damage is dealt: 100 damage is dealt to everything in radius.
(c) Splash-creating missile hits a non-undead target. Base damage is applied with +50% damage from strength: 150 damage is dealt to everything in radius.
(d) Splash-creating missile hits an undead target. Base damage is applied with +50% damage from strength and +50% damage vs undead: 200 damage is dealt to everything in radius, even non-undead targets.
If you decide to try out Radial Splash and notice anything odd about it or have any issues, then let me know! Also note that it obeys resultflags and hitflags, so you can prevent it from dealing hit-effects and a few other things. Preventing hit-effects would, for example, allow you to prevent it from dealing crushing blow and allow you to safely give it via ctc-on-striking without having to worry about it self-triggering.
skills.txt
Code: Select all
skill Id charclass skilldesc srvstfunc srvdofunc prgstack srvprgfunc1 srvprgfunc2 srvprgfunc3 prgcalc1 prgcalc2 prgcalc3 prgdam srvmissile decquant lob srvmissilea srvmissileb srvmissilec srvoverlay aurafilter aurastate auratargetstate auralencalc aurarangecalc aurastat1 aurastatcalc1 aurastat2 aurastatcalc2 aurastat3 aurastatcalc3 aurastat4 aurastatcalc4 aurastat5 aurastatcalc5 aurastat6 aurastatcalc6 auraevent1 auraeventfunc1 auraevent2 auraeventfunc2 auraevent3 auraeventfunc3 auratgtevent auratgteventfunc passivestate passiveitype passivestat1 passivecalc1 passivestat2 passivecalc2 passivestat3 passivecalc3 passivestat4 passivecalc4 passivestat5 passivecalc5 passiveevent passiveeventfunc summon pettype petmax summode sumskill1 sumsk1calc sumskill2 sumsk2calc sumskill3 sumsk3calc sumskill4 sumsk4calc sumskill5 sumsk5calc sumumod sumoverlay stsuccessonly stsound stsoundclass stsounddelay weaponsnd dosound dosound a dosound b tgtoverlay tgtsound prgoverlay prgsound castoverlay cltoverlaya cltoverlayb cltstfunc cltdofunc cltprgfunc1 cltprgfunc2 cltprgfunc3 cltmissile cltmissilea cltmissileb cltmissilec cltmissiled cltcalc1 *cltcalc1 desc cltcalc2 *cltcalc2 desc cltcalc3 *cltcalc3 desc warp immediate enhanceable attackrank noammo range weapsel itypea1 itypea2 itypea3 etypea1 etypea2 itypeb1 itypeb2 itypeb3 etypeb1 etypeb2 anim seqtrans monanim seqnum seqinput durability UseAttackRate LineOfSight TargetableOnly SearchEnemyXY SearchEnemyNear SearchOpenXY SelectProc TargetCorpse TargetPet TargetAlly TargetItem AttackNoMana TgtPlaceCheck ItemEffect ItemCltEffect ItemTgtDo ItemTarget ItemCheckStart ItemCltCheckStart ItemCastSound ItemCastOverlay skpoints reqlevel maxlvl reqstr reqdex reqint reqvit reqskill1 reqskill2 reqskill3 restrict State1 State2 State3 delay leftskill repeat checkfunc nocostinstate usemanaondo startmana minmana manashift mana lvlmana interrupt InTown aura periodic perdelay finishing passive progressive general scroll calc1 *calc1 desc calc2 *calc2 desc calc3 *calc3 desc calc4 *calc4 desc Param1 *Param1 Description Param2 *Param2 Description Param3 *Param3 Description Param4 *Param4 Description Param5 *Param5 Description Param6 *Param6 Description Param7 *Param7 Description Param8 *Param8 Description InGame ToHit LevToHit ToHitCalc ResultFlags HitFlags HitClass Kick HitShift SrcDam MinDam MinLevDam1 MinLevDam2 MinLevDam3 MinLevDam4 MinLevDam5 MaxDam MaxLevDam1 MaxLevDam2 MaxLevDam3 MaxLevDam4 MaxLevDam5 DmgSymPerCalc EType EMin EMinLev1 EMinLev2 EMinLev3 EMinLev4 EMinLev5 EMax EMaxLev1 EMaxLev2 EMaxLev3 EMaxLev4 EMaxLev5 EDmgSymPerCalc ELen ELevLen1 ELevLen2 ELevLen3 ELenSymPerCalc aitype aibonus cost mult cost add
radialsplash 400 splash 2+(stat('strength'.accr)+stat('dexterity'.accr))/200 1 2 none SC SC xx 1 1 1 7 5 0 1 1 0
Code: Select all
Missile Id pCltDoFunc pCltHitFunc pSrvDoFunc pSrvHitFunc pSrvDmgFunc SrvCalc1 *srv calc 1 desc Param1 *param1 desc Param2 *param2 desc Param3 *param3 desc Param4 *param4 desc Param5 *param5 desc CltCalc1 *client calc 1 desc CltParam1 *client param1 desc CltParam2 *client param2 desc CltParam3 *client param3 desc CltParam4 *client param4 desc CltParam5 *client param5 desc {filtered} *server hit calc 1 desc {filtered} *server hit param1 desc {filtered} *server hit param2 desc {filtered} *server hit param3 desc CHitCalc1 *client hit calc1 desc cHitPar1 *client hit param1 desc cHitPar2 *client hit param2 desc cHitPar3 *client hit param3 desc DmgCalc1 *damage calc 1 dParam1 *damage param1 desc dParam2 *damage param2 desc Vel MaxVel VelLev Accel Range LevRange Light Flicker Red Green Blue InitSteps Activate LoopAnim CelFile animrate AnimLen AnimSpeed RandStart SubLoop SubStart SubStop CollideType CollideKill CollideFriend LastCollide Collision ClientCol ClientSend NextHit NextDelay xoffset yoffset zoffset Size SrcTown CltSrcTown CanDestroy ToHit AlwaysExplode Explosion Town NoUniqueMod NoMultiShot Holy CanSlow ReturnFire GetHit SoftHit KnockBack Trans Qty Pierce SpecialSetup MissileSkill Skill ResultFlags HitFlags HitShift ApplyMastery SrcDamage Half2HSrc SrcMissDmg MinDamage MinLevDam1 MinLevDam2 MinLevDam3 MinLevDam4 MinLevDam5 MaxDamage MaxLevDam1 MaxLevDam2 MaxLevDam3 MaxLevDam4 MaxLevDam5 DmgSymPerCalc EType EMin MinELev1 MinELev2 MinELev3 MinELev4 MinELev5 Emax MaxELev1 MaxELev2 MaxELev3 MaxELev4 MaxELev5 EDmgSymPerCalc ELen ELevLen1 ELevLen2 ELevLen3 HitClass NumDirections LocalBlood DamageRate TravelSound HitSound ProgSound ProgOverlay ExplosionMissile SubMissile1 SubMissile2 SubMissile3 HitSubMissile1 HitSubMissile2 HitSubMissile3 HitSubMissile4 CltSubMissile1 CltSubMissile2 CltSubMissile3 CltHitSubMissile1 CltHitSubMissile2 CltHitSubMissile3 CltHitSubMissile4 EOL
splash 706 1 1 44 2 255 255 255 1 0 0 null 1024 1 16 3 1 1 1 3 1 1 1 5 8 128 32 0
(1) Easy to control radius, defined by aurarangecalc which allows calculations (in the examples above, I gave it a basic calc that gives more radius with strength and dexterity).
(2) Large control over how it deals damage. You can prevent it from gaining +damage% entirely if you want, making it behave kind of like Vengeance's elemental damage in that it only uses your base damage values (i.e. if you have 100 physical damage and +500% damage, your splash will still only deal 100 damage). You could prevent +damage% from applying, then re-apply only the pieces of +damage% you want. For example, you could make it so that only strength and dexterity (but not other sources of +damage% like might and fanaticism) increase splash damage.
(3) Does not use nextdelay. Melee splash that uses nextdelay is really awkward, since any other source of nextdelay will interrupt it. For example, Stormlash in a mod with Nextdelay Splash is almost worthless, since each Tornado it produces has nextdelay=25, which would prevent you from dealing melee splash for 25 frames. This also means that Nextdelay Splash can't really be given to minions or hirelings, otherwise the player will be competing with their own melee splash. Radial Splash does not have this issue, since it is instantaneous radial damage.
There are a few oddities/drawbacks as well:
(1) You can't really have a custom splash shape when using radial splash, it will always be a circular explosion from a specified point in space (in the example skills.txt given, it will spawn from the enemy attacked). Nextdelay methods can, for example, shoot out specific patterns of missiles. From playing around with Radial Splash, I think the shape feels good as long as the radius isn't absurdly huge.
(2) The way it appends +damage% is funky. It will ONLY apply +damage% IF the missile hits a target. Moreover, sources of specific +damage% versus a monster, like +damage% vs undead, will apply to everyone within radius if the target hit is of the same type. The settings I have in my above missiles.txt example is purposely made to ensure that it will hit a target almost always. As such, there are a few possibilities for what will happen. Let's take an example of 100 physical damage, +50% damage from Strength and strbonus, and +50% damage vs undead:
(a) Splash-creating missile misses. No damage is dealt, the splash isn't even created.
(b) Splash-creating missile hits nothing, detonating in the air. Only base damage is dealt: 100 damage is dealt to everything in radius.
(c) Splash-creating missile hits a non-undead target. Base damage is applied with +50% damage from strength: 150 damage is dealt to everything in radius.
(d) Splash-creating missile hits an undead target. Base damage is applied with +50% damage from strength and +50% damage vs undead: 200 damage is dealt to everything in radius, even non-undead targets.
If you decide to try out Radial Splash and notice anything odd about it or have any issues, then let me know! Also note that it obeys resultflags and hitflags, so you can prevent it from dealing hit-effects and a few other things. Preventing hit-effects would, for example, allow you to prevent it from dealing crushing blow and allow you to safely give it via ctc-on-striking without having to worry about it self-triggering.
Re: How to add melee splash damage?
Interesting post Cypress!
Resultflags/Hitflags seem woefully under-documented though. Skills.txt fileguide contains little info about them.
In your non-missile skill guide I see that
Okay, is there a reference for these resultflags/hitflags somewhere ?
Thank you for your time Cypress.
Resultflags/Hitflags seem woefully under-documented though. Skills.txt fileguide contains little info about them.
In your non-missile skill guide I see that
Code: Select all
resultflag=32 prevents quite a few effects from being applied, like ctc on striking and crushing blow
Thank you for your time Cypress.
-
- Champion of the Light
- Posts: 448
- Joined: Fri Dec 01, 2017 2:08 am
Re: How to add melee splash damage?
Hi eleriaqueen, there is now: https://d2mods.info/forum/viewtopic.php?f=4&t=67405. It lists all of the hitflags/resultflags described in D2R txt file guide and the results of my testing, although some are still not understood or maybe deprecated.
Re: How to add melee splash damage?
Thanks a lot for your contributions Cypress,
I tried changing paladin's Sacrifice skill into a hit that spawns a small Radial AoE by using funcs 11/19 (Charged Strike) and it worked but I'm not sure about a few things...
In your example you only set srvmissile, not cltmissile, why is that ? Is cltmissile only used for "display" purposes, not for collision ?
Is Charged Strike a good skill to copy funcs from in order to spawn missile on successful hit or is there an alternative ?
I tried changing paladin's Sacrifice skill into a hit that spawns a small Radial AoE by using funcs 11/19 (Charged Strike) and it worked but I'm not sure about a few things...
In your example you only set srvmissile, not cltmissile, why is that ? Is cltmissile only used for "display" purposes, not for collision ?
Is Charged Strike a good skill to copy funcs from in order to spawn missile on successful hit or is there an alternative ?
-
- Champion of the Light
- Posts: 448
- Joined: Fri Dec 01, 2017 2:08 am
Re: How to add melee splash damage?
Since it is radial damage, you will likely want to use radial cltside graphics. The best I can think of is immolationarrow's pclthitfunc=12, which produces defined three random clthitsubmissile within the defined radius. Here are the settings I used:
To radialsplash, I added itemclteffect=1, cltmissile=splash and calc1=rng.
For the missile splash, gave it pclthitfunc=12, s.hitcalc1/chitcalc1=100 (how long the cltside missiles last), chitpar1=0 (radius, controlled by skill calc1 if set to 0), chitpar2=25 (density of cltside missiles, you can use a larger or smaller value if you want), clthitsubmissile1/2/3=teethexplode. Oddly, the srvside setting for s.hitcalc1 seems to control chitcalc1, hence why both were set.
For controlling this, all you really need to care about is:
s.hitcalc1/chitcalc1 which should be at least the same value as the clthitsubmissiles so that they do not disappear prematurely (I kept it at 100, the same as immolationarrow; might help reduce lag if you keep it at the exact length of the clthitsubmissile).
chitpar2 density with larger values producing more clthitsubmissile within the radius, if this value is too large you might get lag, especially with high attack speeds.
clthitsubmissile1/2/3, which are randomly selected such that you can have up to three different clthitsubmissiles appearing (I used teethexplode twice and bonespiritexplode once, giving a bias towards the less gaudy teethexplode).
Code: Select all
radialsplash 400 splash 2+(stat('strength'.accr)+stat('dexterity'.accr))/200 splash 1 2 none SC SC xx 1 1 1 1 7 5 0 1 rng cltside radius 1 0
Code: Select all
splash 706 1 12 1 44 100 fire duration 0 explosion radius (0 = skill) 100 fire duration 0 disc radius (0 = skill) 25 disc density 2 255 255 255 1 0 0 null 1024 1 16 3 1 1 1 3 1 1 1 5 8 128 32 teethexplode bonespiritexplode teethexplode 0
For controlling this, all you really need to care about is:
s.hitcalc1/chitcalc1 which should be at least the same value as the clthitsubmissiles so that they do not disappear prematurely (I kept it at 100, the same as immolationarrow; might help reduce lag if you keep it at the exact length of the clthitsubmissile).
chitpar2 density with larger values producing more clthitsubmissile within the radius, if this value is too large you might get lag, especially with high attack speeds.
clthitsubmissile1/2/3, which are randomly selected such that you can have up to three different clthitsubmissiles appearing (I used teethexplode twice and bonespiritexplode once, giving a bias towards the less gaudy teethexplode).
-
- Posts: 2
- Joined: Mon Jan 31, 2022 2:51 pm
Re: How to add melee splash damage?
Somehow it spawns from my character. This is very noticeable with a smaller radius. Enemies close to the target but far away from me takes no damage, while enemies behind me (and far away from the target) takes damage. I want it to spawn from the target. What did I do wrong?
Code: Select all
Attack 0 attack 1 1 splash 7 1 1 0 both weap tpot A1 A1 A1 1 1 1 1 1 1 1 1 1 0 8 0 0 1 1 1 1 8 128 0
Code: Select all
splash 706 1 1 44 2 255 255 255 1 0 0 null 1024 1 16 3 1 1 1 3 1 1 1 5 8 128 32 0
Code: Select all
Vengeance 111 pal vengeance 35 2 splash 7 1 1 3 h2h mele A1 A1 xx 1 1 1 1 1 18 20 Zeal 1 1 6 0 1 1 ln12+skill('Resist Fire'.blvl)*par8+skill('Salvation'.blvl)*par7 fire damage% ln12+skill('Resist Cold'.blvl)*par8+skill('Salvation'.blvl)*par7 cold damage% ln12+skill('Resist Cold'.blvl)*par8+skill('Salvation'.blvl)*par7 ltng damage% 70 percent damage 18 percent damage per level 0 ? 0 ? 0 ? 0 ? 0 damage synergy 0 damage synergy 1 20 10 8 128 cold 30 15 15 15 640 16000
-
- Champion of the Light
- Posts: 448
- Joined: Fri Dec 01, 2017 2:08 am
Re: How to add melee splash damage?
Hello Bmute.
Your first issue is because you are casting the splash directly with Attack, instead of using it as ctc. The settings of itemeffect=1, itemclteffect=1 make it so that the ctc effects (i.e. the splash) are released from the target rather than the user. You can sort of fix this by giving the Splash missile additional Range and a lot more Vel so that the Splash missile will detonate onto the monster along the path of your attack.
If you want crushing blow, then you will want to set in missiles.txt: Splash's HitFlags=32.
As for adding damage bonuses to Splash, you can sort of do that. For your example, you could make it so Vengeance gives its elemental damage bonuses via aurastats while swinging, in which case Vengeance's damage bonus will be added to any concurrent weapon damage events like Splash. Or you could make it so Vengeance releases its own special splash, which only deals Vengeance's elemental damage.
Your first issue is because you are casting the splash directly with Attack, instead of using it as ctc. The settings of itemeffect=1, itemclteffect=1 make it so that the ctc effects (i.e. the splash) are released from the target rather than the user. You can sort of fix this by giving the Splash missile additional Range and a lot more Vel so that the Splash missile will detonate onto the monster along the path of your attack.
If you want crushing blow, then you will want to set in missiles.txt: Splash's HitFlags=32.
As for adding damage bonuses to Splash, you can sort of do that. For your example, you could make it so Vengeance gives its elemental damage bonuses via aurastats while swinging, in which case Vengeance's damage bonus will be added to any concurrent weapon damage events like Splash. Or you could make it so Vengeance releases its own special splash, which only deals Vengeance's elemental damage.
Re: How to add melee splash damage?
Cypress wrote: ↑Sun Dec 19, 2021 7:42 pmSince it is radial damage, you will likely want to use radial cltside graphics. The best I can think of is immolationarrow's pclthitfunc=12, which produces defined three random clthitsubmissile within the defined radius. Here are the settings I used:
To radialsplash, I added itemclteffect=1, cltmissile=splash and calc1=rng.Code: Select all
radialsplash 400 splash 2+(stat('strength'.accr)+stat('dexterity'.accr))/200 splash 1 2 none SC SC xx 1 1 1 1 7 5 0 1 rng cltside radius 1 0
For the missile splash, gave it pclthitfunc=12, s.hitcalc1/chitcalc1=100 (how long the cltside missiles last), chitpar1=0 (radius, controlled by skill calc1 if set to 0), chitpar2=25 (density of cltside missiles, you can use a larger or smaller value if you want), clthitsubmissile1/2/3=teethexplode. Oddly, the srvside setting for s.hitcalc1 seems to control chitcalc1, hence why both were set.Code: Select all
splash 706 1 12 1 44 100 fire duration 0 explosion radius (0 = skill) 100 fire duration 0 disc radius (0 = skill) 25 disc density 2 255 255 255 1 0 0 null 1024 1 16 3 1 1 1 3 1 1 1 5 8 128 32 teethexplode bonespiritexplode teethexplode 0
For controlling this, all you really need to care about is:
s.hitcalc1/chitcalc1 which should be at least the same value as the clthitsubmissiles so that they do not disappear prematurely (I kept it at 100, the same as immolationarrow; might help reduce lag if you keep it at the exact length of the clthitsubmissile).
chitpar2 density with larger values producing more clthitsubmissile within the radius, if this value is too large you might get lag, especially with high attack speeds.
clthitsubmissile1/2/3, which are randomly selected such that you can have up to three different clthitsubmissiles appearing (I used teethexplode twice and bonespiritexplode once, giving a bias towards the less gaudy teethexplode).
Thanks, i found the generic splash skill that you can find in this forum or some mods, but seems to not work on all items...
I will test your solution !
Re: How to add melee splash damage?
Sorry for the necro but did the file jessedazebra uploaded get blocked? their link is gone. can anyone please help me?
I am also trying to copy Cypress' code but I cant seem to follow completely as some entries are confusing: on the missiles.txt code after cltParam5=2 for "*client Param5 desc" theres like 3 255 entries under it that dont align for me and I have no idea where to place them and if it should matter I am also using "D2Excel Plus"
Any advice would be greatly appreciated!
I am also trying to copy Cypress' code but I cant seem to follow completely as some entries are confusing: on the missiles.txt code after cltParam5=2 for "*client Param5 desc" theres like 3 255 entries under it that dont align for me and I have no idea where to place them and if it should matter I am also using "D2Excel Plus"
Any advice would be greatly appreciated!