Modding:Debugging Content
Common Issues & Solutions
Some issues are a lot more common than other issues, and when it comes to content modding, it's likely that someone else has had the exact same issue you are trying to fix.
My mod does not appear in the Mod Manager list.
- Your mod is likely in the wrong folder. Ensure your mod is placed inside the "Mods" directory of your game installation, or inside the folder shown when "Open Mods Folder" is clicked on the mod manager.
"Unable to load mod. Check log files." in Mod Manager list.
- Your modinfo file may be formatted wrong.
- You may have two mods with the same modid.
- Your mod structure is not setup correctly. See Developing a Content Mod.
- The modinfo, assets, and (optionally) modicon file must be found inside the top-level folder of your mod.
My Block/Item/Entity is not appearing in game!
- There is likely a mistake in your asset's json file. See the Debugging & Logs section below.
- Check you have added your asset to the correct creative menu.
- Or, see if the object exists by using /giveitem itemcode or /giveblock blockcode.
My Block/Item/Entity is not being rendered correctly.
- Your texture and shape properties may not be setup correctly.
- The game cannot find the texture or shape specified.
- This could be a domain issue. If you are using a base-game texture from a mod, make sure to prefix the filepath with "game:".
All in-game textures look messed-up.
- This is almost always a corrupted texture-atlas issue.
- Although the issue is supposedly solved from v1.19.0, this can still sometimes happen due to having a large number of textures.
- It may also be caused by using unsupported graphics cards, potentially those that have a low amount of VRAM.
My Block with a custom shape is causing holes in adjacent blocks.
- Your block needs to be marked as not solid and not opaque.
"sidesolid": { "all": false }, "sideopaque": { "all": false }
- This is due to how block occlusion works - A block's face is only rendered if the connecting face is not marked as solid.
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.
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.
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.
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:
"C:\Program Files\dotnet\dotnet.exe" VintageStory.dll --tracelog
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.
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.
Content Modding | |||||||||
---|---|---|---|---|---|---|---|---|---|
Basics | Content Mods • Developing a Content Mod • Packaging & Release | ||||||||
Tutorials |
|
||||||||
Concepts | Modding Concepts • Modinfo • Variants • Domains • Patching • Remapping • World Properties | ||||||||
Moddable Assets |
|
||||||||
Uncategorized |
|
Wondering where some links have gone?
The modding navbox is going through some changes! Check out Navigation Box Updates for more info and help finding specific pages.
Modding | |
---|---|
Modding Introduction | Getting Started • Theme Pack |
Content Modding | Content Mods • Developing a Content Mod • Basic Tutorials • Intermediate Tutorials • Advanced Tutorials • Content Mod Concepts |
Code Modding | Code Mods • Setting up your Development Environment |
Property Overview | Item • Entity • Entity Behaviors • Block • Block Behaviors • Block Classes • Block Entities • Block Entity Behaviors • Collectible Behaviors • World properties |
Workflows & Infrastructure | Modding Efficiency Tips • Mod-engine compatibility • Mod Extensibility • VS Engine |
Additional Resources | Community Resources • Modding API Updates • Programming Languages • List of server commands • List of client commands • Client startup parameters • Server startup parameters Example Mods • API Docs • GitHub Repository |