

In an effort to combat the declining performance of its employees, the Company is introducing a form of in-house training. This new initiative pits coworkers against each other in a scrap-collecting competition across the galaxy. By the end of a few days, the lucky winner will be awarded a continued contract with the Company and a brand new group of coworkers!
Sign up now to secure your future with the Company!
This mod is a rewrite and continuation of Competitive Company by agmas. It features a new game mode, where teams of players compete to collect the most amount of scrap within a set number of days.
[!IMPORTANT] All players in the lobby are required to have the mod installed!
[!NOTE] The gamemode cannot be toggled off; i.e. to play the base game you have to disable the whole mod.
The numbers shown here are just default values and can be freely configured by the host.
This mod is designed to be somewhat minimal. To complement your experience, consider also using the following mods. These are required by everyone in the lobby unless stated otherwise.
Teams are managed through custom terminal commands:
| Command | Description |
|---|---|
join <team> [player] |
Join a team. The host can join other players by specifying their username as the last argument. |
teams |
Lists all teams and their scores. |
create-team <name> |
Creates a new team with the given name. By default, only the host can use this. |
delete-team <team> |
Deletes the specified team. By default, only the host can use this. |
set-team-name <name> |
Changes the name of your current team. The max length for team names is 64 characters. |
set-team-color <color> |
Changes the color of your current team. The color can be one of red, green, blue, yellow, cyan, magenta, white or black, or a custom hex code (e.g. #FF0000). |
settings |
View the current match settings. |
scramble-teams |
Randomly assigns players to teams. Only the host can use this. |
This information can also be found in-game by running the other command.
Most configuration is done via a normal .cfg file. All options except those in the Client section are server-side and can only be set by the host. The options take effect immediately, meaning you can configure match settings on the fly with a mod like LethalConfig.
Additionally, you can define a custom set of default teams that will be created each time you start a lobby. This is done via a default_teams.json file in the config folder. Any players you specify will be put into that team after joining. For example:
[
{
"name": "Milk enjoyers",
"color": "white",
"players": [
"Kesomannen"
]
},
{
"name": "Orange juice fans",
"color": "#e0701b"
},
{
"name": "Water drinkers",
"color": "aqua",
"players": [
"agmas",
"frostycirno"
]
}
]
This mod exposes an API for other mods to interact with.
CompetitiveCompany.dll and CompetitiveCompany.xml files to a folder in your project, for example lib.<ItemGroup>
<Reference Include="CompetitiveCompany" HintPath="relative/path/to/CompetitiveCompany.dll" />
</ItemGroup>
[BepInDependency(CompetitiveCompany.Plugin.Guid)]
public class MyPlugin : BaseUnityPlugin {
//...
}
You should now be able to access the public members under the CompetitiveCompany namespace. Here's a couple of quick examples:
using CompetitiveCompany.Game;
// Item that shows the position of all enemies when activated
public class XRayItem : GrabbableObject {
public override void ItemActivate(bool used, bool buttonDown = true) {
if (!used) return;
var localTeam = Player.Local.Team;
if (localTeam == null) return;
foreach (var player in Session.Current.Players) {
if (player.Team == localTeam) continue;
var position = player.transform.position;
var username = player.Controller.playerUsername;
Debug.Log($"Enemy {username} is at {position}");
// draw an indicator at the enemy's position
}
}
}
using CompetitiveCompany.Game;
// Only allow PvP inside of the facility
[BepInPlugin(...)]
public class Plugin : BaseUnityPlugin {
void Awake() {
Session.OnSessionStarted += OnSessionStarted;
}
void OnSessionStarted(Session session) {
session.Combat.AddPredicate((attacker, victim) => {
if (!attacker.Controller.isInsideFactory) {
return DamagePredicateResult.Deny("PvP is only allowed inside the facility");
}
return DamagePredicateResult.Allow();
});
}
}
Make sure you have the following installed:
Release configuration)Clone the repository
git clone https://github.com/Kesomannen/CompetitiveCompany.git
Download the following mods from Thunderstore and place their DLLs in the lib folder:
Add the MMHOOK_Assembly-CSharp.dll to the lib folder. This is generated by the HookGenPatcher mod on startup and located in the BepInEx/plugins/MMHOOK folder.
Build the project with
dotnet build
The mod will be built to bin/Debug/netstandard2.1/CompetitiveCompany.dll. Alternatively do a release build with
dotnet build -c Release
which will create a thunderstore-ready zip file in the build folder.
[!IMPORTANT] When testing locally, don't forget to include
assets/competitive-companyandlib/FlowTween.dllin the same folder as the mod's DLL.
The unity project to build the asset bundle is not yet included in this repository.
The source code of FlowTween can be found here. The FlowTween.dll in this project is a slightly modified version with the editor scripts taken out.