Item Progression

From Divinity Engine Wiki
Revision as of 22:31, 22 July 2018 by LaughingLeader (talk | contribs) (Initial ItemProgression draft.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Description

An important part of the treasure system, Item Progression is the link between item stats and root templates, and is necessary to customize the level range, rarity, and names of items generated by stat, or by treasure tables.

ItemProgressionVisuals

ItemProgressionVisuals links an itemgroup with a levelgroup (the level range and rarity), a root group (the root template used), and a namegroup (the names to use).

Properties

Property Parameters Description
itemgroup ItemGroup The itemgroup, defined via item stats. Consider this the "header" that subsequent entries are included under, until a new itemgroup is used.
levelgroup MinLevel,MaxLevel,Rarity The level range and rarity to link the subsequent rootgroup and namegroup to.
rootgroup RootTemplate,ItemColor The RootTemplate is the GUIDSTRING of the root template to use. ItemColor is defined in its own stats file, and changes the color of items with materials that support MSK.
namegroup NameGroup,AffixType,Icon The namegroup to use, whether to use the "cool" version, and an icon to use in place of the root template's icon.

ItemGroup

ItemGroup is defined in equipment stats, and is used to define which group of stats the subsequent levelgroup, rootgroup, and namegroup use.

Examples:

A base stat inherited by other weapons:

new entry "_Clubs"
type "Weapon"
data "ItemGroup" "Maces_1H"
data "ModifierType" "Item"
data "Act" "1"
data "Requirements" "Strength 12"
data "IsTwoHanded" "No"
data "AttackAPCost" "2"
data "Damage Type" "Physical"
data "Damage" "0"
data "Damage Range" "5"
data "DamageFromBase" "67"
data "CriticalDamage" "150"
data "CriticalChance" "0"
data "WeaponRange" "120"
data "Durability" "20"
data "DurabilityDegradeSpeed" "6"
data "Value" "40"
data "Weight" "3500"
data "Movement" "0"
data "WeaponType" "Club"
data "Slot" "Weapon"
data "InventoryTab" "Equipment"
data "Charges" "0"
data "MaxCharges" "0"
data "ItemColor" "DefaultGray"
data "RuneSlots" "0"
data "RuneSlots_V1" "0"

Overriding the inherited ItemGroup with a new one:

new entry "WPN_Common_Mace_1H_A"
type "Weapon"
using "_Clubs"
data "ItemGroup" "WPN_Common_Mace_1H_A"
data "Act part" "1"
data "Value" "2"
data "Weight" "1000"
data "ComboCategory" "Club,Hammer"

LevelGroup

The levelgroup sets the level range and Rarity that the following rootgroups and namegroups will apply to.

Examples:

add levelgroup 9,16,"Uncommon"
add rootgroup "648d501c-2d8e-4464-acfb-6e6f061305f6","MageUncommon"
add namegroup "MageRobe9","",""

This item will generate at levels 9-16 at the "Uncommon" rarity.

add levelgroup 17,0,"Common"
add rootgroup "94aaefe8-4843-4624-b1a0-92d63be2e5b8","LizardsCommon"
add namegroup "Claymore","",""

This item will spawn at level 17 and above, at the "Common" rarity.

new itemgroup "Wings"

add levelgroup 0,0,"All"
add rootgroup "a71d1908-7499-42c2-8c6b-a2173be582dc",""
add namegroup "Wings","",""

This item is generated at any level, and any rarity. Fun fact: These are the wings created by the Wings Polymorph skill.

RootGroup

The rootgroup is simply the GUIDSTRING of the root template to link the itemgroup with. The second property is an optional ItemColor to use. You can get the GUIDSTRING of a root template by right clicking it in the Root template panel, and selecting "Copy GUID to clipboard".

Example:

add levelgroup 4,4,"Common"
add rootgroup "16600f2c-3817-42e7-be9d-5804f8ac77c8","HumansCommon"
add namegroup "Twohander 2","",""

NameGroup

The namegroup is a set of names to use with the item, defined in ItemProgressionNames. The first parameter is the name of the namegroup, while the second and third parameters are optional, and usually blank (""). The second parameter activates the "namecool" version of a name (via "Cool"), and the third parameter specifies the icon to use, which overrides the icon on the root template.

Example:

add levelgroup 9,16,"Common"
add rootgroup "30102727-1802-4aad-b464-02b9816c07db","ElvesCommon"
add namegroup "Elven Sword","",""

This entry uses the namegroup named "Elven Sword".

add levelgroup 9,16,"Rare"
add rootgroup "30102727-1802-4aad-b464-02b9816c07db","ElvesCommon"
add namegroup "Elven Sword","Cool","Item_WPN_Dwarves_Sword_1H_C"

While this entry also uses the namegroup named "Elven Sword", it uses the "namecool" entry thanks to "Cool", and uses the "Item_WPN_Dwarves_Sword_1H_C" icon instead of the one set by the root template.

ItemProgressionNames

ItemProgressionNames defines a set of names and (optional) descriptions to use for items defined in ItemProgressionVisuals.

Properties

Property Parameters Description
namegroup Name The name of the namegroup. Used in ItemProgressionVisuals.
name ItemName,Description The item name and (optional) description to use.
namecool ItemName,Description An optional, additional entry to use if "Cool" is specified in ItemProgressionVisuals.

Example:

Say we have an entry in ItemProgressionVisuals:

add levelgroup 9,16,"Common"
add rootgroup "30102727-1802-4aad-b464-02b9816c07db","ElvesCommon"
add namegroup "Elven Sword","",""

We then define the namegroup "Elven Sword" within ItemProgressionNames:

new namegroup "Elven Sword"
add name "Elven Sword",""
add namecool "Elegant Sword",""

"name" is the name to use normally, followed by the name to use. The second parameter an optional description. If left blank, the description on the root template is used.

"namecool" is the name to use when "Cool" is specified in ItemProgressionVisuals, typically for higher rarity versions of an item.

Note: If the root template specifies a name (Display Name, or Display Name (Unknown)), that value will override the name provided by the namegroup.

Cool Names

Say we have the following entries:

add levelgroup 9,16,"Common"
add rootgroup "30102727-1802-4aad-b464-02b9816c07db","ElvesCommon"
add namegroup "Elven Sword","",""

add levelgroup 9,16,"Epic"
add rootgroup "30102727-1802-4aad-b464-02b9816c07db","ElvesCommon"
add namegroup "Elven Sword","Cool",""

If the item spawns at level 9-16 with the "Epic" rarity, the resulting item will use the name "Elegant Sword" instead of "Elven Sword". Otherwise, the normal name is used.

Icon Override

The third parameter for the ItemProgressionVisuals namegroup entry is an icon override, allowing us to change the icon used for the weapon that matches the progression parameters.

Example:

new itemgroup "ARM_UNIQUE_WikiMod_BrilliantRing"

add levelgroup 0,0,"Common"
add rootgroup "f6fd6b73-191d-4ba1-b844-cec875608fe3",""
add namegroup "ARM_UNIQUE_WikiMod_BrilliantRing","",""

add levelgroup 0,0,"Rare"
add rootgroup "c21de6ee-136b-45f7-b083-565d3f458726",""
add namegroup "ARM_UNIQUE_WikiMod_BrilliantRing","Cool","Item_LOOT_Ring_B_Silver_Turquoise"

Now when a rare version of our ring spawns, it will use the icon "Item_LOOT_Ring_B_Silver_Turquoise", located in the Icons_DOS2_Items texture atlas.

Unique Items

For cases where we want an item to be unique, and spawn regardless of level, an ItemProgression entry is still needed.

Say we have a unique ring, defined in Armor:

new entry "ARM_UNIQUE_WikiMod_BrilliantRing"
type "Armor"
using "_Rings"
data "ItemGroup" "ARM_UNIQUE_WikiMod_BrilliantRing"
data "Unique" "1"

We then define a new entry in ItemProgressionVisuals:

new itemgroup "ARM_UNIQUE_WikiMod_BrilliantRing"

add levelgroup 0,0,"All"
add rootgroup "24c3d50a-c377-4c09-b3e8-274f8447494b",""
add namegroup "ARM_UNIQUE_WikiMod_BrilliantRing","",""

And finally, an entry in ItemProgressionNames:

new namegroup "ARM_UNIQUE_WikiMod_BrilliantRing"
add name "Brilliant Ring of Amun-Ra","This ring shines with a brilliant light. The metal is warm to the touch, and seems impervious to scuffing."

By making our levelgroup 0,0 with the "All" rarity, this makes our ring spawn at any level, and any rarity. Naturally, rarity is left out of the equation, since our ring is unique.

Common Mistakes

  • Generating the Item with a level range or rarity that isn't defined.

Say we have an ItemProgressionVisuals entry:

new itemgroup "WPN_Wikimod_Crossbow_Plus"

add levelgroup 1,9,"Common"
add rootgroup "b8da3005-cc77-4150-b9f3-23e1d3cc92e9","DwarvesCommon"
add namegroup "Dwarven Crossbow","",""

Attempting to generate this item at a higher level than 9, or a rarity other than "Common" will fail. The solution is to add new entries for each level range and rarity we want to support, and is why Shared's ItemProgressionVisuals contains so many entries.

  • Using a root template with a "defined" name, and expecting a namegroup to work.

If a root template has a display name set, it will take priority over the namegroup. This includes "Display Name (Unknown)".