File: Attributes.em

Description: Functions for working with mobile's attributes/skills.
Last Modified: 10/27/2007

AlterAttributeTemporaryMod( character, attrname, delta_tenths )
Parameters:
NameType
characterCharacter Reference
attrnameString (attribute name)
delta_tenthsInteger
Explanation
Changes the temporary modification value for attribute named "attrname". delta_tenths is in tenths, obviously. So "1" would increase the temp mod by 0.1 points.
Return values
1 on success or Error
Errors
"Invalid parameter type" including if attrname was not found as an attribute
"New modifier value is out of range"
Related
Character
Related Configs
attributes.cfg



BaseSkillToRawSkill( baseskill )
Parameters:
NameType
baseskillInteger
Explanation
Converts an old-style "base skill" value to old-style "raw skill" value.
Notes: OBSOLETE
Return values
Raw skill value representation
Errors
"Invalid parameter type"



CheckSkill( character, skillid, difficulty, points )
Parameters:
NameType
characterCharacter Ref
skillidInteger skill/attribute ID
difficultyInteger skill use difficulty
pointsInteger skill gain on success
Explanation
NOTE: Calls the Syshook script CheckSkill. If it doesn't exist, always returns false.
Return values
Return value of CheckSkill syshook.
Errors
"Invalid parameter"
"No such skill"
Related
Character



GetAttributeBaseValue( character, attrname )
Parameters:
NameType
characterCharacter Reference
attrnameString (attribute name)
Explanation
Returns the base value for the specified attribute on character.
Return values
Integer "Base" attribute value on success or Error
Errors
"Invalid parameter type" including if attrname was not found as an attribute
Related
Character
Related Configs
attributes.cfg



GetAttribute( character, attrname )
Parameters:
NameType
characterCharacter Reference
attrnameString (attribute name)
Explanation
Returns the current effective value for the specified attribute on character.
Return values
Integer "Effective" attribute value on success (base + temporary mod + intrinsic mod) or Error
Errors
"Invalid parameter type" including if attrname was not found as an attribute
Related
Character
Related Configs
attributes.cfg



GetAttributeIntrinsicMod( character, attrname )
Parameters:
NameType
characterCharacter Reference
attrnameString (attribute name)
Explanation
Returns the intrinsic value for the specified attribute on character.
You set intrinsic Mod via exported GetIntrinsicModFunction in attributes.cfg
Return values
Integer "Intrinsic" attribute value on success or Error
Errors
"Invalid parameter type" including if attrname was not found as an attribute
Related
Character
Related Configs
attributes.cfg



GetAttributeName( alias_name )
Parameters:
NameType
alias_nameString
Explanation
Returns the real attribute name from an alias
Return values
String
Errors
"Invalid parameter"
Related
Character



GetAttributeTemporaryMod( character, attrname )
Parameters:
NameType
characterCharacter Reference
attrnameString (attribute name)
Explanation
Returns the temporary modification value for the specified attribute on character.
Return values
Integer "temporary" attribute value on success or Error
Errors
"Invalid parameter type" including if attrname was not found as an attribute
Related
Character
Related Configs
attributes.cfg



RawSkillToBaseSkill( rawskill )
Parameters:
NameType
rawskillInteger
Explanation
Converts an old-style "raw skill" value to old-style "base skill" value.
Notes: OBSOLETE
Return values
Base skill value representation
Errors
"Invalid parameter type"



SetAttributeBaseValue( character, attrname, basevalue_tenths ); // obsoletes SetRawSkill
Parameters:
NameType
characterCharacter Reference
attrnameString (attribute name)
basevalue_tenthsInteger (0..60000)
Explanation
Sets the "base" value of "attrname" on "character"
Return values
1 on success
Errors
"Invalid parameter type"
Related
Character
Related Configs
attributes.cfg



SetAttributeTemporaryMod( character, attrname, tempmod_tenths ); // obsoletes mob.strength_mod etc
Parameters:
NameType
characterCharacter Reference
attrnameString (attribute name)
tempmod_tenthsInteger (-30000..30000)
Explanation
Sets the "temporary modification" value of "attrname" on "character"
Return values
1 on success
Errors
"Invalid parameter type" including if attrname was not found as an attribute
Related
Character
Related Configs
attributes.cfg




If you know if any information is incorrect on these pages, mail your corrections to polteam@polserver.com

Copyright ©2003-2006 David Carpman and POL Development Team, all rights reserved. DO NOT REPRODUCE, MIRROR, ALTER, SPINDLE, MUTILATE, OR SIT ON.