Skip to content
isenePublic

About

Amar RPG companion — Fe2O3 suite TUI for the 3-tier O6 system (d6gaming.org)

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

69 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

amar

The Amar RPG companion. Written in Rust.

Rust License Platform Version Canon Fe2O3 Stay Amazing

Terminal companion for the Amar RPG — Geir Isene's three-tier d6 system (O6). Five tabs: the Table for the game being played now, the shared World, a Combat HUD, browsable Lore from the canon wiki, and the Book that keeps the whole campaign. Built on crust (TUI) and glow (kitty graphics).

Part of the Fe₂O₃ Rust terminal suite.

Screenshots

Campaign tab — adventure tree with inline scene image
Campaign
Selina's temple at moonlit night, rendered next to the adventure's nested section tree.
Forge tab — full NPC sheet (3-tier d6 system)
Forge
Generated NPC with characteristics, attributes, skills, derived stats, melee & missile weapons, equipment.
Lore tab — d6gaming.org canon, locally browsable
Lore
Mythology: creation, the Six, secondary and lesser gods — sourced from the wiki, no internet required.
Campaign tab — adventure overview
Adventure
Imported adventure synopsis with auto-extracted scenes, NPCs, floorplans, and complications.

Features

  • 5 tabs
    • Table (opens first) — the active adventure's scenes, the party, where they are, who is there and the places nearby
    • World — the shared places and major NPCs, across all campaigns
    • Combat — live combat HUD
    • Lore — browsable canon: mythology, kingdom, world, calendar, spells, rituals, potions
    • Book — the whole campaign: calendar and diary, PCs, NPCs, adventures; other adventures sit under an "Earlier" fold
  • 3-tier d6 character system (Char + Attribute + Skill = Total) honored throughout
  • 187 wiki entries scraped from d6gaming.org (spells / rituals / potions), bundled offline
  • Adventure import: point at a directory, amar walks *.md + Scenes/ + Floorplans/ + NPCs/, parses heading-level sections, auto-attaches scene images to their sections
  • Inline kitty graphics via glow — scene images, NPC portraits, floorplans, all in-pane
  • Player display — push the current image to a separate window with V (uses feh --class amar-player, so your WM rules pick where it lands)
  • Scene image generation — G on a section invokes DALL-E 3 / Imagen and drops the result into Scenes/ for auto-attach on rescan
  • NPC portraits — auto-generated per NPC, cached per campaign
  • Combat HUD — j/k to cycle combatants, ±/M/m to track HP/MF, o/O for skill / combat O6 rolls with crit/fumble tables
  • Three concentric circles of canon — wiki canon (read-only), author canon (gap-filling additions), campaign canon (per-user)
  • Saved Forge library — every generated NPC / encounter / town / weather can be persisted to the campaign with S
  • Auto-promote — when an encounter NPC joins the party, + upgrades to a full editable NPC sheet (defaults to NPC, press p for PC)
  • Pointer-style navigation — j/k tree, SPACE/l expand, h collapse, PgUp/PgDn, Ctrl+L hard refresh, c rename
  • Encumbrance — armor m_mod offset by Strength + Wield Weapon, Status penalty calculated per Amar rules

Install

Build from source:

git clone https://github.com/isene/amar
cd amar
cargo build --release
cp target/release/amar ~/.local/bin/

Or symlink for live rebuilds:

ln -s "$(pwd)/target/release/amar" ~/bin/amar

Quick start

amar                                   # opens last-active campaign (or onboarding)
amar --create-campaign MyCampaign      # bootstrap a fresh campaign
amar --import MyCampaign ~/path/to/dir # import an adventure into a campaign
amar --rescan-all                      # re-scan every adventure's on-disk root

Press ? for the in-app help. Press q to quit (saves campaign + config).

Key bindings (essentials)

Global

Key Action
1-5 Jump to tab (Table / World / Combat / Lore / Book)
Ctrl-←/→ Previous / next tab
TAB Toggle focus between left and right pane
ESC Drop focus back to left pane / clear status line
w / W Cycle left-pane width
Ctrl-L Hard refresh
r Redraw
? Help popup
Ctrl-A A full Claude session about the campaign, from any tab, as in every Fe₂O₃ app
q / Q Quit (saves)

Table tab

Key Action
SPACE / , Move the current scene (▶) to the next / previous scene; today's diary gets one "▶ scene" line
j / k Move the cursor; the right pane shows the scene, sheet or place
ENTER On a scene: make it current. On a PC or NPC: edit it in the Book. On a nearby place: travel there
→ / l Open the scene's image
g Go to a place (fuzzy name); sets where the party is and writes "Travelled to X" in the diary
f Fight: the party, the NPCs where the party is and the tag pool, in the Combat tab
ESC Back to the current scene
/ Search the Book

