You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
has_icon_file is a boolean for whether an icon file exists in the same directory as the mod main.
icon_path is a string for the full path to the icon. If has_icon_file is false, it will be an empty string
An icon file is a file whose name starts with icon and ends with .stex. It is not case sensitive, and if multiple files fit the entry, it will choose the last one in the list.
The STEX format is used as it is automatically generated by the engine in the .import folder at the root, regardless of image format, and is the most universally accepted by any nodes that use images
Added function __match_mod_path_to_zip to the ManifestV2.gd pointer
This will perform a (somewhat resource-heavy) operation where it will go through each mod zip in the mods folder, and compare a mod main file path to them. If a match is found, it will return the name of the zip.
mod_main_path parameter is a required string for the mod main you are trying to search for, and should be formatted in a res:// filesystem manner
If for whatever reason there is no associated zip file for the mod (which should only happen if the mod is run directly through a modloader patch), it will return an empty string instead. It is heavily recommended to have handling for these cases due to the ease of working in the editor
This code is a minor modification of the modloader code as a whole, so credit for this goes completely to Koder
Added function __get_mod_data_from_files to the ManifestV2.gd pointer
Equivalent to an individual call of a mod from the __get_mod_data method, however provides purely data for that mod and relies on providing a file path
Icon and manifest files must be in the same relative position to the mod main file as would be done normally. The same naming conventions also apply
Added function __compare_versions to the ManifestV2.gd pointer
checked_mod_data input is a dictionary generated by __get_mod_data_from_files, as it allows for a unified way to collect the required info from mods.
Returns a boolean for whether the provided mod data is a newer version of a mod currently installed to the game.
Requires ManifestV2 for actual comparisons to work due to the enforcement of semantic versioning within it.
Any mod using ManifestV1 will be treated as the lesser version
If both the provided and installed mod use MV1, it will always return false