Exports
Comprehensive instructions on configuring files and utilizing export functions.
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:
exports["crm-craftingcreator"]:functionName(args)Player Slots
🔸addSlots
Add crafting slots to a specific character.
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) –
trueif slots were added successfully, otherwisefalse.
Example
🔸removeSlots
Remove crafting slots from a specific character.
Parameters
crm_identifier(string) – Character identifier.crm_slots(number) – Number of slots to remove.
Returns
(boolean) –
trueif slots were removed successfully, otherwisefalse.
Example
🔸setSlots
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) –
trueif slots were updated successfully, otherwisefalse.
Example
Player XP
🔸addXP
Add crafting XP to a character.
Parameters
crm_identifier(string) – Character identifier.crm_xp(number) – Amount of XP to add.
Returns
(boolean) –
trueif xp was updated successfully, otherwisefalse.
Example
🔸removeXP
Remove crafting XP from a character.
Parameters
crm_identifier(string) – Character identifier.crm_xp(number) – Amount of XP to remove.
Returns
(boolean) –
trueif xp was updated successfully, otherwisefalse.
Example
🔸setXP
Set the exact crafting XP for a character.
Parameters
crm_identifier(string) – Character identifier.crm_xp(number) – Total XP value to set.
Returns
(boolean) –
trueif xp was updated successfully, otherwisefalse.
Example
🔸wipeXP
Wipe crafting XP for all characters (sets XP to 0).
Parameters
None
Example
This action affects all players. Use with caution.
Global Toggles
🔸toggleAllCrafting
Toggle crafting globally (enable or disable all crafting stations).
Parameters
None
Returns
(string) –
"crm-disabled"or"crm-enabled"depending on the new state.
Example
🔸toggleAllResearch
Toggle research globally (enable or disable all research stations).
Parameters
None
Returns
(string) –
"crm-disabled"or"crm-enabled"depending on the new state.
Example
Last updated