Modding:Server-Client Considerations: Difference between revisions

From Vintage Story Wiki
update mod paths to reflect defaults in latest version of game
(Marked this version for translation)
(update mod paths to reflect defaults in latest version of game)
Line 38: Line 38:


<!--T:11-->
<!--T:11-->
# Before getting started, remove any mods that you've put directly in your Vintage Story program directory (such as <code>C:\Program Files\Vintagestory</code>). Mods in this directory will be shared by the server and client with the setup described below.
# Before getting started, remove any mods that you've put directly in your Vintage Story directory (typically <code>%appdata%/Vintagestory/Mods/</code>). Mods in this directory will be shared by the server and client with the setup described below.
#* Instead, move these mods into the data directory (on windows, that is <code>%appdata%/Vintagestory/Mods/</code> by default).
#* Instead, move these mods into the data directory (on Windows, that is <code>%appdata%/VintagestoryData/Mods/</code> by default).
# Set up a shortcut to the game's VintageStoryServer.exe file in your existing Vintage Story program directory. You'll use this shortcut to launch your test server. You will need to give it a custom data path using a run parameter to ensure that the server uses a different data path than the default data path. For example, on Windows your shortcut might have a target of<br><code>C:\Program Files\Vintagestory\VintagestoryServer.exe --dataPath "%appdata%/VintagestoryData_Server"</code><br>[[Image:Local_Server_Example_Shortcut.png]]
# Set up a shortcut to the game's VintageStoryServer.exe file in your existing Vintage Story program directory. You'll use this shortcut to launch your test server. You will need to give it a custom data path using a run parameter to ensure that the server uses a different data path than the default data path. For example, on Windows your shortcut might have a target of<br><code>C:\Program Files\Vintagestory\VintagestoryServer.exe --dataPath "%appdata%/VintagestoryData_Server"</code><br>[[Image:Local_Server_Example_Shortcut.png]]
# Double-click the shortcut to launch the server.
# Double-click the shortcut to launch the server.
# At this point, the server will generate new folders and content in the <code>--dataPath</code> directory you specified. For example, you can now visit that path and add a copy of your mod to the </code>/Mods</code> subdirectory if you'd like the server to load your mod (after which you'd need to restart the server). The server will also output logs to the <code>/Logs</code> subdirectory here.
# At this point, the server will generate new folders and content in the <code>--dataPath</code> directory you specified. For example, you can now visit that path and add a copy of your mod to the </code>/Mods</code> subdirectory if you'd like the server to load your mod (after which you'd need to restart the server). The server will also output logs to the <code>/Logs</code> subdirectory here.
# If you'd like load a copy of your mod on the client side, make sure to add your mod to the normal data path directory (on windows, that is <code>%appdata%/Vintagestory/Mods/</code> by default).
# If you'd like load a copy of your mod on the client side, make sure to add your mod to the normal data path directory (on windows, that is <code>%appdata%/VintagestoryData/Mods/</code> by default).
# Launch the normal game client, and select "Multiplayer" from the main menu. Add a new server and configure it with a Host / IP Address value of "localhost". Then click "Save".<br>[[Image:Local_Server_Example_Config.png]]
# Launch the normal game client, and select "Multiplayer" from the main menu. Add a new server and configure it with a Host / IP Address value of "localhost". Then click "Save".<br>[[Image:Local_Server_Example_Config.png]]
# You can now select your server from the Multiplayer menu to connect! All mods, settings, and logs should be separated, and you can test whether the mod will work as expected on a multiplayer server.
# You can now select your server from the Multiplayer menu to connect! All mods, settings, and logs should be separated, and you can test whether the mod will work as expected on a multiplayer server.
Confirmedusers, editor
104

edits