Nexus-Mods / Vortex

Vortex Development
GNU General Public License v3.0
957 stars 137 forks source link

Vortex Mod Manager

Last Commit Build Status Release Pre-release Contributors Forks Stars Watchers License

Discord X (formally Twitter) YouTube Instagram Reddit Facebook

Introduction

Vortex is the current mod manager from Nexus Mods. It is designed to make modding your game as simple as possible for new users, while still providing enough control for more experienced veterans of the modding scene.

Our approach with Vortex aims to take complex tasks such as sorting your load order or managing your mod files and automates as much of the process as possible with the goal of having you achieve a stable modded game with minimal effort. We want to help you spend less time modding and more time playing your games.

Features

Getting Started

To get started, Vortex can be downloaded from Nexus Mods or from GitHub. After the installer has been downloaded, just run it and follow the instructions.

Additional information on Vortex and guides can be found in the Vortex Wiki.

Development

To start development on Vortex, please use this mostly automated method to download and install all dependencies, clone the Vortex repo from GitHub and then build it so it can be run from source. Most dependencies are installed using Scoop.

Decisions

The following section aims to clarify and explain a few development decisions.

Development vs Release builds

The toolchain for development builds and release builds is quite different.

In dev builds, the typescript compiler (tsc) is used directly to transliterate each .ts file to .js individually, electron runs those files directly, dependencies are loaded from node_modules.

In release builds we use webpack and ts-loader to bake all .ts files and dependencies into two javascript files (one for the main/browser process, one for the renderer). electron-builder is used to bundle code & assets, generate an nsis installer, build it into an exe installer and sign them (and all the executables and dlls we ship). There are mulitple electron-builder configuration files for multiple variants, only "oneclick" and "advanced" are used for release builds, the others may be in different states of disrepair (though ci should work as well)

As a result, dev builds are easier to work with and building is much quicker but runtime is slower.

Further, we use a two-package structure, meaning the /package.json file is used for all development and the build environment for releases (e.g. this file always controls the electron version being used/bundled) whereas /app/package.json decides settings (name, version, dependencies) for the release builds only. We use a custom script (checkPackages.js) to ensure that the dependencies for release are a subset of the build env dependencies and that they use the same version to avoid problems that didn't occur during testing because of differing dependencies.

Bundled extensions on the other hand are built the same between dev and release: they are always built with webpack and each have their own build setup - with the exception of simple game extensions which are already single js files, those simply get copied over.

Yarn 1 vs Yarn 3 vs NPM vs PNPM

This codebase still use yarn 1 (classic). Any attempt to use yarn 2 or 3 ended up with nonsensical errors (missing dependencies that are clearly listed, successive installs leading to missing packages) with no reasonable way to investigate why. npm and pnpm are quite slow in comparison. We don't really use any yarn-specific features (workspaces?) so switching shouldn't be too difficult but for now yarn "classic" works.

ESM vs CommonJS

At the time of writing, electron doesn't support ES modules so everything is transpiled to commonjs. This has the consequence that some updated libraries supporting only esm can't be used (e.g. new versions of d3). It also means that asynchronous imports (const foo = await import('bar')) are actually synchronous at runtime. Doesn't really matter though since everything is baked into a single file on release builds anyway and code splitting isn't really needed.

Reporting Bugs

Please report issues on GitHub and include at the very least the following information:

All data the client generates (including settings and logs) are stored at:

Build Type Location Common Path
Release %AppData%\Vortex C:\Users\<USERNAME>\AppData\Roaming\Vortex
Dev %AppData%\vortex_devel C:\Users\<USERNAME>\AppData\Roaming\vortex_devel

If you need to report a bug, the following paths inside that directory may be useful in addition to the error message displayed on screen:

Troubleshooting

TODO: Manual steps with dependencies and versions

Resources

Contributing

The majority of Vortex code is open-source. We are committed to a transparent development process and highly appreciate any contributions. Whether you are helping us fix bugs, proposing new features, improving our documentation or spreading the word - we would love to have you as a part of the Vortex community.

License

A this project is licensed under the GPL-3.0 license.