Page 1 of 1
Update only certain mods from within the game client?
Posted: Mon Jan 08, 2018 2:14 am
by Reika
My own mods are stored in the main mods folder, as having that as the working directory makes realtime or live changes very easy. However, because the version number on the folders does not change - it only changes for the "packed" zip files I publicly release - the game thinks they are extremely out of date, which is obviously not the case.
Now, if I have a handful of mods I did not make, and wish to automatically update those, I seem to be forced to update everything, which breaks my current install, and worse, deletes the actual mod folders in favor of the release zip.
Can I selectively update with the ingame feature?
Re: Update only certain mods from within the game client?
Posted: Mon Jan 08, 2018 4:13 am
by Zavian
As a workaround, my move your development directories out of the mods folder, and create a script that zips them up (if practical with the correct version number), and copies to the game mod folder. If the script gets the version number right, then the game shouldn't have anything to update. If you can't get that working you could also create a script that deletes the .zip version of your mods, (if they exists), and rsyncs the development directories.
Re: Update only certain mods from within the game client?
Posted: Mon Jan 08, 2018 4:16 am
by Reika
Zavian wrote:As a workaround, my move your development directories out of the mods folder, and create a script that zips them up (if practical with the correct version number), and copies to the game mod folder. If the script gets the version number right, then the game shouldn't have anything to update. If you can't get that working you could also create a script that deletes the .zip version of your mods, (if they exists), and rsyncs the development directories.
The reason I use the main mods folder as the working directory is so that I do not need to anything like that when I want to continuously tweak script code, which normally only requires a save reload to update.
Re: Update only certain mods from within the game client?
Posted: Mon Jan 08, 2018 5:40 am
by eradicator
Personally i have junctions (mklink /j target source) inside the mods folder that have correct version numbers.
C:\...\factorio\mods\my-mod-junction-1.2.3
C:\...\working_directory\my-mod-source_WIP
So my wip mods always have the same or a higher version than those on the mod portal.
Alternatively you could try setting your dev folders to write protected, or more extremely use file system permissions to deny factorio write access to those folders.
Or ofc you can always try to convince the devs to change stuff to work the way you want, thought i doubt that has high chances before the mod portal rewrite happens.
Re: Update only certain mods from within the game client?
Posted: Mon Jan 08, 2018 9:22 am
by Reika
eradicator wrote:Personally i have junctions (mklink /j target source) inside the mods folder that have correct version numbers.
C:\...\factorio\mods\my-mod-junction-1.2.3
C:\...\working_directory\my-mod-source_WIP
Elaborate? And would that also work for GitHub repository paths?
Re: Update only certain mods from within the game client?
Posted: Mon Jan 08, 2018 10:37 am
by eradicator
Reika wrote:eradicator wrote:Personally i have junctions (mklink /j target source) inside the mods folder that have correct version numbers.
C:\...\factorio\mods\my-mod-junction-1.2.3
C:\...\working_directory\my-mod-source_WIP
Elaborate? And would that also work for GitHub repository paths?
https://en.wikipedia.org/wiki/NTFS_junction_point
It all depends on why you can't rename your working directory to reflect the newest version (and thus prevent factorio from deleting it). I guess if you never rename the working directory and do the renaming for the release zips some other way... you might also just name your working directory _99.99.99 which would then always be newer than the mod portal version instead of older (like now?).
Re: Update only certain mods from within the game client?
Posted: Tue Jan 09, 2018 2:52 am
by Reika
eradicator wrote:Reika wrote:eradicator wrote:Personally i have junctions (mklink /j target source) inside the mods folder that have correct version numbers.
C:\...\factorio\mods\my-mod-junction-1.2.3
C:\...\working_directory\my-mod-source_WIP
Elaborate? And would that also work for GitHub repository paths?
https://en.wikipedia.org/wiki/NTFS_junction_point
It all depends on why you can't rename your working directory to reflect the newest version (and thus prevent factorio from deleting it). I guess if you never rename the working directory and do the renaming for the release zips some other way... you might also just name your working directory _99.99.99 which would then always be newer than the mod portal version instead of older (like now?).
Renaming the directories would break the path to the local repository for GitHub, which is something not easily amended.
Re: Update only certain mods from within the game client?
Posted: Tue Jan 09, 2018 4:53 pm
by eradicator
Reika wrote:
Renaming the directories would break the path to the local repository for GitHub, which is something not easily amended.
Does that apply to only the mod parent directory or the full path? Because regardless of what method you use you'll have to change the path at least (preferrably exactly) once.
...unless you change the path factorio looks for mods in instead and keep the "original" with the junction method.
PS: And to answer the original question: No, there isn't. It's all just hacky workarounds. (Hm. I never tested if disabled mods are updated too, that might be another possible hacky workaround.)
Re: Update only certain mods from within the game client?
Posted: Tue Jan 09, 2018 4:59 pm
by Helfima
eradicator wrote:Personally i have junctions (mklink /j target source) inside the mods folder that have correct version numbers.
C:\...\factorio\mods\my-mod-junction-1.2.3
C:\...\working_directory\my-mod-source_WIP
So my wip mods always have the same or a higher version than those on the mod portal.
Alternatively you could try setting your dev folders to write protected, or more extremely use file system permissions to deny factorio write access to those folders.
Or ofc you can always try to convince the devs to change stuff to work the way you want, thought i doubt that has high chances before the mod portal rewrite happens.
me too I use junction, it's the best way