Skip to content

makesitgood/ttlooter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tabletop Looter

A Go TUI utility for D&D 5e and other tabletop RPGs. Browse SRD content, create homebrew entries, generate encounters and loot.

Currently

Loads up a sqlite db from the SRD json public stuff embedded, lets you browse and search across spells, monsters, equipment, magic items.

Features:

  • Browse and search across all entity types (Spells, Monsters, Equipment, Magic Items)
  • Switch between categories with ctrl+t/n (next) or ctrl+p (previous)
  • Real-time detail view that updates as you navigate
  • Search filters results and auto-selects first match
  • Tab navigation between search, list, and detail panes with tab/shift+tab
  • Create new homebrew entries from scratch
  • Clone existing items as templates for homebrew variants
  • Form-based editing with validation

Structure

.
├── cmd
│   └── ttlooter
│       └── main.go
├── go.mod
├── go.sum
├── initial_data
│   ├── 5e-SRD-Equipment.json
│   ├── 5e-SRD-Magic-Items.json
│   ├── 5e-SRD-Monsters.json
│   ├── 5e-SRD-Spells.json
│   └── embed.go
├── internal
│   ├── components
│   │   ├── detail_formatter.go
│   │   ├── detail_view.go
│   │   ├── form_view.go
│   │   └── listitem.go
│   ├── data
│   │   ├── entity_test.go
│   │   ├── entity.go
│   │   ├── equipment.go
│   │   ├── homebrew.go
│   │   ├── interface.go
│   │   ├── loader.go
│   │   ├── magic_items.go
│   │   ├── messages.go
│   │   ├── monsters.go
│   │   └── spells.go
│   ├── screens
│   │   ├── browse.go
│   │   ├── equipment.go
│   │   ├── homebrew_edit.go
│   │   ├── magic_items.go
│   │   ├── monsters.go
│   │   ├── screen.go
│   │   └── spells.go
│   ├── shared
│   │   └── styles.go
│   └── ui
│       ├── loader.go
│       ├── model.go
│       └── tabs.go
├── LICENSE
├── migrations
│   ├── 001_create_initial_tables.down.sql
│   ├── 001_create_initial_tables.up.sql
│   ├── 002_add_homebrew_support.down.sql
│   ├── 002_add_homebrew_support.up.sql
│   └── embed.go
├── README.md

Roadmap

In Progress

  • Homebrew Creation (v0.2)
    • Create/edit custom spells
    • Create/edit custom monsters
    • Create/edit custom magic items
    • Create/edit custom equipment
    • Persist homebrew to database
    • Homebrew edit screen fires and initializes
    • Form fields are editable and properly sized - This is extremely broken, but the basics are in place I think
    • Mark homebrew vs SRD in UI
    • Refresh browse list after save
    • Improve form layout and UX

Planned

  • Generate random things in each category
  • Generate loot tables based on params
  • Generate encounter baddies based on params
  • Save favourite generations
  • Share homebrew content

Recent Changes (v0.2)

Schema & Models

  • Added is_homebrew, created_at, updated_at fields to all entity tables
  • Updated Spell, Monster, Equipment, MagicItem structs with homebrew tracking
  • Created HomebrewService for CRUD operations on homebrew entries

UI Components

  • Extended DetailField with InputType for dual display/form rendering
  • Created FormView component for editable forms with field navigation
  • Added GetFormFields() method to all entity types for form-specific field definitions

Homebrew Editing

  • Built HomebrewEditScreen for creating and editing homebrew entries
  • Added "Create New" and "Create From Selected" options to browse screens
  • Implemented entity cloning for template-based creation
  • Form validation for required fields (ID, Name)
  • Keyboard shortcuts: ctrl+s (save), esc (cancel), tab (next field)

Navigation

  • Wired homebrew edit screens into main model
  • Screen switching: browse → edit → back to browse on save/cancel
  • Callbacks from browse screens trigger edit screen creation

Known Limitations (v0.2)

  • Form editing limited to core fields (no relations/nested types)
  • Browse list doesn't auto-refresh after save
  • No visual distinction between homebrew and SRD entries in list
  • No multi-select or bulk operations

About

DND Util to mess around in go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages