Difference between revisions of "ModPCSkill"

Jump to navigation Jump to search
338 bytes added ,  15:01, 9 January 2008
reworked description of the "issues"
imported>ShadowDancer
m (formatting)
imported>White-Gandalf
(reworked description of the "issues")
To lower skills, or to raise skills without having them affect leveling, use Player.[[SetActorValue]] instead.
 
==Issues==
'''Note:''' In the Beta Patch 1.1, this call is fixed by incrementing the level and setting your uses value to 0.0. This avoids the negative value, but if it is used when you are already very close to a level, it will just increase by the amount needed to level.▼
 
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:
'''Note:''' In an unpatched game, ModPCSkill will Increment your skill level by one and decrement your Uses value by the required amount to gain the level. If you had 2.56/7.68 before calling ModPCSkill, it would become -5.12/(New Level Max). Repeated calls will continue to decrement your Uses value by each (New Level Max). If you are close to a new level already, the negative value will be small and quickly overcome, but if you add more than one level of skill, or you repeatedly call ModPCSkill (or [[AdvancePCSkill]]) your deficit will take a lot of time to overcome making your skill appear to be stuck'''
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''').
 
▲'''Note:''' In the Beta Patch 1.1, this call is "fixed" by incrementing the level and setting your uses value to 0.0. This avoids the negative value,skill butusage if it is used when you are already very close to a levelvalues, itbut willnevertheless justwastes increaseall byso thefar amountearned neededskill to levelpoints.
 
'''Workaround:'''
Only minimal distraction occurs when you use [[SetBaseActorValue]] 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==

Navigation menu