Yeah, there is. I already edited the itempools.xml file. http://www.filedropper.com/itempools
Edit.: You might know, where to put this, but for the people who don't: Copy this file to "[XX]:\Steam\SteamApps\common\The Binding of Isaac Rebirth\resources
A new post on the Isaac website confirms that the new dlc will have lua support, which would probably be neater than anything we could hack together from just the machine code. Now we just have to wait...
To make edit rooms in the original you are going to need a few things. First you need to get the swf file of the game, there is a tutorial HERE that can help. Then you will need to download JPEX flash decompiler. Now when that is finished installing open it you will need to add the Isaac swf file to that program (simply drag and drop the swf file in to it) and you should have a screen that looks like [THIS](). Then click on the sprites tab, Each room is it's own sprite and I found which ones go to which
(Sprite 6591 = basement,
Sprite 6599 = caves,
sprite 6607 = depths,
sprite 6634 = womb,
sprite 6630 = Sheol,
sprite 6665 = Special/boss rooms,
sprite 6670 = cellar,
Sprite 6674 = catacombs,
Sprite 6678 = necropolis,
Sprite 6680 = utero,
Sprite 6682 = cathedral,
And Sprite 6684 = Chest )
Now just expand one of these sprites and then each frame of each sprite is a Room. Just expand one of the frames in it will give you two kinds of tags RemoveObject and PlaceObject, don't do anything with Remove Object but with PlaceObject you can click on one it it will have some things on the right for you to mess around with, It should look like [THIS](). Now there is two things in here you want to change, there is the CharacterId and the Metrix tab. The characterid is what the kind of object is (item pedistal, rock, etc) and the metrix tab is where the item is placed in the room. I can go more into detail later because I need to sleep D:
well, Lua as a whole is bigger than Isaac Lua. https://www.lua.org/pil/contents.html is a great source for learning base Lua (i recommend you at least look at some basic stuff) and then there are many YouTube tutorials for learning the Isaac part.
https://www.youtube.com/playlist?list=PLMZJyHSWa_My5DDoTQcKCgs475xIpQHSF this is a great tutorial series for Isaac.
Hey GremiousGremy,
If you are looking to repeat anything X-amount of times I would suggest lua's for loop! A for loop runs a piece of code for a specified amount of time that you can control. (see the documentation here) An example of a for loop in your code may be something like this:
local cainsmark = RegisterMod("Cain's Mark", 1) local item = Isaac.GetItemIdByName("Cain's Mark")
function cainsmark:item_effect(_cainsmark) local room = Game():GetRoom() local player = Isaac.GetPlayer(0) for i = 1, 7 do Isaac.Spawn(EntityType.ENTITY_EFFECT, EffectVariant.CRACK_THE_SKY, 0, room.GetRandomPosition(), Vector(0,0), player) end end
cainsmark.AddCallback(ModCallbacks.MC_ENTITY_TAKE_DMG, cainsmar.item_effect, EntityType.ENTITY_PLAYER)
Hope this helps! Happy Modding!
-TheCrifix
reversed: https://clyp.it/pgn2kxez
Used twistedwave online audio editor. there were multiple channels that were combined into one by this audio editor, maybe something can be found on the different channels (use OP's recording, this has mono stereo)
Hello!
I looked your code and I tried to make my own function and stage detecter to apply a stat or do anything you want Here is the code = https://hastebin.com/omipiroyil.lua Please read the commentaries that I put, it explains a lot of things. I don't know how exactly cache works on this cases so I put a else statement to set false the FloorVisited variable if the player is not in the floor anymore, I don't know if that will keep the damage up from older rooms, If it doesn't work then use this code https://hastebin.com/ovulefoyoc.lua (without the else statments, so the variables will always be true and the stats will stay even if the player isn't anymore in the floor (I suppose).
I hope this can help a little :)
Here's a table of TearFlags: https://hastebin.com/xaqudunuba.hs You HAVE to add the table somewhere in your lua for this to work. OR you can copy the actual value for the flag rather than using the name.
So what you'd want to do is tearvar.TearFlags = tearvar.TearFlags + TearFlags.FLAG_RUBBER_CEMENT
Try this if you're stuck in that room. It'll remove the enemies so you can leave the room.
But doors that can't be bombed, that's new to me. I'll probably remove the enemy rooms next patch, they're more trouble than it's worth. Third time they give me problems.
And thank you very much!
no
the easiest ways are basement renovator and turn the original copy and both mods to xml format. then use text compare with the original and one of the modded ones. copy every room highlighted blue from notepad++(wont work staright from webstie) and paste them in the xml of the other one at the bottom
As a tip, if you something interesting on the workshop or just want to see how something was made, download the mod and look at its main.lua file.
I also recommend downloading ZeroBrane Studio and installing this in ZeroBrane's installation folder. It's an API that autocompletes Afterbirth+ related stuff.
i would recommend using "JPEXS Free Flash Decompiler". Use that programm to extract all Isaac Sprites up to WotL from the "SpiderMod" version of the game.
(Source: Im the author of the "ReFlash" mod, which replaces all isaac sprites with the old flash ones.)
if you got an Android phone I can recommend this app (it has an Item recognizer tool with the camera, works really good): https://play.google.com/store/apps/details?id=com.alpetra.guideisaacrepentance
Here is your mod working: https://hastebin.com/uhoqibuzok
It's hard to tell exactly what errors you had because reddit's formatting is really bad for code. In the future I recommend using hastebin or something similar. Also, you can join the moddingofisaac discord for faster answers.
I added local Game = Game() just so you it's easier to type. Your main error was in the Isaac.Spawn line because you missed a comma before nil. When you run your mod you should always press the ` key (above tab and beside 1) to see if your mod has errors.
The error given was: Dabloon/main.lua:12: ')' expected near 'nil'
This error tells you that something went wrong in line 12 so now you immediately know where to look for errors.
(Sometimes the error message isn't helpful like in this case it says missing parenthesis instead of missing comma but all you really need to see is the line number.)
Actually, I did (and I'll link you to a fixed version of the song). (If you're on Windows), if you right click on the song, click properties, then click on the "Details" tab at the top of the properties box and scroll down in there, you'll find next to "Audio Sample Rate" it'll say 48kHz. For an unspecified reason, the game only loads .ogg's that have the "Audio Sample Rate" set at 44.1kHz (it'll simply say 44kHz). That's what was causing this issue.
So for future reference, make sure the songs are saved at 44.1kHz instead of 48kHz. (Also, I'm loving this WIP mod ^u^)
Fixed song: The Depth (TLoZ Music Mod)
MLG ITEMS 2 OUT YEAH! Spoonbender -> Aimbot | Mutant Spider -> Spodermen | Polyphemus -> OpTic Gaming | The Ludovico Technique -> Weed Controller
k thx bye
AYY RCBLAZING HERES DA REAL MVP! :D ~~I did some changes~~ I smoked some weed: | My Little Unicorn = Weed | Bobs rotten head = Sniper | Bobs Brain = Nuke | Mysterious Liquid = Scuf Gaming | BRIMSTONE = FAZE
i dont know how 2 change da bubz brain flying animation its just for the pickups :D
btw thanks 4 using my loomy narty <3
Edmund has stated that the "unfair challenges" (Speed likely being one of them) will be addressed in a patch that should arrive very soon ("early this week"). Considering that you've done almost all other changes fairly, are you sure want to cheat through this one right now?
this is the entire code now, like this not even the luck up works so there must be some critical error in there
the heartvariables part made the game crash after holding r, probably because i did something wrong with the part where it saves the variable, so i left that out
the log says "'then' expected near '='" but i cant find where a 'then' would be missing
EDIT: the problem seems to be within the immuneToDamage function, because the rest works if i disable that.
The code also still doesn't recognize when LightTravel is finished playing (I think line 32 isn't correct), do you know how to fix that?
Thanks for your help by the way :D
the code looks like this now. Like this the entire thing doesnt work, not even the luck up. I think it doesnt work because the name AnimateLightTravel in
if sprite:IsFinished("AnimateLightTravel") == true then is incorrect, but i dont know where to find animation names
all i can find in the log is "function arguments expected near '=='"
When i turn some parts into comments to make Game():ChangeRoom(level:GetPreviousRoomIndex()) work it teleports me to a random room instead of the previous one, do you know how to fix that?
You had errors in your code, which prevented it from loading. ModCallbacks.MC_POST_GAME_START wasn't a valid callback, so the game threw an error.
https://hastebin.com/watadaxaqu.lua respawns the item every run and spawns unmodified maggots when you're hit.
I loaded your script in Isaac, you renamed the variable you were saving your item's id to but forgot to update the variable throughout your code.
Stool.COLLECTIBLE_STOOL_ITEM -> COLLECTIBLE_STOOL_ITEM
https://hastebin.com/ezelofahig.lua is a working version.
It should theoretically work, but there are a few notes:
https://hastebin.com/wofokediko.lua can be used for a side-by-side comparison.
I just realised your code is completely wrong. You can't just use BombExplosionEffects without telling what to use it, BombExplosionEffects is a function of Game(), which you can find it in documentation here. However when I look at your parameters for your BombExplosionEffects, they don't match what it says in the documentation however they match another functions' parameter which is Isaac.Spawn(). So your code should be like this.
Ah, I wasnt sure how to type cast in LUA thank you
it worked! https://hastebin.com/ayewajeduf.lua
unfortunately i dont know what any of this output means. AANNND I dont see Name listed. Technically I'm looking for anything backdrop related and I'd know if I was seeing the right properties if I also saw the Name property.
I bet it's located in that second layer of userdata labeled 013A8454
This is a nice idea for a mod series. Maybe it could give you a stat change or something as well? Although I don't have a suggestion for that.
A comment on the code: The whole bit operations framework is unnecessary. Whatever version of lua is being used by the API already supports bitwise operators as evidenced by the big TearFlags table full of bitshifts. Actually the table's wrong (it's off by 1), but it doesn't matter because you're not using it. If you want, you can drop the entire bit/setbit/hasbit/clearbit thing and do one of these things:
Replace the table with the corrected one at https://hastebin.com/raw/onovihirov and do something like this:
player.TearFlags = player.TearFlags + TearFlags.FLAG_SPECTRAL --Adds spectral
Or drop the table entirely and do it with bit operations yourself:
player.TearFlags = player.TearFlags | 1 --Adds spectral
The code snippet can be found here: https://hastebin.com/isehenituw.lua
I thought that the player move speed would be reflective of previous updates made to it. So what you're saying is that you need to keep track of the cumulative stat increase of that pill and then apply it during the cache each time Isaac uses the pill?
You probably messed up the syntax somewhere, like putting a bracket in the wrong place or a value the game doesn't understand. Try comparing your version and the original with text compare and see if you can find anything off.
There's no automatic process yet AFAIK, but you can do it manually by combining the changes both of them make to the original file. I find Text Compare useful for this sort of thing.
Lua is semi-common as a modding language. This game engine uses Lua: https://www.lexaloffle.com/pico-8.php
Lua is pretty distant from C; C is typed and very reliant on memory allocation. Of all languages I'm aware of, Lua is closer to Javascript, then possibly Python or Ruby. But once you know a few languages each new language is easier. (Except C and C++. those are always horrible)
This is a good place to start looking into disassembly of C++ executables; it's a thorough tutorial, but general (not specific to Isaac).
Knowledge of C++ and Assembler will obviously help a lot.
I was reading up on LUA's docs to see if I could figure it out. I found this chapter in the LUA manual.
Turns out, it depends on how the method is actually coded.
function ClassName.MethodName(arg1)
-- This method is (more or less) a static method, where the only argument is arg1
end
function ClassName:MethodName2(arg1) -- this method has a hidden self argument and is more or less a standard OO method. end
The problem is that not only is this set in the method declaration, but you have to call it with the correct syntax too.
Unfortunately, Doxygen is a C++ documentation tool and the docs it produces use C++ style of ReturnType ClassName::MethodName(type arg1)
. Otherwise, we would be able to see which type of call we need just from the documentation.
At least some methods are obvious when they're static or normal just from their names and arguments.
>Do you have any pointers?
ayy lmao
Well, C is a simple language in its concept. I suggest you steer clear from things like Learn C The Hard Way and instead focus on things like this. You can also buy some books, obvious choice is this one. Then practice and practice, do more basic stuff, maybe possibly check out graphics stuff like OpenGL, SDL or Allegro.