Barotrauma

Barotrauma

Smarter Bot AI
Landbanana  [developer] 7 Apr @ 2:34pm
Bug Reports
Please post any bug reports here. If anything is gamebreaking, make sure to disable that module using the ingame configuration menu or through SBAI.json file located in your .../saves/ModConfigs folder.
Last edited by Landbanana; 7 Apr @ 2:35pm
< >
Showing 1-15 of 69 comments
Dev1l 21 Apr @ 3:27am 
При отдавании приказа боту на перезарядку аккамуляторов или перезарядку кислородных болонов в консоль начинает бесконечно спамить эта ошибка, что сажает фпс до 5
CL LUA ERROR) USERNAME MoonSharp.Interpreter.ScriptStackOverflowException: stack overflow

at MoonSharp.Interpreter.DataStructs.FastStack 1.Push(T item)

at MoonSharp.Interpreter.Execution.VM.Processor.PushClrToScriptStackFrame(CallStackitemFlags flags, DynValue function, DynValue[] args)

at MoonSharp.Interpreter.Execution.VM.Processor.Call(DynValue function, DynValue[] args)

at MoonSharp.Interpreter.Script.Call(DynValue function, DynValue[] args)

at Barotrauma.LuaCsSetup.CallLuaFunction (Object function, Object[] args) in

B:\programming\c#\Barotrauma\Barotrauma\BarotraumaShared\SharedSource\LuaCs\LuaCsSetup.cs:line 300

[CL LUA ERROR] USERNAME MoonSharp.Interpreter.ScriptStackOverflowException: stack overflow

at MoonSharp.Interpreter.DataStructs.FastStack 1.Push (Titem)

at MoonSharp.Interpreter.Execution.VM.Processor.PushClrToScriptStackFrame(CallStackitemFlags flags, DynValue Function, DynValue[] args)

at MoonSharp.Interpreter Execution.VM.Processor.Call (DynValue function, DynValue[] args)

at MoonSharp.Interpreter.Script.Call(DynValue function, DynValue[] args)

at Barotrauma.LuaCsSetup.CallLuaFunction (Object function, Object[] args) in

B:\programming\c#\Barotrauma\Barotrauma\BarotraumaShared\SharedSource\LuaCs\LuaCsSetup.cs:line 300

[CL LUA ERROR] USERNAME MoonSharp.Interpreter.ScriptStackOverflowException: stack overflow

at MoonSharp.Interpreter.DataStructs FastStack 1.Push (Titem)

at MoonSharp.Interpreter.Execution.VM.Processor.PushClrToScriptStackFrame(CallStackItemFlags flags, DynValue function, DynValue[] args)

at MoonSharp.Interpreter Execution.VM.Processor.Call (DynValue function, DynValue[] args)

at MoonSharp.Interpreter.Script.Call(DynValue function, DynValue[] args)

at Barotrauma LuaCsSetup.CallLuaFunction (Object function, Object[] args) in

B:\programming\c#\Barotrauma Barotrauma\BarotraumaShared\SharedSource\LuaCs\LuaCsSetup.cs:line 300

[CL LUA ERROR) USERNAME MoonSharp.Interpreter.ScriptStackOverflowException: stack overflow

at MoonSharp.Interpreter.DataStructs.FastStack 1.Push (Titem)

at MoonSharp.Interpreter.Execution.VM.Processor.PushClrToScriptStackFrame(CallStackItemFlags flags, DynValue function, DynValue[] args)

at MoonSharp.Interpreter.Execution.VM.Processor.Call(DynValue function, DynValue[] args)

at MoonSharp.Interpreter.Script.Call(DynValue function, DynValue[] args)

at Barotrauma.LuaCsSetup.CallLuaFunction (Object function, Object[] args) in

B:\programming\c#\Barotrauma\Barotrauma\BarotraumaShared\SharedSource\LuaCs\LuaCsSetup.cs:line 300
Landbanana  [developer] 21 Apr @ 4:18pm 
Originally posted by Dev1l:
При отдавании приказа боту на перезарядку аккамуляторов или перезарядку кислородных болонов в консоль начинает бесконечно спамить эта ошибка, что сажает фпс до 5
CL LUA ERROR) USERNAME MoonSharp.Interpreter.ScriptStackOverflowException: stack overflow

