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

Fail to share animations with another creature #15111

Open itchyOwl opened 2 weeks ago

itchyOwl commented 2 weeks ago

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

Originally posted by **A2ur3** November 8, 2024 ### Disclaimers - [X] I have searched the issue tracker to check if the issue has already been reported. - [X] My issue happened while using mods. ### What happened? animations files are defined in character A character B reuses A's animations it works fine until B's animations are affected by SE ### Reproduction steps 1. download and enable Enhanced EuropaWar 2. spawn Clownhuman03 3. giveaffliction Vigor 1000 Clownhuman03 ### Bug prevalence Happens every time I play ### Single player or multiplayer? Happens in both single player and multiplayer ### - _No response_ ### Version v1.6.19.1 (Unto the Breach Update Hotfix 2) ### - _No response_ ### Which operating system did you encounter this bug on? Windows ### Relevant error messages and crash reports ```shell Couldn't load xml document "LocalMods/Enhanced EuropaWar/Content/Characters/Clownhuman/Clownhuman02/Animations/Clownhuman03Walk.xml"! {Could not find file 'D:\Steam\steamapps\common\Barotrauma\LocalMods\Enhanced EuropaWar\Content\Characters\Clownhuman\Clownhuman02\Animations\Clownhuman03Walk.xml'.} at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at Barotrauma.IO.File.Open(String path, FileMode mode, FileAccess access, Nullable`1 share, Boolean catchUnauthorizedAccessExceptions) in \Barotrauma\BarotraumaShared\SharedSource\Utils\SafeIO.cs:line 540 at Barotrauma.XMLExtensions.TryLoadXml(String filePath, Exception& exception) in \Barotrauma\BarotraumaShared\SharedSource\Serialization\XMLExtensions.cs:line 112 ‖color:#9370DB‖[Enhanced EuropaWar]‖color:end‖ [EditableParams] The document is null! Failed to load the parameters. Couldn't load xml document "LocalMods/Enhanced EuropaWar/Content/Characters/Clownhuman/Clownhuman02/Animations/Clownhuman03Run.xml"! {Could not find file 'D:\Steam\steamapps\common\Barotrauma\LocalMods\Enhanced EuropaWar\Content\Characters\Clownhuman\Clownhuman02\Animations\Clownhuman03Run.xml'.} at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options) at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize) at Barotrauma.IO.File.Open(String path, FileMode mode, FileAccess access, Nullable`1 share, Boolean catchUnauthorizedAccessExceptions) in \Barotrauma\BarotraumaShared\SharedSource\Utils\SafeIO.cs:line 540 at Barotrauma.XMLExtensions.TryLoadXml(String filePath, Exception& exception) in \Barotrauma\BarotraumaShared\SharedSource\Serialization\XMLExtensions.cs:line 112 ‖color:#9370DB‖[Enhanced EuropaWar]‖color:end‖ [EditableParams] The document is null! Failed to load the parameters. ```
Regalis11 commented 5 days ago

I was looking into 2 related issues, Character variant that inherits creature in another mod will try to find its sprite from wrong mod and Unable to create a variant of Spineling_morbusine, and the fix I implemented seems to have fixed this too (this seemed to basically be a symptom of the same bug).

Regalis11 commented 4 days ago

It seems I was testing this issue incorrectly: I used "EuropaWar", when I should've been using "Enhanced EuropaWar". Looks like the PR I made don't fix the issue.

I'm actually not sure if there is an issue though(?): it seems there's no inheritance involved in that mod, there's just a "standalone" character called Clownhuman03, which is set to search for the animations from the folder of Clownhuman02, which will fail because it's expecting the file names to start with Clownhuman03. In any case, seems out of scope for the other PR, unlinked the ticket.