-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sample data for combat tests #488
Comments
ping @AJenbo |
To start with just some values for a level 1 warrior in default gear hitting a zombie would be enough. |
RNG locked to 0 (because zero is normally success)
Note that health is Some fighting with RNG enabled:
I'm making sure to only fight one monster at a time, all the hits will be on the monster that subsequently appears with the I do at times get attacked by more than one mosnter so you won't be able to see exactly who dealt the damage to the player.
|
Also note that RNG in Diablo is biased. |
Nice, thanks a lot! When you say the RNG is biased, do you mean they do the modulo trick for generating a number in a range? (so, eg, rand(100) = rand() % 101) Or is it something deeper in their RNG implementation? I'm hoping we can just not replicate that defect, do you think it's significant to gameplay? |
It does affect gameplay a bit, but mostly in a negative way (streaks are more common then they should). If you aim to have comparability with save game files you will need to implement the RNG from Diablo (Borland C/C++) or items will not be regenerated correctly, but you could limit it's use to just the item loading code. |
I probably won't bother with that level of import, but a character stats / inventory importer is definitely on the todo list. |
Well you will need it for inventory |
Oh, are items stored as an rng seed or something? |
Ok, so I did some tests with damage:
Final damage calculation is 1.15, whereas your data indicates it should be 128 / (1 << 6) = 2. Any idea what's wrong here? |
Sorry, no clue about how to handle damage. The first int in the item struct is it's seed value. |
Fair enough, thanks a lot for your help anyway! |
Ok, I did some more digging around, and it seems that while the hp variable for enemies is a fixedpoint value << 6, the damage calculations for melee attacks are actually done in unscaled ints anyway. It seems freeablo is actually correct after all :p Still, it would be nice to get some tests in for this, I plan to add that soon. |
We need some sample data from the original game to verify our combat calculatiosn against.
I have implemented melee combat in accordance with the formulae from Jarulfs' guide, and from what I can tell they should be correct. However, it still feels to me like there is something off when attacking monsters in the first dungeon level, sometimes they seem to survive too long.
It would be useful to have some test data from the original game (ie, with this gear, hit this enemy, and then measure the damage dealt). Ideally we could rig the RNG to always do the max damage in range, never miss etc, to make it easier to compare.
We could use this sample data for automated tests.
The text was updated successfully, but these errors were encountered: