Difference between revisions of "Info.xml"
From Heroes of Hammerwatch wiki
(Created page with "The <code>info.xml</code> 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> <stri...") |
|||
Line 9: | Line 9: | ||
</dict> | </dict> | ||
− | Here's a more complete example, which includes custom levels | + | Here's a more complete example, which includes custom levels, a custom class, and [[Classmaps]]: |
<dict> | <dict> | ||
Line 31: | Line 31: | ||
</dict> | </dict> | ||
</array> | </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> | ||
</dict> | </dict> | ||
Line 47: | Line 54: | ||
** string <code>name</code> ''(required)'' The name of the class. This will be the text of the button. | ** string <code>name</code> ''(required)'' The name of the class. This will be the text of the button. | ||
** string <code>description</code> The description of the class. This will be the tooltip of the button. | ** string <code>description</code> The description of the class. This will be the tooltip of the button. | ||
+ | * dict <code>classmaps</code> A list of [[Classmaps]] to use while the mod is active. | ||
+ | ** array <code>behaviors</code> Behaviors to map. | ||
+ | ** array <code>gamemodes</code> Gamemodes to map. | ||
+ | ** array <code>scripts</code> Classes to map that are instantiated in scripts via <code>InstantiateClass</code>. |
Revision as of 14:23, 15 March 2019
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> </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