Links

ItemAttribute.cs

v4.0
ItemAttribute is a Scriptable Object which is intended to augment an ItemObject, providing more details about it, perhaps describing it. Beyond simply being a thing that changes an ItemObject, the ItemAttribute can also affect Stat objects, so that a "Fire Sword" can do something because of the "Fire" (an ItemAttribute) beyond simply having a cool name.
A GameItemAttribute, the runtime version of ItemAttribute, can also be added to any other object and used in various ways. It can affect the Stats of an IHaveStats object, even if it is not in a GameItemAttributeList, or attached to a GameItemObject.
ItemAttribute.cs
public string ObjectName
public string ObjectType
// ItemAttributes can change the FullName() of a GameItemObject they are attached to
public int nameOrder = 0;
public string humanName = "";

Setup

The objectType of an Item Attribute 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 Attribute
This will create an ItemAttribute Scriptable 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 objectName value.
Note that names of Item Attributes must be unique. The console will provide a warning if there are multiple Item Atrributes with the same name.

Inspector

Select your new object and view it in the Inspector. Here is where you can manage all the details about this Item Attribute. Note there are multiple tabs, each of which provide access to specific, and optional, information.
As with all Game Module objects, the ObjectType is the name of the folder the Scriptable Object is in, "Character Race" in this example from the Party Based RPG demo game.
Settings
Stat Effects
Dictionaries
The Settings tab allows you to specify how the ItemAttribute effects other things, how it may change the name of GameItemObjects it's attached to, and which other ItemAttributes it either requires, or is incompatible with.
This example shows the Stat effects that the Character Race "Elf" would have on an Actor.
Once you have Stats set up, you can set how this Item Attribute will affect them here. The math is all handled automatically once you have your data set up at runtime, so that any Item Attributes you choose can affect the Stats of a player or other object which has Stats.
ItemAttributes can affect the stats of an IHaveStats object, or they can affect the stats of the GameItemObject they are attached to. This can be set up in the General Settings panel, and it may change the scale of the impact the ItemAttribute has.
For example, if the Stat effect is on the Proficiency of a Stat, then the value of the stat is going to be multiplied -- a larger stat value would mean the ItemAttribute has a larger impact. Affecting the GameItemObject often means it has an impact, but one that is limited to the overall impact of the GameItemObject.
See more details of the how this panel works on "Stat Effects" tabs of the Item Objects page.

Example

In the example above, stats Hit Points Max and Magic Points Max are given a 20 and 25 point increase resepctively. The proficiency of Wisdom and Accuracy are both increased by 0.2, while Might and Stamina are decreased by -0.2.
This means that if the stat value is 20, the "Final Stat" of Wisdom and Accuracy would be 20 * 1.2, or 24, while the "Final Stat" of Might and Stamina would be 20 * 0.8, or 16. Proficiency on the Actor may be affected by other things as well, such as the Character Class, or equipped items, or Conditions.
The Magic Points Max value is also affected by the "Level" of the IHaveStats object which owns this ItemAttribute. In the example above, we add 3 * Level * the value of "Magic Points Souce" in a Lookup Table called "Stat Bonus".
In the Party Based RPG demo game, "Magic Points Source" is a "Hidden Stat", which is directly affected by Wisdom and Personality, two "Main Stats" in the game. In the demo, classes which use magic deterimine their Magic Points Source either through the value of their Wisdom or Personality stat. For Druid and Ranger classes, the magic points are determined by the average of the two, as seen here in the "Druid" ItemAttribute.
Among with other Stat effects, the "Magic Point Source" stat has 0.5 * the Final Stat of Wisdom, and 0.5 * the Final Stat of Personality added to it.
This technique allows all magic users to have a common method of calculating final Magic Point Max stats, but with different sources.
Dictionaries can be used to store all kinds of custom data, which you can use any way you'd like!
Here you can manage the values on the various Dictionaries key set up. Each one is a List and you can add and re-order the entires as you'd like. You can also have multiple "type" of data on each key.
To add keys to individual ItemAttributes, you will need click the "Manage Item Attributes" button at the top of the Inspector. Dictionaries keys are the same for all Item Attributes of the same objectType. On the "Manage Item Attributes" panel you can set up Keys, and optionally choose to display strings in those keys as a textbox.