Project structure
Here's everything you need to know about where to find things in the Socially Distant repository, and where things belong.
C# source code
The game's source code and main solution file are found in the src/
directory.
You will find three projects:
AcidicGUI
: This is the UI system of Ritchie's Toolbox. You only need to touch this if you're adding new core functionality to the UI system.SociallyDistant.Framework
: This is the core framework of Socially Distant itself. This is the library that all game mods, including the game itself, must reference. It contains almost all of the game's public API and data types, but almost no actual game code.SociallyDistant
: This is the main game binary. All game code and assets live here.
There are also some third-party libraries, such as IMGUI, in the vendor/
directory. Leave them alone unless you really know what you're doing. Note that these libraries are available as NuGet packages, but we compile them from source to ensure compatibility with our custom MonoGame fork. If you need to add any community-maintained MonoGame/FNA helper libraries, you should include them as source code in the vendor
directory - ask a project maintainer for help if you need it.
Game assets
As mentioned, game assets are found in the SociallyDistant
project in src
. They're specifically found in the Content
directory within that project.
Only the bare minimum assets needed for the game to function are included here. Assets needed by Career Mode are not part of the open-source codebase, and Career Mode will therefore not be available.
You will find shaders, certain core textures, and sdsh
scripts in the Content directory.
sdsh
game scripts
Socially Distant uses a custom scripting language for in-game missions, NPC dialogues, and other scripted events in the game. This is because defining these scripted encounters in C# would look ugly. These scripts are written in a subset of Bash called sdsh
.
You can learn about how to read and write sdsh
here: sdsh
: The Basics
All sdsh
scripts belong in src/SociallyDistant/Content/Scripts
and must end with the .sh
extension. Scripts will be checked during game build, and any syntax errors will prevent the build from succeeding, as if they were C# compiler errors.
Documentation
The page you're reading right now exists in Markdown form, alongside all other guides on this site, inside the docs/
directory. API documentation is generated from XML documentation comments in the game's code.
Saved game data
Sometimes, you'll need to fuck around with saved game data or the game's settings, usually because something broke.
You can find all saved game data and settings in the following locations depending on your platform:
- Windows:
C:\Users\YOU\AppData\Local\acidic light\Socially Distant
- Linux:
~/.local/share/acidic light/Socially Distant
If you care about the contents of that directory, make a backup of it before ever touching the game's code. Once a newer version of Socially Distant writes to your save file, that file can no longer be loaded in older versions.
Where everything starts
The entry-point of Socially Distant is GameApplication
in the SociallyDistant
project.
Happy hackin'.