block-quote On this pagechevron-down
copy Copy chevron-down
🛠️ Crafting CreatorExports Comprehensive instructions on configuring files and utilizing export functions.
triangle-exclamation
Prior experience as a developer or basic programming skills are recommended to effectively navigate this section of the documentation.
Crafting Creator Exports
This module provides a set of exports to interact with the Crafting Creator system, including player progression, slots, XP, and global crafting states
You can use these exports from other resources with:
Copy exports [ " crm-craftingcreator " ]: functionName ( args ) Add crafting slots to a specific character.
Copy local success = exports [ " crm-craftingcreator " ]: addSlots ( crm_identifier , crm_slots ) Parameters
crm_identifier (string) – Character identifier.
crm_slots (number) – Number of slots to add.
Returns
(boolean) – true if slots were added successfully, otherwise false.
Example
Remove crafting slots from a specific character.
Parameters
crm_identifier (string) – Character identifier.
crm_slots (number) – Number of slots to remove.
Returns
(boolean) – true if slots were removed successfully, otherwise false.
Example
Set the exact number of crafting slots for a character.
Parameters
crm_identifier (string) – Character identifier.
crm_slots (number) – Total number of crafting slots to set.
Returns
(boolean) – true if slots were updated successfully, otherwise false.
Example
Add crafting XP to a character.
Parameters
crm_identifier (string) – Character identifier.
crm_xp (number) – Amount of XP to add.
Returns
(boolean) – true if xp was updated successfully, otherwise false.
Example
Remove crafting XP from a character.
Parameters
crm_identifier (string) – Character identifier.
crm_xp (number) – Amount of XP to remove.
Returns
(boolean) – true if xp was updated successfully, otherwise false.
Example
Set the exact crafting XP for a character.
Parameters
crm_identifier (string) – Character identifier.
crm_xp (number) – Total XP value to set.
Returns
(boolean) – true if xp was updated successfully, otherwise false.
Example
Wipe crafting XP for all characters (sets XP to 0).
Parameters
Example
triangle-exclamation
This action affects all players . Use with caution.
🔸toggleAllCrafting
Toggle crafting globally (enable or disable all crafting stations).
Parameters
Returns
(string) – "crm-disabled" or "crm-enabled" depending on the new state.
Example
🔸toggleAllResearch
Toggle research globally (enable or disable all research stations).
Parameters
Returns
(string) – "crm-disabled" or "crm-enabled" depending on the new state.
Example