at MoonSharp.Interpreter.DataStructs.FastStack 1.Push(T item)

at MoonSharp.Interpreter.Execution.VM.Processor.PushClrToScriptStackFrame(CallStackitemFlags flags, DynValue function, DynValue[] args)

at MoonSharp.Interpreter.Execution.VM.Processor.Call(DynValue function, DynValue[] args)

at MoonSharp.Interpreter.Script.Call(DynValue function, DynValue[] args)

at Barotrauma.LuaCsSetup.CallLuaFunction (Object function, Object[] args) in

B:\programming\c#\Barotrauma\Barotrauma\BarotraumaShared\SharedSource\LuaCs\LuaCsSetup.cs:line 300

[CL LUA ERROR] USERNAME MoonSharp.Interpreter.ScriptStackOverflowException: stack overflow

at MoonSharp.Interpreter.DataStructs.FastStack 1.Push (Titem)

at MoonSharp.Interpreter.Execution.VM.Processor.PushClrToScriptStackFrame(CallStackitemFlags flags, DynValue Function, DynValue[] args)

at MoonSharp.Interpreter Execution.VM.Processor.Call (DynValue function, DynValue[] args)

at MoonSharp.Interpreter.Script.Call(DynValue function, DynValue[] args)

at Barotrauma.LuaCsSetup.CallLuaFunction (Object function, Object[] args) in

B:\programming\c#\Barotrauma\Barotrauma\BarotraumaShared\SharedSource\LuaCs\LuaCsSetup.cs:line 300

[CL LUA ERROR] USERNAME MoonSharp.Interpreter.ScriptStackOverflowException: stack overflow

at MoonSharp.Interpreter.DataStructs FastStack 1.Push (Titem)

at MoonSharp.Interpreter.Execution.VM.Processor.PushClrToScriptStackFrame(CallStackItemFlags flags, DynValue function, DynValue[] args)

at MoonSharp.Interpreter Execution.VM.Processor.Call (DynValue function, DynValue[] args)

at MoonSharp.Interpreter.Script.Call(DynValue function, DynValue[] args)

at Barotrauma LuaCsSetup.CallLuaFunction (Object function, Object[] args) in

B:\programming\c#\Barotrauma Barotrauma\BarotraumaShared\SharedSource\LuaCs\LuaCsSetup.cs:line 300

[CL LUA ERROR) USERNAME MoonSharp.Interpreter.ScriptStackOverflowException: stack overflow

at MoonSharp.Interpreter.DataStructs.FastStack 1.Push (Titem)

at MoonSharp.Interpreter.Execution.VM.Processor.PushClrToScriptStackFrame(CallStackItemFlags flags, DynValue function, DynValue[] args)

at MoonSharp.Interpreter.Execution.VM.Processor.Call(DynValue function, DynValue[] args)

at MoonSharp.Interpreter.Script.Call(DynValue function, DynValue[] args)

at Barotrauma.LuaCsSetup.CallLuaFunction (Object function, Object[] args) in

B:\programming\c#\Barotrauma\Barotrauma\BarotraumaShared\SharedSource\LuaCs\LuaCsSetup.cs:line 300
I did a ton of refactoring in this last update (1.5.0) so if you could check that you still have this error I'd really appreciate it (hoping I accidentally fixed it).
Dev1l 22 Apr @ 12:20am 
everything works without errors!
max 22 Apr @ 11:21pm 
Getting

Smarter Bot Al 1.5.1
-Init.lua (Took 0.02708ms)
[CL LUA ERROR] "C:/Users/USERNAME/AppData/Local/Daedalic Entertainment
GmbH/Barotrauma/WorkshopMods/Installed/3343911734/Lua/SBAI/Shared/util.lua:(532,8-535,9): Couldn't register type System.Single."

And now randomly my bots "can't hear" when I try to give them assignments. Did this just get updated or is it something on my end?
Landbanana  [developer] 23 Apr @ 2:17am 
Originally posted by max:
Getting

Smarter Bot Al 1.5.1
-Init.lua (Took 0.02708ms)
[CL LUA ERROR] "C:/Users/USERNAME/AppData/Local/Daedalic Entertainment
GmbH/Barotrauma/WorkshopMods/Installed/3343911734/Lua/SBAI/Shared/util.lua:(532,8-535,9): Couldn't register type System.Single."

And now randomly my bots "can't hear" when I try to give them assignments. Did this just get updated or is it something on my end?
Should be fixed in the latest update (1.5.1a).
Ires 25 Apr @ 8:16am 
If UseTalents module is enabled, and multiple enemies (3-5 and onwards) get on the sub, server can get wildly out of sync, and console starts spamming this line, basically making the encounters where enemies get on your sub unplayable in multiplayer. Not sure if same issue happens in singleplayer, I don't play the game solo.

[LuaCs] [SV LUA ERROR] USERNAME C:/Users/USERNAME/AppData/Local/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/3343911734/Lua/SBAI/Server/Modules/UseTalents.lua:(414,12-419,16): cannot access field IsEnemyClose of userdata<Barotrauma.AIObjectiveCombat>
Last edited by Ires; 25 Apr @ 8:23am
Landbanana  [developer] 25 Apr @ 1:25pm 
Originally posted by Ires:
If UseTalents module is enabled, and multiple enemies (3-5 and onwards) get on the sub, server can get wildly out of sync, and console starts spamming this line, basically making the encounters where enemies get on your sub unplayable in multiplayer. Not sure if same issue happens in singleplayer, I don't play the game solo.

[LuaCs] [SV LUA ERROR] USERNAME C:/Users/USERNAME/AppData/Local/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/3343911734/Lua/SBAI/Server/Modules/UseTalents.lua:(414,12-419,16): cannot access field IsEnemyClose of userdata<Barotrauma.AIObjectiveCombat>
My bad, I forgot to register that specific method. Fixed in 1.5.2a.
Cupears 25 Apr @ 4:03pm 
Been gettting this error in my Story run with one other person, Doesnt seem to have an effect in a new save.
[LuaCs] [SV LUA ERROR] Cupears C:/Users/***/AppData/Local/Daedalic Entertainment
GmbH/Barotrauma/WorkshopMods/Installed/3343911734/Lua/SBAI/Shared/util.lua:(151,8-53):
attempt to perform arithmetic on a nil value
I've updated the mod to the latest version, I still have the error B:\programming\c#\Barotrauma\Barotrauma\BarotraumaShared\SharedSource\LuaCs\LuaCsSetup.cs:line 300

[CL LUA ERROR] USERNAME MoonSharp.Interpreter.ScriptStackOverflowException: stack overflow

at MoonSharp.Interpreter.DataStructs.FastStack 1.Push (Titem)

at MoonSharp.Interpreter.Execution.VM.Processor.PushClrToScriptStackFrame(CallStackitemFlags flags, DynValue Function, DynValue[] args)

at MoonSharp.Interpreter Execution.VM.Processor.Call (DynValue function, DynValue[] args)

at MoonSharp.Interpreter.Script.Call(DynValue function, DynValue[] args)

at Barotrauma.LuaCsSetup.CallLuaFunction (Object function, Object[] args) in

The current mods I have in order
Lua For Barotrauma
CsForBarotrauma
Gamepad input for barotrauma
Anvil
GunShip
Smarter bot AI
Landbanana  [developer] 25 Apr @ 8:24pm 
Originally posted by Georgio Armani:
I've updated the mod to the latest version, I still have the error B:\programming\c#\Barotrauma\Barotrauma\BarotraumaShared\SharedSource\LuaCs\LuaCsSetup.cs:line 300

[CL LUA ERROR] USERNAME MoonSharp.Interpreter.ScriptStackOverflowException: stack overflow

at MoonSharp.Interpreter.DataStructs.FastStack 1.Push (Titem)

at MoonSharp.Interpreter.Execution.VM.Processor.PushClrToScriptStackFrame(CallStackitemFlags flags, DynValue Function, DynValue[] args)

at MoonSharp.Interpreter Execution.VM.Processor.Call (DynValue function, DynValue[] args)

at MoonSharp.Interpreter.Script.Call(DynValue function, DynValue[] args)

at Barotrauma.LuaCsSetup.CallLuaFunction (Object function, Object[] args) in

The current mods I have in order
Lua For Barotrauma
CsForBarotrauma
Gamepad input for barotrauma
Anvil
GunShip
Smarter bot AI
Does this happen with any specific modules of my mod loaded? Unfortunately that error is from Lua for Barotrauma itself, which while it is still probably caused by my mod it doesn't point me where the issue might be within my mod.
jyjyjy11 25 Apr @ 9:33pm 
[CL LUA ERROR] USERNAME C:/Users/USERNAME/AppData/Local/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/3343911734/Lua/SBAI/Shared/util.lua:(151,8-53): attempt to perform arithmetic on a nil value
Landbanana  [developer] 25 Apr @ 11:03pm 
Originally posted by Cupears:
Been gettting this error in my Story run with one other person, Doesnt seem to have an effect in a new save.
[LuaCs] [SV LUA ERROR] Cupears C:/Users/***/AppData/Local/Daedalic Entertainment
GmbH/Barotrauma/WorkshopMods/Installed/3343911734/Lua/SBAI/Shared/util.lua:(151,8-53):
attempt to perform arithmetic on a nil value

Originally posted by jyjyjy11:
[CL LUA ERROR] USERNAME C:/Users/USERNAME/AppData/Local/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/3343911734/Lua/SBAI/Shared/util.lua:(151,8-53): attempt to perform arithmetic on a nil value

Fixed in 1.5.2c. Sorry about this, I forgot to reinitialize the timer delay after a screen change. Should be all good now.
jyjyjy11 26 Apr @ 3:09am 
[04/26/2025 18:07:17] [CL LUA ERROR] USERNAME C:/Users/USERNAME/AppData/Local/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/3343911734/Lua/SBAI/Server/Modules/UseTalents.lua:(260,16-66): attempt to call a nil value

hard crash

Exception: attempt to call a nil value (MoonSharp.Interpreter.ScriptRuntimeException)
Target site: Int32 Internal_ExecCall(Int32, Int32, MoonSharp.Interpreter.CallbackFunction, MoonSharp.Interpreter.CallbackFunction, Boolean, System.String, MoonSharp.Interpreter.DynValue)
Stack trace:
at MoonSharp.Interpreter.Execution.VM.Processor.Internal_ExecCall(Int32 argsCount, Int32 instructionPtr, CallbackFunction handler, CallbackFunction continuation, Boolean thisCall, String debugText, DynValue unwindHandler)
at MoonSharp.Interpreter.Execution.VM.Processor.Processing_Loop(Int32 instructionPtr)
at MoonSharp.Interpreter.Execution.VM.Processor.Call(DynValue function, DynValue[] args)
at MoonSharp.Interpreter.Script.Call(DynValue function, DynValue[] args)
at MoonSharp.Interpreter.Interop.EventMemberDescriptor.DispatchEvent(Object sender, Object o01, Object o02, Object o03, Object o04, Object o05, Object o06, Object o07, Object o08, Object o09, Object o10, Object o11, Object o12, Object o13, Object o14, Object o15, Object o16)
at MoonSharp.Interpreter.Interop.EventMemberDescriptor.<>c__DisplayClass22_0.<CreateDelegate>b__0()
at Barotrauma.AIObjective.OnDeselected() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\AI\Objectives\AIObjective.cs:line 462
at Barotrauma.AIObjectiveIdle.OnDeselected() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\AI\Objectives\AIObjectiveIdle.cs:line 578
at Barotrauma.AIObjectiveManager.GetCurrentObjective() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\AI\Objectives\AIObjectiveManager.cs:line 269
at Barotrauma.AIObjectiveManager.SortObjectives() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\AI\Objectives\AIObjectiveManager.cs:line 368
at Barotrauma.HumanAIController.Update(Single deltaTime) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\AI\HumanAIController.cs:line 394
at Barotrauma.Character.UpdateAll(Single deltaTime, Camera cam) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\Character.cs:line 3371
at Barotrauma.GameScreen.Update(Double deltaTime) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Screens\GameScreen.cs:line 193
at Barotrauma.GameMain.Update(GameTime gameTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GameMain.cs:line 981
at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime) in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 656
at Microsoft.Xna.Framework.Game.Tick() in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 500
at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop() in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\SDL\SDLGamePlatform.cs:line 93
at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior) in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 397
at Microsoft.Xna.Framework.Game.Run() in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 367
at Barotrauma.Program.Main(String[] args) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Program.cs:line 61
Landbanana  [developer] 26 Apr @ 4:32am 
Originally posted by jyjyjy11:
[04/26/2025 18:07:17] [CL LUA ERROR] USERNAME C:/Users/USERNAME/AppData/Local/Daedalic Entertainment GmbH/Barotrauma/WorkshopMods/Installed/3343911734/Lua/SBAI/Server/Modules/UseTalents.lua:(260,16-66): attempt to call a nil value

