After a million years, I finally figured out how to port this mod to the toolkit. (As it turns out, the BF was the Osiris scripting wizard all along.) Here's what I did wrong so you can learn from my mistakes.
For reference, here's my original broken build code under the spoiler:
Spoiler:
Show
If you haven't yet seen LaughingLeader's repository of Osiris functions, do yourself a favor and grab a copy of it right now. This cheatsheet lets us check the definition of a particular function, AKA what the hell it actually wants in a parameter when you use it. AddSpell worked for me as written; AddBoosts didn't. Here's the definition for that function:
---@param object GUIDSTRING ---@param boosts string ---@param sourceID string ---@param cause GUIDSTRING function Osi.AddBoosts(object, boosts, sourceID, cause) end
And therein lies the problem. Looking at my AddBoosts function, it says:
This is why I got the 'parameter 3 is an unbound variable' error. The '_' mark in the third slot is just to list an undefined variable. But the function doesn't want a variable there: it wants a string. Blank quotation marks, like "", is how you list an undefined string.
Looking at the function definition again, you'll see that parameter 4 (cause GUIDSTRING) will also give me a problem for not being a string. In that case, I had to actually define it so the script would build. Dunno if I did it the right way, but it worked!
And now, here's the final working build code. Hopefully this helps someone out there. Happy modding! ✌️
Oh god, I didn't realize until I saw this mod that Tiewing in Baldur's Gate 3 doesn't have any upgrades for Infernal Legacy! I would like to know if you can add hellish rebukes to all Tiewing races based on their character level? Even adding darkness? Just like in 5e, I don't know if it would be troublesome to do this because I only localize and don't make mods. If it's troublesome, then forget about it
I think for a mod affecting all tieflings, it would be better to edit the race/subrace directly than how I did it (just adding a spell with SE). Unfortunately I'm not the best person to ask about that... 😞 There are progression files that you could probably edit to add all the Infernal Legacy skills, but I have no experience in modding those.
I took a look to see if someone already made a mod like this but I couldn't find anything. I'm a little surprised, I figured someone would have done this already!
I won't be able to personally test this particular mod in Patch 7 for awhile, but it should still function as intended. (Someone please let me know if this isn't actually the case 😳) Installing is where this is different now, though.
If by BG3MM you mean LaughingLeader's mod manager, I don't expect any problems. This isn't an override file and you'll be on a high enough version of Script Extender for this (v19 or v20 or wherever they're at now). You do need to be on version 1.0.11.0 or higher of BG3MM so it exports your mod list correctly for Patch 7.
If you mean the official in-game mod manager instead, any Script Extender mods will always be third party because SE is not supported by the toolkit. Idk if this mod will even show up on the in-game mod list. You best bet AFAIK is to keep using BG3MM if you want to continue using SE mods.
Just tested as I rebuild my modlist for Patch 7 and it seems to work fine for me, installed through BG3MM. Started a quick Karlach new game and it's in her reactions list and worked properly reacting to an imp attack.
Hi! Do you mean that Karlach received Hellish Rebuke but that there wasn't a notification for it?
If so, that's on purpose, there's no in-game prompt that tells you she received it. (One because I don't know how lol, and two, probably a little intrusive.) If you have the Debug Console open, you do get printouts to let you know that Hellish Rebuke got added, has previously been added, or failed to add.
looked like she has it but cant use or something. other reactions were firing all the time, like those of "lucky" ones for example, but apparently i was wrong, guess there is some sort of priorities for them. i'll keep an eye on that, maybe i'll just disable others. thanks again for making it, it really fits her like a glove!
data "Conditions" "not HasVerbalComponentBlocked(context.Observer) and IsAbleToReact(context.Observer) and Enemy(context.Source,context.Observer) and HasFunctor(StatsFunctorType.DealDamage) and IsHit() and not AnyEntityIsItem() and HasLastAttackTriggered()"
data "EnableCondition" "HasActionResource('Interrupt_HellishRebukeTiefling_Charge', 1, 0, false, false, context.Source) and (not HasAnyStatus({'SG_Polymorph','SG_Blinded'}) or Tagged('MINDFLAYER') or HasStatus('SG_Disguise'))"
Yeah, the procs for Hellish Rebuke are more fiddly compared to something like Lucky or Shield: it needs to specifically be a damage-dealing attack, it needs to actually hit, etc etc. Also, this is something I always forget but AFAIK mindflayers can't use most normal reactions, so no Hellish Rebuke for squiddie Karlach :(
20 comments
After a million years, I finally figured out how to port this mod to the toolkit. (As it turns out, the BF was the Osiris scripting wizard all along.) Here's what I did wrong so you can learn from my mistakes.
For reference, here's my original broken build code under the spoiler:
If you haven't yet seen LaughingLeader's repository of Osiris functions, do yourself a favor and grab a copy of it right now. This cheatsheet lets us check the definition of a particular function, AKA what the hell it actually wants in a parameter when you use it. AddSpell worked for me as written; AddBoosts didn't. Here's the definition for that function:
---@param object GUIDSTRING
---@param boosts string
---@param sourceID string
---@param cause GUIDSTRING
function Osi.AddBoosts(object, boosts, sourceID, cause) end
And therein lies the problem. Looking at my AddBoosts function, it says:
AddBoosts(_Player, "ActionResource(Interrupt_HellishRebukeTiefling_Charge,1,0)", _, _)
This is why I got the 'parameter 3 is an unbound variable' error. The '_' mark in the third slot is just to list an undefined variable. But the function doesn't want a variable there: it wants a string. Blank quotation marks, like "", is how you list an undefined string.
Looking at the function definition again, you'll see that parameter 4 (cause GUIDSTRING) will also give me a problem for not being a string. In that case, I had to actually define it so the script would build. Dunno if I did it the right way, but it worked!
And now, here's the final working build code. Hopefully this helps someone out there. Happy modding! ✌️
I took a look to see if someone already made a mod like this but I couldn't find anything. I'm a little surprised, I figured someone would have done this already!
If by BG3MM you mean LaughingLeader's mod manager, I don't expect any problems. This isn't an override file and you'll be on a high enough version of Script Extender for this (v19 or v20 or wherever they're at now). You do need to be on version 1.0.11.0 or higher of BG3MM so it exports your mod list correctly for Patch 7.
If you mean the official in-game mod manager instead, any Script Extender mods will always be third party because SE is not supported by the toolkit. Idk if this mod will even show up on the in-game mod list. You best bet AFAIK is to keep using BG3MM if you want to continue using SE mods.
Thank you for the report!! I appreciate it!
is there some other specifics to that event?
If so, that's on purpose, there's no in-game prompt that tells you she received it. (One because I don't know how lol, and two, probably a little intrusive.) If you have the Debug Console open, you do get printouts to let you know that Hellish Rebuke got added, has previously been added, or failed to add.
data "Conditions" "not HasVerbalComponentBlocked(context.Observer) and IsAbleToReact(context.Observer) and Enemy(context.Source,context.Observer) and HasFunctor(StatsFunctorType.DealDamage) and IsHit() and not AnyEntityIsItem() and HasLastAttackTriggered()"
data "EnableCondition" "HasActionResource('Interrupt_HellishRebukeTiefling_Charge', 1, 0, false, false, context.Source) and (not HasAnyStatus({'SG_Polymorph','SG_Blinded'}) or Tagged('MINDFLAYER') or HasStatus('SG_Disguise'))"
Yeah, the procs for Hellish Rebuke are more fiddly compared to something like Lucky or Shield: it needs to specifically be a damage-dealing attack, it needs to actually hit, etc etc. Also, this is something I always forget but AFAIK mindflayers can't use most normal reactions, so no Hellish Rebuke for squiddie Karlach :(