A Dead Cells Modding API/loader.
Warning
This project is under active development. Breaking changes may be made to APIs with zero notice.
Download the latest build here
- Simple Hook
- Basic interoperability
- Game object proxy objects in .NET
- Enum support
- Object support
- Virtual support
- Closure support
- Override Virtual Method
- Edit game bytecode dynamically
- More convenient BuildSystem
- Linux platform support
- .NET 9 runtime or higher
- Microsoft Visual C++ Redistributable package (2015-2022)
- Get the core file from nightly link or releases
- Unzip it to the game root directory
The folder structure should be similar to the following
<DeadCellsGameRoot>
|
+- coremod
| |
| +- core
| | |
| | +- native
| | | |
| | | +- ...
| | |
| | +- mdk
| | | |
| | | +- install.ps1
| | | |
| | | +- uninstall.ps1
| | | |
| | | +- ...
| | |
| | +- host
| | | |
| | | +- startup
| | | | |
| | | | +- DeadCellsModding.exe
| | | | |
| | | | +- ...
| | | +- ...
| | +- ...
| +- ...
|
+- deadcells.exe
|
+- deadcells_gl.exe
|
+- ...
Here are some examples.
- Install .NET SDK 9
- Install Dead Cells Core Modding as above
- Run
<DeadCellsGameRoot>/coremod/core/mdk/install.ps1
to configure the environment
- Create a library project based on .NET 9
- Add package reference
DeadCellsCoreModding.MDK
- Add the following to your csproj file
<PropertyGroup>
<!--Enter the mod name here-->
<ModName>$(AssemblyName)</ModName>
<!--
Enter mod type here
Available values:
mod: Normal mod
library: Library
-->
<ModType>mod</ModType>
<!--Enter the full name of the mod's main type here-->
<ModMain>ModNamespace.MainModClass</ModMain>
</PropertyGroup>
Build the mod using dotnet build
.
The default output directory is $(OutputPath)/output/
Start the game from <DeadCellsGameRoot>/coremod/core/host/startup/DeadCellsModding.exe
- Create
<DeadCellsGameRoot>/coremod/mods
folder if it does not exist. - Move the mods files into the
mods
folder. The folder structure should look like this:
mods
|
+- <ModName>
| |
| +- modinfo.json
| |
| +- ...
|
+- ...
Warning
<ModName>
must be exactly the same as the name
property in modinfo.json
, otherwise the mods loader will refuse to load the mods
- .NET SDK 9
- CMake
- nasm
- Clone the repository
- Run
buildWin.ps1
- MonoMod
- HashlinkNET from DreamBoxSpy
- DeadCellsDecomp and alivecells from N3rdL0rd
- Hashlink from HaxeFoundation
Distributed under the MIT license.
Dead Cells Core Modding is in no way associated with Motion Twin.