[crossfire] Item power/enchantment question

Rick Tanner leaf at real-time.com
Thu Dec 21 16:16:31 CST 2006



Nicolas Weeger (Laposte) wrote:
> I'm wondering if there is somewhere 
> documentation about what item power and enchantment are supposed to do? :)
> 
> So we can fix as the documentation says it should work, or fix the 
> documentation ^_-

This?

http://crossfire.svn.sourceforge.net/viewvc/crossfire/server/branches/1.x/doc/Developers/objects?revision=5018&view=markup

Section 3G Item Power (item_power)

item_power measures how powerful and item is.  This information is only
relevant for items that are equipped - one time use items, monsters,
walls, floors, do not use this.

When a player tries to equip something, the code goes through all the
objects the player currently has equipped and sums up their item_power.
 The item_power of the object the player is trying to equip is also
added.  If this total exceeds the characters level, he is not allowed to
equip the item.

In simple terms, the sum of all the players equip items item_power must
be less than the characters level.

Powerful items should have a higher item_power value.  This basically
acts as a way to balance the items.  It also prevents gifts from high
level characters to newbies from being very useful - the item_power may
prevent the low level character from equipping this items.

For items automatically generated by the treasure code, the following
formula is used:

# enchantments        power
    0        0
    1        0
    2        1
    3        2
    4        3
    5        5
    6        8
    7        11

An enchantment is:
Each plus an item has.
Each point an item increases an ability.
Each 20% protection an item gives (rounded normally, eg 0-9 counts as
nothing,
10-29 counts as one, etc)
Each attacktype a weapon has.
Spell path adjustments

This same formula can be used for custom objects to figure out their
item power.

While the item_power field in the object structure is signed, in
general, there should not be objects with a negative item power.
However, negative effects an item has may reduce the item power.  Eg, a
'sword +4 (str +2)(wis -3)' would really be 3 enchantments.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://mailman.metalforge.org/pipermail/crossfire/attachments/20061221/b3aaf9cb/attachment.pgp 


More information about the crossfire mailing list