Every HPL3 mod needs to point out all of the resources that are to be used in the mod. Resources are essentially collections of folders and files which are going to be used by the mod. For example: 3D Models, Scripts, Audio, Textures, etc. This article explains how to configure the resources for a mod.
Resources Configuration File
In order to make the mod load our assets and maps, we need to list where exactly those resources are located. All of the resources for the mod are listed inside a single XML file, called
resources.cfg. The file should be located inside the main mod folder.
The syntax for adding a resource directory is as follows:
<Resources> <Directory Path="/FolderName" AddSubDirs="true" /> </Resources>
|Path||The relative path to the folder that contains the resources.|
|AddSubDirs||Whether to include sub-folders that are located inside the folder specified in |
Given the following mod structure:
modFolder/ ├── config/ │ ├── lang/ │ │ ├── english.lang │ ├── main_init.cfg ├── maps/ ├── script/ ├── static_objects/ ├── entry.hpc ├── resources.cfg
The resources file will look like this:
<Resources> <Directory Path="/config" AddSubDirs="true" /> <Directory Path="/maps" AddSubDirs="true" /> <Directory Path="/script" AddSubDirs="true" /> <Directory Path="/static_objects" AddSubDirs="true" /> </Resources>