Info.xml
From Heroes of Hammerwatch wiki
The info.xml
file is added to mods in order to specify the details of a mod.
Here's a minimal example:
<dict> <string name="name">Test Mod</string> <string name="author">Miss</string> <string name="description">Just a test mod to test things.</string> </dict>
Here's a more complete example, which includes custom levels, a custom class, and Classmaps:
<dict> <string name="name">Test Mod</string> <string name="author">Miss</string> <string name="description">Just a test mod to test things.</string> <array name="levels"> <dict> <string name="name">My Cool Map</string> <string name="description">It's my very cool map.</string> <string name="file">levels/test_mod.lvl</string> </dict> </array> <array name="custom-character-classes"> <dict> <string name="id">sam</string> <string name="name">Serious Sam</string> <string name="description">Let's get serious!</string> </dict> </array> <dict name="classmaps"> <array name="behaviors"> <array><string>Player</string><string>MyPlayer</string></array> <array><string>PlayerHusk</string><string>MyPlayerHusk</string></array> </array> </dict>
<array name="run-scripts"> <dict> <string name="class">MyScript</string> <string name="name">My own script</string> <string name="description">My script will do something!</string> </dict> </array> </dict>
Specification
The file is an sval file with an xml extension. It's a dictionary containing keys. The keys are:
- string
name
(required) The name of the mod. - string
author
(required) The author of the mod. - string
description
(required) A short description of what the mod does. - array
levels
An optional list of levels to add to the Mod NPC's list in town, as dictionaries or strings. You will be able to use the NPC to switch directly to these levels.- string
file
(required) The path of the level relative to the folder of the mod. - string
name
(required) The name of the level. This will be the text of the button. - string
description
The description of the level. This will be the tooltip of the button.
- string
- array
custom-character-classes
An optiona list of custom classes to add to the Mod NPC's list in town. This will allow you to "morph" your current character class into the custom class.- string
id
(required) The ID of the class. This should be the same as the unit name, for examplepaladin
orsorcerer
. - string
name
(required) The name of the class. This will be the text of the button. - string
description
The description of the class. This will be the tooltip of the button.
- string
- dict
classmaps
A list of Classmaps to use while the mod is active.- array
behaviors
Behaviors to map. - array
gamemodes
Gamemodes to map. - array
scripts
Classes to map that are instantiated in scripts viaInstantiateClass
.
- array
- array
run-scripts
A list of runnable scripts.- string
class
The class that will be instantiated. This class must implement the constructor asMyScript(SValue&)
, and must implementIModScript
, which contains the single functionvoid Run()
. This function will be called when the button is clicked. - string
name
The text that should be displayed on the button. - string
description
The text that should be displayed in the tooltip of the button.
- string