Debugging

From Vintage Story Wiki
Jump to navigation Jump to search

Some info on how to track down issues. For players and modders alike.

Debugging performance issues

If you want to report a vanilla game performance issue, please supply the following info

  • The type of lag: Overally low framerate, short or long lag spikes?
  • Is it Client or Server lag:
    • Client lag symptoms: The framerate will be low or the screen will be frozen for short or longer durations.
    • Server lag symptoms: A disconnected icon on the top right corner, have blocks reappearing, animals not moving, broken blocks taking a while before their drops appear

If its client lag

  • Whats the framerate and fps graph look like? (hit CTRL+F3 to see)
  • Whats your graphics settings and what graphics card and RAM capacity do you have?
  • Whats the current memory usage? How long have you been playing? Is it single player or multiplayer?
  • Make a screenshot of the frame profiler output (hit CTRL+F10 to toggle). Before screenshotting please also type the command .edi to get additional frame profiler output.
  • On just individual lag spikes, please run the command .debug logticks 20 if you are usually above 60 fps, or .debug logticks 40 if you are usually above 30 fps. Let it run for a while and then send us the client-main.txt, it's found in %appdata%/VintagestoryData/Logs. Run the same command again to disable the logging. Please make sure that here too, extended debug info (via .edi) is enabled.

If its server lag and you are the owner or on single player

  • Run the command /debug logticks 100 let it run for a while and then send us the server-main.txt, it's found in %appdata%/VintagestoryData/Logs. Run the same command again to disable the logging


Improving Server Performance

  • Make sure the savegame is on an SSD
  • Make sure 2+ GB of system ram stays free
  • in serverconfig.json MaxChunkRadius = reduce to 10 or lower to reduce max view distance, TickTime = set 40 or 50. That gives a bit of cpu headroom (lowers server TPS from 30 TPS to 25 or 20)
  • in servermagicnum.json DefaultEntityTrackingRange = set to 3 (reduce the range at which distance creatures are still active from 128 blocks to 96 blocks)


Main Page: Modding
Green Items require C# coding
Basics

Getting Started | Mod Types | Simple Examples

Asset System | Textures | Items | Recipes | Blocks | Model Creator | Animation Basics | VTML & Icons | Mod Packaging & Release | Modinfo | Debugging

Advanced

JSON Patching | Advanced JSON Items | The Remapper | Server-Client Considerations

Setting Up Your Development Environment (General - Windows - Linux)

Advanced Blocks | Advanced Items | Item-Block Interactions | Block Behavior | Block Entities | Particle Effects | World Access | Inventory Handling | Chat Commands | GUIs | Server-Client Networking | Monkey patching (Harmony)

Data Management

Savegame Data Storage | ModConfig File | Chunk Data Storage | Tree Attribute

Worldgen

WorldGen Concepts | Terrain | Ores | Trees | WorldGen API

Rendering

Shaders and Renderers

Property Overview

Item | Entity | Block | Block Behaviors | Block Classes | Block Entities | Block Entity Behaviors

Workflows & Infrastructure

Modding Efficiency Tips | Mod Extensibility | Load Order

Additional Resources

List of server commands | List of client commands | Client startup parameters | Creative Starter Guide | ServerBlockTicking | Bot System | WorldEdit | Cinematic Camera

Example Mods | API Docs | GitHub Repository