Compare commits

..

7 commits

Author SHA1 Message Date
6dd459582f 1.0.1 2025-03-15 21:52:46 +01:00
3acfb446d1 perf: deprecate internalCurrentState tracking
It isn't used at the moment.
2025-03-15 21:52:34 +01:00
86a95a8e88 style: minor formatting improvements 2025-03-15 21:48:38 +01:00
c095d824ab fix: resize menu for better score visibility 2025-03-15 21:44:45 +01:00
7af5036fb1 docs: added server config files 2025-03-15 21:42:45 +01:00
0fe4de92fa style: in-game guide formatting
Make the in-game guide look nicer by formatting

Add link to source code for further reference
2025-03-15 21:40:32 +01:00
32080028d6 docs: clarify readme and add new instructions 2025-03-15 21:34:59 +01:00
7 changed files with 245 additions and 39 deletions

View file

@ -15,14 +15,12 @@ public class GBSUGui : MonoBehaviour
{
private bool menu_shown;
//private string _currentMap;
public Rect gmenu = new(Screen.width / 2, 0, 385f, 590f);
public Rect gmenu = new(Screen.width / 2, 0, 385f, 690f);
readonly IInputSystem inputSystem = UnityInput.Current;
string serverip = null;
int serverport = 0;
string currentmap;
string _internalCurrentState;
Traverse _internalCurrentStateTraverse;
int vsync_switch;
bool hosting = false;
private void Start()
@ -36,7 +34,6 @@ public class GBSUGui : MonoBehaviour
int.TryParse(CommandLineParser.Instance.GetValueForKey("-port", true), out serverport);
}
_internalCurrentStateTraverse = Traverse.Create(nameof(GameManagerNew)).Field("internalCurrentState");
vsync_switch = QualitySettings.vSyncCount;
}
private void Update()
@ -48,7 +45,6 @@ public class GBSUGui : MonoBehaviour
}
currentmap = UnityEngine.SceneManagement.SceneManager.GetActiveScene().name;
_internalCurrentState = _internalCurrentStateTraverse.GetValue() as string;
}
private void ToggleMenu()
@ -70,15 +66,15 @@ public class GBSUGui : MonoBehaviour
GUI.skin.label.alignment = TextAnchor.UpperLeft;
GUILayout.Label($@"==Guide==
CLI arguments have to be set to join or host: -ip, -port, -servername, -serverpassword
Set CLI arguments: -ip, -port, -servername, -serverpassword
[Hosting]
1. Create a config in Gang Beasts_Data/Config/Rotation/config.json
2.Press the 'Host' button while in the Main Menu.
2. Press the 'Host' button while in the Main Menu
[Joining]
1. Go to Online
2. Press the 'Join' button.");
2. Press the 'Join' button");
if (GUI.Button(new Rect(320f, 10f, 55f, 30f), "KILL"))
{
Application.Quit(0);
@ -139,14 +135,19 @@ CLI arguments have to be set to join or host: -ip, -port, -servername, -serverpa
QualitySettings.vSyncCount = vsync_switch;
}
GUI.Label(new Rect(20f, 365f, 365f, 400f), $@"Current map: {currentmap}
GUI.Label(new Rect(20f, 365f, 365f, 400f), $@"
Current map: {currentmap}
Lobby State: {LobbyManager.Instance.LobbyStates.SelfState}
Game State: {_internalCurrentState}
Vsync: {QualitySettings.vSyncCount}
Target FPS: {Application.targetFrameRate}
{UpdateScoreDisplay()}
Made with <3 by anavoi at Gaboule Community (gaboule.com)");
Made with <3 by anavoi at Gaboule Community
Free and open-source software under GPLv3.
Our source code is availaible at git.gaboule.com/Gaboule/GBSU
Please refer to the documentation for more information.");
GUI.DragWindow(new Rect(0, 0, 10000, 10000));
}

View file

@ -4,7 +4,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>GBSU</AssemblyName>
<Product>Gang Beasts Server Utility</Product>
<Version>1.0.0</Version>
<Version>1.0.1</Version>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<RestoreAdditionalProjectSources>

View file

@ -67,5 +67,5 @@ public class Plugin : BaseUnityPlugin
public const string PluginGUID = "com.gaboule.plugins.gbsu";
public const string PluginName = "Gang Beasts Server Utility";
public const string PluginVersion = "1.0.0";
public const string PluginVersion = "1.0.1";
}

View file

@ -1,5 +1,5 @@
# GBSU (Gang Beasts Server Utility)
This mod allows you to connect to a Gang Beast server in recent versions (through LAN or Internet) by utilizing developer methods found in the game assembly.
This mod allows you to connect to a Gang Beasts server in recent versions (through LAN or Internet) by utilizing developer methods found in the game assembly.
**NOTICE: This is not a "Cement" mod, and we don't want to be affiliated with their developers. This mod is standalone, and will work best on its own!**
@ -8,48 +8,46 @@ This mod allows you to connect to a Gang Beast server in recent versions (throug
- Custom score handling made by the server (we don't want to use the game's score handler)
# Installation
The mod is made for the game version **1.17.39_WS_8af7688** running on Unity **v2020.3.5.8426922** (check your version in the Settings menu in-game)
Other versions *MIGHT* work with the mod. Try at your own risk.*
1. Check whether your game is Mono or IL2CPP: Go to 'Gang Beasts_Data'
- If you have a il2cpp_data folder: your game is **IL2CPP**
- If you have a folder called `MonoBleedingEdge` or the `Gang Beasts_Data/Managed` folder contains a file called 'Assembly-CSharp.dll': your game is **Mono**
2. **Follow the instructions based on the game type:**
1. Check your game version in the "Settings" menu in-game. If the version is **1.17.39_WS_8af7688**, we fully support it.
2. Check whether your game is Mono or IL2CPP: Go to 'Gang Beasts_Data'
- If you have a folder called `MonoBleedingEdge` or the `Gang Beasts_Data/Managed` folder contains a file called 'Assembly-CSharp.dll': your game is **Mono**. Continue to [Mono instructions](#mono).
- If you have a il2cpp_data folder: your game is **IL2CPP**. Continue to [IL2CPP instructions](#il2cpp).
## Mono
Go to https://github.com/BepInEx/BepInEx/releases and get the latest stable release for Mono x64 (on Windows).
1. As of March 2025, what we recommend doing is getting `BepInEx_win_x64_5.4.23.2.zip`.
2. Extract the zip file contents into your root game folder (not in the 'Gang Beasts_Data' folder!)
1. [Download the latest **BepInEx 5 stable** release for Mono x64](https://github.com/BepInEx/BepInEx/releases). As of March 2025, we recommend getting `BepInEx_win_x64_5.4.23.2.zip`
2. Extract the zip file contents into your root game folder (where the Gang Beasts.exe file is, and not in the 'Gang Beasts_Data' folder!)
3. Launch the game once.
4. Get the mod from our releases page.
4. Get the mod from our [releases page](https://git.gaboule.com/Gaboule/GBSU/releases).
5. Put the .dll file in the `BepInEx/plugins` folder.
6. Launch the game with launch arguments `-ip 1.2.3.4` and `-port 5999` with the IP address and port of the server you want to host or connect to.
7. You're good to go! Learn how to use the mod in [usage](#usage)
- To set those arguments on Steam, [please refer to this guide](https://help.steampowered.com/en/faqs/view/7D01-D2DD-D75E-2955).
7. You're good to go! Learn how to use the mod in [usage](#usage).
## IL2CPP
**WIP**: The mod will be ported to MelonLoader and recent game versions in the future.
**WIP**: You're currently out of luck! The mod doesn't support your game version at the moment. It will be ported to MelonLoader in the future. Try downgrading your game by getting older versions in Steam Betas or by using [DepotDownloader](https://github.com/SteamRE/DepotDownloader).
# Usage
Press `Right Shift` to open the mod GUI. Because of how the game is made, you need to be very careful when executing the steps else you will need to restart it. (will be fixed in future versions)
## Server (host)
1. Open the mod menu and press **Host** while you're in the main menu.
2. Don't pay attention to what's displayed on the game. It will be an infinite loading screen after the first round.
### Setting up the server
1. Open the `Gang Beasts_Data` folder in the "server" game instance files.
2. Create two new folders: `Config/Rotation`
3. Download the [one of the config files](https://git.gaboule.com/Gaboule/GBSU/src/branch/main/docs/configs) and place it inside the `Rotation` folder.
4. Rename the file to `config.json`
### Configuring your custom server settings
* If you set `"random": true`, the map order will be randomized.
* Some maps may have different names in-game compared to their actual titles. Make sure to refer to the [`allmaps` configs](https://git.gaboule.com/Gaboule/GBSU/src/branch/main/docs/configs) for the map names.
### Launching the server
Once the config file is in place, host your server by pressing the **Host** button in the mod menu. Don't pay attention to what's displayed on the game. It will be an infinite loading screen after the first round.
## Client (player)
1. In the game menu, choose **Online**.
2. Make sure to use a different color than your friends.
2. If you're planning to team up with friends, make sure your [server config]() is set to the `gang` gamemode and choose a shared color. Otherwise, use a different color than your friends.
3. Open the mod menu and press **Join**.
# Known Issues
- Scores tab on the server is expected be wrong. This is a temporary implementation and the scores will be reworked.
- The server is not headless.
- If you want to play on your server, you need to launch a different game instance. It is not possible to connect to the server after launching it at the moment.
- Getting the current scene isn't the most efficient way at the moment.
# Troubleshooting
## I press the Host/Join button and nothing works!
1. Make sure you're in Online mode if you're **joining** a server.

View file

@ -0,0 +1,93 @@
{
"random": true,
"games": [
{
"mode": "gang",
"map": "rooftop"
},
{
"mode": "gang",
"map": "ring"
},
{
"mode": "gang",
"map": "blimp"
},
{
"mode": "gang",
"map": "containers"
},
{
"mode": "gang",
"map": "elevators"
},
{
"mode": "gang",
"map": "girders"
},
{
"mode": "gang",
"map": "gondola"
},
{
"mode": "gang",
"map": "grind"
},
{
"mode": "gang",
"map": "incinerator"
},
{
"mode": "gang",
"map": "ring"
},
{
"mode": "gang",
"map": "towers"
},
{
"mode": "gang",
"map": "train"
},
{
"mode": "gang",
"map": "trucks"
},
{
"mode": "gang",
"map": "aquarium"
},
{
"mode": "gang",
"map": "billboard"
},
{
"mode": "gang",
"map": "buoy"
},
{
"mode": "gang",
"map": "chute"
},
{
"mode": "gang",
"map": "billboard"
},
{
"mode": "gang",
"map": "lighthouse"
},
{
"mode": "gang",
"map": "subway"
},
{
"mode": "gang",
"map": "vents"
},
{
"mode": "gang",
"map": "wheel"
}
]
}

View file

@ -0,0 +1,93 @@
{
"random": true,
"games": [
{
"mode": "melee",
"map": "rooftop"
},
{
"mode": "melee",
"map": "ring"
},
{
"mode": "melee",
"map": "blimp"
},
{
"mode": "melee",
"map": "containers"
},
{
"mode": "melee",
"map": "elevators"
},
{
"mode": "melee",
"map": "girders"
},
{
"mode": "melee",
"map": "gondola"
},
{
"mode": "melee",
"map": "grind"
},
{
"mode": "melee",
"map": "incinerator"
},
{
"mode": "melee",
"map": "ring"
},
{
"mode": "melee",
"map": "towers"
},
{
"mode": "melee",
"map": "train"
},
{
"mode": "melee",
"map": "trucks"
},
{
"mode": "melee",
"map": "aquarium"
},
{
"mode": "melee",
"map": "billboard"
},
{
"mode": "melee",
"map": "buoy"
},
{
"mode": "melee",
"map": "chute"
},
{
"mode": "melee",
"map": "billboard"
},
{
"mode": "melee",
"map": "lighthouse"
},
{
"mode": "melee",
"map": "subway"
},
{
"mode": "melee",
"map": "vents"
},
{
"mode": "melee",
"map": "wheel"
}
]
}

21
docs/configs/waves.json Normal file
View file

@ -0,0 +1,21 @@
{
"random": true,
"games": [
{
"mode": "waves",
"map": "rooftop"
},
{
"mode": "waves",
"map": "incinerator"
},
{
"mode": "waves",
"map": "subway"
},
{
"mode": "waves",
"map": "grind"
}
]
}