The Dink Network

Missile Strength Versus Dink Strength

February 20th 2013, 04:27 PM
goblins.gif
I've come across an interesting quirk in the engine while working on my script improvement pack. Missile strength only functions properly on even numbers. If the number isn't even, than the max damage possible will be one less than the strength. so with:

void main( void )
{
     sp_strength(&missile, 15);
}


only 14 damage will be possible. Or for a more drastic comparison, a missile with 3 strength will only ever do two damage.

This is a bug in both FreeDink and Dink v1.08 Aural+.
February 20th 2013, 06:15 PM
pillbug.gif
Pillbug
Peasant He/Him United States
Love! True love! 
O_o

I really love how much you've done, but really, you have to stop finding all these things or else we'll never want to use the engine again

I know very little about actual engine mechanics, but does the defense of the target affect this in any way? Also, do you have a fix/workaround in mind for this in your improvement pack or will we just have to use even-numbered missile strengths?
February 20th 2013, 06:57 PM
goblins.gif
Also, do you have a fix/workaround in mind for this in your improvement pack or will we just have to use even-numbered missile strengths?

Don't worry, you don't have to use even numbered missile strengths. However, an odd strength will work as if it was 1 strength less (and thus, the even number below it). Unfortunately this is something I haven't figured out how to fix with DinkC. It's probably possible but not worth the lengths that would have to be taken. It's also quite a small problem, so it's not worth worrying over too much. But if Beuc or Shevek is around they might be able to benefit from this knowledge, since they could make sure things work in their respective engines.

does the defense of the target affect this in any way?

The only thing defense does is subtract from the final damage. So if you have a three strength missile, and a one defense enemy, you will always hit for one damage with it instead of the two you would do to an enemy with no defense.

you have to stop finding all these things or else we'll never want to use the engine again

I can't help it! Luckily thanks to finding all these things I've also been able to fix/improve a lot of them (especially regarding weapons/spells). I'm trying to find as many bugs as I can now because I want the script pack to be good.

Also, if you want to know the reason I still dabble in Dink despite knowing all the flaws, it's simply because he's Dink. I can't have him in any other engine, you know. And if I did, it wouldn't be quite the same. When I keep all this in mind, the flaws don't really matter all that much.
February 21st 2013, 05:59 AM
custom_robj.png
Robj
Jester He/Him Australia
You feed the madness, and it feeds on you. 
Since it's always 1 less, could you not simply add a hurt command, to further hurt the sprite by 1?
Although I suppose that would just look weird in the game, since two damage numbers would appear.
February 21st 2013, 09:30 AM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
Hurt still takes into account defense as it is applied I believe, so making it hurt(1) could still only do 0 damage.
February 21st 2013, 04:34 PM
goblins.gif
Yes, the health of the enemy could be modified (which would be invisible, but tell the player the wrong damage still), or hurt could be used, but either way it would still be inaccurate. I think it's something that should be dealt with in an engine.

Hurt still takes into account defense as it is applied I believe, so making it hurt(1) could still only do 0 damage.

This is true, however you can simply hurt the enemy 1 more than it's defense to do one damage. But still, it won't fix the problem... 4 strength with one added damage is a different formula than 5 strength, for example. So working around it in that way would be kind of pointless, I think. Plus if the issue got fixed in an engine than using the workaround with it would actually cause the damage to be wrong again. So this is one thing I won't be messing with.

Anyways, it's not a big deal, just a finding I thought I would post for anyone working on engines. Don't be discouraged when making DMODs; it barely influences gameplay.