Character attribute and stat displays ? (in General)

velvetpickle May 27 2006 7:36 PM EDT

Why do the stat displays for attributes (str/dex) not show effective Str and Dex? Actual Str and dex are shown when you inspect a character, but only trained str is shown on the stats pages... I think it would be easier to have an overview of characters if their actual (after toa/hoe/elven etc. bonuses) stats were shown on the page.

AdminQBnovice [Cult of the Valaraukar] May 27 2006 7:39 PM EDT

Imagine calculating those bonuses every time that pages loads and you'll have your answer.

velvetpickle May 27 2006 9:34 PM EDT

calculating what novice? I can guarantee that str and dex are changed more frequently due to training than by equipment changes...

Secondly, when inspecting a character, the true str and dex are shown, so it would just be a matter of caching that information somewhere (most likely it is already cached as it is) I'm sure the stats on the pages aren't updated with up to the second data, so chances are it wouldn't take too much.

bartjan May 28 2006 4:51 AM EDT

It needs to be calculated, as it's not stored in the database.
Real ST and DX already are stored directly in the database, as those are the real stats of the minion, so there's no need to calculate those.

velvetpickle May 30 2006 11:28 PM EDT

maybe someone could see about caching the actual stats in a database?

It doesn't seem very effective to have a stats page that shows 20 Str for my character when actual str is 634,020. I just think it would make the attributes page somewhat usefull to look at when comparing apples and apples. ST: 634,020/20 DX: 616,341/95,178

AdminQBnovice [Cult of the Valaraukar] May 30 2006 11:36 PM EDT

you've got to get how much work you're asking to be done for a really minimal return...

Yes stats are wonderous, but I still like playing a bit more than going through piles and piles of information. Where do you stop if you did get this? Just STR and DEX? or are we going to start listing all attributes as they actually are in a fight (AS, Haste, Corns, AGS all contributing)?

bartjan May 31 2006 12:40 AM EDT

"caching the actual stats in a database"

You have ever designed a database yourself?

babbler May 31 2006 1:32 PM EDT

also consider the changes each time a TOA levels up.
same with AS levels with a RoS.

Maelstrom May 31 2006 1:53 PM EDT

You've got the term "actual" mixed up with the term "effective". A minion's actual stats are the stats he has trained. A minion's effective stats are the trained stats modified by the items equipped. Actual stats are stored. Effective stats are calculated.

Rule #1 of database design is, never store values that you calculate.

QBsutekh137 May 31 2006 4:37 PM EDT

Rule #0 of life: Never say "Never".

True, the design portion of data modeling should not involve calculated fields, but the implementation may very often involve calculated fields.

For example, the CB data model stores PR even though it _could_ be calculated every time by looking through all minions of a character. It depends on the onerous nature of the calculation combined with how often the calculated value gets used. Calculating PR is not easy, and it gets used a lot. Therefore, it gets stored.

When a calculated field gets out of sync with the base data, we get situations like the PR bug we had for a while.

This is why software is hard.

Maelstrom May 31 2006 5:45 PM EDT

I only worked in database design, not implementation - I only know what's supposed to be done :P

QBsutekh137 May 31 2006 5:57 PM EDT

When I need a report to run in less than 24 hours, I'll be sure to ask someone else. *wink*
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=001ohx">Character attribute and stat displays ?</a>