This repository is a modding kit that can be used to create mods for the game Tower Networking Inc. Modding support for the game is implemented with Godot Sandbox using libriscv.
Mods are created in C/C++, however this repository also contains the official LuaJIT support mod. Lua mods are preferred as they are easier to develop and are naturally source-available.
Note that modding for the game is still in early design/implementation stage.
This repository includes a modern WPF-based Mod Manager that can download mods directly from GitHub releases and manage local installations.
- π GitHub Integration: Browse, download, and update mods from releases
- π Progress Bars: Visual feedback during mod downloads
- π¨ Visual Distinctions: Color-coded mods (Downloaded/Manual/Available)
- βοΈ Parameter Configuration: Configure mod settings through the GUI
- π One-Click Launch: Start the game directly from the manager
- Double-click
ModManager.batto launch - Available mods from GitHub releases appear in gray
- Click a mod and press Download to install
- Installed mods show as blue (downloaded) or purple (manual)
- Configure parameters and click Save Changes
| Source | Color | Behavior |
|---|---|---|
| Downloaded | Blue | Installed from GitHub releases. Deleted when removed. |
| Manual | Purple | Manually installed. Moved to disabled folder when disabled. |
| Available | Gray | Not installed. Can be downloaded from GitHub. |
For full documentation, see:
- ModManager-README.md - Complete mod manager guide
- CONFIG-SYSTEM.md - Configuration system architecture
If you want to use a Lua based mods, you will need to manually add the luajit support mod first. This may be improved in the future.
You can find the mod in the github releases, or click here for the latest stable release. Download the luajit file and place it in your mods folder. Refer to Loading the mod for further instructions.
If you are using the beta branch of the game, you'll likely want to use the "Continuous (gnu) - beta" release instead.
There is a beta github branch which should work with the game's beta branch on steam.
Changes to the modding-kit go through the beta branch first.
Each mod in the /lua directory has its own automated release workflow. When you push changes to a mod:
- Version is automatically incremented (using semantic versioning)
- Last Updated date is set to the current date
- Mod is packaged into a versioned zip file
- GitHub release is created with download links
- Documentation is updated with the latest release links
For more details, see .github/MOD-RELEASE-SYSTEM.md.
You can also trigger releases manually:
- Go to the Actions tab
- Select your mod's workflow (e.g., "Release money-cheat")
- Click Run workflow and choose version bump type (major/minor/patch)
All Lua mods follow this structure:
mods/<mod-name>/
βββ entry.lua # Main mod file (REQUIRED)
βββ mod.jsonc # Mod metadata for game loader (REQUIRED)
βββ metadata.yaml # Extended mod metadata (REQUIRED)
βββ README.md # Mod documentation (REQUIRED)
βββ ui-config.ps1 # Custom UI config (OPTIONAL, for complex configs)
entry.lua - Main mod implementation
-
Must be a single, self-contained Lua file
-
Configuration options must be in a marked section:
-- ===== MOD CONFIGURATION START ===== -- This section is parsed and modified by ModManager -- Do not remove the configuration markers local config = { param1 = true, param2 = 2.0, param3 = "value" } -- ===== MOD CONFIGURATION END =====
metadata.yaml - Mod metadata
- Follow the schema in mod-metadata-schema.yaml
- Must include: Name, Description, Author, Version, Creation Date, Last Updated, Development Status, Game Version Supported, ID
- Version field uses semantic versioning (e.g., "1.0.0") and is auto-incremented by release workflows
- Parameters section defines configurable options (used by basic ModManager UI)
README.md - User documentation
- Describe what the mod does
- List features
- Explain installation and usage
- Include compatibility information
- Document any special configuration
ui-config.ps1 - Custom configuration UI
- Only needed for complex mods with conditional parameters
- Defines UI elements in PowerShell (not in metadata.yaml)
- See device-tweaker/ui-config.ps1 for examples
- Keep it simple: Most mods should use the Parameters section in metadata.yaml
- Use marked sections: Always use the
MOD CONFIGURATION START/ENDmarkers in entry.lua - Type-safe defaults: Provide sensible defaults for all parameters
- Document parameters: Add clear descriptions in metadata.yaml
- Use ui-config.ps1 only when needed: For conditional/dynamic parameter visibility
Mods in the game will be loaded from the user's game directory in alphabetical order.
-
Windows:
%APPDATA%\Godot\app_userdata\Tower Networking Inc -
Linux:
~/.local/share/godot/app_userdata/Tower Networking Inc
On the user's game directory, you'll observe directories like saves/ and logs/. Place your mod in the mods/ directory.
For example, to install the cpp-template mod, place .zig/cpp-template to mods/ such that mods/cpp-template/entry.elf exists.
If you'd like to use Lua instead, you can download the luajit-support mod from the releases section and extract it into your mods/ directory so that mods/luajit-support/luajit-support.elf exists. This enables loading of .lua mods.
The engine will always first try to load luajit-support before other mods, so you do not need to worry about the naming.
Check out the librisc-v docs for more information.
To clone and initialize the repository locally;
# Ensure you have `git` installed.
git clone https://github.com/CJFWeatherhead/TNI-Mods.git --branch main
git submodule update --init --recursiveMake sure the following is installed:
- git (version control system, used to clone the repo locally)
- CMake (generator for build systems)
- Ninja (build system)
- ZIG (RISC-V cross-compilation)
Then in the root of this project, run the command:
build-zig.cmd
The built output (a .elf file) will be in the .zig/<name-of-your-mod>/entry.elf directory.
Make sure the following is installed:
git(version control system, used to clone the repo locally)CMake(generator for build systems)Ninja(build system)g++-riscv64-linux-gnu-14(GNU RISC-V compiler)
# For Debian based systems like Ubuntu;
sudo apt install git cmake ninja-build g++-riscv64-linux-gnu-14Then in the root of this project, run the command:
./build-gnu.sh