Maximum statistics and enchanted items

Questions about how to create your own dungeons and replacement graphics and sounds.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting. You may Image to help finance the hosting costs of this forum.
Post Reply
User avatar
Daecon
Expert
Posts: 329
Joined: Tue May 16, 2006 1:56 pm
Location: Upper Hutt, New Zealand

Maximum statistics and enchanted items

Post by Daecon »

What are the maximum statistics that each character can have, how how does the capping work?

For instance, if a character has an item equipped that increases their strength to 255 and then gains a fighter level, after the item is unequipped with the base value of their strength statistic take into acount the increase from gaining a level, or will it just remain at 255, minus however many points the item gave.

What about Health, Stamina & Mana values?

Say I invented an item like "The Pendant of Infinite Magic" that gave you 9999 Mana but reduced your Priest and Wizard levels by 10 ranks each (is that even possible to have negative levels?) or prevented you from casting any spell above "Lo" level (would it be possible to implement a system where you can only have spells work when used at certain power levels?) and the wearer gained Priest levels when using it, how would that effect the statistics when the pendant is unequipped?

Also, is it possible to assign spell effects to items, like having a Cloak of Night that when equipped lowered the lighting level by having the "Darkness" spell active (what are the maximum lighting values anyway)?
User avatar
beowuuf
Archmastiff
Posts: 20686
Joined: Sat Sep 16, 2000 2:00 pm
Location: Basingstoke, UK

Post by beowuuf »

GG can answer the top stuff, for the bottom stuff jsut to say the latest RTC version has a equip / unequip action that lets you do complex stuff whn items are worn or taken off!
User avatar
Daecon
Expert
Posts: 329
Joined: Tue May 16, 2006 1:56 pm
Location: Upper Hutt, New Zealand

Post by Daecon »

Ah, the good ol' Trial and Error. :)
User avatar
George Gilbert
Dungeon Master
Posts: 3022
Joined: Mon Sep 25, 2000 11:04 am
Location: London, England
Contact:

Re: Maximum statistics and enchanted items

Post by George Gilbert »

Des Bro Dain wrote:What are the maximum statistics that each character can have, how how does the capping work?
The additional stats (str, dex etc) have a range of 1-255. Three values are stored for each: The current value, the maximum value and the displayed maximum value.

The maximum value is *ONLY* affected by the starting value and levels gained via experience and is only ever used internally. The displayed maximum value is the same as the maximum value but then adjusted by equipment worn.

After any calculations have been performed, all 3 values are capped by the limits above.
Des Bro Dain wrote:For instance, if a character has an item equipped that increases their strength to 255 and then gains a fighter level, after the item is unequipped with the base value of their strength statistic take into acount the increase from gaining a level, or will it just remain at 255, minus however many points the item gave.
Basically, this just works.

In more detail, lets say your base maximum value is 100 and your item increases strength by +999. Then your displayed value will be worked out to be 1099 and then the displayed value would be capped to 255. Then you gain a level and the base goes up to 105 - then the displayed would go up to 1104 and then capped to 255.
Des Bro Dain wrote:What about Health, Stamina & Mana values?
Same as above but with ranges of 1-999, 1-999 and 0-999 respectively.
Des Bro Dain wrote:Say I invented an item like "The Pendant of Infinite Magic" that gave you 9999 Mana but reduced your Priest and Wizard levels by 10 ranks each (is that even possible to have negative levels?)
Levels are capped in the range 0-15 in exactly the same way as above, but otherwise yes, that would work.
Des Bro Dain wrote:or prevented you from casting any spell above "Lo" level (would it be possible to implement a system where you can only have spells work when used at certain power levels?)
Yep - you can do that. Have a look at how the YA GOR spell works in the example complex actions dungeon (which produces a completely different effect depending on the power level; you could adapt that to have no effect unless the power was "lo").
Des Bro Dain wrote:and the wearer gained Priest levels when using it, how would that effect the statistics when the pendant is unequipped?
Again, that would work as you would expect as the above examples.
Des Bro Dain wrote:Also, is it possible to assign spell effects to items, like having a Cloak of Night that when equipped lowered the lighting level by having the "Darkness" spell active
Yes - as beowuuf mentioned there's a hook to allow an action (which could result in a spell) to be performed when an item is equipped / unequipped.
Des Bro Dain wrote:(what are the maximum lighting values anyway)?
Hmmm - complex!

The minimum is 0; the "normal" light level is shown between 100 and 200. Inbetween 0 and 100 the light level varies linearly between the two.

At the other end of the scale, the range is 200 ("normal" brightness) to about 6400 (total whiteout) but this varies logarithmically so you need to get quite far up that scale before it gets hard to see.
Post Reply