The Binding of Isaac: Rebirth

The Binding of Isaac: Rebirth

Pudding And Wakaba [REP(+)/RGON/WIP]
리셰  [developer] 24 Aug, 2021 @ 6:39pm
Adding extra Book of Shiori combos
Outdated, check this link.

https://github.com/kohashiwakaba/Pudding-Wakaba/wiki/Adding-Book-of-Shiori-function







Book of Shiori activates two types of extra effect for activating book items. One is temporary extra effect, the other one is keep actiive until next book is used.Modded items can also be activated through adding functions.

Below is the example to adding Book of Shiori combinations.

local myItemID = Isaac.GetItemIdByName("My Custom Item") if wakaba then local myFunction = function(player, rng, useflag, slot, vardata) print("Player", player:GetName(), "used the Custom Item!") end wakaba:AddBookofShioriFunc(myItemID, myFunction) end

The other effect can be applied by setting wakaba.nextshioriflag value to EntityPlayer.
The function will still work even if wakaba.nextshioriflag is not set, instead the current Book of Shiori combinations will not be changed or reset.

local myItemID = Isaac.GetItemIdByName("My Custom Item") if wakaba then local myFunction = function(player, rng, useflag, slot, vardata) player:GetData().wakaba.nextshioriflag = myItemID -- Below 2 lines is also needed because changing next flag also cancels previous flag. player:AddCacheFlags(CacheFlag.CACHE_ALL) player:EvaluateItems() end wakaba:AddBookofShioriFunc(myItemID, myFunction) end local function exampleCache(player, cacheFlag) if not player:GetData().wakaba then return end local nextflag = player:GetData().wakaba.nextshioriflag if nextflag == myItemID then -- do something end end

Note : Book of Shiori combinations does not have tag limitations. So any active item can be added extra effects.
Last edited by 리셰; 19 Jul, 2023 @ 7:58am