diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml
new file mode 100644
index 0000000..bd9f7d2
--- /dev/null
+++ b/.gitea/workflows/deploy.yml
@@ -0,0 +1,36 @@
+name: Build & Deploy
+on:
+ push:
+ branches: [release]
+
+jobs:
+ deploy:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Build Docker image
+ run: docker build -t barotrauma-server:${{ github.sha }} .
+
+ - name: Tag and push to local registry
+ run: |
+ docker tag barotrauma-server:${{ github.sha }} \
+ ${{ secrets.REGISTRY_ADDR }}/barotrauma-server:latest
+ docker push ${{ secrets.REGISTRY_ADDR }}/barotrauma-server:latest
+
+ - name: Deploy via SSH
+ uses: appleboy/ssh-action@v1
+ with:
+ host: ${{ secrets.SERVER_HOST }}
+ username: ${{ secrets.SERVER_USER }}
+ key: ${{ secrets.SSH_KEY }}
+ script: |
+ docker pull ${{ secrets.REGISTRY_ADDR }}/barotrauma-server:latest
+ docker stop barotrauma 2>/dev/null || true
+ docker rm barotrauma 2>/dev/null || true
+ docker run -d --name barotrauma \
+ --restart unless-stopped \
+ -p 27015:27015/udp \
+ -p 27015:27015/tcp \
+ ${{ secrets.REGISTRY_ADDR }}/barotrauma-server:latest
+ docker system prune -f
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..93352e1
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,13 @@
+FROM ubuntu:24.04
+
+RUN apt-get update && apt-get install -y --no-install-recommends \
+ lib32gcc-s1 lib32stdc++6 ca-certificates \
+ && rm -rf /var/lib/apt/lists/*
+
+WORKDIR /server
+COPY . .
+
+EXPOSE 27015/udp
+EXPOSE 27015/tcp
+
+CMD ["./DedicatedServer"]
diff --git a/LocalMods/[DebugOnlyTest]Character override and variant tests/Characters/Crawler/Animations/CrawlerRun.xml b/LocalMods/[DebugOnlyTest]Character override and variant tests/Characters/Crawler/Animations/CrawlerRun.xml
deleted file mode 100644
index 41448ae..0000000
--- a/LocalMods/[DebugOnlyTest]Character override and variant tests/Characters/Crawler/Animations/CrawlerRun.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Character override and variant tests/Characters/Crawler/Animations/CrawlerSwimFast.xml b/LocalMods/[DebugOnlyTest]Character override and variant tests/Characters/Crawler/Animations/CrawlerSwimFast.xml
deleted file mode 100644
index 5a5abac..0000000
--- a/LocalMods/[DebugOnlyTest]Character override and variant tests/Characters/Crawler/Animations/CrawlerSwimFast.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Character override and variant tests/Characters/Crawler/Animations/CrawlerSwimSlow.xml b/LocalMods/[DebugOnlyTest]Character override and variant tests/Characters/Crawler/Animations/CrawlerSwimSlow.xml
deleted file mode 100644
index 0e8efab..0000000
--- a/LocalMods/[DebugOnlyTest]Character override and variant tests/Characters/Crawler/Animations/CrawlerSwimSlow.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Character override and variant tests/Characters/Crawler/Animations/CrawlerWalk.xml b/LocalMods/[DebugOnlyTest]Character override and variant tests/Characters/Crawler/Animations/CrawlerWalk.xml
deleted file mode 100644
index 39297cf..0000000
--- a/LocalMods/[DebugOnlyTest]Character override and variant tests/Characters/Crawler/Animations/CrawlerWalk.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Character override and variant tests/Characters/Crawler/Crawler.xml b/LocalMods/[DebugOnlyTest]Character override and variant tests/Characters/Crawler/Crawler.xml
deleted file mode 100644
index bb24f05..0000000
--- a/LocalMods/[DebugOnlyTest]Character override and variant tests/Characters/Crawler/Crawler.xml
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Character override and variant tests/Characters/Crawler/Ragdolls/CrawlerDefaultRagdoll.xml b/LocalMods/[DebugOnlyTest]Character override and variant tests/Characters/Crawler/Ragdolls/CrawlerDefaultRagdoll.xml
deleted file mode 100644
index d3a6deb..0000000
--- a/LocalMods/[DebugOnlyTest]Character override and variant tests/Characters/Crawler/Ragdolls/CrawlerDefaultRagdoll.xml
+++ /dev/null
@@ -1,127 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Character override and variant tests/Human.xml b/LocalMods/[DebugOnlyTest]Character override and variant tests/Human.xml
deleted file mode 100644
index 6c7b98b..0000000
--- a/LocalMods/[DebugOnlyTest]Character override and variant tests/Human.xml
+++ /dev/null
@@ -1,312 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Character override and variant tests/Mudraptor.xml b/LocalMods/[DebugOnlyTest]Character override and variant tests/Mudraptor.xml
deleted file mode 100644
index 84e84bd..0000000
--- a/LocalMods/[DebugOnlyTest]Character override and variant tests/Mudraptor.xml
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/LocalMods/[DebugOnlyTest]Character override and variant tests/README.txt b/LocalMods/[DebugOnlyTest]Character override and variant tests/README.txt
deleted file mode 100644
index 415f503..0000000
--- a/LocalMods/[DebugOnlyTest]Character override and variant tests/README.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-This mod includes a couple of differently configured character overrides and variants:
-
-- Human: overrides the human character with a broken version whose ragdoll fails to load.
- - Expected behavior: loading the human character will fail and cause console errors, and the game will load the vanilla version instead.
-
-- Mudraptor: overrides Mudraptor with a broken version whose ragdoll fails to load.
- - Expected behavior: loading a Mudraptor will fail and cause console errors, and the game will load the vanilla Crawler ragdoll instead.
- - Variants of Mudraptor should fail to load as well, and switch to the Crawler ragdoll instead.
-
-- Crawler: overrides Crawler with a green version with sunglasses.
- - Expected behavior: Crawler spawns as a green version with sunglasses.
- - This change should also affect variants of Crawler: Crawler_large should also be green and have sunglasses (even though the mod does
- not modify it directly).
- - Crawler_hatchling (variant of Crawler) should look unchanged, but load correctly (despite it being a vanilla character whose base
- character has now been overridden by a mod).
-
-- Testcyborgworm_m: adds a variant of the Cyborgworm (identical to the normal Cyborgworm).
- - Expected behavior: Testcyborgworm_m looks identical to Cyborgworm.
- - This has previously caused issues, because the Cyborgworm uses multiple textures, some of which aren't in the character folder,
- and these used to load incorrectly when the character is a variant.
- - Note that the character is configured incorrectly: it's defined to be an override, but there's no character (Testcyborgworm_m) it'd override.
- It works regardless, so this can be used as a test case for checking that these incorrectly defined characters still load.
-
-- Testcrawlerhatchling: overrides crawler hatchling with an identical version.
- - Expected behavior: crawler hatchling looks normal, the same way as in vanilla game.
- - This has previously caused issues, because we incorrectly tried to fetch the texture path from the root element instead
- of the element under it.
-
-- Spineling_morbusine_m: adds a variant of Spineling_morbusine (identical to the normal Spineling_morbusine).
- - Expected behavior: Spineling_morbusine_m looks identical to Spineling_morbusine.
- - This has previously caused issues, because Spineling_morbusine defines the ragdoll slightly differently than other monsters
- (not in the usual Ragdoll folder, but a hard-coded path to a ragdoll file in the character's folder).
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Character override and variant tests/Spineling_morbusine_m.xml b/LocalMods/[DebugOnlyTest]Character override and variant tests/Spineling_morbusine_m.xml
deleted file mode 100644
index 8a7839d..0000000
--- a/LocalMods/[DebugOnlyTest]Character override and variant tests/Spineling_morbusine_m.xml
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Character override and variant tests/Testcrawlerhatchling.xml b/LocalMods/[DebugOnlyTest]Character override and variant tests/Testcrawlerhatchling.xml
deleted file mode 100644
index 590c10e..0000000
--- a/LocalMods/[DebugOnlyTest]Character override and variant tests/Testcrawlerhatchling.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Character override and variant tests/Testcyborgworm_m.xml b/LocalMods/[DebugOnlyTest]Character override and variant tests/Testcyborgworm_m.xml
deleted file mode 100644
index 3c3c7f0..0000000
--- a/LocalMods/[DebugOnlyTest]Character override and variant tests/Testcyborgworm_m.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Character override and variant tests/filelist.xml b/LocalMods/[DebugOnlyTest]Character override and variant tests/filelist.xml
deleted file mode 100644
index 6717724..0000000
--- a/LocalMods/[DebugOnlyTest]Character override and variant tests/filelist.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Lighting stress (10000 lights)/Lighting stress (10000 lights).sub b/LocalMods/[DebugOnlyTest]Lighting stress (10000 lights)/Lighting stress (10000 lights).sub
deleted file mode 100644
index 282a30b..0000000
Binary files a/LocalMods/[DebugOnlyTest]Lighting stress (10000 lights)/Lighting stress (10000 lights).sub and /dev/null differ
diff --git a/LocalMods/[DebugOnlyTest]Lighting stress (10000 lights)/filelist.xml b/LocalMods/[DebugOnlyTest]Lighting stress (10000 lights)/filelist.xml
deleted file mode 100644
index f897a3c..0000000
--- a/LocalMods/[DebugOnlyTest]Lighting stress (10000 lights)/filelist.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]MissionVariantsTest/Missions.xml b/LocalMods/[DebugOnlyTest]MissionVariantsTest/Missions.xml
deleted file mode 100644
index bed2c19..0000000
--- a/LocalMods/[DebugOnlyTest]MissionVariantsTest/Missions.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]MissionVariantsTest/filelist.xml b/LocalMods/[DebugOnlyTest]MissionVariantsTest/filelist.xml
deleted file mode 100644
index 1ae2c16..0000000
--- a/LocalMods/[DebugOnlyTest]MissionVariantsTest/filelist.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]PipeTestSub/Dugong_PipeTest.sub b/LocalMods/[DebugOnlyTest]PipeTestSub/Dugong_PipeTest.sub
deleted file mode 100644
index e0d5f17..0000000
Binary files a/LocalMods/[DebugOnlyTest]PipeTestSub/Dugong_PipeTest.sub and /dev/null differ
diff --git a/LocalMods/[DebugOnlyTest]PipeTestSub/filelist.xml b/LocalMods/[DebugOnlyTest]PipeTestSub/filelist.xml
deleted file mode 100644
index 0e67713..0000000
--- a/LocalMods/[DebugOnlyTest]PipeTestSub/filelist.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]PowerTestSub/PowerTestSub.sub b/LocalMods/[DebugOnlyTest]PowerTestSub/PowerTestSub.sub
deleted file mode 100644
index 4002bbb..0000000
Binary files a/LocalMods/[DebugOnlyTest]PowerTestSub/PowerTestSub.sub and /dev/null differ
diff --git a/LocalMods/[DebugOnlyTest]PowerTestSub/filelist.xml b/LocalMods/[DebugOnlyTest]PowerTestSub/filelist.xml
deleted file mode 100644
index c60a2f1..0000000
--- a/LocalMods/[DebugOnlyTest]PowerTestSub/filelist.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]RegEx Timeout Test/RegEx Timeout Test.sub b/LocalMods/[DebugOnlyTest]RegEx Timeout Test/RegEx Timeout Test.sub
deleted file mode 100644
index fc53217..0000000
Binary files a/LocalMods/[DebugOnlyTest]RegEx Timeout Test/RegEx Timeout Test.sub and /dev/null differ
diff --git a/LocalMods/[DebugOnlyTest]RegEx Timeout Test/filelist.xml b/LocalMods/[DebugOnlyTest]RegEx Timeout Test/filelist.xml
deleted file mode 100644
index ad117a2..0000000
--- a/LocalMods/[DebugOnlyTest]RegEx Timeout Test/filelist.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]RotationAndFlippingTests/OxygenDispenserTest.xml b/LocalMods/[DebugOnlyTest]RotationAndFlippingTests/OxygenDispenserTest.xml
deleted file mode 100644
index 82378a9..0000000
--- a/LocalMods/[DebugOnlyTest]RotationAndFlippingTests/OxygenDispenserTest.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/LocalMods/[DebugOnlyTest]RotationAndFlippingTests/RotationAndFlippingTests.sub b/LocalMods/[DebugOnlyTest]RotationAndFlippingTests/RotationAndFlippingTests.sub
deleted file mode 100644
index 10d816d..0000000
Binary files a/LocalMods/[DebugOnlyTest]RotationAndFlippingTests/RotationAndFlippingTests.sub and /dev/null differ
diff --git a/LocalMods/[DebugOnlyTest]RotationAndFlippingTests/StatusEffectAndLightTest.xml b/LocalMods/[DebugOnlyTest]RotationAndFlippingTests/StatusEffectAndLightTest.xml
deleted file mode 100644
index 4b58a87..0000000
--- a/LocalMods/[DebugOnlyTest]RotationAndFlippingTests/StatusEffectAndLightTest.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]RotationAndFlippingTests/filelist.xml b/LocalMods/[DebugOnlyTest]RotationAndFlippingTests/filelist.xml
deleted file mode 100644
index be951b0..0000000
--- a/LocalMods/[DebugOnlyTest]RotationAndFlippingTests/filelist.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]TestLuaMod/Lua/init.lua b/LocalMods/[DebugOnlyTest]TestLuaMod/Lua/init.lua
deleted file mode 100644
index 0c6c821..0000000
--- a/LocalMods/[DebugOnlyTest]TestLuaMod/Lua/init.lua
+++ /dev/null
@@ -1,75 +0,0 @@
-print("Hello!")
-
-Hook.Add("character.created", "test", function(character)
- print("character.created: ", character)
-end)
-
-Hook.Add("character.death", "test", function(character)
- print("character.death: ", character)
-end)
-
-Hook.Add("character.giveJobItems", "test", function(character)
- print("character.giveJobItems: ", character)
-end)
-
-Hook.Add("roundStart", "test", function()
- print("roundStart")
-end)
-
-Hook.Add("roundEnd", "test", function()
- print("roundEnd")
-end)
-
-Hook.Add("missionsEnded", "test", function()
- print("missionsEnded")
-end)
-
--- cfg tests
-local str = "CLIENT: "
-
-if SERVER then
- str = "SERVER: "
-end
-
-function OnChanged(cfg)
- print(str, "cfg value for ", cfg.InternalName, " changed to ", cfg.Value)
-end
-
-local failed, package = trygetpackage("[DebugOnlyTest]TestLuaMod")
-
-print("packageFailed=", failed)
-print("package", package.Name)
-
-local success, config = ConfigService.TryGetConfig(SettingBase.Int32, package, "TestSynchroServer")
-local success2, config2 = ConfigService.TryGetConfig(SettingBase.Int32, package, "TestSynchroClient")
-
-if not success or not success2 then
- print("Failed to get configs.")
- return
-end
-
-config.OnValueChanged.add(OnChanged)
-config2.OnValueChanged.add(OnChanged)
-
-print(str, " testsynchroclient=", config2.Value)
-print(str, " testsynchroserver=", config.Value)
-
--- The server should keep updating the value and it should show up on the client.
--- The client should try updating and it should fail.
-
-local lastTime = Timer.Time + 30 -- give time to join
-
-Hook.Add("think", "printconfig", function()
- if lastTime > Timer.Time then return end
- lastTime = Timer.Time + 10
-
- if SERVER then
- local succ = config.TrySetValue(config.Value + 1)
- print("Success of setting value on server for '", config.InternalName,"': ", succ)
- end
- if CLIENT then
- local succ = config.TrySetValue(config.Value + 1)
- print("Success of setting value on client for '", config.InternalName,"': ", succ, " | This should fail if permissions are not set for client.")
- end
-
-end)
diff --git a/LocalMods/[DebugOnlyTest]TestLuaMod/ModConfig.xml b/LocalMods/[DebugOnlyTest]TestLuaMod/ModConfig.xml
deleted file mode 100644
index b5f96ba..0000000
--- a/LocalMods/[DebugOnlyTest]TestLuaMod/ModConfig.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/LocalMods/[DebugOnlyTest]TestLuaMod/Settings.xml b/LocalMods/[DebugOnlyTest]TestLuaMod/Settings.xml
deleted file mode 100644
index 5c7e445..0000000
--- a/LocalMods/[DebugOnlyTest]TestLuaMod/Settings.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/LocalMods/[DebugOnlyTest]TestLuaMod/SettingsClient.xml b/LocalMods/[DebugOnlyTest]TestLuaMod/SettingsClient.xml
deleted file mode 100644
index 902b2a7..0000000
--- a/LocalMods/[DebugOnlyTest]TestLuaMod/SettingsClient.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/LocalMods/[DebugOnlyTest]TestLuaMod/SettingsServer.xml b/LocalMods/[DebugOnlyTest]TestLuaMod/SettingsServer.xml
deleted file mode 100644
index 3e04dae..0000000
--- a/LocalMods/[DebugOnlyTest]TestLuaMod/SettingsServer.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/LocalMods/[DebugOnlyTest]TestLuaMod/Texts/English.xml b/LocalMods/[DebugOnlyTest]TestLuaMod/Texts/English.xml
deleted file mode 100644
index a6c96ff..0000000
--- a/LocalMods/[DebugOnlyTest]TestLuaMod/Texts/English.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
- <_x005B_DebugOnlyTest_x005D_TestLuaMod.TestTickbox.DisplayName>Test TickBox
- <_x005B_DebugOnlyTest_x005D_TestLuaMod.TestTickbox.DisplayCategory>Tests
- <_x005B_DebugOnlyTest_x005D_TestLuaMod.TestFloat.DisplayName>Test Float
- <_x005B_DebugOnlyTest_x005D_TestLuaMod.TestFloat.DisplayCategory>Tests
- <_x005B_DebugOnlyTest_x005D_TestLuaMod.TestRangeFloat.DisplayName>Test Range Float
- <_x005B_DebugOnlyTest_x005D_TestLuaMod.TestRangeFloat.DisplayCategory>Tests
- <_x005B_DebugOnlyTest_x005D_TestLuaMod.TestRangeInt.DisplayName>Test Range Int
- <_x005B_DebugOnlyTest_x005D_TestLuaMod.TestRangeInt.DisplayCategory>Tests
- <_x005B_DebugOnlyTest_x005D_TestLuaMod.TestString.DisplayName>Test String
- <_x005B_DebugOnlyTest_x005D_TestLuaMod.TestString.DisplayCategory>Tests
-
diff --git a/LocalMods/[DebugOnlyTest]TestLuaMod/dummy.xml b/LocalMods/[DebugOnlyTest]TestLuaMod/dummy.xml
deleted file mode 100644
index ba75a44..0000000
--- a/LocalMods/[DebugOnlyTest]TestLuaMod/dummy.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]TestLuaMod/filelist.xml b/LocalMods/[DebugOnlyTest]TestLuaMod/filelist.xml
deleted file mode 100644
index 1fc3716..0000000
--- a/LocalMods/[DebugOnlyTest]TestLuaMod/filelist.xml
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-
-
-
diff --git a/LocalMods/[DebugOnlyTest]TestPathFinding/Events.xml b/LocalMods/[DebugOnlyTest]TestPathFinding/Events.xml
deleted file mode 100644
index fecc602..0000000
--- a/LocalMods/[DebugOnlyTest]TestPathFinding/Events.xml
+++ /dev/null
@@ -1,159 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/LocalMods/[DebugOnlyTest]TestPathFinding/[DebugOnlyTest]TestPathFinding.sub b/LocalMods/[DebugOnlyTest]TestPathFinding/[DebugOnlyTest]TestPathFinding.sub
deleted file mode 100644
index b1620c4..0000000
Binary files a/LocalMods/[DebugOnlyTest]TestPathFinding/[DebugOnlyTest]TestPathFinding.sub and /dev/null differ
diff --git a/LocalMods/[DebugOnlyTest]TestPathFinding/filelist.xml b/LocalMods/[DebugOnlyTest]TestPathFinding/filelist.xml
deleted file mode 100644
index bc9dfb0..0000000
--- a/LocalMods/[DebugOnlyTest]TestPathFinding/filelist.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/HumanRunDivingSuit.xml b/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/HumanRunDivingSuit.xml
deleted file mode 100644
index 956472e..0000000
--- a/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/HumanRunDivingSuit.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/HumanWalkDivingSuit.xml b/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/HumanWalkDivingSuit.xml
deleted file mode 100644
index 41f3c44..0000000
--- a/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/HumanWalkDivingSuit.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/TesthumanCrouch.xml b/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/TesthumanCrouch.xml
deleted file mode 100644
index a9034ab..0000000
--- a/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/TesthumanCrouch.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/TesthumanRun.xml b/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/TesthumanRun.xml
deleted file mode 100644
index ddf1013..0000000
--- a/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/TesthumanRun.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/TesthumanSwimFast.xml b/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/TesthumanSwimFast.xml
deleted file mode 100644
index acdeffb..0000000
--- a/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/TesthumanSwimFast.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/TesthumanSwimSlow.xml b/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/TesthumanSwimSlow.xml
deleted file mode 100644
index 24db372..0000000
--- a/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/TesthumanSwimSlow.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/TesthumanWalk.xml b/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/TesthumanWalk.xml
deleted file mode 100644
index 38e2eca..0000000
--- a/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Animations/TesthumanWalk.xml
+++ /dev/null
@@ -1,2 +0,0 @@
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Ragdolls/TesthumanDefaultRagdoll.xml b/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Ragdolls/TesthumanDefaultRagdoll.xml
deleted file mode 100644
index e7a1772..0000000
--- a/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Ragdolls/TesthumanDefaultRagdoll.xml
+++ /dev/null
@@ -1,130 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Testhuman.xml b/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Testhuman.xml
deleted file mode 100644
index 776307e..0000000
--- a/LocalMods/[DebugOnlyTest]Testhuman/Characters/Testhuman/Testhuman.xml
+++ /dev/null
@@ -1,308 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Testhuman/README.txt b/LocalMods/[DebugOnlyTest]Testhuman/README.txt
deleted file mode 100644
index 94c01ba..0000000
--- a/LocalMods/[DebugOnlyTest]Testhuman/README.txt
+++ /dev/null
@@ -1,8 +0,0 @@
-This mod includes a non-human character copied from a human.
-The mod can be used to test whether some normally human-only features work on a non-human character, for example:
-- Giving the character a job, name and portrait.
-- Giving talents to the character.
-- Adding the character to the crew.
-- Using human AI on a non-human.
-
-When spawned, the character should behave and look the same way as a human character (depending on the team, it can either befriendly or hostile).
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]Testhuman/filelist.xml b/LocalMods/[DebugOnlyTest]Testhuman/filelist.xml
deleted file mode 100644
index bf21e44..0000000
--- a/LocalMods/[DebugOnlyTest]Testhuman/filelist.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]testGapSub/filelist.xml b/LocalMods/[DebugOnlyTest]testGapSub/filelist.xml
deleted file mode 100644
index 5caadb4..0000000
--- a/LocalMods/[DebugOnlyTest]testGapSub/filelist.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/LocalMods/[DebugOnlyTest]testGapSub/testGapSub.sub b/LocalMods/[DebugOnlyTest]testGapSub/testGapSub.sub
deleted file mode 100644
index 77747cf..0000000
Binary files a/LocalMods/[DebugOnlyTest]testGapSub/testGapSub.sub and /dev/null differ
diff --git a/config_player.xml b/config_player.xml
new file mode 100644
index 0000000..684e113
--- /dev/null
+++ b/config_player.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docker-compose.yml b/docker-compose.yml
new file mode 100644
index 0000000..ecd2cfd
--- /dev/null
+++ b/docker-compose.yml
@@ -0,0 +1,9 @@
+version: "3"
+
+services:
+ barotrauma:
+ build: .
+ ports:
+ - "27015:27015/udp"
+ - "27015:27015/tcp"
+ restart: unless-stopped
diff --git a/docs/CI_CD_GUIDE.md b/docs/CI_CD_GUIDE.md
new file mode 100644
index 0000000..c7dbf62
--- /dev/null
+++ b/docs/CI_CD_GUIDE.md
@@ -0,0 +1,167 @@
+# CI/CD для Barotrauma Dedicated Server
+
+## Архитектура
+
+```
+ПК (разработка):
+ Barotrauma + моды → autogen_config.py → git commit → push в release
+
+Gitea Actions (CI):
+ Триггер: push в release → docker build → push в локальный registry → SSH деплой
+
+Сервер Ubuntu 24.04:
+ Docker → docker run barotrauma-server → порт 27015 UDP/TCP
+```
+
+## 1. Подготовка сервера (Ubuntu 24.04)
+
+### 1.1. Установка Docker
+
+```bash
+curl -fsSL https://get.docker.com | sh
+sudo usermod -aG docker $USER
+# Выйти и зайти заново (или newgrp docker)
+```
+
+### 1.2. Запуск локального Docker registry
+
+```bash
+docker run -d --restart always -p 5000:5000 --name registry registry:2
+```
+
+### 1.3. Настройка insecure registry
+
+Создать/редактировать `/etc/docker/daemon.json`:
+
+```json
+{
+ "insecure-registries": [":5000"]
+}
+```
+
+Перезапустить Docker:
+
+```bash
+sudo systemctl restart docker
+```
+
+### 1.4. Добавление SSH ключа для CI
+
+Сгенерировать ключ (если нет):
+
+```bash
+ssh-keygen -t ed25519 -f ~/.ssh/ci_deploy -N ""
+cat ~/.ssh/ci_deploy.pub >> ~/.ssh/authorized_keys
+chmod 600 ~/.ssh/authorized_keys
+```
+
+Приватный ключ (`~/.ssh/ci_deploy`) понадобится в Gitea Secrets.
+
+## 2. Настройка Gitea Actions
+
+### 2.1. Включить Actions в Gitea
+
+`Site Administration → Actions → Enable Actions`
+
+Убедиться, что есть Gitea Runner. Если нет — установить:
+
+```bash
+# На сервере или отдельной машине:
+sudo wget -O /usr/local/bin/act_runner https://gitea.com/gitea/act_runner/releases/latest/download/act_runner-linux-amd64
+sudo chmod +x /usr/local/bin/act_runner
+act_runner register --instance https://<ВАШ_GITEA> --token
+act_runner daemon
+```
+
+### 2.2. Добавить Secrets в Gitea
+
+В репозитории: `Settings → Secrets → Add secret`
+
+| Secret | Значение |
+|--------|----------|
+| `REGISTRY_ADDR` | `:5000` (например `192.168.1.100:5000`) |
+| `SERVER_HOST` | IP-адрес сервера |
+| `SERVER_USER` | Пользователь для SSH (обычно `root` или ваш user) |
+| `SSH_KEY` | **Приватный** ключ из `~/.ssh/ci_deploy` |
+
+## 3. Рабочий процесс
+
+### 3.1. На ПК: подготовка сборки
+
+```bash
+# 1. Скопировать моды из Steam Workshop в LocalMods/:
+# Каждый мод — отдельная папка, внутри filelist.xml
+# Пример: LocalMods/MyMod/filelist.xml
+
+# 2. Сгенерировать конфиг:
+python3 scripts/autogen_config.py
+# → Будет создан config_player.xml с путями ко всем модам
+
+# 3. (Опционально) Проверить локально:
+# docker compose up --build
+
+# 4. Закоммитить и запушить:
+git add -A
+git commit -m "feat: update mods"
+git push origin release
+```
+
+### 3.2. CI: автоматический деплой
+
+После push в `release` Gitea Actions автоматически:
+
+1. Собирает Docker образ (`Dockerfile`)
+2. Пушит образ в локальный registry (`:5000/barotrauma-server:latest`)
+3. По SSH подключается к серверу
+4. Останавливает старый контейнер
+5. Запускает новый контейнер с пробросом порта `27015`
+
+### 3.3. Проверка сервера
+
+```bash
+# На сервере:
+docker logs -f barotrauma
+# Или через Steam, подключившись к :27015
+```
+
+## 4. Структура файлов
+
+```
+BarotraumaMod/
+├── scripts/
+│ └── autogen_config.py # Скрипт генерации config_player.xml
+├── .gitea/workflows/
+│ └── deploy.yml # Gitea Actions workflow
+├── Dockerfile # Сборка Docker образа
+├── docker-compose.yml # Локальное тестирование
+├── config_player.xml # Конфиг (генерируется autogen_config.py)
+├── LocalMods/ # Моды (каждый мод в своей папке)
+│ ├── LuaCsForBarotrauma/
+│ │ └── filelist.xml
+│ ├── Mod1/
+│ │ └── filelist.xml
+│ └── ...
+└── ... # Остальные файлы сервера
+```
+
+## 5. Порты
+
+| Порт | Протокол | Назначение |
+|------|----------|-----------|
+| 27015 | UDP | Основной игровой трафик Barotrauma |
+| 27015 | TCP | Steam-подключения |
+| 5000 | TCP | Локальный Docker registry |
+
+## 6. Полезные команды
+
+```bash
+# На сервере:
+docker logs barotrauma # Логи сервера
+docker restart barotrauma # Перезапуск
+docker stop barotrauma && docker rm barotrauma # Удаление
+docker pull :5000/barotrauma-server:latest # Ручное обновление
+
+# На ПК:
+python3 scripts/autogen_config.py # Обновить config_player.xml
+docker compose up --build # Локальный тест
+```
diff --git a/docs/Info.md b/docs/Info.md
new file mode 100644
index 0000000..c1f35b4
--- /dev/null
+++ b/docs/Info.md
@@ -0,0 +1,164 @@
+Ниже — рабочая инструкция для **Ubuntu 24.04** по запуску **Barotrauma Dedicated Server** с **модами** и **Lua for Barotrauma**. Для обычных модов на выделенном сервере нужно, чтобы файлы модов были доступны на сервере и были прописаны в `config_player.xml`; для Lua дополнительно нужно включить Lua Patch/скриптинг и затем активировать C#-скриптинг в клиенте/лаунче сервера[2][4][8].
+
+## 1) Что нужно заранее
+
+- Сервер **Barotrauma Dedicated Server** установлен через Steam/SteamCMD[11].
+- Есть **клиентская** копия Barotrauma на вашем ПК, где вы можете подписаться на моды в Workshop, чтобы они скачались локально[2][4].
+- Моды, которые вы хотите использовать, совместимы между собой и с вашей версией игры.
+- Для **Lua for Barotrauma** сервер должен уметь загрузить Lua Patch; в хостинге это обычно отдельный переключатель, а в локальной установке — это делается через загрузку/установку Lua из консоли и последующее включение скриптинга в игре[1][8].
+
+## 2) Установка самого выделенного сервера на Ubuntu 24.04
+
+Официальная инструкция рекомендует запускать сервер из каталога `Barotrauma Dedicated Server` после установки, например через `./DedicatedServer`[11].
+
+- Обновите систему и установите базовые зависимости:
+```bash
+sudo apt update
+sudo apt install -y lib32gcc-s1 lib32stdc++6 tmux screen wget
+```
+
+- Если сервер не стартует из-за старых библиотек, на wiki Barotrauma отдельно упоминается `libssl1.0.0` для некоторых Linux-сборок[11].
+ На Ubuntu 24.04 этот пакет обычно **не нужен** и может отсутствовать в стандартных репозиториях, поэтому сначала проверьте запуск без него.
+
+- Зайдите в каталог сервера:
+```bash
+cd ~/.steam/steamapps/common/Barotrauma\ Dedicated\ Server
+```
+
+- Запустите сервер:
+```bash
+./DedicatedServer
+```
+Это соответствует официальному способу запуска на Linux/nix[11].
+
+## 3) Как поставить обычные моды на сервер
+
+Официальная wiki описывает такой путь: подписаться на моды в Steam Workshop на своём клиенте, затем скопировать файлы модов на сервер и включить их через `config_player.xml`[2][4].
+
+### Шаг 3.1 — скачать моды на клиенте
+- На вашем ПК откройте Steam Workshop Barotrauma.
+- Подпишитесь на нужные моды.
+- Запустите Barotrauma, чтобы Steam скачал файлы модов локально[2][4].
+
+### Шаг 3.2 — найти файлы модов
+На клиенте моды обычно лежат в каталоге WorkshopMods/Installed, а для сервера их часто копируют в `LocalMods`[10].
+Встречающийся рабочий путь на Linux-серверах и в гайдах:
+- `LocalMods/<ИмяМода>/filelist.xml`[10]
+- либо содержимое, которое соответствует `WorkshopMods/Installed` на клиенте[10]
+
+### Шаг 3.3 — скопировать моды на сервер
+Скопируйте папку мода на сервер в каталог `LocalMods`.
+Пример:
+```bash
+/home/container/LocalMods/MyMod/filelist.xml
+```
+или
+```bash
+/path/to/barotrauma-server/LocalMods/MyMod/filelist.xml
+```
+В гайдах и инструкциях для dedicated server именно `LocalMods` используется как место, откуда сервер подхватывает установленный мод[10].
+
+### Шаг 3.4 — прописать моды в `config_player.xml`
+Официальная wiki говорит, что активные пакеты контента нужно добавить в `config_player.xml` на сервере[2][4].
+
+Откройте файл:
+```bash
+nano /path/to/barotrauma-server/config_player.xml
+```
+
+Найдите блок с контент-пакетами и добавьте строки вида:
+```xml
+
+
+
+
+
+
+
+```
+
+Для отдельных сборок и серверных конфигураций встречается и замена стандартного ванильного пакета на путь из `LocalMods/.../filelist.xml`, если это именно кор-пакет сборки[7][10]. Но для обычных модов безопаснее не заменять ванильный пакет, а добавлять моды в `regularpackages`[4][10].
+
+### Шаг 3.5 — перезапустить сервер
+После сохранения `config_player.xml` перезапустите сервер.
+После этого моды должны быть доступны на сервере[2][4].
+
+## 4) Как включить Lua for Barotrauma
+
+По результатам найденных инструкций, Lua для Barotrauma обычно включается так: сервер запускается с Lua Patch, после чего в игре/консоли выполняется установка, а затем активируется C# scripting[1][8].
+
+### Вариант для локального/самостоятельно запущенного сервера
+- Запустите сервер с нужными модами.
+- Подключитесь к нему клиентом.
+- Откройте консоль на сервере/в игре и выполните команду установки Lua, которую в видео-гайде показывают как `install cl lua` или аналогичную команду установки Lua Patch[1].
+- После установки перезапустите игру/сервер.
+- Затем в интерфейсе игры включите **C# scripting** / **Enable C Sharp scripting**[1].
+
+### Важное замечание
+В разных гайдах и сборках команда/механика установки Lua может отличаться, а у хостингов это часто делается отдельной настройкой **Install Lua Patch = Enabled**[8].
+Для вашего случая на Ubuntu 24.04 я бы ориентировался на такой порядок:
+- сначала установить и проверить обычный сервер;
+- затем включить/установить Lua Patch;
+- затем включить моды;
+- затем включить скриптинг.
+
+## 5) Практический рабочий порядок установки
+
+1. Установить Barotrauma Dedicated Server на Ubuntu 24.04[11].
+2. Запустить сервер один раз, чтобы он создал конфиги[11].
+3. На клиенте подписаться на нужные моды в Workshop и дождаться загрузки[2][4].
+4. Скопировать файлы модов на сервер в `LocalMods`[10].
+5. Отредактировать `config_player.xml`, добавив моды в ``[2][4][10].
+6. Запустить сервер и проверить, что моды загрузились[11].
+7. Установить/включить **Lua Patch**[1][8].
+8. Подключиться клиентом, включить **C# scripting** в интерфейсе игры, если это требуется вашей сборкой Lua[1].
+9. Проверить логи сервера, если мод не подхватился.
+
+## 6) Частые проблемы
+
+- **Сервер стартует, но модов нет**
+ Обычно это означает, что моды не скопированы на сервер или не прописаны в `config_player.xml`[2][4][10].
+
+- **Не совпадают пути к файлам**
+ Проверьте, что путь указывает именно на `LocalMods/<ИмяМода>/filelist.xml` или на тот путь, который использует ваша сборка[7][10].
+
+- **Lua не активируется**
+ Для Lua часто нужен не только пакет модов, но и отдельная активация patch/скриптинга, как показано в гайдах и у хостеров[1][8].
+
+- **На Ubuntu 24.04 не запускается бинарник**
+ Сначала проверьте стандартный запуск `./DedicatedServer`; проблема с дополнительными библиотеками встречается не у всех, и не все старые зависимости актуальны для 24.04[11].
+
+## 7) Минимальный пример структуры
+
+```text
+Barotrauma Dedicated Server/
+├─ DedicatedServer
+├─ config_player.xml
+├─ LocalMods/
+│ ├─ ModA/
+│ │ └─ filelist.xml
+│ └─ ModB/
+│ └─ filelist.xml
+└─ ...
+```
+
+И фрагмент `config_player.xml`:
+```xml
+
+
+
+
+
+
+
+```
+
+## 8) Что я могу сделать дальше
+
+Если хотите, я могу сразу написать **готовый bash-скрипт для Ubuntu 24.04**, который:
+- создаст пользователя для сервера,
+- скачает/обновит Dedicated Server,
+- разложит папки `LocalMods`,
+- и покажет, как автоматически править `config_player.xml`.
+
+**Источники:** [1], [2], [4], [8], [10], [11]
\ No newline at end of file
diff --git a/scripts/autogen_config.py b/scripts/autogen_config.py
new file mode 100755
index 0000000..e301c26
--- /dev/null
+++ b/scripts/autogen_config.py
@@ -0,0 +1,39 @@
+#!/usr/bin/env python3
+"""Scan LocalMods/ and generate config_player.xml with content packages."""
+
+import os
+import sys
+import xml.etree.ElementTree as ET
+
+BASE = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+MODS_DIR = os.path.join(BASE, "LocalMods")
+OUTPUT = os.path.join(BASE, "config_player.xml")
+
+
+def find_mods():
+ if not os.path.isdir(MODS_DIR):
+ return []
+ return sorted(
+ d for d in os.listdir(MODS_DIR)
+ if os.path.isfile(os.path.join(MODS_DIR, d, "filelist.xml"))
+ )
+
+
+def build_config(mods):
+ root = ET.Element("Barotrauma")
+ cp = ET.SubElement(root, "contentpackages")
+ ET.SubElement(cp, "corepackage", path="Content/ContentPackages/Vanilla.xml")
+ reg = ET.SubElement(cp, "regularpackages")
+ for m in mods:
+ ET.SubElement(reg, "package", path=f"LocalMods/{m}/filelist.xml")
+ ET.indent(root)
+ return ET.tostring(root, encoding="unicode", xml_declaration=True)
+
+
+if __name__ == "__main__":
+ mods = find_mods()
+ print(f"Found {len(mods)} mod(s): {mods}")
+ xml = build_config(mods)
+ with open(OUTPUT, "w") as f:
+ f.write(xml)
+ print(f"Generated {OUTPUT}")