Item Proc Order

Website Created by IndieSnek

← Back to items

Information directly from the Developer Ved (This is a copy paste from Discord)

Overview

Items generally do 3 things:

Tick (50 times per second)

This is different for every item, but a tick can for example calculate the distance you have travelled and give you gold (Golden Sneakers) or it can reset the amount of procs an item has hit, so that it can proc again (Spicy Meatball, Ice Cube, etc). So for example Spicy Meatball: once it has proc'd over the max amount, which is 50 for meatball, it can no longer proc when you attack an enemy this frame. This limit is reset in the tick function, which again is called once every physics tick, which 50 times per second.

PreAttack

This one is the least interesting. Whenever you hit an enemy, this is called before any damage calculations are done. For example Giant Fork uses this to add the megacrit damage multiplier before any other damage is calculated.

PostAttack

Probably the most interesting one. Whenever you hit an enemy, this is called after the damage is calculated and dealt to the enemy. So when you hit an enemy, this is what happens:

  1. 0 → Damage is dealt to an enemy from a damage source.
  2. 1 → If the proc coefficient is 0 (for example a spicy meatball explosion), nothing happens. If the Proc Coefficient is larger than 0, for example any weapon projectile in the game or a Cursed Doll for example, we continue
  3. 2 → Check how many times to proc an item. Let's call it numProcs = 1 + (number of lamps)
  4. 3 → Call PostAttack on every item that has some proc effect. We call this numProcs times.

So if we hit an enemy with a Katana and we have a Spicy Meatball in our inventory, this will trigger a PostAttack from the Meatball. This post attack will check if the meatball explosion procs, and if it does, we keep track of how many times it proc'd this tick / frame. If we hit 50 enemies with our Katana in a single frame, and they all create explosions from the meatball, then we stop calling PostAttack this tick because Meatball cannot proc more than 50 times per tick.

Item Order

In the current patch, item order is simply decided by which order you pick up items. This goes for Tick, PreAttack and PostAttack. In the next patch, this will be changed to where they ordered by name for the most part. I'll post the actual order below.

The reason item order is important is the following:

Scenario 1: You picked up an Ice Cube and then a Spicy Meatball

You deal 500 damage to an enemy which makes an Ice Cube proc and kill the enemy. Since the enemy is now dead, the Spicy Meatball explosion never happens. You have killed 1 enemy in total.

Scenario 2: You picked up a Spicy Meatball and then an Ice Cube

You deal 500 damage to an enemy which makes the Spicy Meatball proc and kill the enemy. The explosion radius also kills surrounding enemies. The Ice Cube never procs, because the enemy died. You have killed 10 enemies in total.

Cursed Doll Item Order

The reason Cursed Doll and Spicy Meatball order matters is because of the following:

You have a Katana, and you hit 200 enemies every tick. This leads to your Spicy Meatball procing 50 times every tick (max cap).

You also have a doll, which deals a lot of damage to enemies. Now there are two possible orders here:

  • Cursed Doll → Spicy Meatball
  • Spicy Meatball → Cursed Doll

Generally you always want the Spicy Meatball first because of the Tick Order. Remember - whenever we tick, we reset the Spicy Meatball proc cap. So when we Tick, and Meatball is first in order, we reset the limit on the Meatball. Then the Cursed Doll will tick, deal damage to enemies and that damage will proc the Meatball to explode and damage nearby enemies.

But if you have the Cursed Doll before the Meatball this will not work anymore. Instead, your weapons will most likely proc the Meatball 50 times and hit the cap, then we call Tick which will now trigger your Cursed Doll before the Meatball resets. That means you have already hit the cap of 50, and the Meatball doesn't trigger.

Next Patch

For the next patch, as mentioned, order will be sorted by name, or rather by the name in the enum value:

Item Order (Next Patch):
CursedDoll, Anvil, Backpack, Battery, Beacon, BeefyRing, Beer, BloodyCleaver, BobDead, BobsLantern, Bonker, Borgar, BossBuster, BrassKnuckles, Cactus, CageKey, Campfire, Chonkplate, Clover, CowardsCloak, CreditCardGreen, CreditCardRed, CryptKey, DemonBlade, DemonicBlood, DemonicSoul, Dragonfire, EagleClaw, EchoShard, ElectricPlug, EnergyCore, Feathers, ForbiddenJuice, GamerGoggles, Gasmask, Ghost, GiantFork, GloveBlood, GloveCurse, GloveLightning, GlovePoison, GlovePower, GoldenGlove, GoldenRing, GoldenShield, GoldenSneakers, GrandmasSecretTonic, GymSauce, HolyBook, IceCrystal, IceCube, IdleJuice, JoesDagger, Kevin, Key, LeechingCrystal, LightningOrb, Medkit, Mirror, MoldyCheese, Oats, OldMask, OverpoweredLamp, PhantomShroud, Pot, Pumpkin, QuinsMask, Rollerblades, Scarf, ShatteredWisdom, Skuleg, SlipperyRing, SluttyCannon, Snek, SoulHarvester, SpeedBoi, SpicyMeatball, SpikyShield, SuckyMagnet, TacticalGlasses, TimeBracelet, ToxicBarrel, TurboSocks, UnstableTransfusion, WizardsHat, Wrench, ZaWarudo

This is to make sure Item Order doesn't matter anymore, and it's always consistent not matter what order you picked up the item.

Note that CursedDoll always procs first now. Mainly for consistency, but also to make sure it's not too strong late game.