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
  #1  
Old 10-23-2006, 04:38 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

I've come up with what I think is a reasonable AC mitigation formula but I'm still tweaking it, I have a question though, I'm using extensive rules in it as part of the tweaking so I don't have to recompile to push a value up or down a point or two, is the overhead low enough with rules that this is okay?

Example I'm using about oh:

RULE_INT( Combat, TankACModifier, 14 )
RULE_INT( Combat, MediumTankACModifier, 11 )
RULE_INT( Combat, LightTankACModifier, 9 )
RULE_INT( Combat, PureCasterACModifier, 6 )
RULE_INT( Combat, IksarACModifier, 1 )
RULE_INT( Combat, NPCACModifier, 10 )
RULE_INT( Combat, AttackCalcModifier, 9 )
RULE_INT( Combat, ACBase, 65 )
RULE_INT( Combat, RollDiffACMod, 6 )
RULE_INT( Combat, RollDiffLevelMod, 5 )

all those per AvoidDamage call, some more than once, is there going to be some kind of speed hit where I should hard code those values in the end or is using the rules fine?

The crit function seems the most reasonable solution to me since it can later be expanded to let NPCs crit under certain circumstances, via crit buffs or pets if their owners have petcrit AAs etc; as well as being easily plugged into the special attack code.
Reply With Quote
  #2  
Old 10-25-2006, 07:13 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Some more stuff. Mostly aggro changes and one change to corpses.

Adds Rules:
RULE_INT (Spells, SpellAggroModifier, 100)
% Aggro spells generate 100% default
RULE_INT (Spells, BardSpellAggroMod, 3)
Bard Aggro From Spells / BardSpellAggroMod
RULE_INT (Spells, PetSpellAggroMod, 10)
Pet Aggro From Spells / PetSpellAggroMod

Today was the first time I dual-boxed since I did corpses which is why I didn't really see this earlier. Was testing my AC mitigation and heal aggro and thought this was fixed.

There's this is Client:: Death()
Code:
			entity_list.AddCorpse(new_corpse, GetID());
			
			//send the become corpse packet to everybody else in the zone.
			entity_list.QueueClients(this, &app2, true);
Which should be
Code:
			entity_list.AddCorpse(new_corpse, GetID());
			SetID(0);
			//send the become corpse packet to everybody else in the zone.
			entity_list.QueueClients(this, &app2, true);
I'm not 100% on the logic behind it but I can't argue with results, without that meager line if someone is around when you die and sees you fall your corpse will immediatly disappear on their client but will be there server side and they'll have to zone in and out to see it. Should be included in the diff.

http://hmproject.org/files/Aggro.patch

I surely hope some of my previous changes make it in, I notice some haven't yet. Really think haste affecting combat timers, change to how haste is calculated, recourse and glow messages are nice changes.

Also have been working on Mitigation recently as we don't really have any real mitigation to speak of. Here's the formula I'm working with atm:
Code:
RULE_CATEGORY ( Combat )
RULE_INT( Combat, AttackCalcModifier, 15 )
RULE_INT( Combat, ACBase, 100 )
RULE_INT( Combat, RollDiffACMod, 12 ) 
RULE_INT( Combat, RollDiffLevelMod, 4 ) 
RULE_INT( Combat, MaxClientDamageMultiplier, 100 )
RULE_INT( Combat, ACRollSecondaryChance, 50 )
RULE_INT( Combat, PrimaryReductionBase, 25 )
RULE_INT( Combat, SecondaryReduction, 25 )
RULE_CATEGORY_END()

	if(damage > 0){
		int Mit_AC; 
		int Power_ATK;
		
		Mit_AC = RuleI(Combat, ACBase) + (defender->GetAC());
		Power_ATK = (attacker->GetSkill(OFFENSE) + attacker->GetSTR())*RuleI(Combat,AttackCalcModifier)/10;
		Power_ATK += attacker->GetATK();

		int Roll1, Roll2;
		int RollDiff = 0;
		Roll1 = MakeRandomInt(0, Power_ATK);
		Roll2 = MakeRandomInt(0, Mit_AC);

		if(Roll1 < Roll2){//this is success roll for mitigation
			RollDiff = Roll2 - Roll1;
			int32 PotentialReduction = RuleI(Combat, PrimaryReductionBase) + (100*((RollDiff/RuleI(Combat, RollDiffACMod))))/((20+RuleI(Combat, RollDiffLevelMod)*GetLevel()));
			int32 MinReduction = PotentialReduction/20;
			if(PotentialReduction > 100)
				PotentialReduction = 100;

			if(MinReduction > 100)
				MinReduction = 100;

			int32 DamageReduced = (damage * MakeRandomInt(MinReduction, PotentialReduction)) / 100;
			if(DamageReduced < 1)
				DamageReduced = 1;
			mlog(COMBAT__DAMAGE, "PowerATK: %d, MitAC: %d, PowerATKRoll: %d, MitACRoll: %d, Potential Red: %d, Min Red: %d, Dmg Reduced: %d", 
				Power_ATK, Mit_AC, Roll1, Roll2, PotentialReduction, MinReduction, DamageReduced);
			damage -= DamageReduced;
		}
		else if(MakeRandomInt(0, 100) <= RuleI(Combat, ACRollSecondaryChance)){
			//we fail the initial roll but get lucky and reduce damage by up to a fixed percent
			int32 DamageReduced = (damage * MakeRandomInt(0, RuleI(Combat, SecondaryReduction))) / 100;
			if(DamageReduced < 1)
				DamageReduced = 1;
			
			damage -= DamageReduced;
		}
		else{
			//we completely fail the roll /cry
		}

		if (damage < 1)
			damage = 1;
	}
