This guide was written while using Experimental Build 0.18.38, on 64-bit Windows 10.
If you are on an earlier or later version when reading this, this may not be as relevant. If you aren't on Windows, this should all still apply, just find your version of the Factorio directory where mods are stored, use whatever equates to notepad, and whatever equates to an archive viewer for you.
If you're like me and have way too many mods installed, you might find that your game will hang for long periods of time while loading, specifically during the 'Loading Sprites' phase. In addition, your game might also spike heavily in memory usage. Well it doesn't need to be that way!
For this, try going to C:\Users\\AppData\Roaming\Factorio and open 'factorio-current.log'.
If you see something like this;
142.926 Warning! Sprite at {0,0; 32x32} from __crazy-double-furnaces__/graphics/icons/double-furnace-2.png is defined with 4 mipmap levels, but level 1 is expected to be at {32,0; 16x16} which is out of bounds of the source image.
That is more than likely the cause of the hangups, and it can be solved somewhat easily in most cases. Here's how you can do that.
- Make sure your game is closed. You will not be able to make changes otherwise.
- Go to your mods folder, and find any of the mods listed there - for this example, 'crazy-double-furnaces', and open it up with something that can handle zip files. - I use 7Zip for example.
- You will do one of two things. Either, look for .lua files in the main folder, or look for them in the 'prototypes' folder. - For this example, that will be 'data.lua' and 'data-updates.lua' in main, and 'technology.lua', 'recipes.lua', 'items.lua' and 'entities.lua' in prototypes.
- First check the main folder's .lua files first by right-clicking one and clicking 'edit' - or whatever lets you open them in notepad.
- Press Ctrl+F and search for the latter section of the file in question, in this case, 'icons/double-furnace-2.png'. - Make sure your cursor is at the top of the file, and you're searching in the Down direction.
- If you find no results in the main folder, do the same for .lua files in the prototypes folder.
- Once you find the string in question, make sure 'icon =' exists at the beginning of it. Some modders may have something like 'new.icon' or something similar, there is no difference.
- Copy 'icon =' and whatever exists before it, and paste it into a new line above or below that one, and add, '_mipmaps' after 'icon'. In this example, it would look like, 'icon_mipmaps ='
- Finally, type 'nil' after the =. Look at nearby lines; if there is a comma at the end of those lines, type 'nil,' instead. - For this example, it should look like, 'icon_mipmaps = nil,'
- Save the file and close it. You will be prompted to save changes to the archive, click yes.
- You may have to do this in multiple locations; this particular mod requires it to be edited both in the items.lua and entities.lua, with the latter looking like 'double2.icon_mipmaps = nil' - Note the lack of comma at the end. This lua file does not have them at the end of those lines, while the other did. This is important.
- Some code is much harder to read than others, but the same logic will apply in most cases.
And there you go! The more conflicts you fix, the faster you should load and the less memory spiking should happen!
If you are afraid of screwing up a mod's files, just take a backup of the zip file before making changes. And of course, check the current.log file the next time you finish loading to see if there are any remaining conflicts.
Hope this helps - it certainly helped me!
External link →