Skip to content

Wild-W/Civ6-RandomSeeder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Issues MIT License


Logo

Civ 6 Random Seeder

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

View Demo gifshowcase

Table of Contents
  1. About
  2. Getting Started
  3. Usage
  4. How To Build
  5. Compatibility
  6. License

About

app

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.

node_heavy

(back to top)

Getting Started

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.

Direct Installation

Follow these steps to install the app as an executable:

  1. Extract Civ6-RandomSeeder.zip to its own folder somewhere

  2. Run Civ6-RandomSeeder.exe

  3. (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

NPM Installation

Follow these steps to install the app through NPM:

  1. Install NPM & node.js if you haven't already

  2. Create a new folder where you wish to store the app

  3. Open your newly created folder in a terminal

  4. (Optional/Recommended) Install the civ6-randomseeder NPM package

    npm install civ6-randomseeder
  5. Run civ6-randomseeder

    npx civ6-randomseeder
    • If you skipped installing the package, npx will temporarily install it globally
  6. (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

(back to top)

Usage

  • 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/or directory.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.

Steam users can find their Civ 6 workshop mod directory by following these steps:

  1. In your library, right click on Sid Meier's Civilization VI and navigate to Manage -> Browse local files

  2. Navigate a couple levels back until you are in steamapps

  3. 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
  4. Find & Enter the folder in this directory with the same name as the target mod's ID

    • You can find the ID of any workshop mod in the URL of their steam page
    • My mod: Completely Configurable Tech & Civic Shuffle Mode has the ID: 2823800402
  5. 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

(back to top)

How To Build

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:

  1. Install NPM & node.js if you haven't already

  2. Download and decompress this project's source code

    OR

    Clone this repo using git

    git clone https://github.com/wildweegee101/Civ6-RandomSeeder
  3. Install node_modules in the local project directory

    npm install
  4. Run the project

    node .
  5. (Optional) Build the project to an executable using nexe

    npm install nexe -g
    nexe --build

(back to top)

Compatibility

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
    1. The app is currently hard-coded to write a random seed to the GlobalParameters table where name = WW_RANDOM_SEED
      • WW is the prefix I give my database entries, because having multiple entries with the same name violates GlobalParameter'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
    2. 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

Compatible Mods

(back to top)

License

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.

(back to top)

About

Companion app for generating random seeds for civ 6 randomizer mods, made by WildW with Node.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published