Modding:Debugging Content: Difference between revisions

From Vintage Story Wiki
m
Command line.
mNo edit summary
m (Command line.)
Line 39: Line 39:
== Debugging & Logs ==
== Debugging & Logs ==
Vintage Story logs... pretty much everything. If there is a particular issue inside a json file, the logs will tell you what file it is.
Vintage Story logs... pretty much everything. If there is a particular issue inside a json file, the logs will tell you what file it is.
=== Developer Mode ===
Developer mode has a fair few debugging settings when creating mods, and is particularly useful when creating mods. To enable developer mode, go into the in-game settings, and and check the "''Developer Mode''" box in the interface tab.
This will enable a new tab in the settings window called "''Dev"''. For content mods, it is recommended to enable both the "''Error Reporter''" and ''"Extended Debug Info"'' checkboxes.
When loading a world with developer mode enabled, you can see all the logs whilst your world loads. You can also view the logs folder by clicking "''Open Logs Folder''" at the bottom of this screen.
[[File:LoadingDebugScreenForMods.png|frameless]]
=== Launching the game through command line ===
Although Vintage Story logs everything, it does so in a number of different files. To speed up debugging, you can choose to load the game through the command line via dotnet. This will give you a color-coded console where everything is logged.
[[File:LoadGameThroughConsoleWithModError.png|frameless|887x887px]]
To do this, you will need to create a shortcut. The shortcut can be created anywhere, but it is recommended to make it in the Vintage Story folder. To create a new folder in ''Windows'', right click on any space inside the folder, hover over "''New"'', and then "''Shortcut"''. When asked for the location of the item, enter the following:<syntaxhighlight lang="console">
"C:\Program Files\dotnet\dotnet.exe" VintageStory.dll --tracelog
</syntaxhighlight>You will also be asked to name the shortcut. I called mine "modloader", but you can name it whatever you want.
Now, right click on the newly created shortcut and go in properties. In the "''Start in:''" input, copy and paste the folder that leads to your Vintage Story exe.
[[File:FinishedModLoaderShortcutForDebugging.png|frameless]]
Click "''Apply''" and "''OK''", and now launch your shortcut. You should see a console launch, and shortly after, the game will launch.
To check for errors, load a world. When it finishes loading, look at the console. If there were any errors or warnings during the world startup, they will be copied and displayed near the bottom of the console.


{{navbox/contentmodding}}
{{navbox/contentmodding}}
Confirmedusers
556

edits