Need Help with formula in SkillDesc

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
User avatar
jetaman
Hosted Forum Moderator
Champion of the Light
Posts: 318
Joined: Sat Jul 18, 2015 7:00 pm
Location: Ukraine
Ukraine

Hand-picked

Need Help with formula in SkillDesc

Post by jetaman » Mon Nov 20, 2017 9:28 pm

Hi, I need help from people who know formulas pretty well (maybe Trevor can help :))
So I have this skill: it's similar to Blizzard - invisible missile that spawns other missiles. Blizzard's missile func (13/10) spawns missiles every [x] frames - that is frequency (set in calc2).
I set up my skill to increase frequency of missile spawn (by decreasing the interval) - for example at lvl1 - 2 missiles, at lvl3 - 4 missiles etc. I want to set up the description correctly so that it displays the correct number of missiles. But it shows the wrong number.
My formula is this Range/Frequency. In skilldesc i put this m1rn/(10-dm34). M1rn - is the missile range, 10 is the starting frequency (missile spawns other missiles every 10 frames) and dm34 is the decreasing the interval (increasing frequency).
The problem is that I use LevRange (increasing the duration of missile existene) and the range of the missile is dynamic. So the number which is in the result of the formula is not even, for example:

Range=15,
Frequency=8.
15/18=1,875

So as a result it should spawn one missile, but in fact it spawns two missiles, because the blizzard's missile func works like this:
Spawn missile - wait 8 frames - spawn next missile - wait 8 frames - etc

Even if I tweak the range it will always be uneven number of missiles because the frequency is decreasing with each level.

To help you understand the problem better I made a video.

Thanks you for your help in advance.

User avatar
SpiKe.
Forum Tech Support
Champion of the Light
Posts: 280
Joined: Thu Jul 28, 2011 5:25 pm
Location: Germany
Contact:
Germany

Re: Need Help with formula in SkillDesc

Post by SpiKe. » Tue Nov 21, 2017 10:48 am

Do understand it correctly that it works but always 1 missile spawn too much?

User avatar
jetaman
Hosted Forum Moderator
Champion of the Light
Posts: 318
Joined: Sat Jul 18, 2015 7:00 pm
Location: Ukraine
Ukraine

Hand-picked

Re: Need Help with formula in SkillDesc

Post by jetaman » Tue Nov 21, 2017 11:26 am

Sometimes,yes. Not always though.

User avatar
SpiKe.
Forum Tech Support
Champion of the Light
Posts: 280
Joined: Thu Jul 28, 2011 5:25 pm
Location: Germany
Contact:
Germany

Re: Need Help with formula in SkillDesc

Post by SpiKe. » Tue Nov 21, 2017 12:00 pm

Hm, if it would be always i would have said, put your current formula in brackets and add a -1 at the end.
Can u may post the formula you currently have, to see whats wrong?

Post Reply

Return to “Skill Clinic”