The Dink Network

Reply to The overlooked "base hit" sprite parameter

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
August 21st, 01:25 PM
peasantmb.gif
yeoldetoast
Peasant They/Them Australia
Oh, NOW YOU'VE DONE IT! 
I was looking through the engine recently when I noticed a sprite parameter called "base hit". I had long assumed that it was just another parameter pertaining to graphical sequences, similar to "base attack" and "base walk", however upon investigating its use more closely, this did not turn out to be the case at all.

As it turns out "base hit" is assignable to map sprites, and also is settable on all live sprites, including those created from scripts. In fact, there is a DinkC binding of sp_base_hit(sprite, value) which will assign it. Somehow, this binding, despite being present from the beginning, skipped being documented not just in BigTed's annotated reference, but also in dinkc.chm and also on the new web site.

You may assume at this point that "base hit", due to its lack of documentation, is completely and utterly useless, and to be fair, you would not be far off. It does have a use, however, but only for player sprite 1, in which setting base hit to 0 or below will make whichever equipped weapon inoperable. It has no use anywhere else, and setting the value on a map sprite won't do anything to it. The aforementioned binding does not allow for retrieval, however DinkLua does, in case you'd like to use it as an extra var for something, similar to gold.

The original intended purpose of base hit is difficult to discern, however the use for the player sprite may indicate it was supposed to be a physical complement to magic cost somehow, and that certain weapons might not work on certain sprites while attacking according to their base hit value.