The Binding of Isaac: Rebirth

The Binding of Isaac: Rebirth

Guaranteed Start
Neophyte 19 Jul, 2023 @ 3:14pm
(REP) Manual Fix for Mod
Found a fix to make this work for just the first stage. I don't know if it makes a difference, but I have AB+ & REP. Considering nothing specific is referenced in the script, this should fix the mod for Base, AB+ & REP. I'm hopeless with this sort of stuff but I found some good info on the BoI GitHub API docs page - https://wofsauge.github.io/IsaacDocs/rep/index.html

Follow below steps to fix the mod

Navigate to - C:\Program Files (x86)\Steam\steamapps\common\The Binding of Isaac Rebirth\mods\guaranteed start_1264802784 (Or wherever your install is)

Open "main.lua" in a text editor, (ideally Notepad++, works fine in Notepad too)

Go to line 144 or search for the following line near the bottom of the page

if (itemPoolType == ItemPoolType.POOL_TREASURE) and (Game():GetLevel():GetCurrentRoom():GetType() == RoomType.ROOM_TREASURE) then

Highlight/delete it and replace it with the following:

if (itemPoolType == ItemPoolType.POOL_TREASURE) and (Game():GetLevel() == LevelStage.STAGE1_1) then

Stage1_1 refers to Basement 1, Cellar 1, Burning Basement 1, Downpour 1, Dross 1. I have tested this on 10 separate runs and a number of times I have got quality 1-2 items, so I know it's not running the mod on those treasure rooms. Personally I have set the "useItemList" at the top of the lua to "true" and made my own list of items I would like to see appear. I have tested it with both this setting set to "true" and "false" and got the desired effect.

Hope this helps, I used to use this mod years ago before REP came out, was bummed when it didn't work and did a little diving. Enjoy
Last edited by Neophyte; 19 Jul, 2023 @ 3:34pm
< >
Showing 1-4 of 4 comments
Permamiss 23 Jul, 2023 @ 7:06pm 
Shouldn't it be changed to:
if (itemPoolType == ItemPoolType.POOL_TREASURE) and (Game():GetLevel():GetCurrentRoom():GetType() == RoomType.ROOM_TREASURE) and (Game():GetLevel() == LevelStage.STAGE1_1) then
Last edited by Permamiss; 26 Jul, 2023 @ 12:34am
Neophyte 24 Jul, 2023 @ 2:07pm 
Originally posted by Permamiss:
Shouldn't it be changed to:
if (itemPoolType == itemPoolType.POOL_TREASURE) and (Game():GetLevel():GetCurrentRoom():GetType() == RoomType.ROOM_TREASURE) and (Game():GetLevel() == LevelStage.STAGE1_1) then

The main error I encountered when trying to fix the mod, was the "RoomType.ROOM_TREASURE" was causing the crash. In the line of code you posted, because of the "and", the code will have to meet both conditions to run successfully. It'll attempt to define the room type and crash at that point. That's why I removed it from the original and replaced it with the suggested line in the OP. I don't know why it doesn't like the "RoomType" bit, it's just the conclusion I came to when testing what line breaks it.

If it works for you with the code you entered, that's great. Honestly i'm pretty clueless when it comes to this and it was trial and error, if you've figured something out I've missed, please explain so I can learn and make it better. Thanks
Permamiss 26 Jul, 2023 @ 12:41am 
Originally posted by Neophyte:
Originally posted by Permamiss:
Shouldn't it be changed to:
if (itemPoolType == itemPoolType.POOL_TREASURE) and (Game():GetLevel():GetCurrentRoom():GetType() == RoomType.ROOM_TREASURE) and (Game():GetLevel() == LevelStage.STAGE1_1) then

The main error I encountered when trying to fix the mod, was the "RoomType.ROOM_TREASURE" was causing the crash. In the line of code you posted, because of the "and", the code will have to meet both conditions to run successfully. It'll attempt to define the room type and crash at that point. That's why I removed it from the original and replaced it with the suggested line in the OP. I don't know why it doesn't like the "RoomType" bit, it's just the conclusion I came to when testing what line breaks it.

If it works for you with the code you entered, that's great. Honestly i'm pretty clueless when it comes to this and it was trial and error, if you've figured something out I've missed, please explain so I can learn and make it better. Thanks

My apologies, I had a typo in the original version I posted. Please try this instead:
if (Game():GetLevel() == LevelStage.STAGE1_1) and (Game():GetLevel():GetCurrentRoom():GetType() == RoomType.ROOM_TREASURE) then

I trimmed some of the original code. I got rid of the itemPoolType == ItemPoolType.POOL_TREASURE bit since I believe there is a possibility of that portion of the code causing the mod to not function properly if you start an Eden run with Chaos.

In short, this new version of my code will check for 1) if they are on the first floor and 2) if the player has entered a Treasure Room. I believe this version of the code should work the best for most people! :dip:
When I debugged with my local run, the `Game:GetLevel()` returned an object and not a level stage.
Instead I've changed to
`if (Game():GetLevel():GetStage() == LevelStage.STAGE1_1) and (Game():GetLevel():GetCurrentRoom():GetType() == RoomType.ROOM_TREASURE) then` (notice the GetStage() at the end)
< >
Showing 1-4 of 4 comments
Per page: 1530 50