Difference between revisions of "Mod system proposal"

From VCMI Project Wiki
Jump to: navigation, search
(Modules)
Line 1: Line 1:
= System structure +
+
= System structure =
  
 
There main concepts of modding system are modules and mods of two kinds: extension packages and conversions.
 
There main concepts of modding system are modules and mods of two kinds: extension packages and conversions.
Line 11: Line 11:
 
Modules may be prerequisites for actual mods. The mod may require one or a number of modles to be active before it is avaliable to use.
 
Modules may be prerequisites for actual mods. The mod may require one or a number of modles to be active before it is avaliable to use.
 
The module can be active or inactive. Activation of module in game options automatically activates or deactivates all related mods, assuming they were turned on in first place.
 
The module can be active or inactive. Activation of module in game options automatically activates or deactivates all related mods, assuming they were turned on in first place.
 +
 +
Managing of all mods is performed by [[Mod Handler]].
  
 
==Packages==
 
==Packages==

Revision as of 15:02, 5 February 2012

System structure

There main concepts of modding system are modules and mods of two kinds: extension packages and conversions.

Modules

A module refers to part of the engine that handles optional mechanics. Currently considered modules are:

Modules may be prerequisites for actual mods. The mod may require one or a number of modles to be active before it is avaliable to use. The module can be active or inactive. Activation of module in game options automatically activates or deactivates all related mods, assuming they were turned on in first place.

Managing of all mods is performed by Mod Handler.

Packages

Packages are made of Python scripts. Teir purpose is to add new conetnt to the game, such as creatures or artifacts. Packages may be dependent of modules and other packages with version greater or equal of certain number.

All packages are versioned, with version being an integer. All modders are requested to bump a version number with each update.

Conversions

Conversions are also made of Python scripts. Alter original objects and behaviour of the game. They may be content replacement, alter mechanics or change graphics and sounds.

Scripting

The proposed scripting language is Python thanks to if popularity and wide array of possibilities.

Python functions use high-level callback functions of the VCMI engine to perform basic game actions or access modding engine.

Adventure map scripts

These scripts allow map designers to control game flow and alter object bahaviour. They are stored as Python file, which will be a part of new map format.

ERM scripts

To maintain compatibility with old WoG mods, all ERM functions have to be mapped into new set of Python functions. This mapping may not and will not be 1-to-1 due to acrhitecture of VCMI mechanics. Also, some unsafe functions like direct memory access will be unsupported.

ERM scripts are given their own memory space, which is equivalent of variable space of original ERM.

Safety

Calling scripts by player

Scripts online

Modding engine