For those who are comfortable modding mods, if you replace the code in SitOut.lua with the following, it will only install the SitOut passive on player characters and summons. (The current mod installs it on every creature in the game, it seems. FWIW, I'm not actually sure it's a problem that has any bad side effects.)
local SitOut_PassiveName = "SitOut"
function SitOut_GetSquadiesAndCampies() local scampies = {} local players = Osi.DB_Players:Get(nil) for _, player in pairs(players) do table.insert(scampies, player[1]) end local origins = Osi.DB_Origins:Get(nil) for _, origin in pairs(origins) do table.insert(scampies, origin[1]) end local summons = Osi.DB_PlayerSummons:Get(nil) for _, summon in pairs(summons) do table.insert(scampies, summon[1]) end
-- Remove duplicates local seen = {} local i = 1 while i <= #scampies do if seen[scampies[i]] then table.remove(scampies, i) else seen[scampies[i]] = true i = i + 1 end end return scampies end
Ext.Osiris.RegisterListener("LevelGameplayStarted", 2, "after", function(level, isEditorMode) local scampies = SitOut_GetSquadiesAndCampies() for _, k in pairs(scampies) do if Osi.HasPassive(k, SitOut_PassiveName) == 0 then Ext.Utils.Print("\tAdding SitOut passive: " .. SitOut_PassiveName .. k) Osi.AddPassive(k, SitOut_PassiveName) else Ext.Utils.Print("\tSkipping; already has SitOut passive") end end end)
I'm a bit worried that it won't work with summons that are summoned after you start the game. (It does work with any summons that exist when you load a save.) If that is the case, the problem could be solved by hooking to a different function, perhaps the ones that Senkah000 recommended.
Credit to Senkah000 for pointing out the issue and the author of the Teleport mod for the code that compiles the list of characters/summons.
FYI, I tried hooking to the event that Senkah suggested. It also worked fine for player characters but didn't seem to work any better for summons. The above at least adds the toggle to summons that are in your party when you loaded. (It may also add it when you switch maps. (I'm not sure ifLevelGamePlayStarted fires when that happens, but it seems possible.)
I tried unpacking this mod using bg3 multitool, opened the SitOut.lua using Notepad++ under folder Sit This One Out\ScriptExtender\Lua, replaced everything i found inside SitOut.lua with your code here, saved then repacked everything, but inside game the passive doesn't show up anymore, is there anything else I should've modified also for the game to recognize the change? Thanks
That sounds like exactly what I did to edit mine. If you enable the scriptextender console (you can do that in bg3mm or by manually editing its config file), you should see messages that indicate that SitOut loaded. If you see those messages, I'd check your spellbook for the passive. I've noticed some cases where a passive isn't added to the hotbar but is in your spellbook.
If the author of this mod has retired and no longer supporting this mod, I can post a version. I still haven't figured out how to get email notification of replies on nexus, but I'll try to check this mod's comments every now and then.
Thanks for the reply, so I enabled the console, and this is what appears as the final part concerning unable to load the lua script. But oddly enough, despite already having redone a few times this process and failing to see the passive in game everytime, this is the first time i started it with SE console, and i actually finally found the passive appearing with only the player character, it's right beside the non-lethal attack passive under the common tab. But i am still copy pasting the below just in case you could find some new information with it.
15 mod configuration(s) loaded. Merged configuration: MinVersion 9; Feature flags: Lua Osiris Initializing client with target context Game bg3se::ExtensionStateBase::LuaResetInternal(): LUA VM reset. Loading bootstrap script: Mods/Sit This One Out/ScriptExtender/Lua/BootstrapClient.lua bg3se::lua::State::LoadScript(): Failed to execute script: [string "Sit This One Out/SitOut.lua"]:32: attempt to index a nil value (field 'Osiris') stack traceback: Sit This One Out/SitOut.lua:32: in main chunk [C++ Code]: in field 'Include' builtin://BuiltinLibrary.lua:62: in field 'Require' Sit This One Out/BootstrapClient.lua:1: in main chunk [C++ Code]: in field 'Include' builtin://BuiltinLibrary.lua:99: in function <builtin://BuiltinLibrary.lua:71> Loading bootstrap script: Mods/uhm/ScriptExtender/Lua/BootstrapClient.lua Loading bootstrap script: Mods/CFS/ScriptExtender/Lua/BootstrapClient.lua ecl::ScriptExtender::OnGameStateChanged(): Loaded module
Oh, sorry for disappearing! Didn't think people would continue looking for this mod for this long. Feel free to post updated versions of this mod. Give me the link if you do so I can alter the description to point to the new one.
Also, I played through acts 1 to 3 with this and it didn't break anything, despite noticing that every NPC had the mod ability. That was in patch3, not sure if new patches broke the mod.
Is there a way to use the Script Extender Debug Console to remove the passive from someone who is currently banished and locked out? Lae'zel was set to Sit Out right before she attacked after a cut scene, and it's permanently caused her to be invisible in Combat in camp.
Osi.RemoveStatus(GetHostCharacter(), "SITOUT_ONCOMBATSTART_APPLIER_TECHNICAL") and/or Osi.RemoveStatus(GetHostCharacter(), "SITOUT_ONCOMBATSTART_DOONCE_TECHNICAL")while she's selected on the left should work?
If she's not selectable on the left, replacing GetHostCharacter() with one of the following might work:
"58a69333-40bf-8358-1d17-fff240d7fb12"
"3a0351bd-0b2f-4fbf-84a6-30ad80bb3100"
But also I'd be surprised if teleporting her to you outside of camp using Teleport Party to You and then moving yourself didn't also fix it. Or upgrading to my Sit This One Out 2 which has workarounds for combats where only sitting out friendlies are left.
In any case, would it be possible to get the full save file or more details to replicate the situation for testing? Would be helpful for debugging and eventually patching.
How do you install this one manually? I put the PAK file in the data folder but there was no toggleable spell in the Common section of any of the companions?
Also wondering this... and does v2 actually do anything this mod doesn't already do? It says it was made with the author's permission but I don't know why it was made in the first place, is v1 one outdated or something?
Sorry if it looks sketchy lol, I originally enabled a Forum section for the mod instead of Posts because I find it a lot easier to keep track of, you can post freely there but grouped by topic :) and the changes are explained under https://www.nexusmods.com/baldursgate3/mods/6183/?tab=forum&topic_id=13678937
Can you either turn on Posts or at least explain exactly what your version does that this one doesn't? I appreciate you contributing to the mod scene but I don't actually know what your version does. Is this version outdated or broken or something?
If someone is having trouble finding the "Common" abilities section, it's a Begone Party Limit's bug. Just save, go back to the main menu and load your save again. This will happen with every companion that you add outside of the first four I'm using 2.0 Begone Party with Script Extender (SE) and I installed both mods with Vortex
If you fail a combat and have all all party members dead - with the others banished, combat will never end. The only way to solve this is to reload a save. If you're on a single save (like I was) then you cannot reload or close the game. Closing the game means saving when every one is dead. My save is soft-locked unless there's a work around to un-banish my companions while the enemies turns are just auto-playing eternally.
I've tried disabling the mod via mod loader but that just crashes when attempting to load the save
You have to manually add the spell yourself. Click on any character portrait in your party, look up common spells and you will see it: It's a pink finger pointing to the left. Drag that spell into the character's hot-bar.
I wonder if anyone else has this problem. At the moment jaheira is the only companion i can banish, with all the other companions the button doesnt show up. I can still see the button with enemy's tho.
Hey I was wondering if anyone can help. I am currently in an infinite loop. Wondering if there is anyway to force stop the companions from sitting out or force end the mod. This is because Im running an honor mode run and my main character died but the combat wont end because the banished ones are technically still there. Cant load back the save because its honor mode. Is there a way to disable the mod maybe using the script extender or force it to do a certain command. Please help thanks.
84 comments
local SitOut_PassiveName = "SitOut"
function SitOut_GetSquadiesAndCampies()
local scampies = {}
local players = Osi.DB_Players:Get(nil)
for _, player in pairs(players) do
table.insert(scampies, player[1])
end
local origins = Osi.DB_Origins:Get(nil)
for _, origin in pairs(origins) do
table.insert(scampies, origin[1])
end
local summons = Osi.DB_PlayerSummons:Get(nil)
for _, summon in pairs(summons) do
table.insert(scampies, summon[1])
end
-- Remove duplicates
local seen = {}
local i = 1
while i <= #scampies do
if seen[scampies[i]] then
table.remove(scampies, i)
else
seen[scampies[i]] = true
i = i + 1
end
end
return scampies
end
Ext.Osiris.RegisterListener("LevelGameplayStarted", 2, "after", function(level, isEditorMode)
local scampies = SitOut_GetSquadiesAndCampies()
for _, k in pairs(scampies) do
if Osi.HasPassive(k, SitOut_PassiveName) == 0 then
Ext.Utils.Print("\tAdding SitOut passive: " .. SitOut_PassiveName .. k)
Osi.AddPassive(k, SitOut_PassiveName)
else
Ext.Utils.Print("\tSkipping; already has SitOut passive")
end
end
end)
I'm a bit worried that it won't work with summons that are summoned after you start the game. (It does work with any summons that exist when you load a save.) If that is the case, the problem could be solved by hooking to a different function, perhaps the ones that Senkah000 recommended.
Credit to Senkah000 for pointing out the issue and the author of the Teleport mod for the code that compiles the list of characters/summons.
If the author of this mod has retired and no longer supporting this mod, I can post a version. I still haven't figured out how to get email notification of replies on nexus, but I'll try to check this mod's comments every now and then.
But oddly enough, despite already having redone a few times this process and failing to see the passive in game everytime, this is the first time i started it with SE console, and i actually finally found the passive appearing with only the player character, it's right beside the non-lethal attack passive under the common tab. But i am still copy pasting the below just in case you could find some new information with it.
15 mod configuration(s) loaded.
Merged configuration:
MinVersion 9; Feature flags: Lua Osiris
Initializing client with target context Game
bg3se::ExtensionStateBase::LuaResetInternal(): LUA VM reset.
Loading bootstrap script: Mods/Sit This One Out/ScriptExtender/Lua/BootstrapClient.lua
bg3se::lua::State::LoadScript(): Failed to execute script: [string "Sit This One Out/SitOut.lua"]:32: attempt to index a nil value (field 'Osiris')
stack traceback:
Sit This One Out/SitOut.lua:32: in main chunk
[C++ Code]: in field 'Include'
builtin://BuiltinLibrary.lua:62: in field 'Require'
Sit This One Out/BootstrapClient.lua:1: in main chunk
[C++ Code]: in field 'Include'
builtin://BuiltinLibrary.lua:99: in function <builtin://BuiltinLibrary.lua:71>
Loading bootstrap script: Mods/uhm/ScriptExtender/Lua/BootstrapClient.lua
Loading bootstrap script: Mods/CFS/ScriptExtender/Lua/BootstrapClient.lua
ecl::ScriptExtender::OnGameStateChanged(): Loaded module
Feel free to post updated versions of this mod. Give me the link if you do so I can alter the description to point to the new one.
Also, I played through acts 1 to 3 with this and it didn't break anything, despite noticing that every NPC had the mod ability. That was in patch3, not sure if new patches broke the mod.
Osi.RemoveStatus(GetHostCharacter(), "SITOUT_ONCOMBATSTART_APPLIER_TECHNICAL")
and/orOsi.RemoveStatus(GetHostCharacter(), "SITOUT_ONCOMBATSTART_DOONCE_TECHNICAL")
while she's selected on the left should work?If she's not selectable on the left, replacing GetHostCharacter() with one of the following might work:
But also I'd be surprised if teleporting her to you outside of camp using Teleport Party to You and then moving yourself didn't also fix it.
Or upgrading to my Sit This One Out 2 which has workarounds for combats where only sitting out friendlies are left.
In any case, would it be possible to get the full save file or more details to replicate the situation for testing? Would be helpful for debugging and eventually patching.
and the changes are explained under https://www.nexusmods.com/baldursgate3/mods/6183/?tab=forum&topic_id=13678937
https://www.nexusmods.com/baldursgate3/mods/6183/?tab=forum&topic_id=13678937
I'm using 2.0 Begone Party with Script Extender (SE) and I installed both mods with Vortex
If you fail a combat and have all all party members dead - with the others banished, combat will never end. The only way to solve this is to reload a save. If you're on a single save (like I was) then you cannot reload or close the game. Closing the game means saving when every one is dead. My save is soft-locked unless there's a work around to un-banish my companions while the enemies turns are just auto-playing eternally.
I've tried disabling the mod via mod loader but that just crashes when attempting to load the save
You have to manually add the spell yourself.
Click on any character portrait in your party, look up common spells and you will see it: It's a pink finger pointing to the left.
Drag that spell into the character's hot-bar.
Hope this helps!!