Analyzing Loot

Choosing a loot system is probably the trickiest part; implementation is a close second. Loot affects most subsystems of OSARE: maps, camera position, renderables, mouse state, tooltips, enemies, inventory, events/containers, etc.

Here’s what I plan to do with loot drops.

  • Assign items a new variable: level
  • Item level will determine the item’s sell price and drop chance.
  • Item level will also determine automatic loot tables

Item Level

First, let’s talk about level. Weapons and armor will be our starting point for determining level.

  • Regular daggers, wands, slingshots, and leather armor will be level 2
  • Shortswords, rods, shortbows, bucklers will be level 4
  • Longswords, staffs, longbows, steel armor will be level 6
  • Greatswords, greatstaffs, greatbows, shields will be level 8

I’ll use basic judgment to assign the rest of loot.

  • Food is level 1
  • Potions are level 3
  • Gems are level 9
  • Artifacts are base level 5

Item modifiers change the level of items. This is calculated outside of the game for now and applied directly to the items.txt file

  • -1 damage = -1 level
  • +1 damage = +3 levels
  • -0.5 absorb = – 1 level
  • +0.5 absorb = +3 levels
  • +1-3 hp/mp/accuracy/avoidance = +1 level
  • +4-6 hp/mp/accuracy/avoidance = +2 levels
  • +7-9 hp/mp/accuracy/avoidance = +3 levels
  • +1 crit/regen/speed = +1 level
  • +2 crit/regen/speed = +2 level
  • +3 crit/regen/speed = +3 level

Drop Chance

Now I can automatically generate loot tables for creatures, containers, and vendors. Loot will be on a basic bell curve. When loot DOES drop, what level is it?

  • [Editor’s Note: final implementation is +/- 3 levels]
  • 1% chance: -5 level
  • 2% chance: -4 level
  • 5% chance: -3 level
  • 10% chance: -2 level
  • 20% chance: -1 level
  • 24% chance: same level as creature/container/vendor
  • 20% chance: +1 level
  • 10% chance: +2 level
  • 5% chance: +3 level
  • 2% chance: +4 level
  • 1% chance: +5 level

Note I can tag some monsters as “no loot” types (e.g. antlions, wyverns). Instead of dropping loot, you should find loot around their layers (in nests, rubble, dead adventurers, etc). Also I can tag some loot as “quest” types, so they don’t appear in random tables.

2010/06/21

Leave a Reply

Your email address will not be published. Required fields are marked *