Update only certain mods from within the game client?

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 582
Joined: Tue May 19, 2015 1:56 am
Contact:

Update only certain mods from within the game client?

Post 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?
Image

Zavian
Smart Inserter
Smart Inserter
Posts: 1641
Joined: Thu Mar 02, 2017 2:57 am
Contact:

Re: Update only certain mods from within the game client?

Post 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.

User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 582
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: Update only certain mods from within the game client?

Post 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.
Image

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Update only certain mods from within the game client?

Post 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. :P
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 582
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: Update only certain mods from within the game client?

Post 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?
Image

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Update only certain mods from within the game client?

Post 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?).
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

User avatar
Reika
Filter Inserter
Filter Inserter
Posts: 582
Joined: Tue May 19, 2015 1:56 am
Contact:

Re: Update only certain mods from within the game client?

Post 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.
Image

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Update only certain mods from within the game client?

Post 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.)
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

Helfima
Fast Inserter
Fast Inserter
Posts: 199
Joined: Tue Jun 28, 2016 11:40 am
Contact:

Re: Update only certain mods from within the game client?

Post 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. :P
me too I use junction, it's the best way

Post Reply

Return to “Technical Help”