EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Bugs (https://www.eqemulator.org/forums/forumdisplay.php?f=622)
-   -   Bug: min/max_dmg (https://www.eqemulator.org/forums/showthread.php?t=2173)

PrivateIdaho 06-03-2002 11:31 AM

Bug: min/max_dmg
 
Testing on Kerafyrm in ST.


Set his min dmg to 500, his max dmg to 2048, the change took in MySql:

Quote:

mysql> select * from npc_types where name="kerafyrm";
+-------+----------+-------+------+-------+---------+--------+---------+-------------+------+---------------+-----------------+--------------+-------------+--------+--------+------------------------------------------------------+-----------------+--------+-------------+--------+------+------------------+------------------+-----------------+-------------------+--------+------------------+------------------+-----------+----------+
| id | name | level | race | class | hp | gender | texture | helmtexture | size | hp_regen_rate | mana_regen_rate | loottable_id | merchant_id | mindmg | maxdmg | usedspells | npcspecialattks | banish | aggroradius | social | face | luclin_hairstyle | luclin_haircolor | luclin_eyecolor | luclin_beardcolor | fixedz | d_meele_texture1 | d_meele_texture2 | walkspeed | runspeed |
+-------+----------+-------+------+-------+---------+--------+---------+-------------+------+---------------+-----------------+--------------+-------------+--------+--------+------------------------------------------------------+-----------------+--------+-------------+--------+------+------------------+------------------+-----------------+-------------------+--------+------------------+------------------+-----------+----------+
| 14011 | Kerafyrm | 80 | 198 | 14 | 1000000 | 2 | 0 | 0 | 45 | 100 | 0 | 2005 | 0 | 500 | 2048 | 290 73 869 1699 1696 841 300 1703 1592 186 1723 1466 | E | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 255 | 255 |
+-------+----------+-------+------+-------+---------+--------+---------+-------------+------+---------------+-----------------+--------------+-------------+--------+--------+------------------------------------------------------+-----------------+--------+-------------+--------+------+------------------+------------------+-----------------+-------------------+--------+------------------+------------------+-----------+----------+
1 row in set (0.07 sec)

mysql>
Restarted all the zones/world. He has more HP, the spells I added, etc, but he's skill plinking for 30's and 50's.

Why isn't he:

1. hitting for min dmg
2. hitting for anything close to max dmg?


What am I doing wrong?

Yodason 06-03-2002 03:06 PM

I can confirm this is a bug, or according to image a "Formula problem", I might take a look tonight if i can stay awake.

PrivateIdaho 06-03-2002 03:10 PM

One small addition
 
Added a ton of spells, as you can see, and the only thing he ever casts is dragon charm (which of course does nothing since charm doesn't work yet. )

:(

DeletedUser 06-04-2002 01:49 AM

Theres a difference between a bug (something that doesn't work at all) and when its a formula issue (The formula isn't made to exactely portray the min/max dmg) it will be fixed when someone gets to it.

Yodason 06-04-2002 02:55 AM

If theres a 2k diffference in what its supposed to be and what it is, thats a bug, if it was a few points, that be forumla =p

DeletedUser 06-04-2002 06:03 AM

Yoda ive obviousely not made it clear to you, the formula is not setup to use min_dmg and max_dmg as you see it, but as someone else saw it. It is NOT a bug.

PrivateIdaho 06-04-2002 07:33 AM

Thx
 
Thanks Image, for noting it.. Looking at the code, it looks like it SHOULD be factoring it in.


Quote:


from attack.cpp

for (int ix = 0;ix != atks;ix++){
if(min_dmg != 0 && max_dmg != 0 && min_dmg <= max_dmg)
{
if (max_dmg == min_dmg)
damage = min_dmg;

else
currenthit = min_dmg + (float)rand()/RAND_MAX*(max_dmg-min_dmg);
}
else
currenthit = (float)basedamage-basedamage/100*25 + (float)rand()/RAND_MAX *$
damage = currenthit - (float)basedamage/100*basedefend;


It looks like it should be working.. what's missing.

killspree 06-04-2002 08:57 AM

Hmm...maybe the database is listing it as mindmg and maxdmg, but the code is looking for min_dmg and max_dmg to factor it in?

DeletedUser 06-17-2002 06:20 AM

Its converted when its brought from the db to become min_dmg and max_dmg

e4rl 06-19-2002 02:27 PM

Bugs and Formula Problems
 
(preformatted)
Code:


Were I to make a venn diagram of how I understood bugs
and formula problems it would probably look something like this:
 
  ------------------
 |        |
 |        |
 |        |
 |          |
 |    A      |
 |          |
 |    -------  |
 |    | / / / | |
 |  |/    /| |
 |    |  B  | |
 |  |/    /| |
 |    | / / / | |
 |    -------  |
  -----------------

where set 'A' is the set of all 'bugs'
and set 'B' is the set of all 'formula problems'.

So as to not become too off topic the rest of this discussion is posted here

-e4rl

PrivateIdaho 07-02-2002 09:20 AM

annd...
 
This appears to be partially fixed, IE mobs hit harder.

But the same thing happens.

Set sleeper to hit for 1920's and he doesn't.

Merkur 07-03-2002 01:23 PM

yeah im bored atm - bored enough to visit this board and answer this question

First: Min and Max damage values will never be the 'final' damage. Depending on your AC it will be reduced up to umm 70% ? not sure anymore.

Second: there is a bug
i think if you add/edit this two lines it would work fine, but of course I didn't test it

for (int ix = 0;ix != atks;ix++){
if(min_dmg != 0 && max_dmg != 0 && min_dmg <= max_dmg)
{
if (max_dmg == min_dmg)
currenthit= min_dmg;

else
currenthit = min_dmg + (float)rand()/RAND_MAX*(max_dmg-min_dmg);
basedamage = min_dmg + (max_dmg-min_dmg)/2;
}
else
currenthit = (float)basedamage-basedamage/100*25 + (float)rand()/RAND_MAX *$
damage = currenthit - (float)basedamage/100*basedefend;


All times are GMT -4. The time now is 01:44 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.