A C++ library that allows you to create advanced mods for Spore (user interface, shaders,...)
This GitHub page hosts the Spore ModAPI development kit, used to create Spore mods with C++. To use those mods, you need the ModAPI Launcher and Installers.
The Spore ModAPI SDK allows you to create C++ mods for Spore. These mods are compiled into .dll
files,
that can then be used by the ModAPI Launcher Kit to inject them into Spore.
The documentation of the SDK is available here: https://emd4600.github.io/Spore-ModAPI/
Instructions about download, installation and updating can be found in this tutorial.
The source code can be found in this GitHub repository. It also includes the source code of 3 real mods made with the ModAPI SDK:
To compile the core DLLs (unless you want to develop the SDK itself, you don't need to do this):
msbuild "Spore ModAPI" -t:BuildDlls -p:BuildVer=177 -p:Config=Release
(changing the version and config accordingly)If you want to extend the SDK, or just want to investigate Spore's source code, you can use the free program Ghidra to do so. The SDK includes a plugin and some files, that can be used to add all the known data from the SDK into Ghidra. These are prepared to work with Ghidra's function decompiler, making reverse engineering much easier:
To use them:
Windows > Script Manager
.Manage Script Directories
+
button and search the Spore ModAPI SDK/SDKtoGhidra/GhidraScript
folder in your SDK installation.ImportSporeSDK.java
script (it's in the Data
category).Spore ModAPI SDK/SDKtoGhidra/SporeGhidra_march2017.xml
(or SporeGhidra_disk.xml
if you use a disk Spore installation).Keep in mind that Ghidra's decompiler is only an approximation, and it will not produce code that is directly executable on the SDK. There are several differences to keep in mind, among others:
intrusive_ptr
s, which means the code it generates makes calls to AddRef()
and Release()
(which you never see in the SDK).If you are extending the SDK and need to update the Ghidra files, you need to install Python 3.9 (at least) and the library libclang
, then run extract.py
.