Page 3 of 4

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

Posted: Fri Jul 01, 2016 3:29 pm
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?

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

Posted: Fri Jul 01, 2016 4:05 pm
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.

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

Posted: Sun Jul 10, 2016 12:16 pm
by Ranakastrasz
How exactly did you get other mods to see the data in this mod? I can't replicate the effect.

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

Posted: Sun Jul 10, 2016 1:01 pm
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.

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

Posted: Sun Jul 10, 2016 1:17 pm
by Ranakastrasz
Ah, that makes sense. Explains the difficulties have been having.

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

Posted: Sun Jul 10, 2016 9:54 pm
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 :)

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

Posted: Sun Jul 10, 2016 10:06 pm
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.

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

Posted: Sun Jul 10, 2016 10:43 pm
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.

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

Posted: Sun Jul 10, 2016 11:08 pm
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.

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

Posted: Mon Jul 11, 2016 12:57 am
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.

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

Posted: Mon Jul 11, 2016 7:07 am
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.

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

Posted: Mon Jul 11, 2016 8:21 am
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.

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

Posted: Mon Jul 11, 2016 10:56 am
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.

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

Posted: Mon Jul 11, 2016 4:50 pm
by pieppiep
Break out of the mods own map would be a very dangerous thing.
Write a log to the file ../../../../../windows/somethingimportant.exe

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

Posted: Sat Jul 16, 2016 6:56 am
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.

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

Posted: Mon Aug 08, 2016 5:15 pm
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.

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

Posted: Sat Aug 13, 2016 5:48 am
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 :)

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

Posted: Sat Aug 13, 2016 6:03 am
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

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

Posted: Sat Aug 13, 2016 12:43 pm
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!

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

Posted: Mon Sep 05, 2016 7:21 pm
by Setmaster
Does this have a GUI?