[0.2.8]Factorio Mod Manager

Place to post guides, observations, things related to modding that are not mods themselves.
User avatar
Polymorph
Burner Inserter
Burner Inserter
Posts: 9
Joined: Wed Feb 13, 2013 2:24 am
Contact:

[0.2.8]Factorio Mod Manager

Post by Polymorph »

Should be mostly self explanatory, this is a program that manages mods for Factorio.

Here's what it looks like (On Windows)
FMM1.png
FMM1.png (48.2 KiB) Viewed 12937 times
FMM2.png
FMM2.png (40.96 KiB) Viewed 12937 times
FMM3.png
FMM3.png (43.32 KiB) Viewed 12937 times
To use it you must first configure your paths for both the mod folder and Factorio. Then you create and/or select a profile (which can be used to save a particular mod combination), tick the mods you want to use, adjust the creeper settings (It will be possible to completely remove creeper waves in the near future, I'm just releasing this now while I'm still reasonably coherent and haven't passed out), and then launch Factorio however you prefer.

The mod directory structure goes like this and is pretty much based on Factorio's own structure

Code: Select all

Mods
----ModName1
--------Lua
------------ModName1.lua
--------Prototype Definitions
--------Resources
--------Locale
Just to make it clear, you cannot name any file in those folders that would overwrite one in the original installation (yet), although I can understand the benefits of doing so and will lift that limitation eventually. Also, from my testing Factorio won't load anything that's not in the same folders that it would load the other files (so Prototype Definitions/entities/Pants/blah.json won't actually add anything to the game, but Prototype Definitions/entities/blah.json will), although the changes I make to freeplay.lua (nothing that would make it different from vanilla, just places calls to Mods.lua, which as indicated by the name handles all of the mod lua) allow you to bypass that by way of require.

Speaking of lua, the only filename the program looks for is the same name as the mod itself (which is whatever the folder of the mod in your chosen mod path is), so you won't get any changes if you have Mods/Your Mod Here/Lua/Pants.lua (unless of course you do require "Pants" in Mods/Your Mod Here/Lua/Your Mod Here.lua!). The functions must also contain certain names if they are to be added to the right place, ("onTick", onSave", etc. Look to the wiki for the event names.). With the exception of onSave and onLoad, the functions can also take advantage of the event table if you provide it as an argument, although it is not required.

If there's anything I've failed to mention, if you have any questions/suggestions, or if the program errors please any of those in here. If you really like my work and think it's worth something more than words on an internet forum, then you can donate here if you want.

Linux version will be added as soon as I do a couple more tests tomorrow to make sure it doesn't break in new and exciting ways. Until then, Zzzzzzzz...

Downloads:
Windows Download
Sample Mod
Last edited by rymn on Sat Feb 23, 2013 11:06 pm, edited 1 time in total.
Reason: Made Sticky
Xisuma
Inserter
Inserter
Posts: 29
Joined: Fri Mar 01, 2013 1:33 pm
Contact:

Re: [0.2.8]Factorio Mod Manager

Post by Xisuma »

I'd personally like to see this as part of the game, a "customize your experience" being able to predefine certain settings so you can challenge yourself in different ways :-)
Rax
Burner Inserter
Burner Inserter
Posts: 19
Joined: Fri Mar 01, 2013 3:02 pm
Contact:

Re: [0.2.8]Factorio Mod Manager

Post by Rax »

Xisuma wrote:I'd personally like to see this as part of the game, a "customize your experience" being able to predefine certain settings so you can challenge yourself in different ways :-)
I agree Shiswammy xD

-Rax
Rax
Burner Inserter
Burner Inserter
Posts: 19
Joined: Fri Mar 01, 2013 3:02 pm
Contact:

Re: [0.2.8]Factorio Mod Manager

Post by Rax »

The example mod does not work.
User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [0.2.8]Factorio Mod Manager

Post by FreeER »

did you use it with the mod manager? Admitedly I haven't tried it myself but you could always paste this into factorio\data\lualib\freeplay.lua (though it would only work in the 'new world' option not the story line or any custom scenarios that you create).

Code: Select all

game.onevent = function(event)
if event.name == "ontick" then
	if game.getplayer().getitemcount("basic-bullet-magazine") < 2 then
		game.getplayer().insert{name="basic-bullet-magazine", count=1}
	end
end
or you could swap out "basic-bullet-magazine" with "piercing-bullet-magazine" for the better ammo

P.S. if anyone wonders it is the basic code from the sample
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net
Heinrich
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Tue Feb 12, 2013 9:09 am
Contact:

Re: [0.2.8]Factorio Mod Manager

Post by Heinrich »

Some feedback:

I'm trying to setup my mod to work with the Mod Manager, but it isn't working. It seems to lock it's own settings file and is unable to write into it. On my computer at home i can skip the message, but here at work nothing is happening. I can't even close the application, because it tries to write into the file.

At home it starts modifying the game, freeplay.lua updates works fine (great wiork here). It also copies images from the icons folder, but everything else is omitted. No entities, no recipies, no tech definition, no images, etc. Maybe it has to do with an updated directory structure? Your folder structure says "Prototype Definitions" while the actual folder name is "prototype-definitions".

Another thing had do to with the naming of my mod which featured a dot - "MyMod_v0.1". The application turned out looking for a file [Mod directory]\Lua\MyMod_v0\1.lua.


Personally i think this tools is a very handy thing to have, especially for combining lua functionality of different mods. Also for mod removal it's great. Hopefully you are going to update it, despite the low feedback from the forum.

Keep it going,
Heinrich.
izmurphzi
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Mar 09, 2013 4:29 pm
Contact:

Re: [0.2.8]Factorio Mod Manager

Post by izmurphzi »

I cant get this to work where is the "mods folder" and "factorio" because i cant get this to work and im going to go crazy. Im on windows btw. Thanks for your help and awsome mod! :D
User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: [0.2.8]Factorio Mod Manager

Post by FreeER »

On windows, factorio is probably going to be C:\Program Files\Factorio, if you installed using the exe from factorio's site (the exception with the installer is if you have 64bit and installed the 32bit in which case it is probably under C:\Program Files (x86)\Factorio). If you downloaded the zip file then wherever you unzipped factorio is what you need to put in for Factorio's location. As for the mods folder, I create a folder inside of the Factorio folder called mods and point FMM to that.
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net
Post Reply

Return to “Modding discussion”