Skip to main content

Items

Items are the most basic building block of a game. They are the things that players can pick up, use, and interact with. Since this is a very broad category, this file will focus only on how to create core item data.

Relevant Files

Client

  • None

Server

  • DataModule - src\ServerStorage\Modules\Data\DataModule\init.lua
  • Data types - src\ServerStorage\Modules\Data\DataModule\DataTypes.lua

Data

  • Item icon data - src\ReplicatedStorage\Modules\Data\ItemIconData.lua
  • Item data - src\ServerStorage\Data\DataTypes
  • Item description data - src\ReplicatedStorage\Modules\Data\ItemDescriptionData.lua

Shared

  • Item pack format - src\ReplicatedStorage\Modules\Data\PackFormats\ItemPackFormat.lua
  • Inventory item pack format - src\ReplicatedStorage\Modules\Data\PackFormats\InventoryPackFormat.lua

Minimum Requirements For Creating an Item

  • An ItemData_ItemName file in the src\ServerStorage\Data\DataTypes folder, placed in the appropriate data type folder.
  • Optional an ItemName field in the src\ReplicatedStorage\Modules\Data\ItemDescriptionData.lua file.
  • Optional An ItemName field in the src\ReplicatedStorage\Modules\Data\ItemIconData.lua file.

Minimum Requirements For Adding an Item Type

  • An ItemType folder in the src\ServerStorage\Data\DataTypes folder.
  • A data type and typecheck in the src\ServerStorage\Modules\Data\DataModule\DataTypes.lua file.
  • A pack format in the src\ReplicatedStorage\Modules\Data\PackFormats\ItemPackFormat.lua file.