Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

Reply
 
Thread Tools Display Modes
  #1  
Old 03-20-2003, 12:43 PM
Arroe
Fire Beetle
 
Join Date: Mar 2003
Posts: 11
Default Archery!

i think archery is severely bugged. why am i hitting for 79dmg with a 175dmg bow?!?! anyone know how i can fix this? a link to a patch would be great!
__________________
Arroe
Reply With Quote
  #2  
Old 03-26-2003, 06:14 PM
mByte
Hill Giant
 
Join Date: Feb 2002
Posts: 206
Default

Dude!

Just be lucky its in there.

If you want to help make it better find some sort of Damage Table Algarythem or what not, im sure there is much more important work then fixing archery atm.

a 175dmg bow with a 11dmg arrow in eqlive you could hit for 79dmg. Its all the luck of the roll.

The only time you get a minimum damage in eqlive on a bow is with trueshot if im not mistaken.

So how do you know its not working right?

Anyways - Keep up the good work dev's. Always fun to play with the src after its released
__________________
mByte
Reply With Quote
  #3  
Old 03-30-2003, 03:55 AM
TNT's Avatar
TNT
Fire Beetle
 
Join Date: Mar 2003
Location: West Virginia, USA
Posts: 10
Default

Ya know how he knows it's not working right mByte?

Because I'm pretty sure I know what he's talkin about... The bow will ONLY hit for 79 dmg (or 73, but I probly used a different type of arrow.) I've tested it with custom bows I made too, it seems like if you set a bows damage too high, it messes up the calculation of the data.

I made a bow that was 254 reg dmg, 254 magic dmg once and got non-stop crits for.... guess what, 13 dmg... LOL, so yeah, something is wrong, and I'm sure there are more important things that need fixed atm.

Anyway, maybe you could give him a better description on how he could help out fixing this problem on his own rather than a one-liner that really tells him nothing?

Ta-ta... TNT.
__________________
Windows XP
PublicLogin
EQEmu-0.4.4-DR1+Telmet
worldname=TNT Beta Test
"Bring it on!"
Reply With Quote
  #4  
Old 04-16-2003, 12:27 AM
Roadkill
Sarnak
 
Join Date: Apr 2002
Posts: 31
Default

