Weapon Swapping and Inspectors
A few things done in the last couple of weeks. I yearn for algorithms and procgen yet I have to do refactoring, tools, and *gasp* content. Not my forte!
- Weapon set swapping support: I've been playing TES Oblivion lately (not the remaster), and I keep thinking how imperative is to be able to activate/deactivate torches really quickly. And since a torch is something like a 1h weapon in Sigil of Kings, this means that there should be weapon set swapping support. This was done, works fine, there's no nice GUI to show registration and selection of current set, but that's alright for now, as there is visual communication in the GUI of the currently selected set. Changing weapon sets costs time, so beware!
- Limbo entities support in prefab levels: In a prefab level, it's possible to set some entities in Limbo (in game, but nowhere in particular), so that they can teleport in based on events or other hooks
- Inspector refactor: I'm using Dear ImGui to inspect the game state, and for some convenience functionality. This is all great, but it looked terrible, because ImGui by default for performance reasons puts keys on the right and values on the left. Using it like that for editing was painful to say the least, as I caught myself many times editing the JSON data instead, rather than using the GUI, which is an indicator of a terribad GUI. So, since Dear ImGui also supports tables, and they are wonderful for aligned key/value pairs, I went through the codebase and refactor all the ImGui code, custom or reflection-based, to use tables. The result? Far more readable GUI and far nicer to edit too!
- Inspector and tool window shortcuts: Minor but useful thing - I have two Dear ImGui windows: one for tools and one for game state inspection. Each now has a show/hide shortcut, and another shortcut for cycling through layouts/positioning: fullscreen, left half and right half.
- EntityFinder refactor: I had some functionality to find entities, but had to modify that to anticipate for the eventual and very real scenario of having to search for tens of thousands of entities or more. There's now some centralised functionality where we can provide hints wrt location of entity (e.g. anywhere, current level, limbo) and what does the text of the search string mean: could be some generic tag (useful for cutscene entities where we don't know entity IDs in advance) or the actual name/id of the entity.
- Cutscene editor: Started work on this, it's basically some Dear ImGui tool which is a minimal wrapper over a reflective inspector of a cutscene specification with a few extras: basically a bunch of buttons like Play, Stop, Import, Export, etc. The plan is to make a few demo cutscenes of increasing complexity, and ensure there are helpful hints and reminders that assist the authoring process