It puts out some decent results, it's a pain to balance at the high level versus the low level though and I'm still working on it.

But for anyone who's interested a parse as of last night:
http://hmproject.org/files/parserogue.txt
Moderatly High AC Mob with a rogue with just under 300str and not much +atk.

OH before I forget:
Both the GetAC() and GetATK() are unsigned int values but can attempt to return signed values. Ex with an AC debuff on you can get -100 AC and it will try to return -100 AC but the return type is unsigned = bad stuff.
Reply With Quote
  #3  
Old 10-26-2006, 01:51 AM
fathernitwit
Developer
 
Join Date: Jul 2004
Posts: 773
Default

havent had time to give this the attention it needs yet, but.. rules are designed to be fast, it basically works out to this much work:
rules_array[index].value

also, your change for groups seems to have caused more harm than good, people are reporting that once a group is formed, you cannot invite anybody else (which means to me that nobody is the leader, client side). Im going to revert it, in case you want to work on it more.
Reply With Quote
  #4  
Old 10-26-2006, 09:27 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Odd, I'll have to look at it some more, I admit I don't really have more than myself to test groups with most times and I can't really support more than dual boxing with my server on my comp but I'll see what can be done, might have to recruit some people in IRC for this one =/

Nice about the rules though that means I can make any new mitigation system I put it be totally tweakable without needing to recompile, which seems nice considering I doubt many people have put much thought into str and ac currently in their databases when making the monsters.
Reply With Quote
  #5  
Old 10-26-2006, 11:54 AM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

Something else up with grouping that I do not remember happening before. If I am solo, I can buff myself up no problem. I then join a another character to my group, and buff them, also no problem. But if I target myself again and try to re-buff, it only casts on the other player in the group. Even if they leave the group. It never seems to forget them. Even if they logout. I cannot target myself and get a buff to land.

This is the first I've seen of this. Also using 871 binaries.

Last edited by John Adams; 10-26-2006 at 07:58 PM..
Reply With Quote
  #6  
Old 10-26-2006, 12:49 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

I've seen that too John sorta, if I leave the group I'm fine and it only happens for group buffs for me, meaning to look at it. Not sure I'm getting the same problem as you however, think what's happening with me is a group spell casts on the leader first and goes down from there, and I think something's happening where if the spell wouldn't take hold cause of stacking somewhere it just cancels for everyone. If you can give me more info on your problem, detailed step by step instructions for reproducing etc, I can look into it.

This group thing is one of the most frustrating things I've ever done. The client knows it's part of a group and knows it's the leader but some piece of info is missing or inconsistant with the rest and the packet for invite isn't sent by client. On the other end, the client knows it's the leader and is in the group but again the same thing except this time it wont send group chat, sony set this up in a very confusing manner. I guess I just assumed at the beginning that the client wasn't completely retarded.. last time I'll have faith in that =P

I would go ahead and reverse it, not being able to talk is better than not being able to invite till you zone and I've tried about 10-15 different group packet combos with no luck so far.
Reply With Quote
  #7  
Old 10-26-2006, 03:33 PM
John Adams
Demi-God
 
Join Date: Jul 2006
Posts: 1,552
Default

Let's see if I can step this through...

Leader char casts Speed of the Brood on himself, it lands ok.
Leader invites player to group, and player joins.
Leader then casts same Speed of the Brood on the new group member.
Leader then cancels the effect so he has no buffs.
Targets himself.
Casts Speed.
Nothing lands. Message in the window says the other player feels faster (or whatever).
If that player leaves the group, same thing. Seems stuck on targetting that player.
If the player logs off, leaving only the Leader in the zone, the buff casts, you see the glowies for it, but no message, and no effect icon.

Let me run through a few other tests with this. I might have been casting a group buff on myself, though I should still get it, that might be the key. I'll report back in a few.
Reply With Quote
  #8  
Old 10-26-2006, 03:36 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Hum another thing I noticed something seems up with Character rules, they aren't loading from the DB correctly for me and trying to list them with #rules list Character returns: Failed to list rules!

I'll do a #rules setdb Character:MaxLevel 70 but when I zone it's back to the default in code of 65, same with Character:LeaveCorpses and Character:LeaveNakedCorpses.

All the other rules seem to work fine so long as they aren't in the Category character.
Reply With Quote
Reply

Thread Tools
Display Modes

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 12:11 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3