-
Notifications
You must be signed in to change notification settings - Fork 0
mods
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 Mods
This function gets all mods for the corresponding game. A successful request will return an array of Mod structs. We recommended reading the filtering documentation to return only the records you want.
Syntax:
modio_mods_get_list(_callback_success, _callback_failed, _game_id)
Argument | Type | Description |
---|---|---|
_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: Get Mod
This function gets a mod. A successful request will return a single Mod struct.
Syntax:
modio_mods_get(_mod_id, _callback_success, _callback_failed, _game_id)
Argument | Type | Description |
---|---|---|
_mod_id | Real | 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
This function adds a mod. A successful request will return the newly created Mod. All content published by users on mod.io is subject to the Terms of Use. It is a requirement that you provide a link to https://mod.io/terms in any place where users are submitting content to mod.io.
ℹ️ NOTE
By default new mods are 'not accepted' and 'public'. They can only be 'accepted' and made available via the API once a Mod File has been uploaded. Media, Metadata Key Value Pairs and Dependencies can also be added after a mod profile is created.
Syntax:
modio_mods_add(_name, _logo, _summary, _optionals, _callback_success, _callback_failed, _game_id)
Argument | Type | Description |
---|---|---|
_name | String | Name of your mod. |
_logo | String | Image file which will represent your mods logo. Must be gif, jpg or png format and cannot exceed 8MB in filesize. Dimensions must be at least 512x288 and we recommended you supply a high resolution image with a 16 / 9 ratio. mod.io will use this image to make three thumbnails for the dimensions 320x180, 640x360 and 1280x720. |
_summary | String | Summary for your mod, giving a brief overview of what it's about. Cannot exceed 250 characters. |
_optionals | Struct | - name_id (String) Path for the mod on mod.io. For example: https://mod.io/g/gamename/m/**mod-name-id-here**. If no name_id is specified the name will be used. For example: 'Stellaris Shader Mod' will become 'stellaris-shader-mod'. Cannot exceed 80 characters.- visible (Real) Visibility of the mod (best if this field is controlled by mod admins, see status and visibility for details): 0 = Hidden 1 = Public (default) - description (String) Detailed description for your mod, which can include details such as 'About', 'Features', 'Install Instructions', 'FAQ', etc. HTML supported and encouraged. - homepage_url (String) Official homepage for your mod. Must be a valid URL. - stock (Real) Maximium number of subscribers for this mod. A value of 0 disables this limit. - maturity_option (Real) Choose if this mod contains any of the following mature content. > ℹ️ NOTE > > The value of this field will default to 0 unless the parent game allows you to flag mature content (see maturity_options field in Game Object).0 = None set (default) 1 = Alcohol 2 = Drugs 4 = Violence 8 = Explicit ? = Add the options you want together, to enable multiple options (see BITWISE fields) - community_options (Real) Select which interactions players can have with your mod. 0 = None 1 = Ability to comment (default) ? = Add the options you want together, to enable multiple options (see BITWISE fields) - metadata_blob (String) Metadata stored by the game developer which may include properties as to how the item works, or other information you need to display. Metadata can also be stored as searchable key value pairs, and to individual mod files. - tags (Array of String) Tags to apply to the mod. Every tag to apply requires a separate field with tags[] as the key (eg. tags[]=tag1, tags[]=tag2). Only the tags pre-defined by the parent game can be applied. To determine what tags are eligible, see the tags values within tag_options column on the parent Game. |
_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: Edit Mod
This function edits the details for a mod. If you want to update the logo
or media associated with this mod, you need to use modio_media_mod_add. The same applies to Mod Files, Metadata Key Value Pairs and Dependencies which are all managed via other endpoints. A duccessful request will return the updated Mod struct.
Syntax:
modio_mods_edit(_mod_id, _logo, _optionals, _callback_success, _callback_failed, _game_id)
Argument | Type | Description |
---|---|---|
_mod_id | Real | Unique id of the mod. |
_logo | String | Image file which will represent your mods logo. Must be gif, jpg or png format and cannot exceed 8MB in filesize. Dimensions must be at least 512x288 and we recommended you supply a high resolution image with a 16 / 9 ratio. mod.io will use this image to make three thumbnails for the dimensions 320x180, 640x360 and 1280x720. |
_optionals | Struct | - status (Real) Status of a mod. The mod must have at least one uploaded modfile to be 'accepted' (best if this field is controlled by game admins, see status and visibility for details): 0 = Not accepted 1 = Accepted (game admins only) 3 = Deleted (use the delete mod endpoint to set this status) - visible (Real) Visibility of the mod (best if this field is controlled by mod admins, see status and visibility for details): 0 = Hidden 1 = Public - name (String) Name of your mod. - name_id (String) Path for the mod on mod.io. For example: https://mod.io/g/gamename/m/mod-name-id-here. If no name_id is specified the name will be used. For example: 'Stellaris Shader Mod' will become 'stellaris-shader-mod'. Cannot exceed 80 characters.- summary (String) Summary for your mod, giving a brief overview of what it's about. Cannot exceed 250 characters. - description (String) Detailed description for your mod, which can include details such as 'About', 'Features', 'Install Instructions', 'FAQ', etc. HTML supported and encouraged. - homepage_url (String) Official homepage for your mod. Must be a valid URL. - stock (Real) Maximum number of subscribers for this mod. A value of 0 disables this limit. - maturity_option (Real) Choose if this mod contains any of the following mature content. 0 = None set (default) 1 = Alcohol 2 = Drugs 4 = Violence 8 = Explicit ? = Add the options you want together, to enable multiple options (see BITWISE fields) - community_options (Real) Select which interactions players can have with your mod. 0 = None set (default) 1 = Alcohol 2 = Drugs 4 = Violence 8 = Explicit ? = Add the options you want together, to enable multiple options (see BITWISE fields) community_options(Real)Select which interactions players can have with your mod. - metadata_blob (String) Metadata stored by the game developer which may include properties as to how the item works, or other information you need to display. Metadata can also be stored as searchable key value pairs, and to individual mod files. - tags (Array of String) Tags to apply to the mod. Every tag to apply requires a separate field with tags[] as the key (eg. tags[]=tag1, tags[]=tag2). Only the tags pre-defined by the parent game can be applied. To determine what tags are eligible, see the tags values within tag_options column on the parent Game. |
_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
This function deletes a mod profile. A successful request will fire a MOD_UNAVAILABLE
(modio_mods_get_list) event.
ℹ️ NOTE
This will close the mod profile which means it cannot be viewed or retrieved via API requests but will still exist in-case you choose to restore it at a later date. If you wish to permanently delete a mod you have access rights to, you must do it via the mods profile page on the mod.io website.
Syntax:
modio_mods_delete(_mod_id, _callback_success, _callback_failed, _game_id)
Argument | Type | Description |
---|---|---|
_mod_id | Real | 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:
N/A
GameMaker 2023