A template for creating mods for Fantasy Life I using C++
- CMake
- MSVC or CLang
- x64 build configuration
- Clone or download this repository
$ git clone --recurse-submodules https://github.com/ReDevCafe/FantasyLifeI-ModTemplate MyMod- Use CMake to configure and generate project files
$ mkdir build
$ cmake -S . -B build -DCMAKE_BUILD_TYPE=ReleaseTip
You can customize your mod's metadata directly in the resource/Mod.json:
- Build the project
$ cmake --build build --config Release --target package_mod- After building place the .fliarchive inside Game/Content/Mods
Note
Fantasy Life I/
├── Mods/
| └── MyMod.fliarchive-
ModLoader returns
Missing CraftMod in 'mymod'this means you forgot to add the following lines at the ned of your code:
MOD_EXPORT ModBase* CraftMod() { return new MyMod(); }
Here's how your code should look:
class MyMod : public ModBase { public: void OnPreLoad() override {} void OnPostLoad() override {} // Your additional code here } MOD_EXPORT ModBase* CraftMod() { return new MyMod(); }
-
ModLoader returns
Failed to load: 'mymod'This usually means the program was not compiled correctly. If you made changes to the
CMakeLists.txtfile, try reverting them to the original state.
{ "title": "My Mod", "identifier": "mymod", "author": "Me", "version": 1.0, "dependencies": { "fliapi": 1.0 } }