Coder Social home page Coder Social logo

modupdater's Introduction

modupdater

modupdater is a tool that allows to automatically update outdated plugins (and other files). By running modupdater.exe you can update mods at any time, modupdater.asi will do that as soon as you launch the game and it will show a dialog notification after it's done searching for all updates (do note that sometimes it takes a while).

With "Update all downloaded files" checkbox, updater will replace all downloaded files from the archive (except asi loader, it's updated separately). If this checkbox is not set, only one file will be updated from that downloaded archive (.asi by default). You can also choose between 3 different methods of replacing ini files: replace all and keep settings, replace all and discard settings and don't replace.


To update different mods, settings need to be specified, see tutorials section.



Known Issues

On first launch the updater may offer "update" to already up-to-date version of a mod. This happens because updater doesn't use any versioning information, but instead relies on date difference between local file and remote archive. Just update everything once and this problem shouldn't appear anymore.


Installation

Put modupdater.asi and/or modupdater.exe in the folder with files you want to update. Updater will scan this folder for specified files (see options section) and all subfolders. If you want updater to update all mods from all folders, set ScanFromRootFolder option to 1 (not recommended).


Options

By default updater can work without ini file, it's preconfigured to only update plugins from Widescreen Fixes Pack. However, if you want to update something else, you need to create an ini file with the same name. For example: modupdater.asi / modupdater.ini.

See ini example here or below.

Here's a list of options you can set:

[MODS]
File names and update URLs, for example:
GTA3.WidescreenFix.asi = https://github.com/ThirteenAG/WidescreenFixesPack/

[MISC]
SelfUpdate                   <-- 1 or 0
SkipUpdateCompleteDialog     <-- 1 or 0
ScanFromRootFolder           <-- 1 or 0
OutputLogToFile              <-- 1 or 0
WebUrl                       <-- 1 or 0

[DATE]
UpdateFrequencyInHours = 6   <-- number of hours

[DEBUG]
AlwaysUpdate              <-- 1 or 0

[MISC]

SelfUpdate. Updater will update itself.

ScanFromRootFolder. You can place modupdater.asi in any folder, like scripts, modloader's subfolder etc. With this option set to 1, updater will start searching for files from the folder where the game's exe located. This will not work if you run modupdater.exe.

SkipUpdateCompleteDialog. Skips this dialog window(but doesn't do restart).

OutputLogToFile. Simply creates a log file and writes all messages to it.

[DATE]

UpdateFrequencyInHours. Updater will check for updates every 6 hours by default. Change that value to 0 to check for updates every time at startup. This setting doesn't work if AlwaysUpdate set to 1.

[DEBUG]

AlwaysUpdate. For testing purposes, update dialog will be shown even if there's no updates available.

File specific options

There are a few options available to customize update process for each specific file. If a source is set for file.dll under [MODS] section, simply creating [file.dll] section anywhere in the ini file will allow modupdater to use these options under it.

ExtractSingleFile - only one file will be extracted from the archive.

PlaceToRoot - file will be extracted to root directory. Root directory can only be determined if modupdater loaded as asi plugin.

IgnoreUpdates - updates will not be shown for this file. Modupdater writes this parameter if "Disable updates for this file" link is pressed.

CustomPath - files will be extracted to a subfolder, relative to modupdater's location.

SourceName - if updated file has totally different archive name, you can specify it here. See example here.

Password - if archive is password protected, password should be specified here. See example here.

See ini examples here.


Tutorials

I'm going to use a few random games just to demonstrate how to set everything up.

Need for Speed Underground

I have a copy of NFSU with an old version of widescreen fix from 2015, it's in scripts folder:

I put modupdater.asi there as well. This is what happens after I start the game:

If you click on [ ] Update all downloaded files checkbox, updater will replace all downloaded files from the archive. If this checkbox is not set, only NFSUnderground.WidescreenFix.asi will be updated. Since 2015, widescreen fix for NFSU was updated several times and now includes some additional files, so I'm going to set the checkbox and download the updates (demo).

Scripts folder now contains the following files:

NFSUnderground.WidescreenFix.asi.deleteonnextlaunch will be deleted after you press restart, or the next time you launch the game. Continue button closes the updater and brings the game on top, so you don't have to restart right away.


GTA3:

Tutorial for GTA3 is moved to wiki.

modupdater's People

Contributors

thirteenag avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.