Requires DataManager and optionally espParser!
Has to be require
d before any of the modules that use it.
Includes an optional module skillOver100.lua
which allows natural skill progression over 100. You need to require after main.lua
(such as require("custom.LevelingFramework.skillOver100")
). For it to function you should also change the skillCap
value in LevelingFramework config.
You can find the configuration file in server/data/custom/__config_LevelingFramework.json
after first server launch.
message
enabled
whether LevelingFramework should display a message and play a sound like for normal level ups. Defaulttrue
.text
text of the skill increase message. DefaultYour %s skill increased to %s
.sound
path to the skill increase sound file. Defaultfx/inter/levelUP.wav
.id
id of the GUI message box. Default6666
.
importESPs
whether to parse ESP files on startup. Setting this totrue
will significantly increase your server starting times and RAM usage overall. It is recommended to use thelfimportesps
command when necessary. Defaultfalse
.cmdRank
rank required to use thelfimportesps
command. Default2
(admin).skillCap
prevent increasing skills above this value. Default100
. GMST values, more info here OpenMW ResearchskillNames
list of skill names to display. Default are English version names.fMajorSkillBonus
Default0.75
.fMinorSkillBonus
Default1
.fMiscSkillBonus
Default1.25
.fSpecialSkillBonus
Default0.8
.iLevelUpTotal
Default10
.iLevelUpMajorMult
Default1
.iLevelUpMinorMult
Default1
.iLevelUpMajorMultAttribute
Default1
.iLevelUpMinorMultAttribute
Default1
.iLevelupMiscMultAttriubte
Default1
.
Methods:
importESPs()
trigger ESP import manuallyincreaseSkill(pid, skillName, value, keepProgress)
increases a skill byvalue
whole levels. Sets skill progress to 0 unlesskeepProgress
is trueprogressSkill(pid, skillName, progress, count)
progresses the skill byprogress
count
amount of times. Events:LevelingFramework_OnSkillIncrease
is triggered whenever a skill is increased through this script's methods.
callback arguments arepid
andarguments
, wherearguments
is a table with the arguments passed toincreaseSkill
:skillName
,value
,keepProgress
.
This allows your validators to change values beforeincreaseSkill
logic takes place, such as to implement a custom skill cap (look into event hooks inmain.lua
for an example)
Commands:
lfimportesps
load skill and class data from ESPs
In my CustomAlchemy script I do the following
LevelingFramework.progressSkill(pid, "Alchemy", 2, potion_count)
Players[pid]:LoadSkills()
Players[pid]:LoadLevel()
to progress players' alchemy skill, using vanilla values of 2
progress per potion brewed.
Note Players[pid]:LoadSkills()
and Players[pid]:LoadLevel()
, LevelingFramework
's functions only operate Players[pid].data
, you need to call these functions to sync changes with the client.