Written by Sench - Original Post
First of all, you can safely ignore the "named quality tiers", such as Primitive, Ramshackle, Apprentice etc. - these are all defined in PrimalGameData and everything about them can be changed freely. The important thing is the "Item Rating" (IR) that these tiers are tied to - but even that is a derivative of the "actual quality". Item Rating is hidden in-game, but can be viewed when testing in the DevKit.
Within any PrimalItem BP there is a field called "Item Stat Infos". Each has 8 members (for each of the 8 stats that exist in the game), each with a number of paramteres. The checkboxes are the simplest part. You wouldn't normally need to edit any of these.
- Used defines whether this stat scales with item quality, and whether it is displayed.
- Calculate as Percent seems to insignificantly affect resulting values in case "display as percent" is not used.
- Display as Percent will change the stat to be displayed as percent. Affects calculations somewhat. Should be set to true for weapon damage, must be set to false for everything else.
- Requires Submerged is meant for the Scuba Tank so its durability is only reduced while underwater.
Now let's move on to the variables. I'm giving them in order of difficulty, not appearance.
- The Randomizer Power cannot be edited, so its purpose is unclear (and irrelevant).
- Initial Value Constant (IV) is the starting value for the stat. If "display as percent" is used, 0 will show up as 100% (no added value) and 1 as 200% (100% added value).
- State Modifier Scale (MS) is a multiplier that will be applied to every variable that shifts the value from the initial one.
- Default Modified Value (DM) is a flat increase to the stat that the item will always have. This will neither change with item quality, nor affect the Item Rating. The unit of measurement is IVs.
- Randomizer Range Multiplier (RM) is a variable that defines the "step" the stat can improve by. The unit of measurement is IVs.
- Randomizer Range Override (RO) is a variable that defines the maximum number of "steps" the stat can improve by. The actual number of steps is a random integer between 0 and this value. Setting this to 0 will allow this stat to be displayed without being affected by quality or affecting Item Rating.
- Rating Value Multiplier (RV) is how much this stat affects Item Rating.
Here's how the process works. When an item spawns, it is assigned a random Arbitrary Quality (AQ) (affected by the supply crate it spawns inside, and you can specify it when using commands). For each stat, it generates a random number in range of 0 to AQ*RO, and then adds the result to the IV, following all rules. The resulting value of any stat is calculated by the formula: IV*(1 + MS*(DM + RM*X)) or IV + IV*MS*DM + IV*MS*RM*X, where "X" is the generated random number in range of 0 to AQ*RO.
Once the game calculates an item's stats, it moves on to calculating its Item Rating. For a single stat, the formula looks like this: (X^2/AQ*RO)*RV, where "X" is the generated random number in range of 0 to AQ*RO. The game actually generates "X" as a float number instead of an integer, so rounding can cause slight inconsistencies. For multiple stats, the game simply takes the arithmetic average Item Rating.
Once Item Rating has been decided, the game moves on to calculating crafting costs. This is affected by the following: Resource Requirement Rating Scale (RS), found closer to the bottom of the PrimalItem BP. When set to 1, this increases the crafting cost of an item by 0.3% for every 0.01 IR (or 30% for 1 IR). The base crafting cost is defined in "Base Crafting Resource Requirements", right above "Item Stat Infos". Resource Requirement Increase Rating Power and Resource Requirement Rating Increase Percentage, both found right next to it, don't seem to actually affect anything.
One more thing that can affect crafting costs is the "Quality Tier", as defined in PrimalGameData under "Item Quality Definitions". Here you can define tier names, their display names and colors, their bottom Item Rating threshold ("Quality Random Multiplier Threshold"), multipliers for crafting and repairing items belonging to them and additional crafting costs (Crafting Resource Requirements Multiplier (CM)). The final crafting cost of an item is calculated as follows: BASE_COST*(1 + IR*RS*0.3*CM) or BASE_COST + BASE_COST*IR*RS*CM*0.3. It is not possible to reduce crafting costs below the base amount.
With the exception of weapon damage, all stats an item has are defined only in "Item Stat Infos". This is why you must never set "display as percent" to true for them: any % of 0 is still 0. It will make items unusuable and could cause severe errors. Weapon damage is defined elsewhere (weapon or projectile BPs), and is multiplied properly when "display as percent" is set to true. Turning "display as percent" off will not let you see the base damage of a weapon. Any value displayed in the item will instead be added onto the base damage dealt by the weapon and make proper scaling of damage impossible. This should only be changed when you plan to completely overhaul the damage system.