User Tools

Site Tools


This is an old revision of the document!

This plugin is required by all plugins part of the eXpansion pack. This plugin doesen't have a lot to do it basically has 3 main roles


Load Configuration

Multiple Language Support (i18n)

If you are hosting a server for specific language, you can enable the new default language in config file:

ManiaLivePlugins\eXpansion\Core\Config.defaultLanguage = language

Function for all localized messages is _(), that is defined in BasicPlugin class, which registers the function to general namespace. Core plugin handles loading and setting the default language. When invoked, the _() function then calls the i18n singleton and passes all parameters to sprintf which formats the text.

To use multiple language support, just do this:

_("your string to display goes here"); // string without parameters
_("admin %s kicked the player %s", $admin, $player); // string with parameters

Color Codes

At the current stage the core plugin only loads the configuration of the Color parsing utility.

You may wan't to customize your installation and add you own color codes. You can do this directly in the configuration file by adding these lines :

ManiaLivePlugins\eXpansion\Core\Config.Colors_admin_error = customValue
ManiaLivePlugins\eXpansion\Core\Config.Colors_admina_action = customValue
ManiaLivePlugins\eXpansion\Core\Config.Colors_variable = customValue

YOu may find more information about how to use the color codes here : Chat Coloring

Check GameMode Compatibility

Every plugin checks their own game mode Compatibility, if they are not compatible at start they will unload.(More Info). But this isn't enough, if the game mode changes we might want to unload other plugins or load some new.

The Core plugin will check at the beginning of each map for a change in the game mode, if there is one it will force all loaded plugins to check if they are compatible and then check all the unloaded plugins if any is compatible. If any unloaded plugin is compatible it will load it.

Theoretically all load and unload processes will take in account dependencies. If plugin X isn't compatible with game mode and plugin Y needs it, the system will force unload plugin Y then plugin X. And it will the same way load plugin X first then plugin Y

dev/plugin/core.1361726834.txt.gz · Last modified: 2013/07/17 10:08 (external edit)