| skills.inc Functions | |
| Includes | |
| The following inc files are included in skills.inc | |
| none | |
| AP_GetSkill |
|
| Parameters | |
| (mobile, skill_name) | |
| Name | Type |
| mobile | Mobile reference to retrieve the skill from. |
| skill_name | Name of the skill to retrieve the value for. |
| Explanation | |
| Retrieves the base value of the skill plus its mod value. |
|
| Return Values | |
| Returns an integer. | |
| AP_GetTrueSkill |
|
| Parameters | |
| (mobile, skill_name) | |
| Name | Type |
| mobile | Mobile reference to retrieve the points from. |
| akill_name | Name of the skill to retrieve the points for. |
| Explanation | |
| Retrieves the base value of the skill and turns it into a usable number eg 10.5 instead of 105 | |
| Return Values | |
| Returns a double. | |
| AP_GetSkillMod |
|
| Parameters | |
| (mobile, skill_name) | |
| Name | Type |
| mobile | Mobile reference to retrieve the points from. |
| skill_name | Name of the skill to retrieve the modifier points for. |
| Explanation | |
| Retrieves the base value of the skill mod and turns it into a usable number. (eg 2.5 instead of 25) | |
| Return Values | |
| Returns a double | |
| AP_SetTrueSkill | |
| Parameters | |
| (mobile, skill_name, points) | |
| Name | Type |
| mobile | Mobile reference to set the points on. |
| skill_name | Name of the skill to set the points on. |
| points | Number of points to set the skill at. |
| Explanation | |
| Sets the value of the skill. Example: AP_SetTrueSkill(mobile, "strength", 44.5) | |
| Return Values | |
| The result of SetAttributeBaseValue() | |
| AP_SetSkillMod | |
| Parameters | |
| (mobile, skill_name, points) | |
| Name | Type |
| mobile | Mobile reference to set the modifier points on. |
| skill_name | Name of the skill to set the modifier points on. |
| points | Number of points to set the modifier skill at. |
| Explanation | |
| Sets the modifier value for the skill. Example: AP_SetSkillMod(mobile, "strength", -15.3) | |
| Return Values | |
| The result of SetAttributeTemporaryMod() | |
| AP_ModifySkillMod | |
| Parameters | |
| (mobile, skill_name, points) | |
| Name | Type |
| mobile | Mobile reference to adjust the modifier points on. |
| skill_name | Name of the skill to adjust the modifier points on |
| points | Number of points to adjust the modifier by. |
| Explanation | |
| Modifies the modifier value for the skill by "points" amount. Example AP_ModifySkillMod(mobile, "alchemy", 5.3) | |
| Return Values | |
| Returns the previous value | |
| AP_GetSkillScript | |
| Parameters | |
| (attribute_name) | |
| Name | Type |
| attribute_name | Name of the attribute to get the script for |
| Explanation | |
| Gets the script that a skill uses. | |
| Return Values | |
| Returns a string. | |
| AP_GetSkillStats | |
| Parameters | |
| (attribute_name) | |
| Name | Type |
| attribute_name | Name of the skill to retrieve stat settings for. |
| Explanation | |
| Retrieves a dictionary from the attribute's config elem Key is the stat name, inside is an array containing the settings for it. dict["StatName"] => array{gain chance, award points dice} | |
| Return Values | |
| Returns a dictionary. | |
| AP_GetSkillCap | |
| Parameters | |
| (skill_name:="") | |
| Name | Type |
| skill_name | Name of the skill to check |
| Explanation | |
| Gets the number a skill caps at. | |
| Return Values | |
| Returns a number or error | |
| AP_CheckSkillCap | |
| Parameters | |
| (mobile, skill_name:="") | |
| Name | Type |
| mobile | Mobile to check the skills on |
| skill_name | Optional parameter - name of the skill to check. |
| Explanation | |
| Checks if a skill is greater than or equal to its maximum value in settings.cfg If no skill_name is passed, it will check the totals. | |
| Return Values | |
| Returns 1 if skill(s) >= to the cap | |
| AP_CheckSkillCap | |
| Parameters | |
| (mobile) | |
| Name | Type |
| mobile | Mobile to check the skills on |
| Explanation | |
| Checks the total sum of all skills a mobile has. | |
| Return Values | |
| Returns Integer of the sum total of skill points | |