Same here :( Made a 150 damage bow, and I've seen it hit for nothing but 2 or 4 ever (warrior using it). My skill is maxed, and I hit for 100s+ with the War Bow of Rallos Zek just fine. So it has something to do with going over a certain damage value.
Reply With Quote
  #5  
Old 04-16-2003, 01:54 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

Heres the code for it...

// This is a Ranged Weapon Attack / Bow
const Item_Struct* Rangeweapon = 0;
const Item_Struct* Ammo = 0;
Rangeweapon = database.GetItem(pp.inventory[11]);
Ammo = database.GetItem(pp.inventory[21]);

if (!Rangeweapon) {
Message(0, "Error: Rangeweapon: GetItem(%i)==0, you have nothing to throw!", pp.inventory[11]);
break;
}

if (!Ammo) {
Message(0, "Error: Ammo: GetItem(%i)==0, you have nothing to throw!", pp.inventory[11]);
break;
}

uint8 WDmg = Rangeweapon->common.damage;
uint8 ADmg = Ammo->common.damage;

// These dmg formulae were taken from all over the net.
//No-one knows but Verant. This should be fairly close -BoB
// ** ToDO: take into account trueshot disc (x2.0) and
// Archery Mastery AA when they are available.
// I am still looking for 'double' information too.
// Note: Rangers have a chance of crit dmg with a bow (affected by Dex)

uint8 levelBonus = (pp.STR+pp.level+GetSkill(ARCHERY)) / 100;
uint8 MaxDmg = (WDmg+ADmg)*levelBonus;

sint32 TotalDmg = 0;
sint32 critDmg = 0;

if(GetClass()==RANGER)
{
critDmg = (sint32)(MaxDmg * 1.72);
}

if (MaxDmg == 0)
MaxDmg = 1;

TotalDmg = 1 + rand()%MaxDmg;

// TODO: post 50 dmg bonus
// TODO: Tone down the PvP dmg
// borrowed this from attack.cpp
// chance to hit

float chancetohit = GetSkill(ARCHERY) / 3.75;
if (pp.level-target->GetLevel() < 0) {
chancetohit -= (float)((target->GetLevel()-pp.level)*(target->GetLevel()-pp.level))/4;
}

int16 targetagi = target->GetAGI();
int16 playerDex = (int16)(this->itembonuses->DEX + this->spellbonuses->DEX)/2;

targetagi = (targetagi <= 200) ? targetagi:targetagi + ((targetagi-200)/5);

chancetohit -= (float)targetagi*0.05;

chancetohit += playerDex;
chancetohit = (chancetohit > 0) ? chancetohit+30:30;
chancetohit = chancetohit > 95 ? 95 : chancetohit; /* cap to 95% */

// Hit?
if (((float)rand()/RAND_MAX)*100 > chancetohit)
{
this->Message(MT_Emote, "You missed your target");
target->CastToNPC()->Damage(this, 0, 0xffff, 0x07);
}
else
{
// no crits before level 12 cap is maxed
if((GetClass()==RANGER)&&(GetSkill(ARCHERY )>65)&&(rand()%255<(GetSkill(ARCHERY)+p layerDex)/2)&&(chancetohit > 85))
{
this->Message(MT_Emote, "You score a critical hit!(%d)", critDmg);
target->CastToNPC()->Damage(this, critDmg, 0xffff, 0x07);
}
else
{
this->Message(MT_Emote, "You Hit for a total of %d non-melee damage.", TotalDmg);
target->CastToNPC()->Damage(this, TotalDmg, 0xffff, 0x07);
}



So, from this we see max damage is ..

uint8 WDmg = Rangeweapon->common.damage;
uint8 ADmg = Ammo->common.damage;
// These dmg formulae were taken from all over the net.
//No-one knows but Verant. This should be fairly close -BoB
// ** ToDO: take into account trueshot disc (x2.0) and
// Archery Mastery AA when they are available.
// I am still looking for 'double' information too.
// Note: Rangers have a chance of crit dmg with a bow (affected by Dex)

uint8 levelBonus = (pp.STR+pp.level+GetSkill(ARCHERY)) / 100;
uint8 MaxDmg = (WDmg+ADmg)*levelBonus;
sint32 TotalDmg = 0;
sint32 critDmg = 0;


So, max damage should for a 150 damage bow with dmg. 7 arrows,

(150+7) * lvlBonus, where levelbonus is STR+LEVEL+SKILL/100, so assume a Str of 100, level of 20, and skill of 100, and you get 220/100 = 2 by integer division, so max damage should be

157*2 = 314

Then

if (MaxDmg == 0)
MaxDmg = 1;
TotalDmg = 1 + rand()%MaxDmg;

so, damage done on a noncrit for a 150 damage weapon should be
between 1 and 315...

Why its not? My guess is theres an integer division going on screweing something up, or theres an int8 or 2 in there screwing up the calculation.
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #6  
Old 04-16-2003, 02:07 AM
Trumpcard
Demi-God
 
Join Date: Jan 2002
Location: Charlotte, NC
Posts: 2,614
Default

I think the problem is that its using uint8 for the data types.. uint8 is defined as an unsigned char ?

I think thats the problem, I'll up them to uint16 's , and I bet that will fix the problem...
__________________
Quitters never win, and winners never quit, but those who never win and never quit are idiots.
Reply With Quote
  #7  
Old 04-20-2003, 11:18 PM
kathgar
Discordant
 
Join Date: May 2002
Posts: 434
Default

uint8 is an unsigned char, since char is a byte long.. most of the time.. It was really fun when I was testing some things and couting uint8s.. and getting like
__________________
++[>++++++<-]>[<++++++>-]<.>++++[>+++++<-]>[<
+++++>-]<+.+++++++..+++.>>+++++[<++++++>-]<+
+.<<+++++++++++++++.>.+++.------.--------.>+.
Reply With Quote
  #8  
Old 04-21-2003, 01:41 AM
Graypaint
Sarnak
 
Join Date: Apr 2003
Posts: 36
Default

the actual equation seems reasonable though.
Reply With Quote
  #9  
Old 04-21-2003, 02:02 AM
a_Guest03
Demi-God
 
Join Date: Jun 2002
Posts: 1,693
Default Archery is fun!

Last night, killspree, Jeggred, and I were playing with archery equations. We tried using the basic melee formula with dexterity instead of strength. We found that the formula worked... kind of. The high values came out perfect. With a kickass bow, and great stats and skills, we came up with our expected damage outputs. But at level 20, with a 20 damage bow, we had people hitting for 58... I think that's a bit high.

Archery is next on my list to evaluate and adjust as necessary, unless I get really busy and decide to do an easier one, like tiger strike, or many of ones I suspect have similar equations to kick.

What I will need is example data from live to run my test equations against. I want to know DEX, skill, bow damage, and the highest hit received with those stat/skill/damage combinations. Killspree gave me a high value of 290 DEX, 240 skill, 43 damage bow, level 65 character. The result from the current equation gave an accurate measurement of what the maximum damage should be according to killspree's data.

Is damage really related to strength or is it dexterity? I would think it was related to Dex, skill, combined weapon damage, and maybe, just maybe strength.

I also tested the above equation with killspree's live data maximum, from the example above.
Live data suggested maximum: 370. Current equation maximum: 250.
__________________
It's never too late to be something great.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 11:08 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3