FiveM Artifact Updater is an application created with Node.JS to easily and quickly install/update your artifacts with the click of a button. No more are the days of needing to manually navigate to the Artifacts Site, download whatever version, unzip and replace your files. This tool does all that for you, and more with config file to tune it to your liking, as well as support for replacing all config file items with command line arguments for on the fly usage. It will also clean up after itself afterwards!
- Ability to install the latest, recommended, newest, or custom FiveM build with a single click
- Ability to use custom command line arguments to adjust install on a case by case basis
FiveM Artifact Updater requires Node.js to run.
- Install Node.JS. May require a computer restart.
- Place the
FiveMArtifactUpdater
folder in the same directory as yourtxData
andartifacts
folders - Run
InstallDependencies.bat
ornpm install
in the install directory
After installing the dependencies you can use the application.
- Navigate to the
config.json
and verify theartifactsDirectory
value matches the folder name of the artifacts folder your server is using. By default this isartifacts
. This application's folder should be in the same directory as yourtxData
andartifacts
folders. - Verify the
downloadType
in theconfig.json
is what you want. Supported options are below - Run the
UpdateArtifacts.bat
and follow the prompts
You can edit the UpdateArtifacts.bat
file and add as many command line arguments like below:
node index.js -allowPrompt false
This works for any and all keys in the config.json
:
- artifactsURL
<url>
| URL to webscrape from - artifactsDirectory
<directoryName>
| Directory to place the unzipped artifacts - webscrapeDirectory
<directoryName>
| Directory to place the downloaded webscrape - zipDirectory
<directoryName>
| Directory to place the zip - zipFileName
<fileName>
| Name of the downloaded artifacts file - downloadType
<type>
| Which dynamic build to pull. Supportsspecific
/custom
forbuildSpecific
section below,newest
/latest
for the newest build,optional
for the optional build, andrecommended
for the recommended build - buildSpecific
<5000>
| Use a specific build number.downloadType
must becustom
orspecific
to use this - verbose
<true/false>
| Show more console logging - allowPrompt
<true/false>
| Prompt the user for input before starting and doing important things
{
"artifactsURL": "https://runtime.fivem.net/artifacts/fivem/build_server_windows/master",
"artifactsDirectory": "../artifacts/",
"webscrapeDirectory": "./webscrape/",
"zipDirectory": "./artifacts-zipped/",
"zipFileName": "server.7z",
"downloadType": "latest",
"buildSpecific": null,
"verbose": false,
"allowPrompt": true
}
- Node.JS - evented I/O for the backend
This was a great personal project not only for my use case (needing to easily and quickly update my servers artifacts), but also to spend more time learning Javascript and some new Node.JS modules. Here is what it does:
- Scrape the Webpage - Using
web-scrape
we download the artifacts url source page - Parse the DOM - Using
node-html-parser
we parse the webscraped html for the URL of the build we want - Download New Artifacts - Using
https
we download theserver.7z
from the webscraped url - Delete Current Artifacts - If they exist, we use
fs
to delete the current artifacts - Extract
server.7z
- Using7zip-bin
andnode-7z
we extract theserver.7z
files into our artifacts folder - Cleanup - Using
fs
we delete everything we downloaded, including the webscrape andserver.zip
Want to contribute? Great!
This is an application for competant people who can follow directions. If you know what you're doing and are encountering issues, use the Issues and Pull Request section appropriately.
- Initial Release
- Download only the HTML file of the page, or see if its possible to grab all the data we want directly with sources web-scrape option and eliminate the downloading entirely.