-
Notifications
You must be signed in to change notification settings - Fork 0
dependencies
This module offers a collection of functions designed to address specific tasks and provide utilities for various purposes. Explore the available functions to make the most of the functionalities provided by this module.
mod.io Endpoint: Get Mod Dependencies
This function gets all the dependencies the chosen mod has selected. This is useful if a mod requires other mods to be installed for it to run. A successful request will return an array of ModDependencies structs.
IMPORTANT
Because of the complexity of supporting nested dependencies, we recommend you treat dependencies as a recommendation for your players, and do not process dependencies automatically when installing a mod unless absolutely required. [!NOTE]
Some modders might select soft dependencies to promote or credit other mods. We advise against this but it is possible to do, and is one of the reasons why we recommend against processing nested dependencies automatically.
Syntax:
modio_dependencies_get(_mod_id, _callback_success, _callback_failed, _game_id)
Argument | Type | Description |
---|---|---|
_mod_id | String | Unique id of the mod. |
_callback_success | Function or Method | The function to trigger when the request is successful. |
_callback_failed | Function or Method | The function to trigger when the request failed. |
_game_id | Real | OPTIONAL The ID of the game, defaults to the value set in the Game ID extension option if not provided |
Returns:
mod.io Endpoint: Add Mod Dependencies
This function adds mod dependencies required by the given mod. A dependency is a mod that should be installed for a mod to run. A successful request returns a Message struct.
Syntax:
modio_dependencies_add(_mod_id, _dependencies, _callback_success, _callback_failed, _game_id)
Argument | Type | Description |
---|---|---|
_mod_id | Real | Unique id of the mod. |
_dependencies | String | One or more mod IDs that this mod is dependent on. Every dependency to add requires a separate field with dependencies[] as the key (eg. dependencies[]=1, dependencies[]=2). There is a maximum of 5 dependencies per request. |
_callback_success | Function or Method | The function to trigger when the request is successful. |
_callback_failed | Function or Method | The function to trigger when the request failed. |
_game_id | Real | OPTIONAL The ID of the game, defaults to the value set in the Game ID extension option if not provided |
Returns:
mod.io Endpoint: Delete Mod Dependencies
This function deletes the given mod dependencies that the given mod has selected.
Syntax:
modio_dependencies_delete(_mod_id, _dependencies, _callback_success, _callback_failed, _game_id)
Argument | Type | Description |
---|---|---|
_mod_id | Real | Unique id of the mod. |
_dependencies | String | One or more mod IDs you want to delete as a dependency. Every dependency to delete requires a separate field with dependencies[] as the key (eg. dependencies[]=1, dependencies[]=2). |
_callback_success | Function or Method | The function to trigger when the request is successful. |
_callback_failed | Function or Method | The function to trigger when the request failed. |
_game_id | Real | OPTIONAL The ID of the game, defaults to the value set in the Game ID extension option if not provided |
Returns:
N/A
GameMaker 2024