Skip to content

maxcwolf/glaven

Repository files navigation

Glaven

GLAVEN

Native SwiftUI companion app for Gloomhaven, Frosthaven, and Jaws of the Lion.
Port of Gloomhaven Secretariat (web) to a native macOS/iOS experience
with haptic feedback, custom fonts, and card animations.


Features

  • 3 Editions — Gloomhaven, Frosthaven, and Jaws of the Lion with full scenario data
  • Scenario System — Selection, room reveals, rules display, victory/defeat conclusion, stats tracking
  • Scenario Maps — Interactive room maps from Virtual Gloomhaven Board data with pinch-to-zoom
  • World Map — Interactive campaign map with scenario locations and building placement
  • Character Management — Add/remove characters, initiative input, health/XP/gold, auto level-up, conditions, summons, ability hand management, enhancements
  • Monster AI — Spawn from scenario data, standee management, ability cards with recursive action rendering
  • Attack Modifier Decks — Draw with 3D card flip animation, deck inspection, bless/curse, perk modifications
  • Perks & Battle Goals — Per-character perk selection, battle goal draw and tracking
  • Item Shop — Buy/sell items by equipment slot, character inventory, item distillation (FH)
  • Party & Campaign — Reputation, prosperity, achievements, completed scenarios, campaign log, resource management
  • Loot Deck — Draw and apply loot to characters
  • Event Cards — Event card draw with effects application, deck management, card flipping animation
  • Frosthaven Systems — Buildings, garden, pets, week advancement, outpost attacks, challenge deck, trials & favors
  • Interactive Actions — Toggleable self-targeting actions (heal, conditions, elements) with apply/skip
  • AoE Hex Grid — Renders area-of-effect patterns from ability card data
  • Standalone Tools — Attack modifier deck builder, loot deck, initiative tracker, decks viewer, event cards, treasures, random monster cards
  • Editor Tools — Edition, character, monster, deck, and action editors for custom content
  • Visual Theming — Parchment backgrounds, edition-specific fonts (PirataOne for GH, GermaniaOne for FH), multiple themes, light/dark mode
  • Sound & Haptics — Tap feedback, card flip, health change, phase advance, coin sounds (toggleable in settings)
  • Undo/Redo — Full game state snapshot system with action history visualization
  • Persistence — SwiftData autosave, named save slots, backup/restore, JSON export/import

Requirements

  • macOS 14+ (Sonoma) or iPadOS 17+
  • Xcode 16+ (includes Swift 6 toolchain)
  • xcodegen (for Xcode project generation)

Building and Running

Swift Package Manager (command line)

cd GlavenApp
swift build

Xcode (recommended for iPad development)

# Regenerate the Xcode project from project.yml
xcodegen generate

# Open in Xcode, select GlavenApp_iOS scheme, pick an iPad simulator, Cmd+R
open GlavenApp.xcodeproj

The Xcode project is generated by xcodegen and excluded from version control. Run xcodegen generate after adding or removing source files.

Project Structure

GlavenApp/
  GlavenApp.swift              # App entry point
  ContentView.swift            # Root navigation (welcome vs game board)
  Managers/                    # Game logic (round flow, monsters, characters, scenarios)
  Models/
    EditionData/               # Codable structs for edition JSON
    Enums/                     # Game enums (conditions, elements, phases, etc.)
    Persistence/               # SwiftData @Model classes
    Protocols/                 # Entity & Figure protocols
    Snapshots/                 # Undo/redo state snapshots
    Structs/                   # Value types (actions, conditions, attack modifiers)
  Utilities/                   # Image loading, fonts, sound, theming
  Views/
    Dialogs/                   # Add character/monster sheets
    Figures/Character/         # Character card, perks, battle goals, summons
    Figures/Monster/           # Monster card, standees, ability cards, interactive actions
    Figures/Shared/            # Conditions, health bar, entity menu
    Footer/                    # AM decks, loot deck, round button, timer
    Header/                    # Element board, round counter
    Items/                     # Item shop, character inventory
    Party/                     # Party sheet (reputation, prosperity, achievements)
    Scenario/                  # Selection, rules, rooms, conclusion, stats
    Settings/                  # Preferences panel
    Shared/                    # Logo, hex grid, card flip
  Resources/
    EditionData/{gh,fh,jotl}/  # Bundled JSON (monsters, characters, scenarios, items)
    Fonts/                     # PirataOne, GermaniaOne, Majalla
    Images/                    # Condition/element/action icons, card textures, thumbnails
    Sounds/                    # Audio files
Package.swift                  # SPM package definition
project.yml                    # xcodegen project spec

Copyright / License

Gloomhaven and all related properties, images and text are owned by Cephalofair Games.

Assets/Data used:

About

Gloomhaven Companion App for macOS and iOS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published