FakeFishGames / Barotrauma

A 2D online multiplayer game taking place in a submarine travelling through the icy depths of Jupiter's moon Europa.
http://www.barotraumagame.com/
1.77k stars 408 forks source link

New inventory slots can't be modded in #14285

Closed dontmatterbro closed 4 months ago

dontmatterbro commented 4 months ago

Discussed in https://github.com/FakeFishGames/Barotrauma/discussions/14280

- [x] I have searched the issue tracker to check if the issue has already been reported. - [x] My issue happened while using mods. You can't add new functional inventory slots using Human.xml, they either have no functionality or crash the game when used. However you can remove existing slots without problems. **Adding a dedicated slot using Human.xml** ![Screenshot 2024-07-12 193847](https://github.com/user-attachments/assets/5ee2bbea-7167-4fe3-a097-42d4666b5606) **It only mirrors the existing one, does not have any functionality (There only is one headset equipped)** ![Screenshot 2024-07-12 193855](https://github.com/user-attachments/assets/7797a293-63dc-4347-98e4-c4c5ef710239) **Adding an any item slot using Human.xml** ![Screenshot 2024-07-12 194108](https://github.com/user-attachments/assets/64f694e3-b5c7-4cea-b995-5c87855948b0) **Game crashes upon equipping an item to that slot.** crashreport.log > Game version 1.5.9.1 (ReleaseWindows, branch master, revision 490ff655f3) > > Exception: Index was outside the bounds of the array. (System.IndexOutOfRangeException) > Target site: Boolean InventoryKeyHit(Int32) > Stack trace: > at Barotrauma.PlayerInput.InventoryKeyHit(Int32 index) in \Barotrauma\BarotraumaClient\ClientSource\PlayerInput.cs:line 443 > at Barotrauma.CharacterInventory.UpdateSlotInput() in \Barotrauma\BarotraumaClient\ClientSource\Items\CharacterInventory.cs:line 659 > at Barotrauma.CharacterInventory.Update(Single deltaTime, Camera cam, Boolean isSubInventory) in \Barotrauma\BarotraumaClient\ClientSource\Items\CharacterInventory.cs:line 482 > at Barotrauma.CharacterHUD.Update(Single deltaTime, Character character, Camera cam) in \Barotrauma\BarotraumaClient\ClientSource\Characters\CharacterHUD.cs:line 272 > at Barotrauma.Character.UpdateControlled(Single deltaTime, Camera cam) in \Barotrauma\BarotraumaClient\ClientSource\Characters\Character.cs:line 509 > at Barotrauma.Character.Update(Single deltaTime, Camera cam) in \Barotrauma\BarotraumaShared\SharedSource\Characters\Character.cs:line 3482 > at Barotrauma.AICharacter.Update(Single deltaTime, Camera cam) in \Barotrauma\BarotraumaShared\SharedSource\Characters\AICharacter.cs:line 76 > at Barotrauma.Character.UpdateAll(Single deltaTime, Camera cam) in \Barotrauma\BarotraumaShared\SharedSource\Characters\Character.cs:line 3316 > at Barotrauma.GameScreen.Update(Double deltaTime) in \Barotrauma\BarotraumaShared\SharedSource\Screens\GameScreen.cs:line 184 > at Barotrauma.GameMain.Update(GameTime gameTime) in \Barotrauma\BarotraumaClient\ClientSource\GameMain.cs:line 950 > at Microsoft.Xna.Framework.Game.DoUpdate(GameTime gameTime) in E:\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 656 > at Microsoft.Xna.Framework.Game.Tick() in E:\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 500 > at Microsoft.Xna.Framework.SdlGamePlatform.RunLoop() in E:\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\SDL\SDLGamePlatform.cs:line 93 > at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior) in E:\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 397 > at Microsoft.Xna.Framework.Game.Run() in E:\Barotrauma-development\Libraries\MonoGame.Framework\Src\MonoGame.Framework\Game.cs:line 367 > at Barotrauma.Program.Main(String[] args) in \Barotrauma\BarotraumaClient\ClientSource\Program.cs:line 61 > > Last debug messages: > [07/12/2024 19:40:49] Generating an outpost for the start of the level... (Location: Bramerton Outpost, level type: Outpost) > [07/12/2024 19:40:49] Level identifier: outpostlevel
ubertpendragon commented 4 months ago

I would very much like being able to add completely custom inventory slots just for the sake of creature shenanigans.

Example: Moloch "wearing" minerals using hands/headset/clothes... Would be nice to use custom slots instead

image

Regalis11 commented 4 months ago

Please do not create bug reports in the issue tracker yourself: they should now instead be created in the https://github.com/FakeFishGames/Barotrauma/issues/13590.