with the v0.83, it is not necessary anymore to have a Profile folder in addition to your Mods folder.
1) If you want the game to create a new profile .ini, add this to your Mod.ini (which is "Mods\<YourModName>\Mod.ini"), under [Mod] :
CreateProfile = <YourProfileName>
Replace "<YourProfileName>" with the name of your choice.
If you want to add specific parameters to the Profile .ini, then create this file : "Mods\<YourModName>\Profiles\<YourProfileName>_Mod.ini", then add any parameters you'd like ; this file & these parameters won't be changed when the profile's .ini is saved.
If the game is launched with your Mod, and its Profile .ini still doesn't exist, then the game will create it (copied from the last used profile's .ini), switch to it, then show the Profile menu, so the user will know what's going on.
2) Then if you want your Mod to load only when this profile is active, add this, still under [Mod] in your Mod.ini :
OnlyForProfile = <YourProfileName>
Like this, it's possible to switch between Mods just by changing the profile in-game, and then relaunching the game.
If you want to bind to several profiles, do this :
OnlyForProfile = <Profile1>, <Profile2>, <Profile3>
2a) How to create additional profiles for a Mod ?
A user can also manually create a profile matching an OnlyForProfile name followed by "--Something", and then it'll also load your Mod.
For example, the Mod.ini has :
OnlyForProfile = MySuperMod
Then the user can create this Profile to load your Mod : MySuperMod--02 .
This also allows different profiles to play the same Mods, allowing several users on the same PC, or having access to extra save slots in the World Tour.
3) If you want to have saved Training Club players, copy them to : "Mods\<YourModName>\Profiles\<YourProfileName>\TrainingClubPlayers".
4) Flag your Mod as depending on another Mod
To do so, add in your Mod's Mod.ini file, this line, under [Mod] :
DependOn = <ModFolderName>
eg: if your Mod is a Mod for the XKT Mod, add this :
DependOn = XKT
If your Mod depends on several Mods, use a comma to separate their names, eg :
DependOn = XKT, ScoreBoardsByStef
If your Mod also works alone, add this line :
AlsoWorkAlone = 1
Like this, it'll be applied above the XKT Mod, but if the XKT isn't activated, then it'll still work.
5) Execute a menu function on init
Add in your Mod's Mod.ini file, this line, under [Mod] :
MenuInitFunction= Func_MySuperMod_Init
Func_MySuperMod_Init can be anything and it must match the name of an item in one of your menu files ; for example, create "Mods\NameOfMod\Menu\Scripts\MySuperModInit.menu", and put this in it :
- Code: Select all
item Func_MySuperMod_Init
{
OnActionIfNot /MySuperMod/InitVersion 1
{
SetCfg /TrainingClub_p1/Forehand_Power 100
SetCfg /MySuperMod/InitVersion 1
}
}
This example will set the Forehand Power of the Training Club's Player 1 to 100 on the 1st run of the Mod.