Difference between revisions of "Mod Handler"
From VCMI Project Wiki
(Created page with "Mod handler is a class of modding engine which performs the following tasks: *Reads all packages and conversions *Manages mods, turning them on and off. List of active mods is st...") |
(→Objects identifiers) |
||
Line 9: | Line 9: | ||
Reference to certain object via script has a form: | Reference to certain object via script has a form: | ||
+ | <pre> | ||
[PACKAGE_NAME].[OBJECT_TYPE](localID) | [PACKAGE_NAME].[OBJECT_TYPE](localID) | ||
+ | </pre> | ||
− | For example, WOG.creatures(1) is Supreme Archangel and WOG.artifacts(3) is Monster's Power. | + | For example, <pre>WOG.creatures(1)</pre> is Supreme Archangel and <pre>WOG.artifacts(3)</pre> is Monster's Power. |
Revision as of 14:59, 5 February 2012
Mod handler is a class of modding engine which performs the following tasks:
- Reads all packages and conversions
- Manages mods, turning them on and off. List of active mods is stored in a file.
- Performs consistency checks: if all mod prerequisistes are met, and if mod files are still present.
- Synchronizes mod files in online game
Objects identifiers
Every game object (creature, artifact, hero, spell) needs to have unique identifier (ID). These IDs are assigned dynamically at game start. Original Shadow of Death objects are considered fixed.
Reference to certain object via script has a form:
[PACKAGE_NAME].[OBJECT_TYPE](localID)For example,
WOG.creatures(1)is Supreme Archangel and
WOG.artifacts(3)is Monster's Power.