hard crash

Exception: attempt to call a nil value (MoonSharp.Interpreter.ScriptRuntimeException)
Target site: Int32 Internal_ExecCall(Int32, Int32, MoonSharp.Interpreter.CallbackFunction, MoonSharp.Interpreter.CallbackFunction, Boolean, System.String, MoonSharp.Interpreter.DynValue)
Stack trace:
at MoonSharp.Interpreter.Execution.VM.Processor.Internal_ExecCall(Int32 argsCount, Int32 instructionPtr, CallbackFunction handler, CallbackFunction continuation, Boolean thisCall, String debugText, DynValue unwindHandler)
at MoonSharp.Interpreter.Execution.VM.Processor.Processing_Loop(Int32 instructionPtr)
at MoonSharp.Interpreter.Execution.VM.Processor.Call(DynValue function, DynValue[] args)
at MoonSharp.Interpreter.Script.Call(DynValue function, DynValue[] args)
at MoonSharp.Interpreter.Interop.EventMemberDescriptor.DispatchEvent(Object sender, Object o01, Object o02, Object o03, Object o04, Object o05, Object o06, Object o07, Object o08, Object o09, Object o10, Object o11, Object o12, Object o13, Object o14, Object o15, Object o16)
at MoonSharp.Interpreter.Interop.EventMemberDescriptor.<>c__DisplayClass22_0.<CreateDelegate>b__0()
at Barotrauma.AIObjective.OnDeselected() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\AI\Objectives\AIObjective.cs:line 462
at Barotrauma.AIObjectiveIdle.OnDeselected() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\AI\Objectives\AIObjectiveIdle.cs:line 578
at Barotrauma.AIObjectiveManager.GetCurrentObjective() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\AI\Objectives\AIObjectiveManager.cs:line 269
at Barotrauma.AIObjectiveManager.SortObjectives() in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\AI\Objectives\AIObjectiveManager.cs:line 368
at Barotrauma.HumanAIController.Update(Single deltaTime) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\AI\HumanAIController.cs:line 394
at Barotrauma.Character.UpdateAll(Single deltaTime, Camera cam) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Characters\Character.cs:line 3371
at Barotrauma.GameScreen.Update(Double deltaTime) in <DEV>\Barotrauma\BarotraumaShared\SharedSource\Screens\GameScreen.cs:line 193
at Barotrauma.GameMain.Update(GameTime gameTime) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\GameMain.cs:line 981
at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime) in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 656
at Microsoft.Xna.Framework.Game.Tick() in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 500
at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop() in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\SDL\SDLGamePlatform.cs:line 93
at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior) in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 397
at Microsoft.Xna.Framework.Game.Run() in C:\Users\joona\Documents\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 367
at Barotrauma.Program.Main(String[] args) in <DEV>\Barotrauma\BarotraumaClient\ClientSource\Program.cs:line 61
I believe I've finally fixed all of the recent issues in update 1.5.2d. Please let me know if you have any more issues, and sorry for all the trouble.
Bude 29 Apr @ 10:15am 
I have the following messages in my dedicated server console, are they save to ignore?

Smarter Bot AI 1.5.2d Can't register typeName: System.Collections.Immutable.ImmutableArray`1[[Barotrauma.PreferredContainer,Barotrauma]] Can't unregister typeName: System.Collections.Immutable.ImmutableArray`1[[Barotrauma.PreferredContainer,Barotrauma]] SBAI.CleanablePetItems.activate: LocalMods/3343911734/Lua/SBAI/Server/Modules/CleanablePetItems.lua:(18,4-42,8): LocalMods/3343911734/Lua/SBAI/Server/Modules/CleanablePetItems.lua:(29,16-57): cannot convert a table to a clr type System.Collections.Immutable.ImmutableArray`1[[Barotrauma.PreferredContainer, DedicatedServer, Version=1.8.8.1, Culture=neutral, PublicKeyToken=null]] - Init.lua (Took 0.33191ms)
< >
Showing 1-15 of 69 comments
Per page: 1530 50