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

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #226  
Old 03-26-2013, 09:45 AM
vkrr
Sarnak
 
Join Date: Mar 2013
Posts: 65
Default

Great info Bad_capn. I will play with it.

In the meantime, If i wanted to remove (I'd much rather just disable them) journeyman mercs (without completely breaking the merc tables) what's the easiest way to do that?

Should I:
1) Wipe the hired merc table, delete the mercs from the merchant template entries where (and i'm not sure how to do in in SQL -- MERC ID matches with name like '%journeyman%' from the merc_npc_types table) so they should be unpurchasable?

2) Just delete * where name like '%journeyman%' from merc_npc_types table -- but will that break the merc merchants?

3) Is there a way to implement a cost PER MERC? -- I would love to set the journeyman mercs to cost a crazy amount of plat, that would solve everything rather nicely.

Thanks again for any help you guys can provide
Reply With Quote
  #227  
Old 03-26-2013, 11:22 AM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

There is a function that returns the cost of the merc based on a simple formula I came up with that is pretty close up to level 65 or so. You should be able to add more based on the proficiency if you wanted to.

You could also do it in sql. I can't test right now, but removing the templates from the merchants would be the best of your options, so you could keep most of the data there in case you wanted it later.

Another option is client version, which is in merc_templates. Set that to a very high number so it won't show up for any client (this restriction works so you don't get unknown dbstring errors for invalid races or classes depending on your client). I'll try to come up with a script when I get a chance.
Reply With Quote
  #228  
Old 03-27-2013, 03:02 PM
Armm
Sarnak
 
Join Date: Feb 2013
Posts: 70
Default

After yesterdays build with secrets latest patch, the crashes stopped, so i thought things were good until i noticed mercs with no owners standing around in hub area today. I checked DB and lots and lots of multiple mercs per PC in merc database.

I am cleaning out the DB and rebuilding source and will let you know results.
Reply With Quote
  #229  
Old 03-27-2013, 04:33 PM
Armm
Sarnak
 
Join Date: Feb 2013
Posts: 70
Default

Running latest git pull, x86 build, seems to happen on either UF and ROF clients.

Considering ive only had 6 people over last couple hours, and already i have 2 instances of multiple mercs per PC.

No crashes that i can find.
Reply With Quote
  #230  
Old 03-28-2013, 11:10 AM
Armm
Sarnak
 
Join Date: Feb 2013
Posts: 70
Default

Still havent figured what causes it. It might be related to grouping because these mercs below are run by a guy who multiboxes/groups...

Anyhow demonstrating the "leftovers"

Reply With Quote
  #231  
Old 03-28-2013, 02:59 PM
Secrets's Avatar
Secrets
Demi-God
 
Join Date: May 2007
Location: b
Posts: 1,450
Default

Quote:
Originally Posted by Armm View Post
Still havent figured what causes it. It might be related to grouping because these mercs below are run by a guy who multiboxes/groups...

Anyhow demonstrating the "leftovers"

I'll take a look into this soon; been busy so I haven't had time for mercs.
Reply With Quote
  #232  
Old 04-02-2013, 10:55 AM
Armm
Sarnak
 
Join Date: Feb 2013
Posts: 70
Default

Ok, sounds good.
Reply With Quote
  #233  
Old 04-02-2013, 07:31 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

Quote:
Originally Posted by Armm View Post
Issue - Healer mercs do not cast healdots, tried enabling it and they cast them but the spells dont heal for anything... weird..
They should now cast the heal over time spells. I'll look further into the spells not being effective.
Reply With Quote
  #234  
Old 04-03-2013, 08:03 AM
Armm
Sarnak
 
Join Date: Feb 2013
Posts: 70
Default

Thank you much, that should ease the mana strain on them.
Reply With Quote
  #235  
Old 04-03-2013, 08:43 AM
Shiny151
Hill Giant
 
Join Date: Jul 2009
Location: Indianapolis
Posts: 228
Default

Some additional feedback; i'm not sure if this is exclusive to me or those of us using mercs but; has anyone noticed with the latest build and mercs that grouping seems off? If I'm two boxing, the invitee doesn't see the other's merc in the group but the inviter sees the group leader's merc within the group.

If i revert a few builds back the issue isn't there. Disbanding, suspending etc. doesn't seem to fix the problem.
Reply With Quote
  #236  
Old 04-05-2013, 08:09 PM
Armm
Sarnak
 
Join Date: Feb 2013
Posts: 70
Default Possible bug

Is that GetSTR() supposed to be there in merc.cpp

