Transformation API

If you liked this item, please rate it up on Steam Workshop page.

Author: Mips96

Last revision: 27 Jun, 2022 at 23:13 UTC

File size: 44.03 KB

On Steam Workshop

Description:

• Preconfigured for 50+ items
• Recommended for AB+ only (see description)

Are you tired of modded books not counting toward Bookworm? Shouldn’t new mushrooms give Fun Guy? The Transformation API (actually it’s a library, but too late to change the name now) adds transformations to over 50 modded items and makes it very easy to give a transformation to your own item! You can also give additional transformations to official items in case you think Brimstone is underpowered and want it to also count toward Guppy. It even adds the new transformation to the item’s External Item Description.

Items currently preconfigured in this mod

Here is a list of all modded items currently preconfigured in the library.[pastebin.com] If you have any of these items installed, enabling this mod is all you have to do to make these items count toward transformations. If you know of a modded item that would make sense to count toward a transformation, leave a comment with the item’s exact name as it appears in-game and I might add it. Or if you want to add an item yourself…

How to add a transformation to your own item

For Repentance players, the current modding API allows you to add a transformation to your item via the official "tags" tag in items.xml. For everyone else…
Adding a transformation to your own item (or an official item, or someone else’s modded item) is very easy. All you have to do is add a single line of code to your mod’s MC_POST_PLAYER_INIT callback:

if TransformationAPI ~= nil then TransformationAPI:addItemsToTransformation(TRANSFORMATION, {ITEM_1, ITEM_2, ETC}) end

… And that’s it! (see examples below)

Replace TRANSFORMATION with the name of the transformation (all transformations are supported except Adult and Stompy since they require pills; also, though Super Bum is technically supported, it is untested and not recommended due to how Super Bum works):

"beelzebub", "guppy", "bob", "conjoined", "funguy", "leviathan", "ohcrap", "seraphim", "spun", "superbum", "yesmother", "bookworm", "spiderbaby"

And replace {ITEM_1, ITEM_2, ETC} with an array containing the IDs of each item you want to add (even if you’re only adding one item, it still needs to be in an array).

For example, if you wanted Little Gish to count toward the Spider Baby transformation, you would include the following line:

if TransformationAPI ~= nil then TransformationAPI:addItemsToTransformation("spiderbaby", {Isaac.GetItemIdByName("Little Gish")}) end

Or if you wanted to add Seraphim to both Mini Mush and a modded item called Lucky Sevens (which is made up), you would include this line:

if TransformationAPI ~= nil then TransformationAPI:addItemsToTransformation("seraphim", {Isaac.GetItemIdByName("Mini Mush"), Isaac.GetItemIdByName("Lucky Sevens")}) end

Repentance Disclaimer

This mod has been partially updated for Repentance; however, it is not recommended. It was made back when adding a transformation to an item was a complicated and tedious process, but Repentance lets you simply add a tag to an item corresponding to a transformation, making this mod obsolete. It probably works fine with Repentance (albeit single player-only), but I recommend that you only use this mod if you are playing AB+.