Nice, this is exactly what I needed. For Morrowind and Oblivion I like to level super efficiently with no skill level and attribute point wasted. I had just started a new game and I somehow forgot about skill books. I picked up a random mercantile skill book without realizing it and leveled Mercantile skill - I had no intention in leveling Personality so soon in my leveling plan. I played a bit more to try to work around it, but it became a wrench to the plan. I've decided to scrap that save and start over.
This time my load order will include your mod and another mod that indicates a skill book is a skill book so that I don't accidentally level a skill I don't want at that particular moment. I know there are more instances of forced skill level-ups, with quests and such, but at least now I feel like I have a bit more control over when I want to level a particular attribute. And if I get points for attributes I didn't intend to level at that moment, no worries it'll carry foward.
Thanks for this mod, the simplicity is exactly what I was looking for. I also amended the levelUpCallback function to save any attribute progress over 10 if the attribute was chosen during level up so optimizing leveling is just that extra little bit more sane, thought I'd post it here if anyone else wanted:
--- @param e levelUpEventData local function levelUpCallback(e) -- mwse.log("----------------- levelUpCallback -----------------") local mp = tes3.mobilePlayer for i, v in ipairs(mp.attributes) do -- retrieve the cached value local cached = llu_cache[i] if cached > 0 then -- mwse.log(i .. ": " .. v.base) local diff = v.base - attr_cache[i] -- mwse.log("diff: " .. diff) if diff == 0 then -- mwse.log("cached for " .. i .. ": " .. cached) -- add to player mp.levelupsPerAttribute[i] = cached elseif cached > 10 then mp.levelupsPerAttribute[i] = cached - 10 end end end -- cleanup llu_cache = {} attr_cache = {} end
Well, there's a third case. Let's say you have gathered 4 skill levelups for one attribute. At levelup you get 2 points for the attribute, but would get the same 2 points for only one skill levelup. That means you lose 3 unused points at levelup...
Doesn't seem to do anything, I installed MWSE 2.1, after levelling up i use the console command 'Enablelevelupmenu' and can only increase attributes by 1, the 5 I had in endurance has been cleared even though I didn't use it on levelling up.
8 comments
This time my load order will include your mod and another mod that indicates a skill book is a skill book so that I don't accidentally level a skill I don't want at that particular moment. I know there are more instances of forced skill level-ups, with quests and such, but at least now I feel like I have a bit more control over when I want to level a particular attribute. And if I get points for attributes I didn't intend to level at that moment, no worries it'll carry foward.
Much appreciated for sharing your mod.
--- @param e levelUpEventData
local function levelUpCallback(e)
-- mwse.log("----------------- levelUpCallback -----------------")
local mp = tes3.mobilePlayer
for i, v in ipairs(mp.attributes) do
-- retrieve the cached value
local cached = llu_cache[i]
if cached > 0 then
-- mwse.log(i .. ": " .. v.base)
local diff = v.base - attr_cache[i]
-- mwse.log("diff: " .. diff)
if diff == 0 then
-- mwse.log("cached for " .. i .. ": " .. cached)
-- add to player
mp.levelupsPerAttribute[i] = cached
elseif cached > 10 then
mp.levelupsPerAttribute[i] = cached - 10
end
end
end
-- cleanup
llu_cache = {}
attr_cache = {}
end