Difference between revisions of "HPL3/Resources Configuration"
< HPL3
Jump to navigation
Jump to search
m |
|||
Line 10: | Line 10: | ||
<Directory Path="/FolderName" AddSubDirs="true" /> | <Directory Path="/FolderName" AddSubDirs="true" /> | ||
</Resources></syntaxhighlight> | </Resources></syntaxhighlight> | ||
− | |||
− | |||
{| class="wikitable" | {| class="wikitable" | ||
|Path | |Path | ||
Line 19: | Line 17: | ||
|Whether to include sub-folders that are located inside the folder specified in <code>Path</code> as part of the resources or not (recursive). It is recommended to always set this to <code>true</code>. | |Whether to include sub-folders that are located inside the folder specified in <code>Path</code> as part of the resources or not (recursive). It is recommended to always set this to <code>true</code>. | ||
|} | |} | ||
− | |||
{{note|The file lists directories in which the resources are located at in the form of relative path to the mod. That means you do not need to provide a full path for the folder.}} | {{note|The file lists directories in which the resources are located at in the form of relative path to the mod. That means you do not need to provide a full path for the folder.}} |
Revision as of 13:32, 25 August 2020
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 resources / assets, 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 Path as part of the resources or not (recursive). It is recommended to always set this to true .
|
