Spellforce-Spell-framework
Loading...
Searching...
No Matches
SFSF Custom Campaign Module

Core mod that discovers, validates and registers custom campaigns. More...

Functions

void initialize_campaign_module ()
 Creates the module's mod entry and loads sfsf\campaigns*.json.

Variables

SFModg_campaign_mod = NULL
SFModg_campaign_mod

Detailed Description

Core mod that discovers, validates and registers custom campaigns.

Custom campaigns are pure data: every .json under sfsf\campaigns\ is loaded here, checked, and handed to register_campaign(). The module owns its own SFMod entry so that a broken campaign shows up in the in-game mod list with a readable reason, exactly like a misbehaving .sfm would.

Function Documentation

◆ initialize_campaign_module()

void initialize_campaign_module ( )

Creates the module's mod entry and loads sfsf\campaigns*.json.

Safe to call when the folder does not exist - custom campaigns are simply disabled in that case. Must run before the main menu is built, since sf_menu_hook only offers the campaign button when g_campaign_count > 0.

Definition at line 258 of file sf_campaign_module.c.

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ g_campaign_mod [1/2]

SFMod* g_campaign_mod = NULL

The core mod that owns every JSON-defined campaign.

Definition at line 20 of file sf_campaign_module.c.

◆ g_campaign_mod [2/2]

SFMod* g_campaign_mod
extern

The core mod that owns every JSON-defined campaign.

Definition at line 20 of file sf_campaign_module.c.