### Quickstart Script Example Source: https://wiki.vintagestory.at/Modding%3AModding_Efficiently A batch script to launch Vintage Story directly into a specific world with predefined settings, saving time on setup. ```batch VintageStory.exe -oTestWorld -pcreativebuilding ``` -------------------------------- ### Install .NET Runtime via apt Source: https://wiki.vintagestory.at/Installing_the_game_on_Linux Installs the .NET Runtime using the apt package manager. This is an example command and may need adjustments based on the specific .NET version required. ```bash sudo apt install dotnet-runtime-7.0 ``` -------------------------------- ### Get Server Startup Parameters Help Source: https://wiki.vintagestory.at/Server_startup_parameters To view a list of all available server startup parameters, execute the help command. ```bash VintageStoryServer.exe --help ``` -------------------------------- ### rawfm format example Source: https://wiki.vintagestory.at/Special%3AApiHelp/rawfm Example of how to use the rawfm format to get site information, specifically namespaces. ```APIDOC ## GET api.php?action=query&meta=siteinfo&siprop=namespaces&format=rawfm ### Description Retrieves query results in the RAW format, specifically fetching site information including namespaces. ### Method GET ### Endpoint /api.php ### Parameters #### Query Parameters - **action** (string) - Required - The action to perform, typically 'query'. - **meta** (string) - Required - The metadata to retrieve, 'siteinfo' in this case. - **siprop** (string) - Required - Specific siteinfo properties to retrieve, 'namespaces' is used here. - **format** (string) - Required - The desired output format, 'rawfm' for raw format. ### Request Example ``` api.php?action=query&meta=siteinfo&siprop=namespaces&format=rawfm ``` ### Response #### Success Response (200) Returns the query result in a raw, unformatted text or JSON structure, depending on the specific data and MediaWiki configuration. The exact structure for namespaces in rawfm is not detailed here but would be a direct representation of the data. #### Response Example (Example not provided in source) ``` -------------------------------- ### Install .NET 7 Runtime with APT Source: https://wiki.vintagestory.at/index.php?action=edit&title=Installing_the_game_on_Linux Installs the .NET 7 Runtime on Debian-based systems using the apt package manager. This example demonstrates searching for the package and then installing it. ```bash sudo apt update sudo apt install dotnet-runtime-7.0 ``` -------------------------------- ### Get Server Startup Parameters Help Source: https://wiki.vintagestory.at/index.php?group=page-Server+startup+parameters&language=nn&title=Special%3ATranslate To get a list of all implemented startup parameters, call this command in your game directory. Parameters with multiple values can be supplied with values separated by spaces. ```bash VintageStoryServer.exe --help ``` ```bash VintageStoryServer.exe --addModPath="path/to/dir1" "path/to/dir2" ``` -------------------------------- ### List All Startup Parameters Source: https://wiki.vintagestory.at/index.php?action=edit&mobileaction=toggle_view_desktop&title=Client_startup_parameters To view a comprehensive list of all available command-line arguments for the game, execute the game's executable with the --help flag. ```bash VintageStory.exe --help ``` -------------------------------- ### Custom Shader Setup Example Source: https://wiki.vintagestory.at/Modding%3ARendering_API Example demonstrating how to set up a custom shader for rendering overlays. This is useful for advanced visual effects. ```csharp using System; using System.Collections.Generic; using Vintagestory.API.Client; using Vintagestory.API.Common; using Vintagestory.API.Common.Entities; using Vintagestory.API.Maths; using Vintagestory.Common; namespace ScreenOverlayShaderExample { public class ScreenOverlayShaderExample : ModSystem { public override void StartClientSide(ICoreClientAPI api) { api.Event.RegisterRenderer(new ScreenOverlayRenderer(api), 1000); } } public class ScreenOverlayRenderer : IRenderer { ICoreClientAPI api; ShaderProgram shaderProgram; public ScreenOverlayRenderer(ICoreClientAPI api) { this.api = api; // Load shader from json file string code = api.Assets.Get( ``` -------------------------------- ### Example ModSystem Class Source: https://wiki.vintagestory.at/Modding%3AServer-Client_Considerations This is a basic example of a ModSystem class, which is the core of a Vintage Story mod. It shows the typical inheritance from ModSystem and the common Start method for initialization. ```csharp public class ExampleMod : ModSystem ``` -------------------------------- ### Print Help Information Source: https://wiki.vintagestory.at/index.php?action=edit&mobileaction=toggle_view_desktop&title=Client_startup_parameters Use the -h or --help flags to display help information, including a list of all available startup parameters, and then exit. ```bash VintageStory.exe -h ``` ```bash VintageStory.exe --help ``` -------------------------------- ### Get Server Startup Parameters Help Source: https://wiki.vintagestory.at/Special%3ASearch/Server_startup_parameters To get a list of all currently implemented server startup parameters, execute this command in your game directory. ```bash VintageStoryServer.exe --help ``` -------------------------------- ### Example: Dairy Category Source: https://wiki.vintagestory.at/Template%3AItem/Food/Category/doc Demonstrates how to get the 'Dairy' category name using its ID. ```wikitext {{Item/Food/Category|dairy}} ``` -------------------------------- ### Example: Protein Category Source: https://wiki.vintagestory.at/Template%3AItem/Food/Category/doc Demonstrates how to get the 'Protein' category name using its ID. ```wikitext {{Item/Food/Category|protein}} ``` -------------------------------- ### Get Help and Version Information Source: https://wiki.vintagestory.at/Special%3AMyLanguage/Client_startup_parameters Use these parameters to display the game version or a list of all available startup parameters. This is useful for troubleshooting or understanding command-line options. ```bash VintageStory.exe --help ``` ```bash VintageStory.exe -v ``` ```bash VintageStory.exe --version ``` -------------------------------- ### Get Help and Version Information Source: https://wiki.vintagestory.at/index.php?action=edit&title=Client_startup_parameters Use these flags to display the game version or a list of all available startup parameters. ```bash VintageStory.exe --help ``` ```bash VintageStory.exe -v, --version ``` -------------------------------- ### Example: Grain Category Source: https://wiki.vintagestory.at/Template%3AItem/Food/Category/doc Demonstrates how to get the 'Grain' category name using its ID. ```wikitext {{Item/Food/Category|grain}} ``` -------------------------------- ### Download and Execute .NET Scripted Installer Source: https://wiki.vintagestory.at/index.php?mobileaction=toggle_view_desktop&title=Installing_the_game_on_Linux Use these commands to download the .NET installation script, make it executable, and then run it to install the specified .NET channel. This method is recommended for a streamlined installation. ```bash wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh ``` ```bash chmod +x ./dotnet-install.sh ``` ```bash ./dotnet-install.sh --channel 10.0 ```