Code:
int16 Merc::CalcAGI() {
	int16 val = _baseAGI + itembonuses.AGI + spellbonuses.AGI;
	int16 mod = aabonuses.AGI;

	int16 str = GetSTR();

	AGI = val + mod;

	if(AGI < 1)
		AGI = 1;

	return(AGI);
}
Reply With Quote
  #237  
Old 04-06-2013, 01:41 PM
Armm
Sarnak
 
Join Date: Feb 2013
Posts: 70
Default

One bug and a few things i dont understand.

I buy a level 50 J2 tank merc, has base stats like DB using #showstats. If i buff him with "Swift like the wind" spell number 172 which to my knowledge has no stat or resist buffs in it, then the merc has around 20 added to str,dex,40 to sta, 20 to agi, and resists are bumped up 60? When you suspend and restore the merc MOST of the time the stats return back to normal. Picture is below demonstrating me buying the merc, #showstats, buffing-showstats, suspending and bringing him back - showstats. I totally don't understand this.

Why do the mercs have so much attack? The values in the database don't match up with stats shown in game, and the ATK stats in the database are SKY high.

If i am understanding the code in attack.cpp right below then its looking for merc ATK which doesn't seem to be the same as in the database(which is even higher) Is it using CalcATK() from merc.cpp?? If so does then CalcATK also adds strength and skill to come up with its number?? If CalcATK does that then isnt Str and Offense added twice when it hits the code below??

I am trying pretty hard to balance things for my server, and the ground keeps shifting under my feet every time i solve one problem. Any information is apprecaited. Thank you.

Code:
if(attacker->IsClient())
		{
			attack_rating = (attacker->CastToClient()->CalcATK() + ((attacker->GetSTR()-66) * 0.9) + (attacker->GetSkill(OFFENSE)*1.345));
		}
		
		else
		{
			attack_rating = (attacker->GetATK() + (attacker->GetSkill(OFFENSE)*1.345) + ((attacker->GetSTR()-66) * 0.9));
		}


Reply With Quote
  #238  
Old 04-06-2013, 02:30 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

I've been out and busy the last 2 weeks, so I'm going to try and get back into this this weekend and check out some of the issues you've pointed out.

I'd have to look into the buffs. Not sure what's going on there.

Attack and AC are kind of confusing and how they are calculated and displayed are different between clients, npc, bots, mercs, and pretty much everything else. Merc base ATK and AC may be higher than what clients are used to because they have little to no way to improve them. No equipment upgrades, no AAs, etc. Only buffs can be used to increase them. They may still be a little high, as I just guessed when I created them, trying to get them close to high end client values at that level. If you have a specific example of what one should be, I can adjust them accordingly.

#Showstats shows different values for Bots as well, but I'd have to look into it again, as it's been a while since I tried to figure it out. I do remember ATK values being maybe half what they should have shown for bots.

Edit: Looks like that is being added twice. I'll get that removed.

Last edited by bad_captain; 04-06-2013 at 02:38 PM..
Reply With Quote
  #239  
Old 04-06-2013, 02:44 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

I have figured out the buffs issue, I believe. I'll see if I can get it in this weekend.
Reply With Quote
  #240  
Old 04-06-2013, 06:20 PM
Armm
Sarnak
 
Join Date: Feb 2013
Posts: 70
Default

Thank you.

I agree the attack code is confusiing. Since you asked for a specific example ill give you one with the level 50 scenario above. The example below ASSUMES i know what the code is doing. I am going to leave ATK values out of it because im not sure what is being calced here.

Mob is level 50 Froglok Dar Knight from sebilis who has an AC of 429 in DB.

Level 50 Merc attack the Froglok. Merc has str of 267, and warrior for that level has offense of 210. Running that through formuyla listed above WIHTOUT the ATK added onto it gives you 463 for attack RATING.

Froglok is an NPC so the NPCACfactor rule is 2.25 by default.

Code:
else if(IsNPC())
		{
			armor = CastToNPC()->GetRawAC();

			if(!IsPet()) 
			{
				armor = (armor / RuleR(Combat, NPCACFactor));
			}

			armor += spellbonuses.AC + itembonuses.AC + 1;
		}
so the Frogloks armor is AC/2.25 + spells and item bonuses which means his AC before class armor caps is 190.

You can see the problem is that the attack rating is already over 2 times the AC to begin with. Now if you add (im working from memory) several hundred or thousand ATK once or twice you can see that the attack rating to AC ratio is someplace from 3x to 20x.

To be fair , you are remarkably close on your AC settings for mercs tanking NPCs.
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 10:17 PM.


 

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