how to properly show a new skill's 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
kulasdq
Posts: 16
Joined: Tue May 04, 2021 6:04 pm
United States of America

how to properly show a new skill's damage

Post by kulasdq » Wed Jun 23, 2021 5:47 am

I changed asn's cobra strike's 3rd charge attack and made it do AOE pois damage. the skill seems to work fine but I couldn't manage to show the skill damage correctly. in the skilldesc.txt, i followed the same format of other charge up skills. I created 2 description for the 3rd charge up, one for the AOE, the other for the pois dmg. The AOE can show properly, but the dmg doesn't show up at all. I guess it's probably because I created a new missile for cobra strike?? Need some help on this part.

kulasdq
Posts: 16
Joined: Tue May 04, 2021 6:04 pm
United States of America

Re: how to properly show a new skill's damage

Post by kulasdq » Wed Jun 23, 2021 6:51 pm

ok, did some testing myself. the problem is not the missile, it's dmg type. i changed the elemental type from pois to ltng, now the skill tree can correctly show the dmg amount. in the skillcalc.txt, there are only 2 types of codes dealing with missile elemental dmg, which can be used in skilldesc.txt:
m3en "desc missile 3, min elemental dmg"
m3ex "desc missile 3, max elemental dmg"

and

m3eo "desc missile 3, min elem dmg, 256ths"
m3ey "desc missile 3, max elem dmg, 256ths"

asn's charge ups use the first code, i tried both, neither works for pois. however, i did see in some other mods that they make the pois charge up show the dmg properly, guess it needs to be done through hardcoding :cry:

User avatar
Cypress
Junior Member
Paladin
Posts: 188
Joined: Fri Dec 01, 2017 2:08 am

Re: how to properly show a new skill's damage

Post by Cypress » Wed Jun 23, 2021 9:55 pm

Use descline=14 (see Appendix B: kb/viewarticle?a=370). It will automatically calculate the poison damage of your skill. If the damage is from the missile itself and not the skill, then you will need to create a calculation that is identical to the vanilla poison display. You do not need hardcoding to do either of these things.

EDIT: Also, if you want it to add onto the LCS upon gaining the third charge, then use the p3d columns to calculate the poison damage.

kulasdq
Posts: 16
Joined: Tue May 04, 2021 6:04 pm
United States of America

Re: how to properly show a new skill's damage

Post by kulasdq » Thu Jun 24, 2021 1:29 am

i tried 14, didnt work. it seems 14 can only read dmg from skills.txt not from missiles.txt. plus it doesnt work well with chargeup skill as "charge up" needs a separate text.
how do i create my own calculation? is there a guide on this?

User avatar
Cypress
Junior Member
Paladin
Posts: 188
Joined: Fri Dec 01, 2017 2:08 am

Re: how to properly show a new skill's damage

Post by Cypress » Thu Jun 24, 2021 5:01 am

You can connect the missile to the skill by referencing the skill name in the missiles.txt Skill column. So in your case, you'd want to set the poison damage directly into the skill Cobra Strike, and then enter Cobra Strike into the missiles.txt Skill column to link it. This would be the easiest way, since it will allow for display via descline=14. This is how Poison Nova, and every other poison skill, displays its poison damage.

For calculations: viewtopic.php?t=24813.

If you want to keep the damage on the missile, then you can directly reference the missile's damage via miss('missname'.misscalc), where missname is the name of your missile and misscalc is a function from misscalc.txt. I believe Diablo 2 displays poison damage as: edln*edns/256 to edln*edxs/256. You can use descline=47 to display a string followed by a range of two calcs. So for example:

descline=47
texta=stringcobrastrikedmg (make a string that contains "Charge 3 - Poison Damage: ")
calca=miss('cobrapois'.edns)*miss('cobrapois'.edln)/256
calcb=miss('cobrapois'.edxs)*miss('cobrapois'.edln)/256

This should display as Charge 3 - Poison Damage: X-Y, similarly to vanilla poison skills. You can add another line underneath it that displays poison duration the same way as vanilla. For that, you can use descline=12 or 31, which converts from frames to seconds.

EDIT: Thinking about it, I wrote that in a dumb way, you could just put edmn*edln to edmx*edln. The way I have it written is multiplying by 256 and dividing by 256. But regardless, you should be able to figure it out with a bit of trying, if you can get the exact same damage to display as a Poison Skill without using descline=14, then you've got the right formula.

Post Reply

Return to “General Mod Making”