Back to mods
ImGui project artwork

Vintage Story Mod DB · Vintage Story mod

ImGui

You can support me on Patreon: Description This is a library that brings Dear ImGui to Vintage Story To increase/decrease font size (and GUI size as a result), use hotkeys (CTRL + - and CTRL + = by default) Details From Dear ImGui git repository: Dear Im

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which ImGui release matches 1.21.5?

Updated last month
Best match for your filters 1.1.16
Game version 1.21.0, 1.21.1, 1.21.2
Loader Built-in Vintage Story mod system

ImGui 1.1.16 targets 1.21.0, 1.21.1, 1.21.2. It must be installed on the client. Installation on the dedicated server is optional. No extra mods listed for this file.

Where it goes

Is ImGui required on the client, server, or both?

It must be installed on the client. Installation on the dedicated server is optional.

Client Required
Dedicated server Optional
Loader for this release Built-in Vintage Story mod system
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

This release supports both sides, but the source does not require it on the server.

What else does ImGui 1.1.16 need?

1.1.16 on 1.21.5. Every mod below is checked against that same setup.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add ImGui without breaking your instance.

Built for ImGui 1.1.16 on 1.21.5. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use 1.1.16. It targets 1.21.0, 1.21.1, 1.21.2; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    It must be installed on the client. Installation on the dedicated server is optional.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside 1.1.16. It opens that exact file at the source.

About this project

What does ImGui add?

You can support me on Patreon:


Description

This is a library that brings Dear ImGui to Vintage Story

To increase/decrease font size (and GUI size as a result), use hotkeys (CTRL + - and CTRL + = by default)

Details

From Dear ImGui git repository:

Dear ImGui is designed to enable fast iterations and to empower programmers to create content creation tools and visualization / debug tools (as opposed to UI for the average end-user). It favors simplicity and productivity toward this goal and lacks certain features commonly found in more high-level libraries.

Wrapper for ImGui.NET which in it self is wrapper for Dear ImGui - graphical user interface library. In order to use this wrapper you just need to add reference on ImGui.NET (1.89.7.1) and the mod dll itself (like with other mods dependencies, both are in this mod's archive), and add your methods for constructing ImGui windows to VSImGuiModSystem.SetUpImGuiWindows event. Another example: github.com/maltiez2/vsmod_configlib/blob/master/configlib/src/GUI/ConfigWindow.cs

Supports also Not actually (working on it, it seems I need to follow this procedure, if somebody will provide this binaries I'll inculde them in mod):

This mod will allow you to make development tools like tfedit or simple throw away debug/visualisation tools for working on your mod. It would not require your mod to depend on this library if you need it only for debugging. Just wrapp all the code you dont want to ship in #if DEBUG #endif . Bulding such tools is as easy as adding logs.

 

You might want to take a look at: ToastLib for additional functionality


Features

  • Quick and easy small debug tools - you can display and edit in real time any value in any part of your code no matter how deep it is with just a one line (static methods of DebugWindow class from VSImGui namespace)
  • No dependencies required for debug tools - just wrap all the ImGui and VSImGui methods calls you add in '#if DEBUG #endif'
  • Easy to build debug tools - add more sophisticated dev tools specific to your mod to speed up development and ease debugging (for example, Animation Manager library has in-game animation editor in its dev build)
  • Easy and quick to layout GUI with docking and a lot of built-in functionality like color pickers
  • Styles - you can change every color and size and even tile your window with a texture with a simple Style and WindowStyle classes, you can serialize style into json and load it from json

 


Examples and docs (outdated)

ImGui manual for C++, but .NET methods should have same names and similar arguments: https://pthom.github.io/imgui_manual_online/manual/imgui_manual.html

ImGui wiki: https://github.com/ocornut/imgui/wiki

Example of showing demo window: api.ModLoader.GetModSystem<VSImGuiModSystem>().SetUpImGuiWindows += ImGuiNET.ImGui.ShowDemoWindow;

Example of adding debug widget

If you have some field or property in your class (or just some reference type value) you want to display or edit via GUI, you can call a static mehod of a DebugWindow class that will display a widget in a debug window with specified domain as name inside a tab with specified category. Given title serves as this widget id, and calling DebugWindow methods for same domain and title will replace existing widget instead of adding a new one. Some mehod require also an int id, it server same perpouse as title. You can call DebugWindow method in any place of code, any amount of time, but setter and getter delegates will be called once per frame.

private float someValue;
private void SomeMethod()
{
    DebugWindow.FloatSlider("My debug window title", "Some sliders", "a slider", min: 0, max: 1.0f, getter: () => someValue, setter: value => someValue = value);
}

If you want to not add ImGui as dependency you can wrap its mehods with #if DEBUG #endif and leave them only in debug build

private float someValue;
private void SomeMethod()
{
#if DEBUG
    DebugWindow.FloatSlider("My debug window title", "Some sliders", "a slider", min: 0, max: 1.0f, getter: () => someValue, setter: value => someValue = value);
#endif
}
Simple example of a full mod that uses ImGui

To add your own ImGui windows you can add your drawing method to SetUpImGuiWindows event of VSImGuiModSystem. This method will be called once per frame. This method should contain all ImGui methods for drawing windows and widgets. Each frame gui is fully redrawn, so this method servers as layout composer and interface logic at the same time (this is a feature of all immediate mode GUIs).

using ImGuiNET;
using Vintagestory.API.Client;
using Vintagestory.API.Common;
using Vintagestory.API.MathTools;
using VSImGui;

namespace ImGuiExample;
public class ImGuiExampleModSystem : ModSystem
{
    private ICoreClientAPI mApi;

    public override void StartClientSide(ICoreClientAPI api)
    {
        mApi = api;
        api.ModLoader.GetModSystem<VSImGuiModSystem>().SetUpImGuiWindows += Draw;
    }

    private void Draw()
    {
        ImGui.Begin("ImGui example");

        float roll = mApi.World.Player.CameraRoll * GameMath.RAD2DEG;
        ImGui.SliderFloat("Roll", ref roll, -90, 90);
        mApi.World.Player.CameraRoll = roll * GameMath.DEG2RAD;

        ImGui.End();
    }
}

 

 

Project description from Vintage Story Mod DB.

Pick your setup

ImGui releases for each Vintage Story version.

Choose the version and loader you play, then open the matching release.

41 available setups

Showing the newest 12 of 41 game versions. Older files are in the list below.

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

ImGui versions and loaders

3 of 43 releases match
Clear filters

Looking for an older file? The official Vintage Story Mod DB project page is in Resources.