Log in

View Full Version : AC for mobs and more


Scorpious2k
05-14-2004, 11:18 AM
First, in the next CVS you should see AC for mobs implemented. You will need to add a column for AC in npc_types by sourcing the file MobACupdate.sql or using this:

ALTER TABLE `npc_types` ADD `AC` smallint(5) not null default 0;

Since AC defaults to zero, all mobs will have no AC (in other words no difference than you have now) until you set values in it.

If you remember this thread : http://www.eqemulator.net/forums/viewtopic.php?t=14061 then you saw a suggestion I made of a way for serverops to control the way AC is implemented on their server. This will also be in the next CVS. Here is the way it will work (quoted from the above thread)

So, I propose instead the creation of 3 variables in the variables table.

ACfail - the percentage of time AC fails to protect. 0 would mean there was always some level of protection, 100 would mean AC has no affect. When AC fails, it will be possible to get a max dmg hit.

ACreduction - the percentage of AC that is ALWAYS reduced from a hit (except when AC fails with ACfail)

ACrandom - the maximum amount of additional protection AC provides. 0 would mean no additional protection is provided, otherwise an additional amount of reduction is calculated using a random percentage of 1 to this value (except when AC fails with ACfail)

So on our server ACfail=0, ACreduction=5, ACrandom=5. AC always provides protection of 5-10 percent.

Someone else might use ACfail=10, ACreduction=2, ACrandom=3 meaning that AC would fail 10% of the time and when it works you get 2-5% reduction.

Setting ACreduction to a value and ACrandom to 0 would give a constant reduction of a fixed percentage of the AC.

Setting ACrandom to a value and ACreduction to 0 would give a random reduction percentage of the AC from 1 to ACrandom.

I think this would give the ServerOps a lot of flexability.

RangerDown
05-14-2004, 11:36 AM
I'll be the devil's advocate and ask, did you try a situation where the ACreduction and ACrandom together added up to over 100? What happened in combat when they did that? Hopefully we weren't healing the mob :lol:

Scorpious2k
05-14-2004, 11:53 AM
I'll be the devil's advocate and ask, did you try a situation where the ACreduction and ACrandom together added up to over 100? What happened in combat when they did that? Hopefully we weren't healing the mob :lol:

Nope:
if (damage<1) damage=0;

KhaN
05-14-2004, 01:06 PM
Thanks Scorpious2k for this.
AC on mobs were really missing :)

sandy
05-15-2004, 01:20 AM
yes thank you =)
next update will be haste for mobs ? =)

govtcheeze
05-15-2004, 06:37 PM
Speaking of haste...

/noob question inc

I picked up some haste gloves today, and when I right-click them the haste did not show up. However in the DB they are set up properly. Does this mean PC haste is not currently supported as well as npc (per post above)?

mikenune
05-16-2004, 07:52 AM
I've noticed that "Worn" effects (at least for me) don't show up in my Buffs window, but work anyway. The only clicky effect item I've used like that would be JBoots and their icon didn't show up either. I still got the measly 30-something% speed increase though.

smogo
05-16-2004, 09:04 AM
Thanks, very nice work.

It is really valuable to have a variable to tune this, instead of hard coded arbitrary design, so that every server can be tuned appropriate to server's style.

This shows EQEMu grows more and more high quality engine :P

Keep on good work ! :)

blastoma
05-16-2004, 12:54 PM
Yes, Im very impressed and extremely pleased at this implementation. Well done.

I'm kinda new to eqemu... and I hope to lend my programming skills to the mix. Seems like eqemu gets better by leaps and bounds everyday.

KhaN
05-16-2004, 01:07 PM
Scorp, i know im boring but, it is possible to add AC to #spawn ? Could be usefull :p

blastoma
05-18-2004, 05:54 AM
I was kinda bored last night and started adding ac to mobs in the database. After pulling all my hair out, I figured I'd do it the lazy way (and probably the wrong way... my C++ knowlage is pretty gimp).

Anyhow, I used some randomish number based on the level of the npc to auto-give ac if the ac in the db was 0. I dont know if it works correctly or not... either way... it does show the ac in #showstats.

At line 189ish in mob.cpp I used:

if(in_ac == 0)
AC = ((level*level)/1.75) + 15;
else
AC = in_ac;

Numbers are just rough... Hope it helps.

smogo
05-18-2004, 06:02 AM
direct SQL :
update npc_types set AC=(((level*level)/1.75)+15) where AC=0;

Man, you must have been bored :lol:

blastoma
05-18-2004, 06:04 AM
:oops: :D