Comment on page
ItemObjectis a Scriptable Object which holds references to all the data set up with the Items Module. It implements
public string ObjectName
public string ObjectType
objectTypeof an Item Object is the name of the folder the Scriptable Object is in. Create one named as you'd like, and right-click inside to select the menu option:
/Create/Game Modules/Items/Item Object
This will create an
ItemObjectScriptable Object in your project. Select that and view the Inspector to begin setting up your data. The name of the Scriptable Object is saved as the
Note that names of Item Objects must be unique. The console will provide a warning if there are multiple Item Objects with the same name.
ItemAttributesto differentiate between things like "Wooden Sword", "Sword", and "Master Sword". In this context, both "Wooden" and "Master" would be
Select your new object and view it in the Inspector. Here is where you can manage all the details about this Item Object. Note there are multiple tabs, each of which provide access to specific, and optional, information.
The Quest Item
boolis used to identify this
ItemObjectas something special, which may need special rules. For example, the drag-and-drop Inventory System will not let a player "drop" a quest item, as that may result in the quest item being lost. Your own systems may choose to make use of this value.
Once you have Stats set up, you can set how this Item Object will affect them here. The math is all handled automatically once you have your data set up at runtime, so that any Item Objects you choose can affect the Stats of a player or other object which has Stats.
Stats have two key concepts: Value and Proficiency. Value are numbers, while Proficiency is a percent. In the example above, the "Sword" weapon will increase the "Attack" Stat of the owner by 2, and incrase the "Damage" Stat of the owner by 3.
"Targets" are the Stats that will be affected by this Item Object. Add new Target using the search & drop down at the top.
The "Base" values are modified directly simply by this Item Object being included in the calculations. The amounts you insert are not modified by any other Stat.
"Sources" are the Stats that will be used to compute the affect values on the various Targets. Add a new Source using the drop down on the right.
This example shows the "Master Sword", which is a "Quest Item", and has a greater impact on the owners Stats
Our "Master Sword"
ItemObjectis a Quest Item, and has an impact on Might as well as Attack and Damage. The "Base" value for Might has a proficiency boost of 0.1. This means that the owner of this weapon, when equipped would get a 10% point boost in the proficiency of their might stat.
There is also an addtional source, Personality. This is set to add 0.01 to the proficiency of might for every "Final Stat" in the owners Personality. This means that if the owner has a "Personality" of 20, there will be an additional 20% point boost in the proficiency of their might stat.
Other values are modified by the Source Stat selected. There are multiple ways to compute the modification, which you can select via the drop down. Toggle the row off if you do not want this particular Source to affect the Target.
This is similar to the "Base" option, but will only be included if the Owner of of the Stats being targetted also has the Source Stat.
The Base and Proficiency values will be multiplied by the "Points" associated with the Source Stat.
The values provided will be multiplied by the Final Proficiency of the Source Stat.
Selecting this will multiple the values by the Final Stat of the Source.
Lookup Tables provide specific output numbers based on the input. If the object with the Stats has an output value of "6" for the Stat "Wisdom", and a Final Value of "Level" of 10, the math would equate to a 60% increase in the Proficiency value of the Stat "Critical Strike":
Using Stats to modify other Stat values is a great way to add complexity to your game, and give your players many ways to improve their characters. This system will make it much easier to connect all of the various Stats you have with the things that affect them.
In this example, the weapon "Sword" is part of the "Basic Gear" and "Basic Weapons" loot item objects
If you have Loot Box Items set up, via the Loot module, you can see which Loot Box Item objects this Item Object is included in. You are able to remove it from existing ones, or add it to new ones via the drop down menu.
Here you can manage the values on the various Dictionaries key/value pairs set up. Each one is a
Listand you can add and re-order the entires as you'd like. Each KeyValue can hold many different types, including Game Module types.
To add keys to individual
ItemObjects, you will need click the "Manage Item Objects" button at the top of the Inspector. Dictionaries keys are the same for all Item Objects of the same
objectType. On the "Manage Item Objects" panel you can set up Keys, and optionally choose to display
stringsin those keys as a