Skip to content

Latest commit

 

History

69 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scrim

scrim, The Super Cool Rust CharIcter Manager (yes, we do know how to spell character correctly, but it didn't fit with the acronym), simple dnd character manager written in rust, with vim-inspired tui controls for easy (if you know vim) editing. It offers a simple autocomplete and lookup system for maximum convenience.

Installing

The scrim binary can be installed locally to your machine by running either install.sh or install.bat, depending on your platform. The install script with place a release build of the application in the users path and copy necessary files. Once installed, the command

scrim [player]

can be used to launch a scrim session. If a player name is given, then scrim will attempt to load the specified player file.

Controls

scrim is (kinda) a modal editor, which means that you will have to used keybinds to switch between differents modes. The following keybinds can be used to change the selected control:

  • u - highlight the top bar.
  • i - highlight the info bar.
  • s - highlight the stat pane.
  • t - highlight the current tab pane (Notes, Inventory, or Spells).
  • 1 - select the notes pane.
  • 2 - select the inventory pane.
  • 3 - select the spells pane.
  • E - open the spell slots menu.
  • l - (with a line in the tab menu selected) - open a lookup for the current line.
  • L - (tab pane not selected) - open the free lookup box.
  • C - attempt to open a lookup for the current class.
  • R - attempt to open a lookup for the current race.
  • F - open the funds menu.
  • P - open the proficiencies menu.
  • [ - open the player select menu.
  • S - save the player.

Fortunately, most selectable controls will have the shortcut that selects them placed in parentheses somwhere near their name, so if you forget just try to look as best as you can.

Navigation

  • h, l - navigate left and right in the current widget.
  • k, j - navigate up and down in the current pane. If no pane is selected, this will scroll the current tab pane. If editing mode is engaged, this will scroll through numerical values and other values such as the player class, race, background, and alignment.
  • shift+k, shift+j - navigate up and down 10 lines at once. If no pane is selected, this will scroll the current tab pane.
  • tab - while typing, access the autocomplete menu. If used in the free lookup box functions identically to pressing enter.
  • enter - enter editing mode or select an item from a list.
  • a, x - increase and decrease values in certain panes, namely money and spell slots remaining.
  • A, X - increase and decrease money by 10, increase and decrease total spell slots.
  • esc - if editing mode is engaged, exit editing mode. if a pane is selected, deselect the pane.
  • q - same functions as esc, but if no pane is selected, open the quit confirmation menu.

Autocomplete and Lookups

scrim has an easy-to-use autocomplete and lookup system. C, R, l, and L can be used to access lookups, and tab can be used to perform autocomplete. The lookup entries are loaded dynamically at startup. If the application is run in debug mode, then the lookups folder in the base folder of the repository is assumed to contain lookups. Otherwise, the .scrim folder in the user's home directory is assumed to contain lookups. Currently, lookups for spells, weapons, races, classes, and subclasses are provided by default, and will be placed in the correct folders when the install script is run.

Adding Lookups

Lookups are stored in the JSON file format and should be placed in the appropriate lookups folder prior to startup. Only JSON files will be attempted to be loaded by scrim. Each lookup should have a top level dictionary containing exactly one entry -- a dictionary called entries. Each entries to entries should have a key in all lowercase that represents the name of the lookup, and the entry itself should be another dictionary. Each entry should contain three entries:

  • name: the name of the item with any proper formatting necessary.
  • description_short: an optional, short description of the entry.
  • description: the full body of the entry.

Due to the limitations of the JSON format, every field must be containted on one line, so manually escaped \n newlines will have to be used in place. This is unfortunate but will be necessary unless a different file format is chosen, which is highly unlikely.

Configuration

Scrim supports (some) amount of UX configuration to allow the user to tailor the app experience to their needs. Configuration settings are located in config.yaml in the .scrim folder in the user's home directory. A basic config.yaml that contains all default fields will be generated if one cannot be found.

Save Format

The format field can contain either YAML or JSON. All players will be saved with the specified format, but either format can be loaded.

Colors

The default colors Black, Red, Green, Yellow, Blue, Magenta, Cyan, Gray, DarkGray, LightRed, LightGreen, LightYellow, LightBlue, LightMagenta, LightCyan, and LightGray are available, as well as 24-bit RGB and 8-bit Indexed options.

Example Config

An example config that saves to the JSON format and has a custom RGB color palette.

format: JSON
background: !Rgb
- 33
- 10
- 78
foreground: !Rgb
- 91
- 176
- 155
popup_background: !Rgb
- 91
- 176
- 155
popup_foreground: !Rgb
- 33
- 10
- 78
highlight: !Rgb
- 201
- 60
- 100
tab_select: !Rgb
- 64
- 145
- 23

Notes

  • If a pane is selected, the currently selected pane item will be highlighted in yellow. If an item is selected and is currently being edited, it will be highlighted in green.
  • If no player name is passed to scrim on startup, then the player name specified in the app will be used to save the file.
  • If you want to save a player to a different file, then open a new terminal window, move the old file, save the player, move the new file, and then move the old file back. A save as feature may be implemented but it is currently not very high priority

About

A simple dnd character manager written in rust.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages