-
Notifications
You must be signed in to change notification settings - Fork 44
ModLoaderUserProfile
Extends: Object
This Class provides methods for working with user profiles.
const FILE_PATH_USER_PROFILES: String = "user://mod_user_profiles.json"The path where the Mod User Profiles data is stored.
const LOG_NAME: String = "ModLoader:UserProfile"func enable_mod(mod_id: String, user_profile: ModUserProfile) -> boolEnables a mod - it will be loaded on the next game start
Parameters:
- mod_id (String): The ID of the mod to enable.
- user_profile (ModUserProfile): (Optional) The user profile to enable the mod for. Default is the current user profile.
Returns: bool
func disable_mod(mod_id: String, user_profile: ModUserProfile) -> boolDisables a mod - it will not be loaded on the next game start
Parameters:
- mod_id (String): The ID of the mod to disable.
- user_profile (ModUserProfile): (Optional) The user profile to disable the mod for. Default is the current user profile.
Returns: bool
func set_mod_current_config(mod_id: String, mod_config: ModConfig, user_profile: ModUserProfile) -> boolSets the current config for a mod in a user profile's mod_list.
Parameters:
- mod_id (String): The ID of the mod.
- mod_config (ModConfig): The mod config to set as the current config.
- user_profile (ModUserProfile): (Optional) The user profile to update. Default is the current user profile.
Returns: bool
func create_profile(profile_name: String) -> boolCreates a new user profile with the given name, using the currently loaded mods as the mod list.
Parameters:
- profile_name (String): The name of the new user profile (must be unique).
Returns: bool
func set_profile(user_profile: ModUserProfile) -> boolSets the current user profile to the given user profile.
Parameters:
- user_profile (ModUserProfile): The user profile to set as the current profile.
Returns: bool
func delete_profile(user_profile: ModUserProfile) -> boolDeletes the given user profile.
Parameters:
- user_profile (ModUserProfile): The user profile to delete.
Returns: bool
func get_current() -> ModUserProfileReturns the current user profile.
Returns: ModUserProfile
func get_profile(profile_name: String) -> ModUserProfileReturns the user profile with the given name.
Parameters:
- profile_name (String): The name of the user profile to retrieve.
Returns: ModUserProfile or null if not found
func get_all_as_array() -> ArrayReturns an array containing all user profiles stored in ModLoaderStore.
Returns: Array of ModUserProfile Objects
Warning
This documentation has moved!
You can find it here: https://wiki.godotmodding.com/
- Home
- Getting Started
- ModLoader API
- Reference
- Guides
- Versions & Releases