A guide to unlocking more logistics slots
(currently only for x86_64 on MacOS)There are at least 5 bytes I’ve found that need to be modified for this to work. The hex editor I’ve used for this is “hexed.it” because it has a number of features that make it ideal for this purpose. First off, on the left there are three windows: File Information, Data Inspector (Little-endian), and Data Inspector (Big-endian). Only the Data Inspector (Little-endian) tab is needed, so the other two can be minimized. On the right, there are three more tabs: Go To, Search, and WebApp Information. Only the Search tab is needed. The first step is to make a backup of two important files from the factorio application: the executable and the Code Signature. To do this, find the factorio application in finder and control-click on it. This brings up a menu with a button that reads “Show Package Contents”. Click on this and you’ll be brought to the inside of the factorio application. Inside this there is a folder called “Contents”. Open it, and a whole host of files and folders will appear. The ones that matter are called “MacOS” and “_CodeSignature”. I’d reccomend copying “_CodeSignature” and pasting it somewhere like a desktop. Open the “MacOS” folder and there will be two files. One is an executable called “factorio”. The other is not an executable, and is called “factorio.dSYM”. The only relevant one is “factorio”. Copy and paste this file in the same way as the “_CodeSignature” folder. (As a note, it’s important to copy and paste, not drag and drop. Dragging and dropping creates an alias for application executables instead of moving them, which might be an issue.) Next, go back to hexed.it and click on “Open File” from the top of the window. It’ll bring you to a finder window. Navigate to the location where you placed the “factorio” file and click open. Now open the search bar and paste in this string: “fd81f9e803000073”. A series of checkboxes under this text box will select themselves. The only relevant one is “Hexadecimal Values”, so the rest can be unchecked. The other sections of the Search tab are irrelevant, except for the “Byte Order” subsection. Ensure that only “Little-endian” is checked. Then just click “Find Next” and a series of byes will automatically be selected. Click on the byte that reads “E8”. Now look over at the Data Inspector tab and some numbers will appear. The only ones of interest read “1000”. If none of them read “1000”, then you have the wrong byte selected. Click on any one of them, change the number from 1000 to 2000 (Or whatever number of logistics slot you want, as long as it’s less than 65536), and hit enter. This process of searching and replacing needs to be repeated three more times, for these strings: “c13de8030000b8”, “b8e80300000f”, and “ffbee80300004c”. There is one more string to replace, with some important caveats: In this case, you should click on “E7”, not “E8”, and also type in 1 less than the number of slots you want. Here’s the string: “004181f8e70300000f”. Now all the modifications are complete. Find the top bar and hit “Export”. Hexed.it will give a warning in Safari. Ignore this warning, and download it anyway. If the name of the file isn’t “factorio”, change it to that. This new downloaded file is not an executable yet, so a terminal command needs to be run to make it one:
chmod +x “/Path/To/File”
Once this is done, nothing will seem to change, but if Terminal doesn’t throw an error, then this is now an executable.
Now you can go back into the contents of the factorio application, navigate to the “MacOS” folder, open it, and control click the “factorio” executable, and click “Move to Trash” in the window that pops up. Once again, dragging and dropping does not work. Now you can drag and drop or copy+paste the new modified executable into the space where the old one once was. However, the program isn’t ready yet. The game will boot up as normal, but it’ll crash the moment you open your inventory. That’s where the code signature comes in. Delete the “_CodeSignature” folder from the factorio application, and run this terminal command I found on the internet to replace it:
codesign —force —deep —sign - “/Path/To/Application”
In case you need it, the path is usually “/Applications/factorio.app”.
Now everything’s done! I’d suggest making a copy of both the new modified executable and new code signature and placing them elsewhere as a backup, along with the original executable and code signature. Just be sure not to mix them up. To switch back and forth between versions, just delete whichever existing executable and code signature is in use, and copy+paste in the ones you want.
Notes for how this affects game features:
Mods: It works with all mods in the Seablock Pack and Recursive Blueprints, so I’d assume it works with basically all mods.
Save files: Any requests past the first 1000 are saved in the map data, and the modified map data also runs perfectly well on unmodified executables, making them completely interchangeable, with one exception that I detailed elsewhere.
Multiplayer: I haven’t used multiplayer since swapping executables, so I don’t know.
Updates: I don’t know if this affects the ability to receive updates at all.
If you have any problems, just tell me.