Godot 4, from the code that shipped
Write-ups on the systems behind the SELOdev Godot tools. Each post is drawn from a working system and leaves you able to build a rough version yourself.
- Setting Godot 4 audio bus volume from a slider: Wire a 0-to-1 slider to a Godot 4 audio bus volume setting: linear_to_db, set_bus_volume_db, muting at zero, and saving the level. From a real addon.
- Building a key rebinding menu in Godot 4: Build a key rebinding menu in Godot 4: capture the next input event, swap the InputMap binding, catch conflicts, and persist remaps as serialized events.
- Saving game state between scenes in Godot 4: A scene change should not reset the player's progress. Keep save data in one persistent contract, restore it after the destination scene is ready, and avoid the loading-order bug that makes a save look empty.
- Building a buy and sell shop in Godot 4: A Godot 4 shop buy/sell UI grounded in real vendor code: stock counts, sell price as a fraction of buy, affordability checks, and moving gold and items as one.
- Saving inventory items in Godot 4 without saving Resources: Save an inventory in Godot 4 by writing item ids and counts to JSON, then resolve those ids through a catalog when the game loads. The Resource is your authoring data, not your save format.
- Building a Godot 4 skill tree data structure: Model a Godot 4 skill tree as a Resource: nodes with prerequisites, gating allocation, refunding points, and why the stats snapshot won't persist which nodes you took.
- Collect and kill quest objectives in Godot 4: Build a Godot 4 quest system where collect and kill objectives track progress from combat and inventory signals, then auto-complete, with zero coupling upstream.
- Shaped crafting grid recipes in Godot 4: Match a Minecraft-style grid of placed ingredients to a recipe in Godot 4, cropping the pattern to its bounding box so it matches anywhere on the bench.
- Atomic save files in Godot 4, so a crash can't corrupt them: A power drop mid-write can leave a Godot 4 save half-written and unloadable. Fix the corruption with a temp file plus an atomic rename on the Lite core.
- Migrating old Godot save data when your schema changes: A versioned Godot 4 save format with forward schema migration: read the version field, walk an old file one hop at a time to the current shape, refuse what you cannot upgrade.
- Stat modifiers from gear in Godot 4: How equipping gear applies stat modifiers in Godot 4 and unequipping removes them cleanly, and why you recompute totals from worn gear instead of adding and subtracting deltas.
- Building a paper doll equipment system in Godot 4: Build a paper doll equipment system in Godot 4: named slots that accept only matching gear, and the displaced item returning to your bag on every swap.
- Item stacking and splitting a stack in Godot 4: How item stacking works in a Godot 4 inventory, then how to build a right-click split-stack on top of add_item and remove_item without ever losing an item.
- Drag and drop inventory UI in Godot 4: Godot 4 hands you three drag-and-drop callbacks and no opinion about what a drop means. Here is how to build inventory slots on top of a real stacking inventory, where a partial merge and a clean rejection both fall out of one method call, and the item never mutates behind your back.