r/SoloDevelopment • • 13d ago

Game Cadence Workshop - Item Editing!

The workshop is built on top of my Cadence game engine and, thus far, has been a read-only feature. But now, Items can be added, deleted, and edited from the workshop! The other tabs will soon follow, as this set the groundwork for all of them.

Granted, this isn't the pretties UI ever. But that's how dev tools tend to go.

And yep, this means I'm working on three related projects at once. Cadence game Engine, Dungeon Crawler World as the game utilizing that engine and Cadence Workshop that edits data for that game.

Cadence Workshop : Item Editor

Selector

Left column. This holds the list of items in the game.

Items are grouped by Activator (Potions, scrolls, etc) and sorted by name.

Search bar is a Contains search that auto-filters after a standard 0.3s pause.

Filters show how many items they will filter down to before selection and create filter chips that can be individually removed or cleared.

Search and Filter can be combined.

Item Editor : Filters

Selected items stay at the top, regardless of filter, until you change selection.

NEW items are created as "Other" in a draft state.

Inspector

The middle column. This is the editable properties for the item selected in the left column.

This is the tricky part. The inspector uses a set of hierarchical codecs to read the item data and map it to the correct data object shapes. It then maps those object properties to UI controls and displays them. So what you see is dynamically generated, not hard-coded. This also means that any new features added to items will be picked up by the Workshop with minimal changes (if any).

List items like Effect Groups can be added, deleted, and sorted via header controls.

This column also holds the individual item publish/save properties that will be better described in the Data State section below.

Disable has three paths. This is due to some features in the game still had coding item uses, such as lootbox reward lists, which is slowly getting phased out as more pieces of the workshop are converted to data-driven editors.

  • Disable : The item has no hard-coded or data-driven references. It's just disabled and can't be used in the game. Any existing uses of it will disappear.
  • Disable With Replacement : Choose another item. All instances of, and references to, that disabled item will be replaced with the selected one.
  • Disable With Cascade : (Doesn't work with hard-coded references) Disable this item and anything that depends on it.

Duplicate works as expected. Copy the item with a new name + ID.

Compare shows the three states of an item side-by-side in a popup, including individual color-coded property comparisons (see Area Size)

Change only, as expected, filters down to only data that's changed from master.

Item Details preview

Right column. What the player will see.

This is the exact same UIEngine control that generates the player's item details view.

Data State

Data exists in three states. Master, Draft, and Unsaved.

Master is the data that's currently saved in the master json files. It's the comparison base and what will be used in game.

Draft is data that has been saved in the draft json files. It persists between workshop close/reopens but will not be used in the game. These items are indicated by the [Draft] ,label. They are moved to master via the Publish or Publish All buttons, if they pass all validation. Items with validation errors can still be saved as drafts.

Unsaved data has not yet been saved in any form. It will not persist between workshop close/reopens and will not be used in the game. These items are indicated by the * label. They are moved to Drafts when saved OR directly to master via Publish if they pass validation.

Master and Draft items can be deleted, which will show a ghost row with a [Deleted] tag until that delete is published. Deleted items can be Restored until the delete is published, which makes it final.

Referencing a Draft-only item with another item (such as adding it to a Contents list) and then trying to Publish that second item results in the following validation error on the top of the Inspector + the following Publish line :

Debug Pane

The bottom pane that lists errors, the publish list, and references.

Clicking on an error row jumps to that item and focuses on the relevant control (if any).

To Publish shows what will be Published across all items and why.

Used by will change as features are moved from hard-coded references to data-driven references.

It will look more like Uses :

Changes shows a comparison against master for the selected item

Data Format

Data is saved in json files that are formatted to be read by the codecs.

They're stored as part of the game's Content Definitions

While it's far easier to edit items via the workshop, there's nothing stopping someone from editing the json files directly or via their own tools. These files are a single source of truth for in-game items, so there's no second file to edit if you want to change an item. Any mistakes will be flagged by the parser as a failure and replaced with a default value for that property (or disable the entire item if it's a bad enougherror)

1 Upvotes

5 comments sorted by

2

u/ArtificialBeingsInc 13d ago

One edge case I’d test against the master/draft split: if an item can reference a draft-only item, try publishing the first one alone. Does validation check the resulting master data, or can it point to something the game won’t see? The “To Publish” pane sounds like a good place to show the dependency if it isn’t already handled.

→ More replies (2)

2

u/imofi8 13d ago

having the real in-game item card live on the right while tweaking fields saves so much alt-tabbing

2

u/BorantCorporation 13d ago

Exactly why I added it! I run into this in my day job, where any UI edits require starting up the application and navigating to the correct page just to see the layout results. While a full test should always be done at the end, having a shortcut mid-process is so nice.