-
Notifications
You must be signed in to change notification settings - Fork 1
Items Editor
he item editor is a core component of the Questie plugin for Godot, designed to facilitate the creation and management of in-game items. It can be accessed from the second tab of the Questie interface and is represented by the item-db.tres file located at res://questie/item-db.tres.
A set of buttons in the top-left corner of the editor window, each with a unique icon representing the type of item that will be created when clicked:
- Sword: creates a weapon item
- Armor: creates an armor item
- Potion: creates a consumable item
- Wood: creates a material item
- Star-Coin: creates a special item
The ability to delete created items using the toilet paper icon located at the bottom of the window. A dedicated workspace for each item type, designed specifically for efficient item management.
It is important to note that clicking on any folder in the item editor will not have any effect on item creation. To create a new item, you must use one of the buttons provided in the interface.
The weapon item is a fundamental object used to deal damage to creatures or enemies within the game. The Questie plugin for Godot includes a dedicated workspace for customizing the basic information of a weapon item, as outlined below:
- Title: the name of the item.
- Description: a brief description of the item, such as its origins or any notable features.
As with any in-game item, weapons can be used to generate income within the game economy. The weapon item workspace includes the following options for defining item merchandising:
- Can be sold: a boolean value that determines whether the item can be acquired and sold by any vendor within the game.
- Purchase price: the cost to purchase the item.
- Sell price: the amount of money received when selling the item.
The damage dealt by a weapon item is a crucial factor in gameplay. The Questie plugin provides the following options for defining the damage dealt by a weapon:
- Damage type: the type of damage dealt by the weapon, such as physical, fire, or poison.
- Minimum damage: the minimum amount of damage dealt by the weapon.
- Maximum damage: the maximum amount of damage dealt by the weapon.
The Armor Item Workspace is used to define armor items such as chestplates, shoulder pads, and more. All objects inherit from the ItemData structure, with additional data structure specific to armor as described below:
- Armor type: specifies the type of armor, such as darkness, fire, physical, etc.
- Armor value: indicates the amount of defense that the armor provides.
The armor type indicates the type of damage that the armor can block. When defining an armor type, the armor value determines the amount of damage that will be reduced if the same type of armor is used.
For example, if an enemy casts a fireball spell that deals 50 damage, and the player is wearing armor with a Fire armor type and an armor value of 45, then the damage dealt by the opponent will be reduced by 45 because the damage type and armor type match.
The current armor types are defined as follows:
-
Physical: reduces damage based on the
physicaltype. -
Fire: reduces damage based on the
firetype. -
Water: reduces damage based on the
watertype. -
Nature: reduces damage based on the
naturetype. -
Air: reduces damage based on the
airtype. -
Darkness: reduces damage based on the
darknesstype. -
Spirit: reduces damage based on the
spirittype.
The consumable item is a versatile object that serves various utility purposes in the game, such as health or stamina recovery, weapon enchantment, and more.
Similar to the weapon item, the consumable item also inherits its structure from a generic item data object. Additionally, it includes a dedicated section for its unique information:
- Value: the value associated with this consumable, which can be used to increase the character's health, apply status effects, and more.
It's important to note that the item editor is designed to provide a flexible way to store item information. The stored data can be utilized as needed during item implementation. The editor only stores this data in the item database and does not affect how it's used in the game.
A special item is a unique object that does not fit into any of the previously defined categories. It can have the attributes of both a weapon and a material item, making it a versatile object. For instance, the Dark Lord Ring can provide damage reduction against dark magic like armor, function as a crafting material to create a powerful weapon, and there can only be one in the game. This merging of information from the armor and material items makes it a special item.
The item inspector allows the special item to be a hybrid of each item category and treated as both. Enabling the as... checkmark lets the item function as that item. Additionally, it has a checkbox called is_unique that determines whether the item should be a one-of-a-kind object in the game. If checked, the player can possess only one instance of this item in their inventory.