Skip to content

ReDevCafe/FantasyLifeI-ModTemplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fantasy Life I ModTemplate

A template for creating mods for Fantasy Life I using C++

Requirements

  • CMake
  • MSVC or CLang
  • x64 build configuration

Building the mod

  1. Clone or download this repository
$ git clone --recurse-submodules https://github.com/ReDevCafe/FantasyLifeI-ModTemplate MyMod
  1. Use CMake to configure and generate project files
$ mkdir build
$ cmake -S . -B build -DCMAKE_BUILD_TYPE=Release

Configuring Mod Info

Tip

You can customize your mod's metadata directly in the resource/Mod.json:

{
   "title": "My Mod",
   "identifier": "mymod",
   "author": "Me",
   "version": 1.0,
   "dependencies": {
       "fliapi": 1.0
   }
}

Installing the mod

  1. Build the project
$ cmake --build build --config Release --target package_mod
  1. After building place the .fliarchive inside Game/Content/Mods

Note

Fantasy Life I/
├── Mods/
|   └── MyMod.fliarchive

Troubleshooting

  1. 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(); }
  2. ModLoader returns Failed to load: 'mymod'

    This usually means the program was not compiled correctly. If you made changes to the CMakeLists.txt file, try reverting them to the original state.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •