The Binding of Isaac: Rebirth

The Binding of Isaac: Rebirth

StatAPI
Crashington 8 Jan, 2018 @ 10:32pm
Questions
Questions on how to use the statsapi
Last edited by Crashington; 8 Jan, 2018 @ 10:33pm
< >
Showing 1-3 of 3 comments
Crashington 8 Jan, 2018 @ 10:34pm 
how do you go about, for a simple example, make breakfast raise your damage by one every tick?
so a simple dynamic stat change
『Sora』  [developer] 9 Jan, 2018 @ 10:17am 
Okay, so since that is not just an effect you want for an item in general right? You would only want it to start ticking up when you picked up breakfast - that part you are going to have to check yourself. You will also need to store a variable to tick up whenever the player has breakfast, the same way you would if you were doing it yourself. Now, usually youd have to call the cache callback every tick then to make sure that the damage is applied properly (and that wierd schenanigans arent happening instead) - and basically just instead of making your own cache callback and all that, make a FlagTable, and throw it to statAPI:CacheItem(CollectibleType.COLLECTIBLE_BREAKFAST,StatsTable, stackable)

Pretty much, all you need to do to change dynamic stuff like that is instead of writing your cache callback, wherever youd usually call the cache, just use the stats api's Cache functions.

If you want it not based on an item, use CacheNull - but do keep in mind that has to be removed when you don't want the effect, and none of the tables are saved and stored by the statAPI - its just to replace the Cache Callback, effectively.
『Sora』  [developer] 9 Jan, 2018 @ 10:17am 
If that didn't make sense I can try explaining it again and use code examples to show it off better lmao
< >
Showing 1-3 of 3 comments
Per page: 1530 50