Package
Last updated
Last updated
Updated for version 3.38.
The module is inherited from ModuleBase. So base parameters can be found there.
The main purpose of this module is to emulate a 'package' that the game normally uses to load assets for various purposes (such as levels). Everything in PackageManager should support your 'added' package, except the PackageManager:package function.
Imagine PackageModule module as a delayed AddFilesModule. Instead of loading it right away it will load when you need it.
The name of the module you use as the meta of the module definition is 'Package' or 'PackageModule' if _force_search
is set to true in the module definition.
<Package id directory>
Parameter | Type | Description |
---|---|---|
<extension path force load reload unload/>
See: AddFilesModule
This example is what you would put inside your main node within your mod config
For this example you would have your custom texture like this: mods/MyMod/mod_assets/guis/textures/my_texture.texture
And you could load the package by doing PackageManager:load("packages/my_test_package")
If you are using this module in a BLT mod.
Function | Description |
---|---|
id
String
The id/path of the package which is used when it is being called to be loaded, unloaded etc
directory
String
string directory/path relative to the mods directory which contains all files to be added
Load()
This function is used to add/load all the assets defined in the package. This is usually called by the PackageManager:load function
Unload()
This will remove all the added files from the game's database. This is usually called by the PackageManager:unload function
Loaded()
Returns a value that determines if the package has been 'loaded'. This is usually called by PackageManager:loaded