A command-line app for easy management of Civilization VI randomizer mods
Originally made for my mod Completely Configurable Tech & Civic Shuffle Mode but can be easily retooled to work for another random mod
Table of Contents
Civ 6 Random Seeder is an app I designed to make random mods in Civ 6 a little less inconvenient. It was made with node.js
, a JavaScript runtime environment.
-
It accomplishes this by providing a streamlined way to automatically generate and store "random seeds", opposed to using your system's clock. (Such is a method with many of its own issues)
There also exists SQLite's Random()
function which provides fantastic PRNG and can be used to order tables, but will re-roll whenever you reload the game and practically guarantees desync when used in multiplayer.
I do apologize for choosing Node, twas was a decision driven by familiarity. I forgot that to ship the app I'd need to package the entirety of Node and its modules into a single executable.
This results in an uncompressed total size of around 120 MB, when realistically this app should be a couple MB at most.
To install this app, either download the most recently published release that's compatible with your operating system, or install it through NPM.
If you are not familar with NPM I would recommend downloading the app here, it's much less hassle.
Follow these steps to install the app as an executable:
-
Extract Civ6-RandomSeeder.zip to its own folder somewhere
-
Run Civ6-RandomSeeder.exe
-
(Optional) Create a shortcut of the exe and place it in the directory
%programdata%\Microsoft\Windows\Start Menu\Programs
- This will allow you to easily find the app using the windows search box
Follow these steps to install the app through NPM:
-
Install NPM & node.js if you haven't already
-
Create a new folder where you wish to store the app
-
Open your newly created folder in a terminal
-
(Optional/Recommended) Install the civ6-randomseeder NPM package
npm install civ6-randomseeder
-
Run civ6-randomseeder
npx civ6-randomseeder
- If you skipped installing the package, npx will temporarily install it globally
-
(Optional) Download this batch file and place it in your directory
- This file executes
npx civ6-randomizer
in the directory its placed in, think of it like a shortcut
6a. (Optional) Create a shortcut to this batch file and place it in the directory
%programdata%\Microsoft\Windows\Start Menu\Programs
- This will allow you to easily find the app using the windows search box
- This file executes
- Using the app is generally quite simple, but I've attached some useful information below if you need the help
If they do not already exist, running this app will generate two files in the immediate directory: directory.txt
and profiles.json
- You do not need to edit these files directly, the app will take care of that
directory.txt
stores the path to the mod (default: C:\Program Files (x86)\Steam\steamapps\workshop\content\289070\2823800402)profiles.json
stores user created "profiles" (a random seed with an accompanying title)
- If for whatever reason, the app has trouble reading
profiles.json
and/ordirectory.txt
and it cannot be resolved within the app itself, you may delete those files to let the app regenerate them- This will result in the loss of whatever data they stored, if this is an issue I would recommend opening them to retrieve any important data before deletion
When prompted for a directory, know that the app is looking for any valid directory that includes a file named RandomSeed.sql
.
- This file will be found in any compatible mod's directory.
Steam users can find their Civ 6 workshop mod directory by following these steps:
-
In your library, right click on Sid Meier's Civilization VI and navigate to
Manage -> Browse local files
-
Navigate a couple levels back until you are in
steamapps
-
Now enter
workshop/content/289070
- 289070 is the Steam game ID bestowed upon Civ 6, this folder is where all your workshop mods for Civ 6 are installed
-
Find & Enter the folder in this directory with the same name as the target mod's ID
-
Copy the mod's directory and paste it into the command-line prompt
- The next time you use the app, it will remember this directory
- When using this app for multiplayer games, use the "copy seed" prompt to paste & distribute it to all the players, everyone needs to be using the same seed to avoid desync
- From here on, usage of the app should be simple & straightforward enough for anyone to use it
If you're having trouble, you can always shoot me a message over on Discord
I know this software is safe, but if you do not trust me, or for whatever other reason would like to build the app yourself, follow these steps:
-
Install NPM & node.js if you haven't already
-
Download and decompress this project's source code
OR
Clone this repo using git
git clone https://github.com/wildweegee101/Civ6-RandomSeeder
-
Install
node_modules
in the local project directorynpm install
-
Run the project
node .
-
(Optional) Build the project to an executable using
nexe
npm install nexe -g
nexe --build
- You can add a custom icon to an exe using Resource Hacker
For now, and perhaps forever, there is only one compatible mod, but if you wish to make your own randomizer mod then you are 100% free to integrate it with this app, and I'd be willing to help
- In that case, a couple things should probably be addressed first
- The app is currently hard-coded to write a random seed to the
GlobalParameters
table wherename
=WW_RANDOM_SEED
- WW is the prefix I give my database entries, because having multiple entries with the same
name
violatesGlobalParameter
's unique constraint - Basically this means that you wouldn't be able to use two mods both using this app for random seeds in the same game
- Fortunately this should be a very easy fix
- WW is the prefix I give my database entries, because having multiple entries with the same
- As a QOL change,
directories.txt
should perhaps be upgraded to a json file capable of storing an array of mods and their file paths
- The app is currently hard-coded to write a random seed to the
Distributed under the MIT License. See LICENSE.txt
for more information.
This software is 100% free to use and repurpose, even in your own commercial projects. If you wish to, you can show some acknowlegment by forking this repo and/or crediting my name, but it is not required.