Skip to Content

Exports

This section is aimed at developers. Basic scripting knowledge will help you get the most out of it.

Crafting Creator Exports

These exports let you control player progression — slots and XP — as well as the global crafting and research states, from any other resource.

Call them like this:

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

if exports["crm-craftingcreator"]:addSlots("RO7G58L8", 2) then print("Slots added successfully") end

removeSlots

Remove crafting slots from a specific character.

local success = exports["crm-craftingcreator"]:removeSlots(crm_identifier, crm_slots)

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

exports["crm-craftingcreator"]:removeSlots("RO7G58L8", 1)

setSlots

Set the exact number of crafting slots for a character.

local success = exports["crm-craftingcreator"]:setSlots(crm_identifier, crm_slots)

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

exports["crm-craftingcreator"]:setSlots("RO7G58L8", 5)

Player XP

addXP

Add crafting XP to a character.

exports["crm-craftingcreator"]:addXP(crm_identifier, crm_xp)

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

exports["crm-craftingcreator"]:addXP("RO7G58L8", 250)

removeXP

Remove crafting XP from a character.

exports["crm-craftingcreator"]:removeXP(crm_identifier, crm_xp)

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

exports["crm-craftingcreator"]:removeXP("RO7G58L8", 100)

setXP

Set the exact crafting XP for a character.

exports["crm-craftingcreator"]:setXP(crm_identifier, crm_xp)

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

exports["crm-craftingcreator"]:setXP("RO7G58L8", 1000)

wipeXP

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

exports["crm-craftingcreator"]:wipeXP()

Parameters

  • None

Example

exports["crm-craftingcreator"]:wipeXP()

This action affects all players. Use with caution.


Global Toggles

toggleAllCrafting

Toggle crafting globally (enable or disable all crafting stations).

local state = exports["crm-craftingcreator"]:toggleAllCrafting()

Parameters

  • None

Returns

  • (string)"crm-disabled" or "crm-enabled" depending on the new state.

Example

local state = exports["crm-craftingcreator"]:toggleAllCrafting() print("Crafting state:", state)

toggleAllResearch

Toggle research globally (enable or disable all research stations).

local state = exports["crm-craftingcreator"]:toggleAllResearch()

Parameters

  • None

Returns

  • (string)"crm-disabled" or "crm-enabled" depending on the new state.

Example

local state = exports["crm-craftingcreator"]:toggleAllResearch() print("Research state:", state)