Difference between revisions of "ModPCSkill"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>DragoonWraith
(CS 1.0)
imported>Vswe
m (Added Search Terms)
 
(6 intermediate revisions by 3 users not shown)
Line 4: Line 4:
  ModPCSkill Block 1
  ModPCSkill Block 1


ModPCSkill increases '''[[Stats List|SkillName]]''' by '''amount'''. Make sure the number you use is a positive number. The increase counts toward leveling just like normal "earned" skill increases.
ModPCSkill increases '''[[Stats List|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.
To lower skills, or to raise skills without having them affect leveling, use Player.[[SetActorValue]] instead.


'''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.
==Issues==


'''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'''
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==
==See also==
Line 18: 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]