Idea for new Character Attribute Stat (in General)
Would it be possible to add a list for the minion with the Highest AC? It would be nice to be able to view which Wall/Heavy Tanks have the biggest armour. With no spell/skill adding to AC now (Unlike Protection in CB1) it would be like inspecting minions to find their AC value (which won't change in battle) without having to inspect every character in the game.
:)
QBRanger
May 15 2005 1:37 PM EDT
GL,
This has been proposed before but noone acted on it.
Perhaps we can get someone to put it in, HINT HINT.....
It would look just right in the space next to DX and above Evasion!
:D
Maelstrom
May 15 2005 1:49 PM EDT
I believe Jon has mentioned in the past that this stat would be too difficult and costly (in terms of bandwidth) to maintain, especially for something that could change so often.
QBRanger
May 15 2005 1:51 PM EDT
And PR does not change often?
Plus with item cool downs etc to discourage the swapping of items (for PR fluctuations anyway..) amour changing wouldn't make to much of an impact now.
Maelstrom
May 15 2005 2:19 PM EDT
"And PR does not change often? "
Hey, I'm just (mis?)-quoting something Jon has said a few times over the past few months. Check the old forum threads for "new stat" to find his actual response.
bartjan
May 15 2005 2:29 PM EDT
That it often changes is not relevant. It needs to be calculated each time the stat page is generated, for *all* characters in the game, so it's a SQL query that runs over the entire items table, and it must be a very ugly query, as it has to take care of named armor, and armor that doesn't grant AC, but another stat.
PR sounds like a much more straightforward query.
:(
Granted, I've really no idea how CB runs, but the total AC of a minion, including named armour bonuses is already show as a single total.
Instead of a query running over the entire items table, could this single value (as shown on the inspect page) be collated?
Did a little digging, and Chet's already answered my questions...
"AC is not an attribute of the minion (at least I assume it isn't at the moment). Total AC is the sum of all equipment the minion is wearing. That means a query would have to walk the minion table, the association table linking minions to equipment, and the equipment table (which is probably rather large). Then, sum up the base armor and plus on the armor, and there you have a total by minion. This _might_ be possible in a single query, but it would be a large one. Worst case scenario is that a stored procedure would have to be written to iterate through each minion's equipment, and in that case we are talking orders of magnitude on the performance hit.
The alternative would be to store the total AC on each minion, and then be sure to update it in all places where equipment can change and therefore change the number. There is one word for this in the database world: denormalization. There is another word for this in the database world: icky.
But you are saying, "It can't be that hard, it shows on the Inspect page!" That is the difference between on-demand data on a case-by-case basis and batch queries encompassing the entire system. It is easy to do what I mention above on a character by character basis. It's the doing it for everyone every time stats are calculated that is hard on the server."
QBsutekh137
May 15 2005 3:15 PM EDT
I do think Ranger has a good point, though (and disagree with bartjan a bit)...I think PR is a somewhat tough thing to calculate these days with all of the stuff going on. Not minion PR...that's easy. But total PR is a bit of a bear.
I am wondering if Jon is not storing that number now, at least every time the background processes rifles through and calculates it. PR (like AC) has to be known for each and every battle, and since it is all over the stats pages, maybe he has denormalized that.
The question then would be (assuming my assumptions are even remotely true, which they probably are not) whether or not the AC number is worth denormalizing. The answer there would probably be "no", since AC does not play nearly as important a role as PR.
I do, however, think Jon will revisit this as processing/disk speeds increase. I agree that it would be a cool statistic, especially when trying to analyze how people are applying their net worth in this new NW-linked-to-PR world.
bartjan
May 15 2005 3:40 PM EDT
"Instead of a query running over the entire items table, could this single value (as shown on the inspect page) be collated?"
Lesson #1 in Database Design: Never store data that can be determined from other data.
If you do store the AC of a minion as a separate value in the database, you'll end up with the problems of keeping both values up-to-date whenever either one changes.
AC is actually even messier than PR to calculate, because of the various armor pieces whose + doesn't actually count as AC
and yes, PR is denormalized and maintained with a trigger (and CB bends over backwards to avoid having to update that number more than necessary, which is part of why it took a while to link in NW)
MPR is also denormalized and a few other stats for which the extra effort to update is worth not having to recalculate it whenever it's requested
so yeah, AC isn't worth it to me
QBsutekh137
May 15 2005 5:01 PM EDT
Thanks for the look "behind the curtain", Jonathan...maybe I am just a geek (well, of course I am), but that is neat stuff to hear about. I am very much in awe of all that you have put into design and implementation, and I am sure you have learned a ton...
This thread is closed to new posts.
However, you are welcome to reference it
from a new thread; link this with the html
<a href="/bboard/q-and-a-fetch-msg.tcl?msg_id=001LIv">Idea for new Character Attribute Stat</a>