Exports

Comprehensive instructions on configuring files and utilizing export functions.

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)true if slots were added successfully, otherwise false.

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)true if slots were removed successfully, otherwise false.

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)true if slots were updated successfully, otherwise false.

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)true if xp was updated successfully, otherwise false.

Example


🔸removeXP

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


🔸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)true if xp was updated successfully, otherwise false.

Example


🔸wipeXP

Wipe crafting XP for all characters (sets XP to 0).

Parameters

  • None

Example


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