Book tab

Key Action
C / L / X Create / load / delete a campaign
D Delete the PC, NPC, or saved-forge entry under the cursor
+ Promote NPC → roster (default NPC; press p for PC list)
I Import an adventure directory into the campaign
N On Adventures header → scaffold new adventure; on a section row → append session note
a Mark cursor adventure as ACTIVE (persists between sessions)
R Re-scan adventure root for new scenes / NPCs / .md edits
V Push cursor image to player display (feh --class amar-player)
G Generate scene image for the cursor section
E End current session — writes banner + advances section pointer
c Rename file under cursor (pointer convention)
t Tag for combat: PC/NPC → binary toggle; saved encounter → tag next inner NPC (press 9 times for 9 rats)
T Untag: PC/NPC → remove if tagged; saved encounter → drop highest-indexed tagged NPC

Lore tab

Key Action
j / k Tree cursor down / up
ENTER / l Expand canon category
h Collapse / jump to parent
SPACE Toggle collapse
g / G First / last item
PgUp / PgDn Page scroll content

Combat tab

Key Action
j / k Select combatant
+ / − Damage / heal current HP
M / m MF up / down (mental fortitude — spell cost, willpower hits)
A Add all PCs to the fight
a Add one PC or NPC by name substring
d Remove selected combatant
c Clear the HUD
o / O Private skill / combat O6 rolls (status line)

Forge tab

Key Action
1-4 NPC / Encounter / Town / Weather
ENTER Re-roll
S Save to campaign library
+ Promote to roster (NPC or PC)

Data layout

~/.amar/
├── config.toml                      # active campaign + global prefs
└── campaigns/
    └── <name>/
        ├── campaign.json            # PCs, NPCs, locations, factions, saved-forge, adventures, calendar
        ├── session.log              # append-only session journal
        ├── portraits/               # NPC portrait cache
        └── adventures/<adventure>/
            ├── <Adventure>.md       # GM notes, headings → section tree
            ├── Scenes/              # scene images (auto-attached by heading match)
            ├── Floorplans/          # maps and floorplans
            └── NPCs/                # NPC docs + portraits for this adventure

Canon pipeline

All Amar mechanics — spells, rituals, potions, weapons, armor, formulas — come from d6gaming.org. The wiki is the source of truth; amar never invents canonical rules.

scripts/ and src/bin/scrape_canon.rs hold the canon scraper:

cargo run --release --features scraper --bin scrape_canon

It reads from d6gaming.org via ?action=raw (wikitext export), parses the {{infobox}} of every spell / ritual / potion page, and writes data/canon.toml. Each entry carries its source URL so any value can be verified against the wiki by hand.

When the wiki changes, re-run the scraper. The TOML is committed to the repo so amar runs without internet access.

Three concentric circles of canon

  1. Wiki canon — data/canon.toml, scraped from d6gaming.org. Verified, source-linked. The TUI never modifies this file.
  2. Author canon — data/death_spells.toml, data/magic_items.toml, data/monsters.toml and similar. Hand-authored entries that fill gaps the wiki has not yet covered. Marked source = "amar-author" so they are visually distinct in the Lore tab.
  3. Campaign canon — ~/.amar/campaigns/<name>/. Per-user, per-campaign data: PCs, NPCs, locations, adventures, session logs, calendar.

Part of the Rust Terminal Suite (Fe₂O₃)

See the Fe₂O₃ suite overview and the landing page for the full list.

Tool Clones / Origin Type
rush rsh Shell
crust rcurses TUI library
glow termpix Image display
pointer RTFM File manager
kastrup Heathrow Messaging
tock Timely Calendar
scroll brrowser Browser
amar Amar-Tools (Ruby) RPG companion

Dependencies

Build: Rust toolchain (cargo, 2021 edition)

Runtime (optional, for full features):

  • ImageMagick (convert) for kitty graphics / image scaling
  • A kitty-protocol-capable terminal (kitty, wezterm, ghostty) for inline images
  • feh for player display (V key)
  • claude CLI for the Inspire tab
  • An OpenAI key in ~/.amar/openai.txt (or its path as openai_key_path in ~/.amar/config.toml) for DALL-E scene / portrait generation
  • GEMINI_API_KEY for Imagen scene generation (alternative)

License

Unlicense — public domain.

Credits

Created by Geir Isene (https://isene.org) with extensive pair-programming with Claude Code. The Amar RPG world, mythology, and 3-tier d6 system are also Geir Isene's, documented at https://d6gaming.org.

About

Amar RPG companion — Fe2O3 suite TUI for the 3-tier O6 system (d6gaming.org)

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages