Skip to content

Understanding Borderlands Weight and Probability Values

CJ Kucera edited this page Mar 10, 2018 · 10 revisions

Before diving into this, it's recommended to have a general understanding of how Borderlands 2/TPS handles weighted probabilities -- a good primer on that can be found on Gearbox's blog in a post named The Borderlands 2 Loot System by Paul Hellquist.

Basics

Loot pools in Borderlands are generally defined using a BalancedItems array which looks like this, taken from Borderlands 2's GD_Itempools.LootablePools.Pool_Locker_Items_SMGsAndPistols:

BalancedItems(0)=( 
      ItmPoolDefinition=ItemPoolDefinition'GD_Itempools.WeaponPools.Pool_Weapons_Pistols', 
      InvBalanceDefinition=None, 
      Probability=( 
          BaseValueConstant=0.000000, 
          BaseValueAttribute=None, 
          InitializationDefinition=AttributeInitializationDefinition'GD_Balance.Weighting.Weight_2_Uncommon', 
          BaseValueScaleConstant=1.000000 
      ), 
      bDropOnDeath=False 
  )
BalancedItems(1)=( 
      ItmPoolDefinition=ItemPoolDefinition'GD_Itempools.WeaponPools.Pool_Weapons_SMG', 
      InvBalanceDefinition=None, 
      Probability=( 
          BaseValueConstant=0.000000, 
          BaseValueAttribute=None, 
          InitializationDefinition=AttributeInitializationDefinition'GD_Balance.Weighting.Weight_3_Uncommoner', 
          BaseValueScaleConstant=1.000000 
      ), 
      bDropOnDeath=True 
  )

The Probability section will become very familiar over time, and consists of four elements: BaseValueConstant, BaseValueAttribute, InitializationDefinition, and BaseValueScaleConstant. We'll refer to them as BVC, BVA, ID, and BVSC.

When writing custom loot pools or playing with these kinds of stanzas in mods, the simplest thing to do is to set the middle two (BVA and ID) to None and only use BVC and BVSC. In that case, the formula for finding out the numerical value of one of those stanzas is just BVC * BVSC. So either of the following stanzas would evaluate to 50:

  Probability=( 
      BaseValueConstant=50.000000, 
      BaseValueAttribute=None, 
      InitializationDefinition=None, 
      BaseValueScaleConstant=1.000000 
  )

or

  Probability=( 
      BaseValueConstant=1.000000, 
      BaseValueAttribute=None, 
      InitializationDefinition=None, 
      BaseValueScaleConstant=50.000000 
  )

In practice, you'll generally set BVC to the number you want, and leave the BVSC at 1.

Clone this wiki locally