I'm playing on a multiplayer server with some friends, in order to ease things for everyone I thought to bundle all our mods into a single mod. Once I got started though things just kept spiraling in hackery so I thought to come here and see what lua experts thought on the topic.
My first thought was to place all the mods into a sub folder, "mods", and require() their data.lua files in the real data.lua. But then it started to get wonky via relative paths. Am I going at this the worst possible way? Perhaps I should just merge all the mods and concatenate all same-named files.
What is the easiest method to create a mod bundle?
Re: What is the easiest method to create a mod bundle?
You only get one script.on_init() call per mod, after that it overwrites the previous one. Same with all other script.* functions. So you will have to do some merging anyway.admo wrote:Perhaps I should just merge all the mods and concatenate all same-named files.
Re: What is the easiest method to create a mod bundle?
Seems I should give up on the cleverness and just give them a zipped mod folder.DaveMcW wrote:You only get one script.on_init() call per mod, after that it overwrites the previous one. Same with all other script.* functions. So you will have to do some merging anyway.admo wrote:Perhaps I should just merge all the mods and concatenate all same-named files.
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: What is the easiest method to create a mod bundle?
that's definitely easier.
Merging mods together (which can actually be a violation of some of the mod licences) is quite the modding job. you need to merge control.lua so all scripts with the same name are one big script... and this is actually the easy part.
you'll need to find all references in all the data files to directories "__bobplates__/" would be a directory example, and change them all to the name of your new mod, then make sure the directories all point to the right place.
Merging mods together (which can actually be a violation of some of the mod licences) is quite the modding job. you need to merge control.lua so all scripts with the same name are one big script... and this is actually the easy part.
you'll need to find all references in all the data files to directories "__bobplates__/" would be a directory example, and change them all to the name of your new mod, then make sure the directories all point to the right place.
Re: What is the easiest method to create a mod bundle?
I went ahead with the zipped mod folder plan, but I came across some oddity I didn't understand. While doing the "mods" subfolder inside my bundle mod's directory structure:bobingabout wrote:that's definitely easier.
Merging mods together (which can actually be a violation of some of the mod licences) is quite the modding job. you need to merge control.lua so all scripts with the same name are one big script... and this is actually the easy part.
you'll need to find all references in all the data files to directories "__bobplates__/" would be a directory example, and change them all to the name of your new mod, then make sure the directories all point to the right place.
Code: Select all
%appdata%
--factorio
----mods
------admo_bundle-0.0.1
--------mods
----------autofill
----------squeak_through
Code: Select all
local savedPath = package.path
package.path = "../mods/autofill/?.lua"
require("data") --intended to force the load of autofill's data.lua over the admo_bundle's data.lua
package.path = savedPath
Re: What is the easiest method to create a mod bundle?
It will be good, when you have all script events in the control.lua, but they are have only one handler function per sub_mod.
If you have the second sub_mod, then you are need to add new handler function and choose which folder it have.
If you have the second sub_mod, then you are need to add new handler function and choose which folder it have.
-
- Fast Inserter
- Posts: 127
- Joined: Fri May 08, 2015 2:25 pm
- Contact:
Re: What is the easiest method to create a mod bundle?
Another way would be to share a savegame and let people click the "sync mods with savegame" button. Then it will prompt them to download all the mods from the mod portal. You would also have to ship the mod-settings file too if you changed ingame settings.
My RSO+Bob's+Angel's modpack: Farlands (outdated)
Mods (current): Resource Labels
Mods (old): Biter Spires
Mods (current): Resource Labels
Mods (old): Biter Spires
Re: What is the easiest method to create a mod bundle?
In general mod packs suck hard because at the moment they are published they are outdated if one of the included mods are updated.
At any point of time the uploader abandone the pack and all users complain of bugs not fixed anymore or complain about bugs in the mod pack for what the uploader is not responsible for...
A link list with all recommended mods would be easier to maintain.
ModMyFactory(viewtopic.php?f=137&t=33370) provides ModPack files but i'm no expert for this tool.
Greetings, steinio.
At any point of time the uploader abandone the pack and all users complain of bugs not fixed anymore or complain about bugs in the mod pack for what the uploader is not responsible for...
A link list with all recommended mods would be easier to maintain.
ModMyFactory(viewtopic.php?f=137&t=33370) provides ModPack files but i'm no expert for this tool.
Greetings, steinio.
Re: What is the easiest method to create a mod bundle?
The pack wouldn't be published, it's just to help some people who have not played with mods before, while also helping me who does play with mods and I update my mods for my own games. The zip seemed easiest, I can swap the mod folders in my %appdata% path for whichever games I'm playing.steinio wrote:In general mod packs suck hard because at the moment they are published they are outdated if one of the included mods are updated.
At any point of time the uploader abandone the pack and all users complain of bugs not fixed anymore or complain about bugs in the mod pack for what the uploader is not responsible for...
A link list with all recommended mods would be easier to maintain.
ModMyFactory(viewtopic.php?f=137&t=33370) provides ModPack files but i'm no expert for this tool.
Greetings, steinio.
-
- Filter Inserter
- Posts: 454
- Joined: Tue Jun 20, 2017 1:56 am
- Contact:
Re: What is the easiest method to create a mod bundle?
Hi one of the things i did with a friend, for us to play co-op together, was to simply test all the mods locally to see if they work ok, and then to copy and paste them to his Dropbox folder... then he just copies and pasted them into his mods folder, overwriting what was there.
with the exception of about 9 mods that i added recently, all of these seem to play together very nicely:
(based on an initial bundle of angels and bobs from an earlier arumba pack)
listed here in case you fancy a look:
viewtopic.php?f=95&t=40288&start=20#p290313
with the exception of about 9 mods that i added recently, all of these seem to play together very nicely:
(based on an initial bundle of angels and bobs from an earlier arumba pack)
listed here in case you fancy a look:
viewtopic.php?f=95&t=40288&start=20#p290313
(also me from the mod portal - im not dustine lol) = https://mods.factorio.com/mods/Dustine/ ... ssion/9108
my 1st Mod Idea viewtopic.php?f=33&t=50256
my 1st Mod Idea viewtopic.php?f=33&t=50256