-
Notifications
You must be signed in to change notification settings - Fork 147
File Based Override Instructions
As of Vortex 1.14.0, mod authors can control how Vortex installs their mods by adding a vortex_override_instructions.json
file to the root folder of their mod.
This feature has been developed primarily to ensure a mod is installed correctly even if the Vortex game extension is outdated or flawed (incorrect mod type assignment, incorrect file destination, etc).
It should not be used as an alternative to informing the game extension author of any issues with their code - the instructions should ideally be generated automatically by the game extension. This functionality should only be used as an interim fix while waiting for the game extension to update, or when a mod's packaging pattern is too complex for the game extension to install correctly.
The system is using the same IInstruction
object array as the custom installers of the game extension.
For more information regarding the different instruction types and overall structure, please refer to this link.
Please Note, at the time of writing this article - generatefile
, unsupported
, error
instruction types can be potentially used maliciously and are therefore disregarded when detected.
Additionally - override instructions are not applied when installing a mod through a collection!
Consider a use case where a game extension assigns the wrong mod type to a certain mod, causing it to deploy its files in an incorrect location.
Adding the override file to the root of the mod with the below JSON data will let Vortex know we want to deploy the mod to the game's root directory.
[{ "type": "setmodtype", "value": "dinput" }]
dinput
is the mod type id for engine injectors and is available to all game extensions. It will always deploy to the game's root folder.
Vortex will first check if the mod type id is supported for the active game before assigning it.
To find out which mod types are available, the game extension's code should be reviewed; specifically the id assigned during the mod type registration.
e.g. the id of the mod type is the first parameter in any mod type registration call
context.registerModType('dinput', 100, gameSupported, getPath, testDinput, {
mergeMods: true,
name: 'Engine Injector',
});
In certain situations you may want to change the location where Vortex deploys some of the files found within the mod's archive. Vortex uses copy instructions specifying the relative path of the file within the mod's archive as the source, and the relative path of where the file should be deployed to in the game's directory as a destination.
[{
"type": "copy",
"source": "someDirectory/someFile.txt",
"destination": "someNewDirectory/someFileRenamed.txt"
},
{
"type": "copy",
"source": "someDirectory/someDifferentFile.txt",
"destination": "someNewDirectoryRenamed/someDifferentFile.txt"
}]
Please note that the destination's relative path is dependant on the mod type assigned to the mod. The system cannot currently be used to deploy one file to the game's directory in "Program Files" and another to the "My Documents" folder for example.
(Well, it can - but that would require a definition for a submodule type instruction and can get extremely complex, this is best avoided)
As this is an array of IInstruction objects, you can add/remove entries as needed; e.g. you can set copy instructions alongside a mod type assignment instruction if needed.
[{
"type": "copy",
"source": "someDirectory/someFile.txt",
"destination": "someNewDirectory/someFileRenamed.txt"
},
{
"type": "copy",
"source": "someDirectory/someDifferentFile.txt",
"destination": "someNewDirectoryRenamed/someDifferentFile.txt"
},
{
"type": "setmodtype",
"value": "dinput"
}]
Using an online JSON Lint tool is highly advisable when generating these instructions.
This wiki and the Vortex Readme document contains a lot of information, please take your time and read these instructions carefully.
We provide detailed changes for each Vortex release.
If you have any questions about Vortex usage or want to share some information with the Vortex community, please go to one of the following places:
- About
- Install
- Troubleshooting
- Troubleshooting
- Developers
- Troubleshooting
- Developers
- Valheim
- Bannerlord
- BepInEx
- How to test a game extension
- How to package a game extension
- How to upload an extension to Nexus
- How to submit a game extension for review
Warning
The below documentation has not been checked for quality since migrating to GitHub Wiki and the information contained is potentially out of date and\or repeated.
- Frequently Asked Questions
- Getting Started
- Deployment Methods
- Downloading from Nexus Mods
- Managing File Conflicts
- Managing your Load Order
- Managing Save Games
- Setting up Profiles
- Keyboard Shortcuts
- How to create mod installers
- External Changes
- The Vortex Approach to Load Order
- Moving Vortex to a new PC
- Modding Skyrim Special Edition with Vortex
- Modding Mount & Blade II: Bannerlord with Vortex
- Modding Monster Hunter: World with Vortex
- Modding The Witcher 3 with Vortex
- Modding Baldur's Gate 3 with Vortex
- Modding Stardew Valley with Vortex
- Modding Valheim with Vortex
- Error Messages
- Misconfigured Documents Folder
- .NET 6 Install Issues
- Downgrading Extensions
- Command Line Parameters
- Introduction to Vortex extensions
- Creating a game extension (JavaScript)
- Creating a theme
- Game detection
- Adding a main page
- Adding a load order page
- Building UI with Vortex and React
- Packaging an extension
- Introduction
- Packaging extensions
- Project management
- Harmony Patcher Exectuable
- Vortex Harmony Mod Loader
- Setting up your dev environment
- Creating a theme
- Creating a game extension