Difference between revisions of "Talk:AdvancePCSkill"

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search
imported>ABO
m
imported>ABO
m
 
Line 6: Line 6:
Mods wishing to use this function can reset the levelup notification using OBSE's [[setPCMajorSkillUps]] and [[getPCMajorSkillUps]] functions. The skill increases misc stat can be increased using [[modPCMiscStat]]. The code for this looks like;
Mods wishing to use this function can reset the levelup notification using OBSE's [[setPCMajorSkillUps]] and [[getPCMajorSkillUps]] functions. The skill increases misc stat can be increased using [[modPCMiscStat]]. The code for this looks like;


  advancePCSkill athletics 1
  advancePCSkill athletics, 1
  modPCMiscStat 2, 1
  modPCMiscStat 2, 1
  set temp to getPCMajorSkillUps
  set temp to getPCMajorSkillUps

Latest revision as of 21:46, 3 February 2009

This function has some interesting behaviour and bugs;

  • It does correctly increment the pc major skill advance count, but it does not honour the iLevelUpSkillCount setting, and will show the levelup notification and icon if the major skill advance count has reached 10, regardless of what iLevelUpSkillCount is set to.
  • It does not increase the skill increases misc stat.

Mods wishing to use this function can reset the levelup notification using OBSE's setPCMajorSkillUps and getPCMajorSkillUps functions. The skill increases misc stat can be increased using modPCMiscStat. The code for this looks like;

advancePCSkill athletics, 1
modPCMiscStat 2, 1
set temp to getPCMajorSkillUps
setPCMajorSkillUps temp

Normal skill ups from earning experience will automatically increment the pc major skill advance count while honouring the iLevelUpSkillCount setting, and will increase the skill increases misc stat without any problems. Many leveling mods watch the skill increases misc stat to detect skill advances to trigger attribute and level recalculation. The OBSE function incrementPlayerSkillUse also works correctly, and can be used in conjunction with getSkillUseIncrement and setSkillUseIncrement to add controlled amounts of experience.

Note the amount of experience required to advance a skill can be calculated using the fSkillUseFactor, fSkillUseExp, fSkillUseMajorMult, fSkillUseMinorMult, fSkillUseSpecMult, settings together with getClassSpecialization and isClassSkill. You can use getPlayerSkillUse to get how much experience a skill has accumulated since the last advance.

--ABO 13:36, 3 February 2009 (EST)