Charged Items
The charge system is a generic-use component that counts item uses,
how ever that is defined, in world event notification terms. It will
manage updating usage count in the item name, and save the usage
value across multiplayer game sessions (through gold value).
The charge component is not dependent on any other systems or files, but other
systems can be dependent on charges.
Other optional features of the charge component:
- initialize with a random number of charges (specifiable min-max)
- replenishable by automatic recharge (specifiable rate)
- replenishable by spending gold at a store
- replenishable by special event (message notification)
- delete its owner Go when the last charge is used
- send notification messages to self upon certain charge states (zero charges, one charge, fully charged)
Certain items in the mod implement the charge component, namely:
- rejuvenation potions
- spellcasting gauntlets
The number of charges remaining on an item is indicated in the name of
the item. For example, Small Rejuvenation Potion (3/5) means that there
are 3 more uses left out of 5 total. The current purchase cost/sell value
depends on the number of charges left on the item. Charges can be
replenished by selling the item to a shopkeeper and then buying it back.
Files
Origin Ramblings
I got the idea of using gold value to store charge count in multiplayer character saves
from Shulsocrath during in an IRC conversation we had a while back.