8bf28ac686
Fix the windows PlayLayer::markCheckpoint address |
||
---|---|---|
.github/workflows | ||
bindings | ||
cmake | ||
codegen | ||
docs | ||
include | ||
link | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
entry.cpp | ||
EULA | ||
Geode.cmake | ||
README.md |
Geode SDK
Geode is a revolutionary Geometry Dash modding framework. Documentation on using the Geode SDK can be found on the Geode Documentation.
SDK
The SDK repo contains headers for Geometry Dash, Cocos2d-x, and the Geode framework itself. The Geometry Dash headers are generated using codegen, although pre-genned headers can be found through the bin submodule.
Basic Usage
While traditional modding techniques involve convoluted setups using hooking libraries and calling conventions, Geode simplifies the development of mods to a single macro: $modify
. Using it, you can hook functions in any class as long as the addresses of those functions is defined in the codegenned bindings.
For example, to alter the behaviour of the "More Games" button in GD, all you have to do is this:
class $modify(MenuLayer) {
void onMoreGames(CCObject*) {
FLAlertLayer::create(
"Geode",
"Hello World from my Custom Mod!",´
"OK"
)->show();
}
};
⚠️ Make sure that your overridden funcion's signature matches the original's. Emitting parameters / the
virtual
keyword may cause issues.
If you want to call the original function, all you need to do is the base class name and the function name, in the same way you would call the base of a virtual function.
class $modify(MenuLayer) {
bool init() {
if (!MenuLayer::init())
return false;
auto label = CCLabelBMFont::create("Hello world!", "bigFont.fnt");
label->setPosition(100, 100);
this->addChild(label);
return true;
}
};
If you to give a name to your modified class, specify it as the first parameter to $modify
:
class $modify(CustomMenuLayer, MenuLayer) {
void onMoreGames(CCObject*) {
FLAlertLayer::create(
"Geode",
"Hello World from my Custom Mod!",´
"OK"
)->show();
}
};
Documentation
Documentation on using the Geode SDK can be found on the Geode Documentation.