Info {{ currentPage ? currentPage.title : "" }}

SP8_CrafterComponent

Option

Description

Global Crafter

Global Crafter are not calling Can Use Crafter and can be opened everywhere.

You can leave the Array empty, if you want to make an Interactable Crafter.

Values: Crafter Data Table.

Crafter Logging

Customize Logs

Example:

Key: Select LogType

Type: Can be left empty if not needed

SubType: Can be left empty if not needed (Sometimes it will be overwritten with different Values)

Message: What should be printed to the Chat Box.

OnlyOnDebug: If true, the Message will be only shown, if the “Crafter Logging Debug” is set to true.

Crafter Logging Debug

If set to true, every Log of the Crafter Component will be shown in the Chat.

Function

Callable

Description

Default Use-Case

craftItem

Server & Client

Craft a Item (can fail).

Calls isItemCraftable, SP8_RemoveItemFromInventory, SP8_AddItemToInventory and SP8_ReduceCurrency.

Called when Item was added to the Crafter Window and the User has pressed the Craft Button.

isItemCraftable

Server & Client

Checks if the Item can be crafted.

Calls SP8_HasEnoughCurrency, SP8_CheckIfInventoryHasEnoughSpace, SP8_hasItemInInventory.

Check inside the Crafter Window and set the Crafter Button to enabled or not.

unlockCrafterRecipe

Server

Unlocks a Crafter Recipe by the Item ID.

Calls isCraftingRecipeUnlocked.

After using the Consumable Item, which can unlock a Recipe.

isCraftingRecipeUnlocked

Server & Client

Check if the Crafter Recipe is unlocked.

On generating the Crafter Window to hide or show a Recipe.

getUnlockedRecipes

Server & Client

Get all unlocked Recipes

Since v0.2

getCraftingChance

Server & Client

Get the Additional Chance for a Recipe.

For displaying the correct Chance on the Crafter Widget.

Initialize

Server

If you are using your own Save System, you can use this Function to set the Informations, which this Component needs.

Only if you do not call Load!

Load

Server

Load all variables

Should be called on start.

Save

Server

Save all variables

Dispatcher

Called

Description

Default Use-Case

CraftingRecipeUnlocked

Client

Called when a new Crafting Recipe was unlocked.

Change the Recipe List if the Crafter is open.

Not needed if you are using the PlayerTemplate!

CraftingSucceded

Client

Called when the Crafting succeded.

Items and Currency were removed and crafted Item was added.

Remove the Item from the Crafter Widget and maybe make some Effect.

Not needed if you are using the PlayerTemplate!

CraftingFailed

Client

Called when the Crafting Failed.

Items and Currency were removed, but not item will be added.

Remove the Item from the Crafter Widget and maybe make some Effect.

Not needed if you are using the PlayerTemplate!

SP8_BPI_canUseCrafter (Only if you are not using SP8_PlayerTemplate)

Function

Callable

Description

When is it called?

SP8_canUseCrafter

Server & Client

Checks if the Player can use the Crafter.

You could check if the Player can open the Shop with this Interface Function.

On Craft Item.

Since v0.2

SP8_getAdditionalCraftingChance

Server & Client

Get the Additional Chance for a Crafting Recipe.

On isItemCraftable & Craft Item

Crafter LogTypes

LogType

Description

Error_CrafterDataTableIsNotValid

Data Table of Crafter is not valid.

Error_CrafterDataTableRowNotFound

Data Table of Crafter does not contain “NewRow”.

Error_ItemDataTableIsNotValid

Data Table of Item is not valid.

SubType will be overwritten with the Item Index.

Error_ItemDataTableRowNotFound

Data Table of Item does not contain “NewRow”.

SubType will be overwritten with the Item Index.

Info_CraftingSucceded

Called when the Crafting succeded.

Info_CraftingFailed

Called when the Crafting Failed.

Error_CrafterNotFound

The Crafter could not be found.

Error_CrafterDoesNotContainValidIndexInCraftRecipes

Crafter does not include the submitted Index.

Error_CrafterRecipeChanceIsToLow

The Chance of the Crafter is to low.

Must be at least 1.

Info_CraftingRecipeNotUnlocked

Trying to use a Crafting Recipe which the Player has not unlocked yet.

Info_InventoryDoesNotHasEnoughSpace

Interface Function CheckIfInventoryHasEnoughSpace returned false.

If using the PlayerTemplate: Sp8_Override_CheckIfInventoryHasEnoughSpace.

Info_InventoryDoesNotContainItemForCrafting

Interface Function hasItemInInventory returned false.

If using the PlayerTemplate: Sp8_Override_hasItemInInventory.

Info_CraftingRecipeAlreadyUnlocked

The Crafting Recipe can not be unlocked twice.

Info_CraftingRecipeUnlocked

Crafting Recipe was unlocked.

Info_BPI_CanUseCrafterReturnedFalse

Interface Function canUseCrafter returned false.

If using the PlayerTemplate: Sp8_Override_canUseCrafter.

Info_NotEnoughCurrencyToCraftItem

Interface Function hasEnoughCurrency returned false.

If using the PlayerTemplate: Sp8_Override_hasEnoughCurrency.

{{{ content }}}