[0.12.x][v0.12.4] Bob's Config mod

Some mods, made by Bob. Basically streaks every Factroio-area.

Moderator: bobingabout

solntcev
Long Handed Inserter
Long Handed Inserter
Posts: 81
Joined: Tue Jun 21, 2016 8:37 am
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by solntcev »

Thank you.

I have theoretical question (because I play vanilla right now and did not tried mods from mod portal yet):

How should I use config mod from mod portal?
So it is installed as archive, I extract it and edit text file.
But what happens when you update mod on portal? previous version is deleted and new is again installed as archive? (update happens automatically or is it user-initiated?)
So I need to keep backup of my changes in config mod and be ready to merge it with updated version?

Can configuration be stored outside of mods folder? can config read/write params from/to somewhere else so it can persist between updates?
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by bobingabout »

Basically, probably the worst answer to most of your questions.

Mod portal download works, to edit the config does require manually extracting the mod and editing the config file.
When I update the mod on the mod portal, you would have to start all over again, but I thnik you can check for updates of mods manually.

The main problem with keeping an old version of the config and updating it, is one of the main reasons to update the config file is that either there are more options, or the options have changed, so keeping an old version would be best only as reference.

Reading from somewhere else is... not really possible, yet. There are ideas in the pipeline to make configs more friendly.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2173
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by Ranakastrasz »

How exactly did you get other mods to see the data in this mod? I can't replicate the effect.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by bobingabout »

Basically, make this mod an optional dependancy of my other mods forces this one to load first. the config options are only accessable in the data stage though, because that's what everything in this mod configures.
if you then want to use a script that is configurable, well, add an item, entity etc to the data in your configured mod, then have the script look for that entity/item etc. well, I've only done it for technology so far.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2173
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by Ranakastrasz »

Ah, that makes sense. Explains the difficulties have been having.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by Nexela »

If a mod is extracted I believe the in game mod updater won't automatically update it. I could be wrong though! but I swear I remember seeing or hearing about this :)
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by orzelek »

Nexela wrote:If a mod is extracted I believe the in game mod updater won't automatically update it. I could be wrong though! but I swear I remember seeing or hearing about this :)
AFAIK it will silently overwrite it with zip now. It would bug out in early versions of 0.13 but now update will work by overwrite.
User avatar
Ranakastrasz
Smart Inserter
Smart Inserter
Posts: 2173
Joined: Thu Jun 12, 2014 3:05 am
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by Ranakastrasz »

Actually, wait a second. If the globals are shared during data/load only, then what happens after that? I mean, you can still access it, but somehow, even though you could override one mod's values from another, there isn't any interaction afterwards? That seems odd, and confusing.
My Mods:
Modular Armor Revamp - V16
Large Chests - V16
Agent Orange - V16
Flare - V16
Easy Refineries - V16
orzelek
Smart Inserter
Smart Inserter
Posts: 3924
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by orzelek »

Ranakastrasz wrote:Actually, wait a second. If the globals are shared during data/load only, then what happens after that? I mean, you can still access it, but somehow, even though you could override one mod's values from another, there isn't any interaction afterwards? That seems odd, and confusing.
Most of mods use a config file thats also included by control.lua. And for mod relations you need to use remote calls or check for existence of entities/recipes/techs etc.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by bobingabout »

Yes, you can include your config.lua in your control.lua, and then all the config options specified will exist in your scripting stage too... however, that only really works if the config file is within the same mod as the scripts. it doesn't really work across multiple mods like my config mod does.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
pieppiep
Fast Inserter
Fast Inserter
Posts: 170
Joined: Mon Mar 14, 2016 8:52 am
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by pieppiep »

If the config mod is extracted to a folder and an update comes, the folder is deleted and the updated zip is there, without your custom config options.

Maybe a solution would be to make a new bobconfig-custom mod that would be an optional dependency for the normal config mod.
That custom config will never be updated because it's just an empty mod that will be filled with your own settings and thus overwrite the settings from the normal config.
This is for now theory in my head, not sure if it works and no time to test on my crappy holliday internet connection.
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by Nexela »

pieppiep wrote:If the config mod is extracted to a folder and an update comes, the folder is deleted and the updated zip is there, without your custom config options.
Boooooo
Maybe a solution would be to make a new bobconfig-custom mod that would be an optional dependency for the normal config mod.
That custom config will never be updated because it's just an empty mod that will be filled with your own settings and thus overwrite the settings from the normal config.
This is for now theory in my head, not sure if it works and no time to test on my crappy holliday internet connection.
I really like this idea if it is possible! at least until Factorio gets around to handling mod config options better.
User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by bobingabout »

I was looking to see if it was possible to say... include a file in the game's config directory... which is probably possible, and no flip out if the file doesn't exist...

I haven't found an answer yet.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.
pieppiep
Fast Inserter
Fast Inserter
Posts: 170
Joined: Mon Mar 14, 2016 8:52 am
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by pieppiep »

Break out of the mods own map would be a very dangerous thing.
Write a log to the file ../../../../../windows/somethingimportant.exe
OvermindDL1
Fast Inserter
Fast Inserter
Posts: 194
Joined: Sun Oct 05, 2014 6:12 am
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by OvermindDL1 »

What is needed is for Factorio to give a Mod Configuration panel or so on the mods screen to allow a mod to offer configuration options or so, while also synchronizing those options from server->client.
Requia
Long Handed Inserter
Long Handed Inserter
Posts: 70
Joined: Thu Mar 24, 2016 12:24 am
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by Requia »

How do i get the game to actually recognize the changes (to module configs specifically), I assume there's some command to run like when changing recipes?

Edit: oh wait, the mod isn't loading for some unknown reason.

Editedit: didn't unzip the archive right works fine.
kevmert
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed Jan 21, 2015 12:43 pm
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by kevmert »

If I started a map with the settings to have the water pumpjacks enabled and then switch the config to use the old pump "out of nowhere" recipe thing, how do I get the old recipe to activate. I've used the command for reset_recipe and reset_technologies (these if I'm correct, it was several days ago; game.player.force.reset_technologies() and game.player.force.reset_recipes() ) and I still have the water spots on the map and now no access to either the waterpump recipe or the water pumpjacks, if I start a new world the recipe is fine, just not on the world my cohorts in mp want it on (they haven't grasped trains yet). all help would be appreciated :)
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by Nexela »

After you reset the recipe/tech list then you need to actually learn then tech

/c game.player.force.recipes["ground-water"].enabled = true

and same thing for lithia-water
kevmert
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed Jan 21, 2015 12:43 pm
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by kevmert »

Many many thanks to you Nexela. cant wait to tell the boys that they got their recipe change, but I'm still gonna learn-em some trains come hell or high lithia-water!
Setmaster
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Sep 05, 2016 7:21 pm
Contact:

Re: [0.12.x][v0.12.4] Bob's Config mod

Post by Setmaster »

Does this have a GUI?
Post Reply

Return to “Bob's mods”