Any chance of getting this on mod.io as well? Now that the game supports it natively it would be much more convenient and i cant find anything similar on there yet.
Added my own adjustments to include shadow spell slots, and spell slots levels 7-9 support. I tested the changes and they seem to be working. If others want my adjustments you can find them here, forked from the repo started by @DDanDev : https://github.com/marqgray/bg3-regeneration-mod-fixes/releases/latest
I edited the commands as well to help first time users figure everything out :D Example:
MISSING in mod >>>>>>>> Blades => lvl1: 1.0/1.0, -- Add the following line to your MCM_blueprint.json: { "Id": "Blades", "Name": "Blades Regeneration Rate", "Tooltip": "Turns required to regenerate Blades", "Type": "slider_int", "Default": 1, "Options": { "Min": 0, "Max": 1200 }
} -- Add the following line to your BootstrapServer.lua: Blades = MCMGet("Blades")
I set ALL sliders to the max (30). While out of combat it works, I wait a while and stuff come back. Would love to have way more range than 3 minutes afk restores everything. HOWEVER, in combat, each turn is restoring everything back to full. I then disabled combat regen and behavior continues.
I just want something to not be forced to either be holding back on everything cool I could do but don't because I might need it more later, while at the same time not be forced to short rest/full rest constantly. Any ideas how to fix?
I like this one's idea better over the alternative I found Configurable resources regeneration because in case several fights are chained I won't have everything back up immediately with this one. And while I can just wait a bit during exploration to turn into a mist again or something like that, or recast buffs that I would have cast had I taken rests, it is not all freely available with zero cooldown.
Maybe a simple mod would suffice that just did nothing automatically but allowed me to click a button/type a command in console and restore everything when I feel its "fair" for my gameplay, for enabling fun (stop holding back and not be forced to rest constantly) instead of for cheesing everything.
While I don't quite share all the sentiments, it would be great to have the option to increase it to more than 30 turns (which should equate to 5min real time?). Would personally like some regen, but not to easily have regened all of my spell slots between most encounters.
If you know how to extract/bundle .pak (look at BG3-Modders-Multitool for example), you can easily increase the maximum in the MCM file. 30 rounds = 3 minutes. I have put my maximum at 1200 (2 hours). But still trying to figure out why am I getting regenerated during combat, and not after the number of turns specified.
Need to test it better but basically, I use everything I can (rage, maneuvre dice, spell slots, weapon actions) in the first turn. When the turn gets back to that character it has everything back already... Might be the out of combat timer still running, might be just a first turn bug, might be because I usually have someone out of combat when I start one.
I have identified and fixed the issue. Posting here for Mithras666 to take it as a suggestion (consider it a pull request lol). For others, while the author doesn't update the mod, feel free to get my version: https://github.com/DDanDev/bg3-regeneration-mod-fixes
Uploaded the merged version! Thank you so much @DDanDev for your amazing work <3 Means a lot to me and I wish I could have helped, but alas I haven't been able to mod for a month now and I don't see it happening in the next few weeks either :(
Do you know why I'm getting this error every few seconds?
Error while dispatching user function call: [string "Regeneration/BootstrapServer.lua"]:176: attempt to index a nil value stack traceback: Regeneration/BootstrapServer.lua:176: in upvalue 'CountATurn' Regeneration/BootstrapServer.lua:223: in function <Regeneration/BootstrapServer.lua:214> [C++ Code]: in ?
It's the only mod doing something like this out of hundreds so I'm probably going to have to remove it.
@Wikt0r1us Hi I helped with the latest version and would like to understand your issue. That line from the error goes through a character's resources. I wonder if you have another mod that adds a new kind of resource to your character. A resource is something like a spell slot, an "action", a bonus action, a use of a reaction, etc. It looks like there's a resource in your character's ActionResources (I guess from a mod) that is not in StaticData.
We can investigate if you can unpack the mod (use bg3-modders-multitool or LSLib Toolkit), go to Mods/Regeneration/ScriptExtender/Lua/BootstrapServer.lua and replace the line 176 and what follows with the following, then repack it and replace the new pak in your mods folder. This will stop the mod from breaking and throwing that error, it will then still work for other resources and you will have in your console some info you can post back here for us to learn what's your issue. If the bugged resource is something you would like to regenerate, we can enable support for that. If you're fine with just skipping the bugged resource, simply remove all the added _P and _D new lines to stop writing the debug stuff to your console, everything else should now work.
Original code is: for UUID, resource in pairs(resources) do local resourceName = Ext.StaticData.Get(UUID, "ActionResource").Name
for lvl, resourceData in pairs(resource) do if resourceData and resourceData.Amount then local resourceNameComplete = resourceName if resourceName == "SpellSlot" or resourceName == "WarlockSpellSlot" then resourceNameComplete = resourceName .. "sLvl" .. lvl end count(character, resourceNameComplete, resourceData, entity) end end end
Replace with: for UUID, resource in pairs(resources) do local resourceStatic = Ext.StaticData.Get(UUID, "ActionResource") -- removed .Name <<<<<<<<<
if resourceStatic == nil then -- new lines <<<<<<<<< _P("Invalid resource") _P("UUID") _D(UUID) _P("resource") _D(resource) _P("static") _D(resourceStatic) _P("character") _D(character) goto continue end
local resourceName = resourceStatic.Name -- end of new lines <<<<<<<<<
for lvl, resourceData in pairs(resource) do if resourceData and resourceData.Amount then local resourceNameComplete = resourceName if resourceName == "SpellSlot" or resourceName == "WarlockSpellSlot" then resourceNameComplete = resourceName .. "sLvl" .. lvl end count(character, resourceNameComplete, resourceData, entity) end end ::continue:: -- new line <<<<<<<<<<< end
103 comments
Mithras' Mod Menus
You can also support me on Ko-Fi:
Currently supported mods are:
Blood Hunter Class
Mystic Class at Baldur's Gate 3 Nexus
Ghastly Ghouls - Playable Undead Race
Arcane Archer - Fighter Subclass
Vanguard Class - Arcane Martial Half-Caster
Blackguard
LaserLlama Shaman Class
Onyxeagle's Spell Points Overhaul
PS: If you'd like me to include another mod, please contact me in the Discord thread, as I'll need some information about the resources.
Also does this include Illithid powers' resources and dialouge related illithid powers ?
https://www.nexusmods.com/baldursgate3/mods/14971?tab=description
Have you thought in any update for new resource with patch 8?
Bladesong power for wizard.
Cosmic omens and star maps for druid
Arcane arrows for warrior
Writhing currents for ranger
I think those are all.
Thx for the mod.
HOWEVER, in combat, each turn is restoring everything back to full. I then disabled combat regen and behavior continues.
I just want something to not be forced to either be holding back on everything cool I could do but don't because I might need it more later, while at the same time not be forced to short rest/full rest constantly. Any ideas how to fix?
I like this one's idea better over the alternative I found Configurable resources regeneration because in case several fights are chained I won't have everything back up immediately with this one. And while I can just wait a bit during exploration to turn into a mist again or something like that, or recast buffs that I would have cast had I taken rests, it is not all freely available with zero cooldown.
Maybe a simple mod would suffice that just did nothing automatically but allowed me to click a button/type a command in console and restore everything when I feel its "fair" for my gameplay, for enabling fun (stop holding back and not be forced to rest constantly) instead of for cheesing everything.
Need to test it better but basically, I use everything I can (rage, maneuvre dice, spell slots, weapon actions) in the first turn. When the turn gets back to that character it has everything back already... Might be the out of combat timer still running, might be just a first turn bug, might be because I usually have someone out of combat when I start one.
https://github.com/DDanDev/bg3-regeneration-mod-fixes
Edit: The Dan Update rofl
Error while dispatching user function call: [string "Regeneration/BootstrapServer.lua"]:176: attempt to index a nil value
stack traceback:
Regeneration/BootstrapServer.lua:176: in upvalue 'CountATurn'
Regeneration/BootstrapServer.lua:223: in function <Regeneration/BootstrapServer.lua:214>
[C++ Code]: in ?
It's the only mod doing something like this out of hundreds so I'm probably going to have to remove it.
Hi I helped with the latest version and would like to understand your issue. That line from the error goes through a character's resources. I wonder if you have another mod that adds a new kind of resource to your character. A resource is something like a spell slot, an "action", a bonus action, a use of a reaction, etc. It looks like there's a resource in your character's ActionResources (I guess from a mod) that is not in StaticData.
We can investigate if you can unpack the mod (use bg3-modders-multitool or LSLib Toolkit), go to Mods/Regeneration/ScriptExtender/Lua/BootstrapServer.lua and replace the line 176 and what follows with the following, then repack it and replace the new pak in your mods folder. This will stop the mod from breaking and throwing that error, it will then still work for other resources and you will have in your console some info you can post back here for us to learn what's your issue. If the bugged resource is something you would like to regenerate, we can enable support for that. If you're fine with just skipping the bugged resource, simply remove all the added _P and _D new lines to stop writing the debug stuff to your console, everything else should now work.
Original code is:
for UUID, resource in pairs(resources) do
local resourceName = Ext.StaticData.Get(UUID, "ActionResource").Name
for lvl, resourceData in pairs(resource) do
if resourceData and resourceData.Amount then
local resourceNameComplete = resourceName
if resourceName == "SpellSlot" or resourceName == "WarlockSpellSlot" then
resourceNameComplete = resourceName .. "sLvl" .. lvl
end
count(character, resourceNameComplete, resourceData, entity)
end
end
end
Replace with:
for UUID, resource in pairs(resources) do
local resourceStatic = Ext.StaticData.Get(UUID, "ActionResource") -- removed .Name <<<<<<<<<
if resourceStatic == nil then -- new lines <<<<<<<<<
_P("Invalid resource")
_P("UUID")
_D(UUID)
_P("resource")
_D(resource)
_P("static")
_D(resourceStatic)
_P("character")
_D(character)
goto continue
end
local resourceName = resourceStatic.Name -- end of new lines <<<<<<<<<
for lvl, resourceData in pairs(resource) do
if resourceData and resourceData.Amount then
local resourceNameComplete = resourceName
if resourceName == "SpellSlot" or resourceName == "WarlockSpellSlot" then
resourceNameComplete = resourceName .. "sLvl" .. lvl
end
count(character, resourceNameComplete, resourceData, entity)
end
end
::continue:: -- new line <<<<<<<<<<<
end