In this article, we're going to take a look at The Binding of Isaac: Afterbirth+ modding API and go over the basic steps to create a simple item mod for the game.
Modding is the act of modifying graphics and/or gameplay elements of the base game (in other words, creating mods). Modding for the Afterbirth+ and non-Afterbirth+ versions are very different, so they have been separated into two pages which are linked to above. Permissions and credits. A pack of challenges that was made a few years ago due to boredom, which I finally decided to share with others! I keep it short, but here are few things you need to know before playing this mod. First is that it usually focuses on themes, but there are challenges that are made to be difficult (to some extent). Binding of isaac afterbirth plus mod Category Name Mods Downloads Total size Last update New Areas / Scenarios 7 1,462 Apr 08, 2021 General Mods 40 64,765 Apr 08, 2021 New Weapons 19 4,979 Apr 07, 2021 Total / Partial Conversion Mods 1 146 Mar 03, 2021 New Gear / Armor 11 1,813 Apr 04, 2021 Battle Scenarios 1 568 Apr 03, 2021 Graphic - Spoiler. 250900 is The Binding of Isaac: Rebirth's ID on Steam. Inside this folder you will see many more numbered folders, these correspond to the id of each mod. You can see these numbers in links. Once you have located the problem mod, go into its folder and copy all the files inside over to its true location in the Binding of Isaac Afterbirth+ Mods folder.
Folder Setup
The first step to making a new mod is to navigate to your mods directory and create a new folder.
This new folder requires a few files and a specific folder structure to actually work correctly. In our case, we're going to be creating an item - so our mod will require a folder named content
a folder named resources
.
Inside of our resources
directory we need to add a few more folders. When done, our directory structure should look like so:
The reason that we have to structure the resources
folders in this way is because they directly map to the folder structure that the game already uses. We're essentially mimicking this structure so that the game knows where to find our files and pull them into the game.
Creating The Items File
Next, inside of our content
directory, we will need to create a new file named items.xml
. This file will contain the basic information for the item that we are creating in addition to a reference to the graphic that we will be using for it.
This file has to be located inside of the content
directory to work properly. Unlike the resources
directory, this breaks the pattern of mimicking the same location the the game already uses.
For the element, we just need to provide the root directory to find the graphics files that we will be using and the version of the API.
Inside, we added a new element which signifies that we are creating a passive item (for reference, the other options are
and
). On this element, we provide all of the necessary properties that that game will use.
First we provide it a name
and description
. These will be used directly inside of the game when the player picks up the item. Next, we have a couple function properties cache
and soulhearts
.
The cache
property values are used to trigger stat changes for the player. You will provide a corresponding cache value for every stat that you wish to modify.
The soulhearts
property values reflect how many soul hearts we would like to give to the player when they pick up this item. It is important to note that this numeric value corresponds to the smallest heart unit: the half-heart. So, in this case, we wish to give the player 3 full soulhearts so we must double the number assigned to this property.
Adding Your Item Graphics
Once you have successfully added your items.xml
file, we can now add in an image file for our item. Making the image from scratch is well beyond the scope of this tutorial, but all you need is to have an image that is 32px-by-32px and place it into the resources/gfx/items/collectibles/
directory that we created earlier. Just make sure that the image filename is exactly what you set as the value in the gfx
property of the item in the items.xml
file we created above.
Adding Logic
Our item is going to do basic stat updates for the player, similar to the various items already in the game that give increase all of your stats.
To do this, we need to add in some logic to tell the game which stats we would like to increase and by how much.
In the root directory of our project, create a new main.lua
file. Inside of the file, we'll first register our new mod and set a reference to the game.
This registers our new mod by passing in a string of 'My Mod'
and 1
, which sets the name of our mod and the API version we're using. A reference to our mod is then stored in the MyMod
local variable that we can now use within our code.
As an additional convenience, we've also created a game
variable to reference the game class.
Next, let's make some references to the item that we are creating and attach them to our mod. This will make it easier reference them throughout our code.
Next, we will begin setting up some various callbacks. These callbacks are what the game uses to trigger logic around events that happen in the game. We will be using these callbacks to execute custom logic for our item.
Since this item is going to update our stats, let's make a function called onCacheEval
and then assign it to the MC_CACHE_EVALUATE
callback. This will trigger the the onCacheEval
function anytime a cache update occurs.
The majority of this code should read fairly straightforward. We are simply writing if statements to check whether or not cache flags are set. These flags are the string values that we assigned to the cache
property of our item in the items.xml
file we created before.
The cache values are preset keywords defined by the game itself. So, these have to be exactly what the game defines to work properly.
The oddball in this set of code is where we are updating the fire delay. For some strange reason, this value must be updated within the code that checks the damage
cache flag. Unfortunately, I don't know a lot of detail behind this issue, but as soon as I find out I will update this to reflect the finer details.
Debug Placement
So, to easily test our item, let's setup a quick way to immediately spawn our custom item into the game as soon as we begin a new run.
Let's add in a debug variable that will hold a boolean value. This is what we will use to easily trigger our item in game for testing purposes.
At the beginning of our main.lua
file, let's add in a isDebugging
property after our mod and game references.
With that added, let's add in a new callback that will run on every game update.
The overall structure of this code should be familiar to you having completed the cache callback code above. This creates a new onUpdate
function and then assigns it to the MC_POST_PEFFECT_UPDATE
callback which is executed every time the game updates (every frame).
For more information on the various mod callbacks that the Afterbirth+ API gives us, check out this article on modding callbacks.
Now, we don't want the item to be added every single frame so we add in a bit of logic to only add the item when both the game frame count is 1
(aka the beginning of the run) and the isDebugging
property is set to true.
This will only spawn the item as the game is beginning and gives us a mechanism to easily toggle it's availability for when we are debugging.
Testing Your Item
With the code we have written above we can now open the game and begin testing our item. If all goes well, the game will book up normally and you will be able to access the 'Mods' menu item in the options and see your mod listed.
If the title of your mod is a red color, then it means that there is an error in your code. You will have to close the game and begin exploring the log files for the cause. We will be covering that next!
Go ahead and start a new run. When you spawn into the first room, your item should now be spawned in the middle of the room on item altar. You can pick it up and double check your item title and description and also ensure that the stats are properly being updated.
Debugging
So, what happens if things go wrong? The easiest way to debug any problems is to take a look at the log file that the game generates.
I will personally open this via the command line by running tail -f log.txt
which will keep displaying any updates to the log file so I don't have to keep reopening the file to see what went wrong.
Of course, this is just a simple text file, so you can open it up in a text editor if that works better for you!
Once you have identified the issue, jump back into your code and patch things up. Once you have a solution in place, you have a couple options.
You could just reboot the game, but that can be quite time consuming. So, the developers have given us another option via the in-game console that will allow us to reload our mod while the game is running.
To access the console, type `
while in the game. This will bring up a command line where you can run various commands. The command that we are interested in is luamod
.
To reload the mod, type luamod
followed by the directory name of your mod. In this case, it will be:
After running this command, it will provide you with a success or error message. If successful, press Enter
again to close the console and quickly jump back into the game.
I hope you've enjoyed this article and it has been insightful. I'm really quite pleased with the modding API after the initial learning curve. It definitely has some confusing turns and shortcomings but overall, it's a relatively easy way to get started and create your own mods for the game.
You feel something shining within you...
Thank you very, very much for the Mod's overwhelming reception and 50000+ Downloads!
This mod replaces characters, music, bosses and floors with Undertale content! Enjoy!
by Cake and Opscat
Contact
![Binding Binding](http://orcz.com/images/thumb/c/c0/BindingofIsaacRebirthFamine.jpg/400px-BindingofIsaacRebirthFamine.jpg)
Our Subreddit!
The Mod's blog
Q: Do I need Afterbirth for this to work?
A: No. Inside the folder, you can see there is a 'Rebirth only' folder.
Q: Where's Toriel, Asgore and Chara?
A: You installed the Special version. Re-install the mod, but only Install the Basic version, not the Special one, and you'll get those characters.
Q: My game Crashes!
A: Install the mod, then delete Costumes2.xml. Be aware that this might cause characters to change appearence
when collecting some items.
Q: I'm in Snowy/Waterfall and the screen is pitch black!
How to fix:
Go inside resources/gfx/Background and delete the 'Black' images. Those being: 8bitclouds_64,8bitclouds_64_black,8bitclouds_642,8bitclouds_643,blue_overlay and orange_overlay.
Q: I see a credits page, but not the Challenge page! Where is it?
A: If you want to see the challenges, just go inside gfx/ui/main menu and delete challengeph.png
![Binding of isaac mods wiki Binding of isaac mods wiki](https://external-preview.redd.it/QmTPZkj8YOVCcp9K8QgtbSiJoNw8NIzzFN834oeRY_I.jpg?auto=webp&s=391576b0681a302cf081f587ca9eda7ce0fd1509)
A: As far as we know, it's compatible with mac. It's super buggy with Linux and we plan on fixing of it later.
Q: I found a bug! Where can I report it?
A: Either Private Message me through Steam or the mod's blog.
Q: Can I suggest/submit stuff?
A: Yes! Either go to the mod's blog or post a comment in this comment section.
- The mod can be very glitchy on Linux and Mac.
- Rebirth modding is janky, so expect glitches in the Rebirth-only version.
_ In Snowy Rivershore and Waterfall, the screen might go black, but you can still hear the sound. Read the FAQ, you can find the answer there.
-Bugfix for Mac:
http://moddingofisaac.com/mod/1027/bindingofundertale-elcapitanfix
-More reskins. (Taking Suggestions!)
SwingPoynt: https://www.youtube.com/watch?v=Zv1446FOAhY
SwingPoynt v2: https://www.youtube.com/watch?v=7ku56ChHm_I
Jacksepticeye: https://www.youtube.com/watch?v=vIp8YEmAimE
iVertrox (Spanish): https://www.youtube.com/watch?v=_AGvQtFw9MQ
Lumoblaze: https://www.youtube.com/watch?v=dIh2eZR8Sis
HOW TO INSTALL VIDEO by Zenofirex: https://www.youtube.com/watch?v=SvLa1zKY6rU
Special Thanks to:
Patkall - Sprites
FAz - Sprites
SoaringSparrows - Original Concept
IKARUS - Song Credit
![Binding of isaac mods with achievements Binding of isaac mods with achievements](https://i.ytimg.com/vi/8AVkokHGIGM/maxresdefault.jpg)
/u/Haylex - Tem Shop Mod
Draexzhan - Miscellaneous Item Sprites
reijigazpacho - Logo
Felix (stupid-doo-doo-butt.tumblr.com) - Nightmare Sprites and the Omega Flowey boss
Sophomore - Miscellaneous Item Sprites
/u/otherhand42 - Miscellaneous Help
engineerthecowboy - Rebirth Testing
Toby Fox - Undertale
- Last support for the Rebirth and Afterbirth versions
- Refer to the link on the top of the page for the Afterbirth+ and Repentance versions!
- Updated character Nightmare and Boss sprites
- Added some items, visuals and bugfixes to the Rebirth and AB versions.
- 20+ New items and 3 transformations, by the talented FAz!
- Community Update: 20+ items and a Flowey transformation, by the amazing /u/Patkall! Thank you!
- Fixed compatibility with the newest Isaac patch.
- More items
- New version whenever Afterbirth+ Hits
- Rebirth Support! (Thanks to engineerthecowboy for testing!)
- Community Made items!
- More items, like Muffet's Pet and Lil' Whimsalot!
- New character: Mad Dummy!
- Made it easier to understand how to install/know what version you're using.
- Small item replacements.
Binding Of Isaac Mods For Xbox One
- Balanced some stuff.
- Fixed Special Version having a hybrid of Gaster and Temmie.
- Two New Characters, Gaster and Temmie.
- Two new end bosses, Omega Flowey and God of Hyperdeath Asriel
![Isaac Isaac](https://indiefaq.com/wp-content/uploads/2020/09/The-Binding-of-Isaac-Rebirth-1024x605.jpg)
Our Subreddit!
The Mod's blog
Q: Do I need Afterbirth for this to work?
A: No. Inside the folder, you can see there is a 'Rebirth only' folder.
Q: Where's Toriel, Asgore and Chara?
A: You installed the Special version. Re-install the mod, but only Install the Basic version, not the Special one, and you'll get those characters.
Q: My game Crashes!
A: Install the mod, then delete Costumes2.xml. Be aware that this might cause characters to change appearence
when collecting some items.
Q: I'm in Snowy/Waterfall and the screen is pitch black!
How to fix:
Go inside resources/gfx/Background and delete the 'Black' images. Those being: 8bitclouds_64,8bitclouds_64_black,8bitclouds_642,8bitclouds_643,blue_overlay and orange_overlay.
Q: I see a credits page, but not the Challenge page! Where is it?
A: If you want to see the challenges, just go inside gfx/ui/main menu and delete challengeph.png
Q: Is this compatible with Mac/Linux?
A: As far as we know, it's compatible with mac. It's super buggy with Linux and we plan on fixing of it later.
Q: I found a bug! Where can I report it?
A: Either Private Message me through Steam or the mod's blog.
Q: Can I suggest/submit stuff?
A: Yes! Either go to the mod's blog or post a comment in this comment section.
- The mod can be very glitchy on Linux and Mac.
- Rebirth modding is janky, so expect glitches in the Rebirth-only version.
_ In Snowy Rivershore and Waterfall, the screen might go black, but you can still hear the sound. Read the FAQ, you can find the answer there.
-Bugfix for Mac:
http://moddingofisaac.com/mod/1027/bindingofundertale-elcapitanfix
-More reskins. (Taking Suggestions!)
SwingPoynt: https://www.youtube.com/watch?v=Zv1446FOAhY
SwingPoynt v2: https://www.youtube.com/watch?v=7ku56ChHm_I
Jacksepticeye: https://www.youtube.com/watch?v=vIp8YEmAimE
iVertrox (Spanish): https://www.youtube.com/watch?v=_AGvQtFw9MQ
Lumoblaze: https://www.youtube.com/watch?v=dIh2eZR8Sis
HOW TO INSTALL VIDEO by Zenofirex: https://www.youtube.com/watch?v=SvLa1zKY6rU
Special Thanks to:
Patkall - Sprites
FAz - Sprites
SoaringSparrows - Original Concept
IKARUS - Song Credit
/u/Haylex - Tem Shop Mod
Draexzhan - Miscellaneous Item Sprites
reijigazpacho - Logo
Felix (stupid-doo-doo-butt.tumblr.com) - Nightmare Sprites and the Omega Flowey boss
Sophomore - Miscellaneous Item Sprites
/u/otherhand42 - Miscellaneous Help
engineerthecowboy - Rebirth Testing
Toby Fox - Undertale
- Last support for the Rebirth and Afterbirth versions
- Refer to the link on the top of the page for the Afterbirth+ and Repentance versions!
- Updated character Nightmare and Boss sprites
- Added some items, visuals and bugfixes to the Rebirth and AB versions.
- 20+ New items and 3 transformations, by the talented FAz!
- Community Update: 20+ items and a Flowey transformation, by the amazing /u/Patkall! Thank you!
- Fixed compatibility with the newest Isaac patch.
- More items
- New version whenever Afterbirth+ Hits
- Rebirth Support! (Thanks to engineerthecowboy for testing!)
- Community Made items!
- More items, like Muffet's Pet and Lil' Whimsalot!
- New character: Mad Dummy!
- Made it easier to understand how to install/know what version you're using.
- Small item replacements.
Binding Of Isaac Mods For Xbox One
- Balanced some stuff.
- Fixed Special Version having a hybrid of Gaster and Temmie.
- Two New Characters, Gaster and Temmie.
- Two new end bosses, Omega Flowey and God of Hyperdeath Asriel
- HP up item reskins
- Some music added
- Napstablook now Starts with Dapper Blook
- Frisk starts with Purity (Soul Colors)
- Between level ('Nightmare') sprites, courtesy of @stupid-doo-doo-butt
- Only a small amount of items now change your character.
- Asgore, Sans, Mettaton, Toriel, Asriel and Undyne have new costumes wich will help prevent their appearence to change.
- Fixed some naming stuff
- Made the Character menu less messy
- Toriel starts with proper items
- Blue womb is not dunked up anymore
- Characters don't have their items because you didn't unlock them was fixed
- Napstablook glitches when picks up a item was fixed
- Frisk doesn't have Isaac's heart, just <3
- Papyrus lost 1 heart container inside his spaghetti
- Mettaton has better bombs and Tech.5 (not tech 2)
Binding Of Isaac Mods
Binding Of Isaac Mods Disabled
Binding Of Isaac Mods No Steam
Binding Of Isaac Mods With Achievements
Oh nice mods
Binding Of Isaac Mods Achievements
Binding Of Isaac Mods Steam
anyone have a idea for fixing this?