Mods / ImGui
Author: Maltiez
Side: Both
Created: Nov 30th 2023 at 7:09 PM
Last modified: Nov 13th at 4:33 AM
Downloads: 316127
Follow Unfollow 2451
Recommended download (for Vintage Story 1.21.0, 1.21.1 and 1.21.2 - 1.21.5):
vsimgui_1.1.16.zip
1-click install
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)
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
DebugWindowclass fromVSImGuinamespace) - 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
StyleandWindowStyleclasses, 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;
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
}
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();
}
}
| Mod Version | Mod Identifier | For Game version | Downloads | Released | Changelog | Download | 1-click mod install* |
|---|---|---|---|---|---|---|---|
| 1.1.16 | vsimgui | 14779 | Nov 13th at 4:33 AM | vsimgui_1.1.16.zip | 1-click install | ||
|
Fixed Almendra font | |||||||
| 1.1.15 | vsimgui | 9246 | Nov 4th at 10:46 PM | vsimgui_1.1.15.zip | 1-click install | ||
|
Added some safeguards | |||||||
| 1.1.14 | vsimgui | 33886 | Oct 5th at 2:55 PM | vsimgui_1.1.14.zip | 1-click install | ||
|
Fixed text input softlock | |||||||
| 1.1.13 | vsimgui | 15737 | Sep 23rd at 12:50 PM | vsimgui_1.1.13.zip | 1-click install | ||
|
Fixed bug when you can still hover and click over gui elements when mouse is not visible on screen | |||||||
| 1.1.12 | vsimgui | 34308 | Aug 15th at 10:34 PM | vsimgui_1.1.12.zip | 1-click install | ||
|
Possible fix for crash when imgui window is outside of main game window | |||||||
| 1.1.11 | vsimgui | 714 | Aug 9th at 9:45 PM | vsimgui_1.1.11.zip | 1-click install | ||
|
Changed how Esc works. Fixed crash when ImGui can't access monitor | |||||||
| 1.1.10 | vsimgui | 2630 | Jul 16th at 3:03 PM | vsimgui_1.1.10.zip | 1-click install | ||
|
Recompiled for pre.3 | |||||||
| 1.1.9 | vsimgui | 3681 | Jun 17th at 8:39 AM | vsimgui_1.1.9.zip | 1-click install | ||
|
Recompiled for 1.21 | |||||||
| 1.1.8 | vsimgui | 64072 | Apr 4th at 9:09 AM | vsimgui_1.1.8.zip | 1-click install | ||
|
Added hotkeys to increase/decrease default font size | |||||||
| 1.1.7 | vsimgui | 61972 | Oct 24th 2024 at 3:13 AM | vsimgui_1.1.7.zip | 1-click install | ||
|
Updated to 1.20.0-pre.7 | |||||||
| 1.1.6 | vsimgui | 2061 | Oct 5th 2024 at 3:36 PM | Empty | vsimgui_1.1.6.zip | 1-click install | |
| 1.1.5 | vsimgui | 32380 | Jun 6th 2024 at 12:56 PM | vsimgui_1.1.5.zip | 1-click install | ||
|
Added support for cyrillic, chinese, japanese, korean characters | |||||||
| 1.1.4 | vsimgui | 1881 | May 30th 2024 at 10:51 AM | vsimgui_1.1.4.zip | 1-click install | ||
|
Fixed memory leak on word reloads | |||||||
| 1.1.3 | vsimgui | 13338 | Mar 21st 2024 at 8:32 AM | vsimgui_1.1.3.zip | 1-click install | ||
|
Fixed problems with rendering and cursor position registering if monitor scale was not set to 100% Fixed mouse wheel not being captured by imgui windows | |||||||
| 1.1.2 | vsimgui | 2389 | Mar 7th 2024 at 5:42 PM | vsimgui_1.1.2.zip | 1-click install | ||
|
Nuget packages support | |||||||
| 1.1.1 | vsimgui | 1125 | Mar 2nd 2024 at 12:10 PM | vsimgui_1.1.1.zip | 1-click install | ||
|
Fixed bug with popups sticking to mouse with window that created them when they cross main window border | |||||||
| 1.1.0 | vsimgui | 5938 | Mar 2nd 2024 at 12:42 AM | vsimgui_1.1.0.zip | 1-click install | ||
|
Changelog
| |||||||
| 1.0.0 | vsimgui | 675 | Feb 28th 2024 at 9:16 AM | vsimgui_1.0.0.zip | 1-click install | ||
|
Added on imgui closed event | |||||||
| 1.0.0-pre.3 | vsimgui | 319 | Feb 28th 2024 at 5:51 AM | vsimgui_1.0.0-pre.3.zip | 1-click install | ||
|
Changelog
| |||||||
| 1.0.0-pre.2 | vsimgui | 484 | Feb 26th 2024 at 3:10 PM | vsimgui_1.0.0-pre.2.zip | 1-click install | ||
|
Use previous versions (prior to 1.0.0) for dependent mods unless they explicitly state the opposite. This release is for modders and testing. Unstable, not backwards compatible (to versions prior 1.0.0), will certainly break dependent mods. Changelog
| |||||||
| 1.0.0-pre.1 | vsimgui | 344 | Feb 26th 2024 at 4:49 AM | vsimgui_1.0.0-pre.1.zip | 1-click install | ||
|
Use previous versions for dependent mods unless they explicitly state the opposite. This release is for modders and testing. Unstable, not backwards compatible (will certainly break dependent mods). Changelog
| |||||||
| 0.3.5 | vsimgui | 1368 | Feb 13th 2024 at 10:01 PM | vsimgui_0.3.5.zip | 1-click install | ||
|
Fixed Mac support | |||||||
| 0.3.4 | vsimgui | 1826 | Feb 13th 2024 at 7:52 PM | vsimgui_0.3.4.zip | 1-click install | ||
|
Version with requirement for both sides | |||||||
| 0.3.3 | vsimgui | 6020 | Jan 18th 2024 at 11:26 AM | Empty | vsimgui_0.3.3.zip | 1-click install | |
| 0.3.2 | vsimgui | 784 | Jan 14th 2024 at 3:22 AM | vsimgui_0.3.2.zip | 1-click install | ||
|
Just updated required game version to help moddb pull correct version of the mod | |||||||
| 0.3.1 | vsimgui | 578 | Jan 13th 2024 at 1:27 PM | vsimgui_0.3.1.zip | 1-click install | ||
|
Fixed a bug related to some stuff not being disposed | |||||||
| 0.3.0 | vsimgui | 302 | Jan 13th 2024 at 9:33 AM | vsimgui_0.3.0.zip | 1-click install | ||
|
New helper classes (editors and filtering) New debug widgets (now you can easily add a widget to a dedicated debug window from any part of your code with just a one line) | |||||||
| 0.2.4 | vsimgui | 334 | Jan 12th 2024 at 2:28 PM | vsimgui_0.2.4.zip | 1-click install | ||
|
Removed debug logs | |||||||
| 0.2.3 | vsimgui | 345 | Jan 11th 2024 at 7:51 PM | vsimgui_0.2.3.zip | 1-click install | ||
|
Added support for Linux (previously it was bugged and gave an error on loading specific library) | |||||||
| 0.2.2 | vsimgui | 477 | Jan 9th 2024 at 10:18 AM | vsimgui_0.2.2.zip | 1-click install | ||
|
Made not required on both server and client | |||||||
| 0.2.1 | vsimgui | 607 | Dec 19th 2023 at 3:24 AM | vsimgui_0.2.1.zip | 1-click install | ||
|
Assigned ExecuteOrder to 0.001 so it will be loaded before other mods | |||||||
| 0.2.0 | vsimgui | 367 | Dec 16th 2023 at 7:34 AM | vsimgui_0.2.0.zip | 1-click install | ||
|
New default vanilla friendly style Style and WindowStyle classes Style editor for editing them Export styles to json and load from json Tiling window background with texutre (in Utils class) Vanilla fonts are loaded and used by default | |||||||
| 0.1.1 | vsimgui | 458 | Dec 12th 2023 at 4:42 AM | Empty | vsimgui_0.1.1.zip | 1-click install | |
| 0.1.0 | vsimgui | 331 | Dec 5th 2023 at 2:12 AM | vsimgui_0.1.0.zip | 1-click install | ||
|
Config file (imgui.ini) now saved in ModConfig folder Added support for:
| |||||||
| 0.0.1 | vsimgui | 329 | Nov 30th 2023 at 7:09 PM | vsimgui_0.0.1.zip | 1-click install | ||
|
first test version | |||||||
Bug: IMGUI controls missing 'f' in "Font".
TY TY TY so much!!!!
I'm not sure what I'm doing wrong, but I would like to increase the structure rates drastically and for whatever reason, either this or config don't work. When I open my world, it gives me a couple error messages, and then when I open up the settings area, it just doesn't show anything to edit. Anyone have any idea how to fix this?
@Maltiez Thank you for the reply! Unfortunately I don't seem to have an imgui.ini file in my ModConfig folder. I installed the latest version of imgui for 1.21.0-rc.4, but there's no imgui.ini, or even a vsimgui.ini that I see.
SabineWebb remove imgui.ini file in ModConfig folder
I'm playing 1.21.0 with one monitor. When I tried to move the mod settings window, it made a second window with the settings window and now I have to tab out of the game to make any modifications. The problem is that when I do so, none of the changes stick. How do I get the window back into the game window?
Running this in conjunction with Config Lib 1.10.1 (for 1.21.0-rc.6) + BetterRuins 0.5.0 (for 1.21.0-rc.7) on latest 1.21 stable release without any issues.
That's not to say there aren't any, but it generally seems to play nice with the stable version!
Latest version no crash on RC4.
I don't know about RC5 since I reverted back due to the windmill bug.
Crash still happening with RC4 and latest version.
I can reproduce it, it is that regular.
Game Version: v1.21.0-rc.3 (Unstable)8/9/2025 11:15:46: Critical error occurred in the following mod: vsimgui@1.1.10
Loaded Mods: buzzwords@1.8.0, cutthehides@1.0.0, immersivecorpsedrop@1.0.3, lanternsarelighters@1.0.0, makesaltnmore@1.0.1, mbr@1.0.0, moreicons@1.1.0, noisybears@1.1.0, particlesplus@2.3.1, patchdebug@1.1.2, recyclablebags@1.0.0, ripened_wild_crops@1.0.0, simplelogging@0.1.5, stepfixelk@0.0.1, sletharm@0.1.1, visibleore@1.0.1, game@1.21.0-rc.3, vsimgui@1.1.10, zoombuttonreborn@2.0.0, kalwaysgetcropseeds@1.0.0, egocaribautomapmarkers@4.0.3, betterfirepit@1.1.6, betterstonepath@1.0.4, blocksoverlay@4.5.2, carryon@1.10.0-rc.1, commonlib@2.6.1, composter@1.2.1, configlib@1.9.1, cratebulkinput@1.0.0, danatweaks@3.5.0, easylightlevels@1.0.3, extrainfo@1.9.10, farmlanddropswithnutrients@1.2.1, freedomunits@1.1.4, harvestcorpsesquickly@1.0.0, healthbar@1.0.7, hudclockpatch@1.1.1, improvedhandbookrecipes@1.1.3, knapster@2.14.6, mobsradar@2.1.9, projectiletracker@1.0.4, statushudcont@3.2.7, stepupcontinued@0.0.1, stripper@0.0.5, traitacquirer@0.9.6, translocatordirectionindicator@1.0.0, creative@1.21.0-rc.3, survival@1.21.0-rc.3, extraoverlays@1.5.0, pickupartist@0.3.1, traitacquireraddon@1.0.0, treetapping@1.0.0
System.NullReferenceException: Object reference not set to an instance of an object.
at OpenTK.Windowing.Desktop.MonitorInfo..ctor(MonitorHandle handle)
at OpenTK.Windowing.Desktop.Monitors.GetMonitorFromWindow(Window* window)
at VSImGui.Controller.Update(Single deltaSeconds, Boolean captureInputs) in D:\Projects\VintageStory\vsimgui\VSImGui\source\Integration\Controller.cs:line 46
at VSImGui.OffWindowRenderer.OnRenderFrame(Single deltaTime, EnumRenderStage stage) in D:\Projects\VintageStory\vsimgui\VSImGui\source\Integration\Dialog.cs:line 153
at Vintagestory.Client.NoObf.ClientMain.RenderToDefaultFramebuffer(Single dt) in VintagestoryLib\Client\ClientMain.cs:line 1010
at Vintagestory.Client.GuiScreenRunningGame.RenderToDefaultFramebuffer(Single dt) in VintagestoryLib\Client\MainMenu\Screens\GuiScreenRunningGame.cs:line 250
at Vintagestory.Client.ScreenManager.Render(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 760
at Vintagestory.Client.ScreenManager.OnNewFrame(Single dt) in VintagestoryLib\Client\ScreenManager.cs:line 663
at Vintagestory.Client.NoObf.ClientPlatformWindows.window_RenderFrame(FrameEventArgs e) in VintagestoryLib\Client\ClientPlatform\GameWindow.cs:line 113
at OpenTK.Windowing.Desktop.GameWindow.Run()
at Vintagestory.Client.ClientProgram.Start(ClientProgramArgs args, String[] rawArgs) in VintagestoryLib\Client\ClientProgram.cs:line 337
at Vintagestory.Client.ClientProgram.<>c__DisplayClass10_0.<.ctor>b__1() in VintagestoryLib\Client\ClientProgram.cs:line 133
at Vintagestory.ClientNative.CrashReporter.Start(ThreadStart start) in VintagestoryLib\Client\ClientPlatform\ClientNative\CrashReporter.cs:line 95
This happens when I forget the game is running and go away long enough for my monitor to shut off.
Usually the game will be paused, but it has even happened when I was just in the main menu.
I don't know how different PR3 is from RC3 or if it makes a difference, but I figured better to let you know.
Maltiez Hi, how did you added version "for testers" on the page?
If you are having issues with this mod and config lib:
uninstall both and go into the "files" tab on both mod pages to download the previous version
make sure you restart your game.
the problem is that the mods have updated to support the unstable branch of the game, but that does not support the stable branch anymore.
once you go back to the previous version and restart the game, the issue will be fixed.
1.20.12?
TassieTiger I'm running the 1.1.8 version and I get the same message...
Im running the latest version of both mods for betterRuins but the button doesent do anything.. im on 1.20.12 am i doing something wrong?
TassieTiger Bang on accurate and thanks for that.
As you mentioned ImGUI 1.1.9 is ONLY good for unstable VS 1.21.0-pre.1
I can probably reconfirm what other people already know - Tested on stable and using ImGUI 1.1.8 = works fine
Easy fix when choosing the correct version (me = dum-dum)
A big thanks for Maltiez for the mod too!
Guys make sure you are running the appropriate version. Go into the files tab and make sure the version you download matches the game version you are running. I dare say most of you are running the latest stable game version 120.12 while trying to use a version of this mod for the unstable version. It is working fine for me
I'm having the same issue as everyone else. Same error.
Checked this mod for the error - full log here with line errors mentioned when using ModContainer.cs:lines 457 & 454 : https://pastebin.com/PX3iNFHi
vsimgui was the only mod enabled, so doesn't look to be related to other mods.
was using mod version 1.1.9 with VS v1.20.12 (in case I'm using the wrong version - is this latest version not backwards compatible with v1.20.12?)
vsimgui fails to initialise with this error occuring
same are you also not getting the button to use stuff like config lib
RedRockG came to comment im getting the same error
Hello, I am receiving the following message:
21.6.2025 16:04:30 [StoryEvent] Comienza...
21.6.2025 16:04:30 [StoryEvent] Siente...
21.6.2025 16:04:32 [Error] [vsimqui] An exception was thrown when trying to load assembly:
21.6.2025 16:04:32 [Error] [vsimqui] Exception: Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. El sistema no puede encontrar el archivo especificado.
at System.ModuleHandle.ResolveType(QCallModule module, Int32 typeToken, IntPtr* typeInstArgs, Int32 typeInstCount, IntPtr* methodInstArgs, Int32 methodInstCount, ObjectHandleOnStack type)
at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
at System.Reflection.RuntimeModule.ResolveType(Int32 metadataToken, Type[]
I uploaded wrong build and reuploaded correct one after several minutes
that fixed it. so it just didn't download correctly the first time?
TakeoTheWolf
Redownload latest release
somehow this new update cuases crashes upon saving and leaving a single player world, it prevents the save sometimes as well. and doesn't activate the crash handler so I have no logs to offer you. sorry to be a bother.
Losa98
Added hotkeys to decrease/increase gui size, dont want to tie it to vanilla gui scale
Hello please patch to scale with in-game gui size setting, I can't see anything in the config window because the text is way too small!! Tried a bunch of different things to fix it and while I could make it bigger it would drop the resolution of the rest of the game by a ton. thank you!!
Edit: this issue caused me to find out windows magnifying glass exists xD pretty useful tbh, the shortcut is the windows key and the plus button
Does most current version work with 1.20.4?
Can I use this mod to increase font size? It's hard for me to read text in this game...
Do i need this mod, for BetterRuins? Is it necessary?
which version is compatible with 1.19.8 please!
which version is compatible with 1.19.8? (current stable)
Exstructor
You can try building binaries yourself. This is stuff I used to do this: https://drive.google.com/file/d/1mJ5b5-5wkU4Fo9jQJAUiQT3RmJZtPotX/view?usp=sharing, I dont remember the steps and details cause it was long ago. If you will be able to successfully build it, just replace binaries in mod archive.
Hey, I'm using Linux ARM (aarch64), and the so files have the wrong architecture, how can I fix that?
Maltiez thanks
Just tested latest version on Ubuntu 20: works fine
adres4t
Should work on linux, need more info, logs and such, better in VS discord.
what about linux compatibility? can't join any server with this library on.
Maltiez
yep you are right i finally fixed it and it works, Thanks.
Yes. Considering you asked this question, it probably does. You have 0.3.5 version for 1.19.4-rc.1 version of the game, but your game version is probably 1.19.3.
says that unable to resolve some mod dependencies???
Maltiez
I just checked on 19.1.4-rc and with v0.3.5 and the game loads normally! You are the best for resolving this so fast, really appreciate it!
Dmitryz
0.3.5 will hopefully fix mac support
Dmitryz
Mac... It is kinda not supported, or rather I cant test it on mac and debug cause I dont have mac, and library needs a binary for it. I will try to solve Mac support in a couple of days.
Upd. Ok, found an image of mac for vmware
I am on a Mac (v19.1.3) and I believe I am facing the
problem.
Is anyone aware of any workarounds? Tried googling how to change the noexec status, but the suggested solutions didn't seem to work, game crashes on startup if I have this mod enabled
rayray
Make sure that you have the latest versions of both ImGui and Config lib mods, mod manager warning does not matter in this case
say it needs error say it needs 1.18.8 even though you said for 1.19 and crashes when i press p to change elements on hud for mod