Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Be warned about base tears though - whatever change you apply needs to be multiplied by 1000. So if you want to change base tears by +0.7 (like sad onion) then you need to do player.MaxFireDelay += 700
If you need more help let me know and I can provide an example.
The log.txt outputs infinite repetitions of:
"[INFO] - [Stats API 2.0] Error in "PostEvaluateItems" call: ...f Isaac Afterbirth+ Mods/statapi 2.0_1431542487/main.lua:119: attempt to call a nil value (field 'Func')"
...and I can't for the life of me figure out why.
The old version I just copied code from 1.0 which because of a change in structure was causing deadeye to either just not work or to crash the game. This patch should fix that :P
player.MaxFireDelay = player.MaxFireDelay + 0.7*1000
end
stats:AddCache(mod.TearsUp, CacheFlag.CACHE_FIREDELAY, StatStage.BASE)
That's the simplest way to do it. If you want to have more than one stat upgrade in the same function though, you gotta make a small change.
function mod:StatsUp(player, cacheFlag, stage)
if cacheFlag == CacheFlag.CACHE_FIREDELAY then
if stage == StatStage.BASE then
player.MaxFireDelay = player.MaxFireDelay + 0.7*1000
end
elseif cacheFlag == CacheFlag.CACHE_DAMAGE then
if stage == StatStage.MULTI then
player.Damage = player.Damage*2
end
end
end
stats:AddCache(mod.StatsUp)
= stats.LoadSave(data) at the beginning of your load file.
Check the description above.
...So I might need to put your 'savedata' in my table with datavalues before saving and before loading. Idk
https://imgur.com/a/Iw6Efku
I took a tears up pill, torn photo and tech x. And after I tried to pick the halo, I find myself unable to shoot...
Awesome! :D
Srry to be so picky, but could you make something like a 'banlist' for collectibles or what not that checks whether the whole list stays above the cap of 5?
Good mod though, it solves what was missing before (a decent way to make accurate stat changing items)
Honestly its easier to add stat items with stat api 2.0 imo, cuz you can specify stuff like cacheflag or whatever right in the addcache so its a win/win for me
That should probably fix my problems, thx for the quick response!
alternatively, any other mods that use a more updated version will override your old version if played with them so
Likely what im guessing is either you didnt add the file to your own mod files and require it, or you did but you didnt require it at the top of your lua. You CAN run the mod without requiring the actual file in your mod - but then you have to check for stats before you can use it, and if your mod loads before stats, then you have to add the cache callbacks to it from like PostGameStarted instead - so its a little hassle. That is why I designed it to allow you to just copy statsAPI.lua from the mod folders to your mod and just have you require it :P
https://imgur.com/a/FNl6p1U
(my mod is supposed to keep upping the damage every time you use book of belial, for bossrush and what not)
Maybe I did something wrong here, but it seems from looking at the errors the console spews back at me that the 'stats' keyword isn't available before I reload my mod?
btw nice mod