pls ; (
Edit: forgot to add, the ability to read a file there. Don't need to write one.
Local folder for each mod (version inspecific) and a settings file
Local folder for each mod (version inspecific) and a settings file
I have mods! I guess!
Link
Link
Re: Local folder for each mod (version inspecific) and a settings file
I don't know what you're actually requesting but if It's what I think it is - it's not going to happen because it would break every single mod out there, every single game that has mods, and every bit of documentation about how mods work.
If you want to get ahold of me I'm almost always on Discord.
Re: Local folder for each mod (version inspecific) and a settings file
To be clearer (since it's somehow not obvious?) I want a folder which can store mod-specific files, and be read specifically by that mod. Currently all mod settings are stored in one vomitous binary file, and there's no support for files that are independent of versions (the version is one zip blob that doesn't even get extracted). I'd like to have a persistent file of user changes to my mod, but that's literally impossible. I'd like to have test settings so if I make changes, I can drop in a settings file for coverage and change back to my preferred settings as easily.
It doesn't even need to write to the folder, because the only thing that's malleable and persistent can be settings and version-inspecific changes.
It doesn't even need to write to the folder, because the only thing that's malleable and persistent can be settings and version-inspecific changes.
I have mods! I guess!
Link
Link
Re: Local folder for each mod (version inspecific) and a settings file
What changes can users make to a mod? Do you mean users modifying your mod? That isn't really supported, nor recommended, beyond scripted changes determined by settings. I'd tell them to use version control so they can make their changes, then if the mod updates they can simply re-apply their changes.
Re: Local folder for each mod (version inspecific) and a settings file
My mod supports custom item stacks, and some other bits here and there that are more for messing with than anything serious. If someone found some items that didn't work well for stack changes, they could write a little bit, without me having to overwrite their additions every time or add them to the mod itself. I could also test things without adding them to the mod, including things I'd like to merge later, without having to constantly re-zip the file.Boodals wrote: ↑Sun Nov 10, 2019 12:14 pmWhat changes can users make to a mod? Do you mean users modifying your mod? That isn't really supported, nor recommended, beyond scripted changes determined by settings. I'd tell them to use version control so they can make their changes, then if the mod updates they can simply re-apply their changes.
I have mods! I guess!
Link
Link
Re: Local folder for each mod (version inspecific) and a settings file
You can have zipped and unzipped versions of the same mod in one directory, as well as different versions of the same mod. The game will use the latest version and prefer the unzipped over the zipped version by default:
Code: Select all
0.559 Info ModManager.cpp:241: Found duplicate mod GCKI, using higher version (0.17.8 > 0.17.6).
0.560 Info ModManager.cpp:241: Found duplicate mod GCKI, using higher version (0.17.9 > 0.17.8).
0.561 Info ModManager.cpp:241: Found duplicate mod GCKI, using higher version (0.17.11 > 0.17.9).
0.562 Info ModManager.cpp:248: Found duplicate mod GCKI, using folder version (0.17.11).
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: Local folder for each mod (version inspecific) and a settings file
Sounds like a great use for mod settings. Add a string setting which contains a list of words which define which stack changes to ignore, or whatever it is you're doing. If you need to test their additions you can just ask for the string and paste it into your settings.Honktown wrote: ↑Mon Nov 11, 2019 5:47 am My mod supports custom item stacks, and some other bits here and there that are more for messing with than anything serious. If someone found some items that didn't work well for stack changes, they could write a little bit, without me having to overwrite their additions every time or add them to the mod itself. I could also test things without adding them to the mod, including things I'd like to merge later, without having to constantly re-zip the file.
Although it wouldn't work in this case, if the setting format is pretty complicated, you can make a custom GUI to allow users to modify it in a friendlier way. Mods can write to their own settings, but it would have to be in-game and so it obviously doesn't work with a startup setting (hence not useful here).
A more general API for reading/writing files has been requested a few times, and IIRC the devs aren't against the idea, it would just take some time to write because it all has to be synchronized. Something like that would be a lot more powerful and allow you to do whatever it is you're trying to do.
Re: Local folder for each mod (version inspecific) and a settings file
I didn't know that feature existed. I normally have a 'working' directory when I'm updating (extract the latest version and make changes). I usually only make changes inside the "core" of my mod so that's a completely different thing that how I'd use a separate directory/file or ask of people. People could write little extra definitions for my mod without needing to change the mod itself. That's the bigger difference. They could change something if they needed to personally, and then just ask me about the change if they felt it could be a permanent addition. Currently if anyone changes any mod, they have to re-zip it, and keep a separate file for if/when the mod updates.Pi-C wrote: ↑Mon Nov 11, 2019 8:28 amYou can have zipped and unzipped versions of the same mod in one directory, as well as different versions of the same mod. The game will use the latest version and prefer the unzipped over the zipped version by default:If several versions of the same mod are stored in the same directory, the game's mod manager will allow you to choose one version. So why would you have to constantly re-zip?Code: Select all
0.559 Info ModManager.cpp:241: Found duplicate mod GCKI, using higher version (0.17.8 > 0.17.6). 0.560 Info ModManager.cpp:241: Found duplicate mod GCKI, using higher version (0.17.9 > 0.17.8). 0.561 Info ModManager.cpp:241: Found duplicate mod GCKI, using higher version (0.17.11 > 0.17.9). 0.562 Info ModManager.cpp:248: Found duplicate mod GCKI, using folder version (0.17.11).
I'm honestly not looking for anything big. That'd be very easy to reject and is way more work than necessary. All I'd like is a) a settings file in a human-readable form and b) a lua "require"-able file. I do not need ANY general reading/writing capability, just two dang files. I already know what I can do for coverage testing, but all the settings are in the damn dat blob. To keep other mod settings I'd have to manually change settings in game, and when finished, copy-paste back in the previous blob. It's even more annoying when I cloud sync, because mods aren't cloud synced (not even the enabled/disabled list of installed mods), and neither are the settings.Boodals wrote: ↑Mon Nov 11, 2019 9:56 amSounds like a great use for mod settings. Add a string setting which contains a list of words which define which stack changes to ignore, or whatever it is you're doing. If you need to test their additions you can just ask for the string and paste it into your settings.Honktown wrote: ↑Mon Nov 11, 2019 5:47 am My mod supports custom item stacks, and some other bits here and there that are more for messing with than anything serious. If someone found some items that didn't work well for stack changes, they could write a little bit, without me having to overwrite their additions every time or add them to the mod itself. I could also test things without adding them to the mod, including things I'd like to merge later, without having to constantly re-zip the file.
Although it wouldn't work in this case, if the setting format is pretty complicated, you can make a custom GUI to allow users to modify it in a friendlier way. Mods can write to their own settings, but it would have to be in-game and so it obviously doesn't work with a startup setting (hence not useful here).
A more general API for reading/writing files has been requested a few times, and IIRC the devs aren't against the idea, it would just take some time to write because it all has to be synchronized. Something like that would be a lot more powerful and allow you to do whatever it is you're trying to do.
I have mods! I guess!
Link
Link
Re: Local folder for each mod (version inspecific) and a settings file
The settings aren't getting moved out of the data blob because the data blob is required for them to work correctly. Human-readable format is not precise enough to preserve the settings correctly between save/load/restart.
You're meant to edit them in-game in the mod settings GUI.
You're meant to edit them in-game in the mod settings GUI.
If you want to get ahold of me I'm almost always on Discord.