Creating a new mod
Creating a new mod is simple:
Open SporeModderFX
Create a new project in SMFX.
Select Spore
and set toCreate a folder in that project called mod
Create two files in that folder: main.lua and info.lua
Fill out the following information in info.lua:
name = "Your mod name"
description = "Your mod description"
version = 10000 --this version must be a number, it cannot be a string
author = "Author"
--the minimum lua api version required to run this mod
--intended to prevent mods from running if the lua api is too old
--10000 is the oldest version of the lua api
base_api_version = 10000
--set the load priority of your mod, the higher priority = mod loads sooner
--you should make sure your priority is lower than your mod dependencies
priority = 0
Upon packing the mod, your mod (which currently does nothing) should be loaded by the game. To verify this you can check your spore_log.txt for the following message:
[Lua] [ModLoader] Mod: <PackageName> (<ModName>) Loading mod/main.lua
Where <PackageName>
is the name of your SMFX Project, and <ModName>
is the name you put in mod/info.lua
At this point you can add your code to mod/main.lua and start writing your mod.
Last modified: 08 August 2024