SADX Mod Loader: Difference between revisions
Appearance
Adding initial SADX Mod Loader page + documentation. |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 5: | Line 5: | ||
== Struct == | == Struct == | ||
Below is the initialized version of the HelperFunctions struct. For the definition of the struct, you can find that in [https://github.com/X-Hax/sadx-mod-loader/blob/master/SADXModLoader/include/SADXModInfo.h SADXModInfo.h] | Below is the initialized version of the HelperFunctions struct. For the definition of the struct, you can find that in [https://github.com/X-Hax/sadx-mod-loader/blob/master/SADXModLoader/include/SADXModInfo.h SADXModInfo.h] | ||
{{DocHeader|header=HelperFunctions|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
HelperFunctions helperFunctions = | HelperFunctions helperFunctions = | ||
{ | { | ||
ModLoaderVer, | |||
&RegisterStartPosition, | |||
&ClearStartPositionList, | |||
&RegisterFieldStartPosition, | |||
&ClearFieldStartPositionList, | |||
&RegisterPathList, | |||
&ClearPathListList, | |||
&RegisterCharacterPVM, | |||
&ClearCharacterPVMList, | |||
&RegisterCommonObjectPVM, | |||
&ClearCommonObjectPVMList, | |||
&RegisterTrialLevel, | |||
&ClearTrialLevelList, | |||
&RegisterTrialSubgame, | |||
&ClearTrialSubgameList, | |||
&GetMainSavePath, | |||
&GetChaoSavePath, | |||
&GetReplaceablePath, | |||
&_ReplaceFile, | |||
&SetWindowTitle, | |||
&RegisterSoundList, | |||
&RegisterMusicFile, | |||
&LoadEXEData, | |||
&LoadDLLData, | |||
&_ReplaceFileForce, | |||
&PushScaleUI, | |||
&PopScaleUI, | |||
&SetScaleFillMode, | |||
&GetScaleFillMode, | |||
&ReplaceTexture, | |||
&MipmapBlacklistGBIX, | |||
&RegisterEnglishVoiceDuration, | |||
&RegisterJapaneseVoiceDuration, | |||
&RegisterCharacterWelds, | |||
&loaderSettings, | |||
&modList, | |||
&weightFuncs, | |||
&RegisterVoice, | |||
&PushInterpolationFix, | |||
&PopInterpolationFix, | |||
&RegisterPermanentTexlist, | |||
&ExpandPVMList, | |||
&UnreplaceFile, | |||
&PrintDebugUnicode, | |||
&PrintDebugLocal, | |||
&PrintDebugCodepage, | |||
&GetFileModIndex, | |||
&ReplaceFileAtIndex | |||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
{{Note|text=Please be aware that all examples on this page will be using <code>helperFunctions</code> which is how the variable is sent to a mod.|type=info}} | |||
== Properties == | == Properties == | ||
| Line 63: | Line 71: | ||
This returns the version of the mod loader. This can be used to check if the user has an old version of the mod loader that may not have functionality your mod requires. | This returns the version of the mod loader. This can be used to check if the user has an old version of the mod loader that may not have functionality your mod requires. | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
if ( | if (helperFunctions.ModLoaderVer <= 10) | ||
PrintDebug("This Mod Loader is way out of date.\n"); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Mod Loader Settings === | === Mod Loader Settings === | ||
| Line 76: | Line 83: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Mod List === | === Mod List === | ||
| Line 88: | Line 94: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Weight Functions === | === Weight Functions === | ||
| Line 99: | Line 105: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
== Functions == | == Functions == | ||
| Line 112: | Line 118: | ||
Registers a new Start Position for the specified character. | Registers a new Start Position for the specified character. | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
StartPosition myStageStartPos = { | StartPosition myStageStartPos = { | ||
| Line 125: | Line 130: | ||
// and we have specified Sonic, so the level for this ID would now use | // and we have specified Sonic, so the level for this ID would now use | ||
// our StartPosition instead of the original. | // our StartPosition instead of the original. | ||
helperFunctions.RegisterStartPosition(Characters_Sonic, &myStageStartPos); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Clear Start Position List === | === Clear Start Position List === | ||
| Line 135: | Line 140: | ||
Clears the Start Positions for the specified character. | Clears the Start Positions for the specified character. | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// Running this inside of your mod's Init export would | // Running this inside of your mod's Init export would | ||
// clear all of Sonic's Start Positions for his stages. | // clear all of Sonic's Start Positions for his stages. | ||
helperFunctions.ClearStartPositionList(Characters_Sonic); | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Register Field Position === | === Register Field Position === | ||
| Line 149: | Line 153: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Clear Field Start Position List === | === Clear Field Start Position List === | ||
| Line 160: | Line 164: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Register Path List === | === Register Path List === | ||
| Line 171: | Line 175: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Clear Path List List === | === Clear Path List List === | ||
| Line 182: | Line 186: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Register Character PVM === | === Register Character PVM === | ||
| Line 193: | Line 197: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Clear Character PVM List === | === Clear Character PVM List === | ||
| Line 204: | Line 208: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Register Common Object PVM === | === Register Common Object PVM === | ||
| Line 215: | Line 219: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Clear Common Object PVM List === | === Clear Common Object PVM List === | ||
| Line 226: | Line 230: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Register Trial Level === | === Register Trial Level === | ||
| Line 237: | Line 241: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Clear Trial Level List === | === Clear Trial Level List === | ||
| Line 248: | Line 252: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Register Trial Subgame === | === Register Trial Subgame === | ||
| Line 259: | Line 263: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Clear Trial Subgame List === | === Clear Trial Subgame List === | ||
| Line 270: | Line 274: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Get Main Save Path === | === Get Main Save Path === | ||
| Line 281: | Line 285: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Get Chao Save Path === | === Get Chao Save Path === | ||
| Line 292: | Line 296: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Get Replaceable Path === | === Get Replaceable Path === | ||
| Line 303: | Line 307: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Replace File === | === Replace File === | ||
| Line 314: | Line 318: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Set Window Title === | === Set Window Title === | ||
| Line 325: | Line 329: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Register Sound List === | === Register Sound List === | ||
| Line 336: | Line 340: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Register Music File === | === Register Music File === | ||
| Line 347: | Line 351: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Load EXE Data === | === Load EXE Data === | ||
| Line 358: | Line 362: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Load DLL Data === | === Load DLL Data === | ||
| Line 369: | Line 373: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Replace File Force === | === Replace File Force === | ||
| Line 380: | Line 384: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Push Scale UI === | === Push Scale UI === | ||
| Line 391: | Line 395: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Pop Scale UI === | === Pop Scale UI === | ||
| Line 402: | Line 406: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Set Scale Fill Mode === | === Set Scale Fill Mode === | ||
| Line 413: | Line 417: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Get Scale Fill Mode === | === Get Scale Fill Mode === | ||
| Line 424: | Line 428: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Replace Texture === | === Replace Texture === | ||
| Line 435: | Line 439: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Mipmap Blacklist GBIX === | === Mipmap Blacklist GBIX === | ||
| Line 446: | Line 450: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Register English Voice Duration === | === Register English Voice Duration === | ||
| Line 457: | Line 461: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Register Japanese Voice Duration === | === Register Japanese Voice Duration === | ||
| Line 468: | Line 472: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Register Character Welds === | === Register Character Welds === | ||
| Line 479: | Line 483: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Register Voice === | === Register Voice === | ||
| Line 490: | Line 494: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Push Interpolation Fix === | === Push Interpolation Fix === | ||
| Line 501: | Line 505: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Pop Interpolation Fix === | === Pop Interpolation Fix === | ||
| Line 512: | Line 516: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Register Permanent Texlist === | === Register Permanent Texlist === | ||
| Line 523: | Line 527: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== Example ==== | {{DocHeader|header=Example|content= | ||
<syntaxhighlight lang="cpp"> | |||
// TODO: Write example. | |||
</syntaxhighlight> | |||
}} | |||
=== Unreplace File === | |||
<syntaxhighlight lang="cpp"> | |||
void UnreplaceFile(const char* file) | |||
</syntaxhighlight> | |||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | |||
// TODO: Write example. | |||
</syntaxhighlight> | |||
}} | |||
=== Expand PVM List === | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
TEX_PVMTABLE* ExpandPVMList(TEX_PVMTABLE* sourcepvmlist, const TEX_PVMTABLE &newpvmentry) | |||
</syntaxhighlight> | |||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | |||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== Unreplace File === | === Unreplace File === | ||
| Line 534: | Line 560: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== Example ==== | {{DocHeader|header=Example|content= | ||
<syntaxhighlight lang="cpp"> | |||
// TODO: Write example. | |||
</syntaxhighlight> | |||
}} | |||
=== Print Debug Unicode === | |||
<syntaxhighlight lang="cpp"> | |||
void PrintDebugUnicode(char* utf8) | |||
</syntaxhighlight> | |||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | |||
// TODO: Write example. | |||
</syntaxhighlight> | |||
}} | |||
=== Print Debug Local === | |||
<syntaxhighlight lang="cpp"> | |||
void PrintDebugLocal(char* buf) | |||
</syntaxhighlight> | |||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | |||
// TODO: Write example. | |||
</syntaxhighlight> | |||
}} | |||
=== Print Debug Codepage === | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
void PrintDebugCodepage(char* buf, unsigned int source_cp) | |||
</syntaxhighlight> | |||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | |||
// TODO: Write example. | |||
</syntaxhighlight> | |||
}} | |||
=== Get File Mod Index === | |||
<syntaxhighlight lang="cpp"> | |||
int GetFileModIndex(const char* path) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
= | {{DocHeader|header=Example|content= | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
=== | === Replace File At Index === | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
void ReplaceFileAtIndex(const char* src, const char* dst, int modIndex) | |||
</syntaxhighlight> | |||
{{DocHeader|header=Example|content= | |||
<syntaxhighlight lang="cpp"> | |||
// TODO: Write example. | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | |||
Latest revision as of 18:04, 8 October 2025
HelperFunctions API
Struct
Below is the initialized version of the HelperFunctions struct. For the definition of the struct, you can find that in SADXModInfo.h
HelperFunctions helperFunctions =
{
ModLoaderVer,
&RegisterStartPosition,
&ClearStartPositionList,
&RegisterFieldStartPosition,
&ClearFieldStartPositionList,
&RegisterPathList,
&ClearPathListList,
&RegisterCharacterPVM,
&ClearCharacterPVMList,
&RegisterCommonObjectPVM,
&ClearCommonObjectPVMList,
&RegisterTrialLevel,
&ClearTrialLevelList,
&RegisterTrialSubgame,
&ClearTrialSubgameList,
&GetMainSavePath,
&GetChaoSavePath,
&GetReplaceablePath,
&_ReplaceFile,
&SetWindowTitle,
&RegisterSoundList,
&RegisterMusicFile,
&LoadEXEData,
&LoadDLLData,
&_ReplaceFileForce,
&PushScaleUI,
&PopScaleUI,
&SetScaleFillMode,
&GetScaleFillMode,
&ReplaceTexture,
&MipmapBlacklistGBIX,
&RegisterEnglishVoiceDuration,
&RegisterJapaneseVoiceDuration,
&RegisterCharacterWelds,
&loaderSettings,
&modList,
&weightFuncs,
&RegisterVoice,
&PushInterpolationFix,
&PopInterpolationFix,
&RegisterPermanentTexlist,
&ExpandPVMList,
&UnreplaceFile,
&PrintDebugUnicode,
&PrintDebugLocal,
&PrintDebugCodepage,
&GetFileModIndex,
&ReplaceFileAtIndex
};
Please be aware that all examples on this page will be using
helperFunctionswhich is how the variable is sent to a mod.
Properties
Mod Loader Version
int ModLoaderVer;
This returns the version of the mod loader. This can be used to check if the user has an old version of the mod loader that may not have functionality your mod requires.
if (helperFunctions.ModLoaderVer <= 10)
PrintDebug("This Mod Loader is way out of date.\n");
Mod Loader Settings
LoaderSettings loaderSettings;
Mod List
std::vector<Mod> modlist;
Weight Functions
BasicWeightFuncs weightFuncs;
Functions
Register Start Position
static void RegisterStartPosition(unsigned char character, const StartPosition& position)
Registers a new Start Position for the specified character.
StartPosition myStageStartPos = {
1, // Level ID
0, // Act ID
{ 100.0f, 200.0f, 100.0f }, // Position
0 // Y Rotation
};
// We pass our StagePosition variable as a pointer to this function
// and we have specified Sonic, so the level for this ID would now use
// our StartPosition instead of the original.
helperFunctions.RegisterStartPosition(Characters_Sonic, &myStageStartPos);
Clear Start Position List
static void ClearStartPositionList(unsigned char character)
Clears the Start Positions for the specified character.
// Running this inside of your mod's Init export would
// clear all of Sonic's Start Positions for his stages.
helperFunctions.ClearStartPositionList(Characters_Sonic);
Register Field Position
static void RegisterFieldStartPosition(unsigned char character, const FieldStartPosition& position)
Clear Field Start Position List
static void ClearFieldStartPositionList(unsigned char character)
Register Path List
static void RegisterPathList(const PathDataPtr& paths)
Clear Path List List
static void ClearPathListList()
Register Character PVM
static void RegisterCharacterPVM(unsigned char character, const PVMEntry& pvm)
Clear Character PVM List
static void ClearCharacterPVMList(unsigned char character)
Register Common Object PVM
static void RegisterCommonObjectPVM(const PVMEntry& pvm)
Clear Common Object PVM List
static void ClearCommonObjectPVMList()
Register Trial Level
static void RegisterTrialLevel(unsigned char character, const TrialLevelListEntry& level)
Clear Trial Level List
static void ClearTrialLevelList(unsigned char character)
Register Trial Subgame
static void RegisterTrialSubgame(unsigned char character, const TrialLevelListEntry& level)
Clear Trial Subgame List
static void ClearTrialSubgameList(unsigned char character)
Get Main Save Path
static const char* GetMainSavePath()
Get Chao Save Path
static const char* GetChaoSavePath()
Get Replaceable Path
const char* __cdecl GetReplaceablePath(const char* path)
Replace File
void _ReplaceFile(const char* src, const char* dst)
Set Window Title
void SetWindowTitle(const char* title)
Register Sound List
int RegisterSoundList(const SoundList& list)
Register Music File
int RegisterMusicFile(const MusicInfo& track)
Load EXE Data
void LoadEXEData(const wchar_t* filename, const wchar_t* mod_dir)
Load DLL Data
void LoadDLLData(const wchar_t* filename, const wchar_t* mod_dir)
Replace File Force
void _ReplaceFileForce(const char* src, const char* dst)
Push Scale UI
void PushScaleUI(uiscale::Align align, bool is_background, float ratio_h, float ratio_v)
Pop Scale UI
void PopScaleUI()
Set Scale Fill Mode
void SetScaleFillMode(uiscale::FillMode mode)
Get Scale Fill Mode
uiscale::FillMode GetScaleFillMode()
Replace Texture
void ReplaceTexture(const char* pvm_name, const char* tex_name, const char* file_path, uint32_t gbix, uint32_t width, uint32_t height)
Mipmap Blacklist GBIX
void MipmapBlacklistGBIX(Uint32 index)
Register English Voice Duration
void RegisterEnglishVoiceDuration(const uint16_t voiceID, const uint16_t duration)
Register Japanese Voice Duration
void RegisterJapaneseVoiceDuration(const uint16_t voiceID, const uint16_t duration)
Register Character Welds
void RegisterCharacterWelds(const uint8_t character, const char* iniPath)
Register Voice
uint16_t RegisterVoice(const char* fileJP, const char* fileEN, uint16_t durationJP, uint16_t durationEN)
Push Interpolation Fix
void PushInterpolationFix()
Pop Interpolation Fix
void PopInterpolationFix()
Register Permanent Texlist
void RegisterPermanentTexlist(NJS_TEXLIST* texlist)
Unreplace File
void UnreplaceFile(const char* file)
Expand PVM List
TEX_PVMTABLE* ExpandPVMList(TEX_PVMTABLE* sourcepvmlist, const TEX_PVMTABLE &newpvmentry)
Unreplace File
void UnreplaceFile(const char* file)
Print Debug Unicode
void PrintDebugUnicode(char* utf8)
Print Debug Local
void PrintDebugLocal(char* buf)
Print Debug Codepage
void PrintDebugCodepage(char* buf, unsigned int source_cp)
Get File Mod Index
int GetFileModIndex(const char* path)
Replace File At Index
void ReplaceFileAtIndex(const char* src, const char* dst, int modIndex)