Translations:Modding:Preparing For Code Mods/11/en

From Vintage Story Wiki
Revision as of 10:45, 20 May 2024 by FuzzyBot (talk | contribs) (Importing a new version from external source)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

When you have your game folder open in Windows file explorer, you need to open this folder in powershell. Ensure you do not have a file or folder selected, and click 'File' in the menu bar, then click 'Open Windows PowerShell'.

OpenVintageStoryFolderInPowershell.png

Powershell will open with your current file path. Ensure that the file path stated does not include the 'assets', 'mods', or 'lib' folders. Paste the following line into powershell, and press enter to run it.

[Environment]::SetEnvironmentVariable("VINTAGE_STORY", ($pwd.path), "User")

This will create the environment variable called "VINTAGE_STORY", and set its value to be the current working directory (the Vintage Story folder). The "user" parameter simply stores this variable as a user-only environment variable, meaning other users on your PC will not be able to use this variable.

Test your environment variable
To ensure your environment variable has been created correctly, run the following command in the opened powershell:
echo $env:VINTAGE_STORY
This should print the full path to your vintage story directory. If it does not, then repeat this section.

When you have set a new environment variable, it is recommended to restart your PC. This will ensure that all programs are using your updated environment variables.