Jeggred made me a driver to test values. Whatever is missing in the DB, I think we can solve using test values from his driver and logs of real data.
Just an update to what's going on with the equations.
The equation we use to test damage values is:
Roundint(DB + (1-AC/ATK)*randint(1,20)*DI)
DI is a float value truncated to 1 decimal place, loaded from database for NPCs. It is the damage interval. For each of 20 rolls of the "dice", you can multiply that by the damage interval.
DB + (1-AC/ATK) * 1 * DI
will be different than:
DB + (1-AC/ATK) * 20 * DI.
randint(1,20) will give 20 different integers to multiply the damage intervals by, meaning that assuming AC, ATK, DI and DB don't change, attacks have 20 damage outcomes.
DB is an integer, loaded from the database for NPCs. It is a damage bonus, which is should be able to be evaluated using an equation from currently existing values in the database. The NPC will always deal this much damage ON TOP OF what it can get out of the 1-20 roll described above. If Cazic Thule hits you, it won't be for 200, but his DB is 200. His DI is 20. You might get hit for 220 or 240 or 210, but never for DB, always above.
AC is the target's AC. That's pretty self-explanatory. I don't know how we'll solve these for the database yet... It may be interesting. This will apply to PCs and NPCs.
ATK is the attacker's ATK. We'll also have to put these values into the database if they don't exist yet. NPCs will need to have them for this equation to work.
If the equation comes out negative, the hit becomes a miss: Damage won't heal, so negative damage becomes 0.
More to come as we uncover it.
__________________
It's never too late to be something great.
|