Procedural Item Generation

For ProcGene, I want to create a way to have procedurally generated items.

I found two games which had item generation systems which would fit really well into ProcGene; Path of Exile and Borderlands.

In this document I will be taking a look at what properties the items have, and how the systems generate the items.

Borderlands

Borderlands is a First Person Shooter RPG, which also has a focus on Loot Grinding. Borderlands

Borderlands has a few different items, but I will only take a look at how the Guns and Shields are generated, since I think that’s where Borderlands really shines, and that’s the only part that I really want to implement in ProcGene.

Guns

Guns in Borderlands have quite a lot of properties, so I will be splitting them into the gun overall properties and the gun parts.

Gun Properties

Property Explanation
Weapon Type Determines what kind of gun this item is
Manufacturer The company that manufactures this gun, has different strengths and weaknesses
Weapon Grade Specifies what version of a gun this is
Rarity Used to show what the overall value of the gun parts are
Damage How much damage it deals per hit
Accuracy How likely it is to hit where you’re aiming at
Fire Rate How often the gun can shoot per second
Reload Speed How quickly the gun can be reloaded
Magazine Size How many bullets you can fire before you need to reload
Recoil How much the gun recoils when you fire a shot
Level Requirement What level the player must be before it can use this gun

Gun Parts

Property Explanation
Material What metal the gun is made of
Body The body of the gun
Barrel Influence the damage and the accuracy
Magazine Determines the amount of ammo
Accessory Alter the performance of the gun in various ways. Can change the stats, or add elemental effects
Sight Determines the amount of zoom when looking down the barrel
Stock Affects the recoil and reload speed
Grip The grip of the gun
Level Restricts the amount of damage the gun can do, and the Level Requirement

Generation

The generator starts with deciding on the Weapon Type, Manufacturer and Weapon Grade.

After these are selected, the game will construct the gun by selecting the Material, and all Gun Parts.

The gun must now be named.

The first part of a weapon’s name is its Prefix. Each manufacturer has a list of Prefixes, and which one a weapon gets is determined by a number of factors including Parts, what Element it has (if any) and any bonuses the weapon has. Prefixes form a hierarchy, with each having a set priority. The highest-priority Prefix is the one that will be displayed, while all others will be hidden.

The second part of a weapon’s name is its Title. The Title is determined entirely by the combination of Body and Barrel parts it has; the Body is determined by the weapon’s Manufacturer, while the Barrel assigns a specific Title from that Manufacturer’s list.

It’ll finally end up with a gun like this;

Path of Exile

Path of Exile is an online Isometric Action RPG, with a focus on Loot Grinding. It is heavily inspired by Diablo II. Path of Exile

Path of Exile has a lot of different items which all have their own properties. I’m only going to look at Weapons and Armour, since this is what I am trying to implemented in ProcGene.

Weapons

Weapons in Path of Exile have the following properties;

Property Explanation
Weapon Type Determines what Weapon this item is (Bow, Axe, etc)
Hands Needed If the weapon is one or two handed
Quality Increases Physical Damage
Physical Damage How much Physical Damage is dealt per hit
Elemental Damage How much Elemental Damage is dealt per hit
Critical Strike Chance How often the Weapon performs a Critical Strike, which increases damage
Attacks Per Second How many times the weapon can attack per second
Weapon Range How far the weapon can reach
Requirements What attributes the player needs to meet before it can wear this armour piece

Armour

Armour has the following properties;

Property Explanation
Armour Type Determines what Armour piece this item is
Quality Increases Armour Rating, Evasion Rating and Energy Shield
Armour Rating Reduces incoming damage
Evasion Rating Increases chance to dodge attacks
Energy Shield Extra health pool on top of Life, which automatically regenerates after not getting hit for some time
Requirements What attributes the player needs to meet before it can wear this weapon

Modifiers

Path of Exile spices up the item generation by adding Modifiers. A Modifier applies stats, a buff or grants a skill to the item. These go from simple modifiers like + # to Strength, to interesting modifiers like Adds # to # Cold Damage to Attacks with this Weapon per 10 Dexterity.

There are 3 types of modifiers;

Type Usage
Prefix Used to identify the modifier on the item
Suffix Used to identify the modifier on the item
Implicit Extra modifier, doesn’t count towards Max. Modifier count

A Modifier has the following properties;

Property Name Explanation
Name What the Modifier is called
Domain What Item this modifier can be applied to
Type Whether the modifier is a Prefix, Suffix or Implicit,
Level The required level the Item Level needs to be so it can acquire this Modifier
Mod Group Groups for modifiers based on what changes they apply, every group can only be applied once to any Item
Tier The ranking of this mod in its' Mod Group

All items also have two other properties which play a big part for Modifiers;

Rarity

Items can be one of these 4 rarities, which grant # of modifiers;

Rarity Max. Modifiers Prefixes Suffixes
Common 0 0 0
Magic 2 1 1
Rare 6 3 3
Unique No set limit - -

Item Level

Item Level determines what tier of a modifier the item gets. The higher the Item Level, the better the Modifier can be.

Generation

The Rarity is rolled first. This will return either Common, Magic, Rare or Unique.

A Base Item is chosen based on the Item Level, and after that the Item Type is decided, based on what the Base Item is.

The Modifiers are then picked, based on the Rarity, Item Level, Base Item and Item Type.

The name is then decided. If the Rarity is Magic, the name is done like so {Prefix Name} Base Item Name {Suffix Name}. If the Rarity is Rare, the name is selected by using the Rare Item Name Index, in which two random words are chosen from a pool and are combined into the name. These names aren’t influenced by what kind of Item Type they have.

After all these steps, the generator would have made something like this;

Sources

Beginner’s Guide to Borderlands Weapon Generator | Gearbox Forum
Part Spotters Guides - Borderlands 2 / Loot and Weapons | Gearbox Forum
Weapons | Borderlands Fandom
Borderlands 2 Weapons | Borderlands Random

Modifiers | Official Path of Exile Wiki
Rare Item Name Index | Official Path of Exile Wiki

Related