Question regarding melee splash damage

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

Post Reply
User avatar
Leauqis
Posts: 5
Joined: Thu Jul 16, 2020 3:20 pm

Question regarding melee splash damage

Post by Leauqis » Fri Jul 24, 2020 9:49 pm

Hi guys! This is going to be my first post
so i need to know if i posted this topic in correct place

I took a brief glance to the forum and very good post got my interest

viewtopic.php?t=65367

I implemented the feature as it should
problem is monster which is getting hit by melee weapon also taking damage from it's splash
there is no problem with other monsters in splash area whatsoever they take their damage properly :lol:
so is there a fix available with only softcoding which makes monster getting hit by melee weapon to ignore collision from splash damage missile or any other approach?

EDIT: fixed a typo

User avatar
Cypress
Posts: 96
Joined: Fri Dec 01, 2017 2:08 am

Re: Question regarding melee splash damage

Post by Cypress » Sat Jul 25, 2020 10:23 pm

You can modify calc2 of skills.txt for proc_SplashDamage and it will determine how many frames must pass before the missile will come into existence. This means you can set it high enough that by the time it spawns it will be outside the radius of the given monster. You should increase this incrementally and test it on a size 3 monster (like a Gargantuan Beast, Afflicted, Act Boss, etc) until you notice that the splash spawns past the monster.

You might still be able to hit the same monster twice if you have knockback or if it moves immediately after being hit, so if you really want to prevent double hits you could try and (1) maximize the activation frame (so that it hits at the outer edge of size 2-3 monsters around the given target monster that the splash is spawned from) and (2) mess with the Vel and Range (Vel=velocity is the speed of the missile and range is the number of frames that the missile exists for) columns of proc_splashdamage in Missiles.txt, so that the splash missiles move so fast that they will have gone away before the monster can be knockbacked into them.

EDIT: I had previously said that the missile would have its full duration after the activation frame, but this is wrong. The missile uses up range even before it is activated, so it should retain the same radius as long as the distance traveled is the same as it was before being modified.

User avatar
Leauqis
Posts: 5
Joined: Thu Jul 16, 2020 3:20 pm

Re: Question regarding melee splash damage

Post by Leauqis » Sun Jul 26, 2020 11:42 am

Thank you for the reply i tried lots of combinations editing vel, range and activation frame and it works preventing double damage but when surrounded by multiple close range enemies it kind of defeats the purpose :cry: but some cool idea came to my mind

Can attack skill used for melee force NextHit and NextDelay on target globally so splash damage missile cant hit the monster if i hit it with regular attack skill (i hope it is easy in practice as it sounds 8-O )
İf we can do that splash damage will work in any condition i wont shy away if it is a code editing solution i am using 1.13c if that matters

User avatar
Cypress
Posts: 96
Joined: Fri Dec 01, 2017 2:08 am

Re: Question regarding melee splash damage

Post by Cypress » Sun Jul 26, 2020 4:19 pm

I see the problem. I misunderstood how the skill worked, I just quickly glanced at the txt files without actually testing how it works. The problem is that this skill sends out missiles as a wave from the player instead of a nova from the target. If you were to use a skill that is like the latter case, then all of the missiles should leave the radius of the target monster at the same time (or nearly the same time), since the missiles would be traveling away from the same point (that point being the center of the target monster). This would allow you to set the activation frame so that the missiles come into existence shortly after passing the radius of the monster. Would you consider a nova that spawns from the attacked monster to be an acceptable solution? If so, I could make something like that pretty quickly.

As for nextdelay, it only exists for missiles, and while you probably could replace most attacks with invisible missiles that spawn directly on the target, it would be unusual since attacks and missiles have different rules. They trigger different effects and some of the effects that work for both cases do not function identically (e.g. crushing blow is half as effective on a missile, elemental skill damage does not apply to weapon damage on missiles).

I imagine hardcoding in nextdelay for attacks would be very difficult (this is just an assumption though, I've never actually hardcoded anything before), and also break a lot of things since nextdelay applies globally. This means a lot of the attacks would end up being ignored because they were executed before nextdelay runs out, and this would make missiles that use nextdelay and attacks that use nextdelay work against each other. For example, if you have Frost Nova when struck, your next attack would end up doing no damage if it is executed during Frost Nova's nextdelay.


I'm a dummy, you can ignore all the previous stuff I said. There is a very simple solution. All you need to do is make it so that the target monster gets hit by a different missile with nextdelay first. You could directly place a non-damaging, colliding missile with nextdelay onto srvmissile in Skills.txt and set the activation frame to 1. This would mean that on the first frame, the srvmissile (non-damaging) hits the target, then on the next frame srvmissilea (damaging) comes into existence and starts hitting things that haven't already been hit.

Post Reply

Return to “General Mod Making”