Website Created by IndieSnek
Information directly from the Developer Ved (This is a copy paste from Discord)
Items generally do 3 things:
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.
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.
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:
numProcs = 1 + (number of lamps)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.
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:
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.
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.
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:
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.
For the next patch, as mentioned, order will be sorted by name, or rather by the name in the enum value:
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.