Changing the tears stat
Author(s): catinsuranceTags:
Creating an item that gives a simple tears up or down is more complex than it may appear.
Explanation⚓︎
Making a simple item like Sad Onion is actually a bit complicated, because the tears stat as displayed in the FoundHud in Repentance(+) is not the same as what we change internally.
The game uses something called MaxFireDelay, or tear delay, which is the minimum amount of game updates (30 game updates per second) before another tear can be fired. You can find more information about it here, on the wiki.
The in-game display of the tears stat is your tears per second, or your fire rate. To get the tears per second from the MaxFireDelay, use the following:
1 2 3 |
|
Conversely, you can get the MaxFireDelay from the tears per second using the following:
1 2 3 |
|
Example⚓︎
Now we can put it all together. The following is technically a "fire rate" up, since a "tears up" follows the soft cap of 5 (depending on the character you're playing).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
|