Difference between revisions of "ModPCSkill"
imported>White-Gandalf m (cosmetic change) |
imported>Vswe m (Added Search Terms) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 10: | Line 10: | ||
==Issues== | ==Issues== | ||
This function is meant to be used internally for skill leveling control. It is designed to operate on the "usage count" for the skill in the following manner: | This function is meant to be used '''internally''' for skill leveling control. It is designed to operate on the "usage count" for the skill in the following manner: | ||
On reaching the current usage limit for a skill level up it executes: | On reaching the current usage limit for a skill level up it executes: | ||
skill_level ++ | skill_level ++ | ||
skill_usage -= old_skill_usage_limit | skill_usage -= old_skill_usage_limit | ||
skill_usage_limit = new_skill_usage_limit | skill_usage_limit = new_skill_usage_limit | ||
'''Note:''' | '''Note:''' | ||
Line 24: | Line 24: | ||
'''Workaround:''' | '''Workaround:''' | ||
Only minimal distraction occurs when you use [[ | Only minimal distraction occurs when you use [[SetActorValue]] instead. It will lead to a slightly lower "skill_usage_limit" for the newly gained skill level (thus acting as the same as an additional little usage point bonus), but not to the waste of averagely 100% (unpatched) versus 50% (patched) of the "usage points", which makes such a bonus level-up useless. | ||
==See also== | ==See also== | ||
Line 32: | Line 32: | ||
[[Category: Functions]] | [[Category: Functions]] | ||
[[Category:Functions (CS)]] | |||
[[Category: Functions (CS 1.0)]] | [[Category: Functions (CS 1.0)]] | ||
[[Category: Player Functions]] | [[Category: Player Functions]] | ||
[[Category: Player Functions (CS 1.0)]] | [[Category: Player Functions (CS 1.0)]] | ||
<!-- Begin Search Terms | |||
Mod | |||
PC | |||
Skill | |||
End Search Terms --> |
Latest revision as of 12:07, 20 June 2008
Syntax:
ModPCSkill SkillName amount
Example:
ModPCSkill Block 1
ModPCSkill increases SkillName by amount and decreases the "usage count" for that skill by the current "usage count limit" (see #Issues). Make sure the number you use is a positive number. The increase counts toward leveling just like normal "earned" skill increases.
To lower skills, or to raise skills without having them affect leveling, use Player.SetActorValue instead.
Issues[edit | edit source]
This function is meant to be used internally for skill leveling control. It is designed to operate on the "usage count" for the skill in the following manner: On reaching the current usage limit for a skill level up it executes:
skill_level ++ skill_usage -= old_skill_usage_limit skill_usage_limit = new_skill_usage_limit
Note: While this leads to correct behavior in normal gameplay, it leads to confusion in fan made made scripts, when they just want to give an additional bonus level-up. They usually don't expect third variables and processes to be affected (and especially not negatively).
In the Beta Patch 1.1, this call is "fixed" by incrementing the level and setting your uses value to 0.0. This avoids negative skill usage values, but nevertheless wastes all so far earned skill points.
Workaround: Only minimal distraction occurs when you use SetActorValue instead. It will lead to a slightly lower "skill_usage_limit" for the newly gained skill level (thus acting as the same as an additional little usage point bonus), but not to the waste of averagely 100% (unpatched) versus 50% (patched) of the "usage points", which makes such a bonus level-up useless.
See also[edit | edit source]