Skip to content

Releases

0.6.0

Choose a tag to compare

@github-actions github-actions released this 10 Nov 12:54
4020828

The RPG engine's first pieces: entities (monsters and other things that come and go), faster long games, rule-system packs with a first pack (Dungeon crawl) and a "New game" command, counted items, equipment slots and statuses. Requires Obsidian 1.13.0 or later.

Games made with 0.5.0 keep working. Regenerate a game's engine ink ("Generate game engine ink") to use the new features and the faster table and party lookups; the panel says when the engine file is out of date.

  • Counted items, equipment and statuses (RPG R4). An item marked stack: true has a count: give(arrow, 3), take(arrow, 1) (gives back how many it took), inv_count(arrow); it is in the inventory while its count is above 0, and a character starts with counts: { arrow: 12 }. slots: and an item's slot: give equip(sword) / unequip(sword) (one item per slot, {equipped ? sword}); an item with a slot adds its modifiers only while equipped (items without a slot work as before). statuses: (name, description, skill modifiers, rest: true) are put on the character ("me"), a party member or an entity: add_status(who, "poison", 3), has_status, status_turns, clear_status, tick_statuses(), rest_statuses(). The panel shows counts (×12), worn items (◆) and statuses as tags on the cards; the web page lists them; check-ink --random reports each stack's count at the end and how often each status was put on. The dungeon-crawl pack is 1.1: arrows run out, cave spiders and ghouls poison.
  • Rule-system packs (RPG R3): a game note can name a pack with system: <folder> or system: { path: <folder>, version: 1 }. The pack's system.md frontmatter goes under the game's (lists joined by id, the game's entry wins; anything else the game sets replaces the pack's), its from: notes are read relative to the pack, and the generated engine INCLUDEs the pack's rules.ink. A pack that is missing, or of another major version than the game asks for, is reported. Markdown tables take spawn/生成 and count/数量 columns. First pack: Dungeon crawl (original rules): a crew of four goes down room by room, 2d6 fights, torches, potions, traps, shrines, a warlord in the last room; the story only calls -> crawl -> and reads crawl_result. New command "New game" (pick a rule pack or the journal template): it installs the pack into 规则包/ / Rule packs/ unless it is there already, copies its template into a new folder with system: pointing at the pack, and generates the engine. api.newGame(pack, folder?).
  • Faster long games (RPG R2): the engine looks table rows up itself (table_text/table_id; the generated ink stays as the fallback and gives the same text), a session parses the story JSON once instead of on every restart, back and load, and one of inkjs's per-step checks is done without a helper call per output item. New engine-side reads for parties: member_get(who, "var") (by number or id, any per-member variable; nobody gives the zero of the variable's type) and party_count("var", value). On the 4AD port, with its helpers rewritten on top of these, a random run takes half the ink steps and half the time. Writing advice in docs/ink-performance.md. Games with tables or a party need their engine file regenerated.
  • Entities (the RPG engine's first piece): kinds: in the game note declares kinds of things that come and go during play (monsters, summons), with stats and templates. The story spawns and fights them with spawn("foe", "goblin"), stat(id, "life"), set_stat, add_stat, despawn, alive("foe"), pick_one("foe", "random" | "lowest:life" | …), nth_one, name_of. A kind's remove stat takes an entity out at 0. They are kept in the run like everything else (back, saves, replays). The panel shows them as cards above the choices, one foldable row per kind; the web page lists them in its status lines. A table row can spawn them (spawn: goblin, count: d3, stats:), rolled with spawn_from("lair"). With kinds, party members answer the same functions by id, and alive/pick_one/nth_one take "party" for the standing members. check-ink --random and api.simulate count each kind: how many of each template came, how many were taken out and after how many choices, how many were left, the most at once, and stats pushed past their max (a warning).
  • [[note]] links in a story's text are links in the play panel: a click opens the note, hovering previews it (desktop). The exported page shows the text only; journals keep the links. In ink a bare | does not compile, so an alias is written [[note\|shown]].
  • New command "New solo game (journal)": makes a playable journal game in a new folder (a prompt table, a road clock, two records, a live journal, a guide note, the engine generated) and opens it in the panel. api.newJournalGame(folder?).
  • Saves can be renamed: "Rename" in the saves list (Enter keeps the new name, Escape leaves it); the time it was saved stays. api.renameSave(idOrName, name).
  • A resource marked manual can be set by typing: click its value on the status bar.
  • Coming back to Obsidian (the window gets the focus again) reads the run again when another device played on meanwhile.
  • A live journal catches up when a run is opened: what was played after its last write (the app closed before it could be written) is appended.
  • Fixes from a review of 0.5.0 against the solo and tabletop PRDs:
    • A change by hand that the story can no longer make (its variable is gone) is skipped on replay as before, and the panel now says so.
    • The dice tray's dice follow how often the tray itself was used; changes by hand and record entries no longer shift them (answers already given are kept in the run and do not change).
    • Deleting a save asks first: the button turns into "Delete for good?" and a second tap within three seconds deletes.
    • The default journal folder follows the interface language: 日志/ in Chinese, Journal/ in English.
    • check-ink names the choices that take several cards at once, which it plays as a sample rather than every combination.

0.5.0

Choose a tag to compare

@github-actions github-actions released this 10 Nov 00:34
af49a92

Solo play and tabletop games: runs that pick up where you left off, a dice tray and oracle, clocks, records and a live journal; dice formulas, random tables, decks and hands, maps, a chaos bag, a growing dungeon and a party of several characters. Requires Obsidian 1.13.0 or later.

Breaking

  • The generated ink no longer uses temps called c, none and before (a card, item or place with such an id broke the story), and a game with two decks no longer fails to compile (the draw function declared its temp once per deck). Regenerate the engine ink of your games.
  • A game with items now always declares played (for #use): a game that declared its own played VAR (出牌 with ink: zh) must drop it, then regenerate the engine ink.
  • Saves move to a folder in the vault (Inkwright/存档/ or Inkwright/Saves/, set in the settings) on first start; the panel keeps a run and replays it instead of starting over.

Solo play

Runs that carry on, and the tools of a solo game (docs/solo-prd.md).

  • The player picks up where you left off (solo PRD, slice 1a). The panel no longer starts over on every recompile or restart: it keeps the run as the choices made since the start (with their text, language and the run's seeds) and replays them on the current story, so the text, ink's RANDOM and shuffles, the dice and back all come out as they were. Edits after the point you reached go unnoticed; when a choice you took changed or is gone, the panel stops there and says so, keeps the steps it could not take, and saves the whole run as "Progress before the stop" before a new choice there drops them. A start point or character the story no longer has stops it too. Runs are saved in a vault folder (Inkwright/存档/ or Inkwright/Saves/, set in the settings), one file per device so no sync can overwrite another device's progress; a run moved on elsewhere is picked up when its file syncs in; two devices that went different ways at once keep both runs (the other as a conflict copy); the sync mode setting (iCloud by default, Obsidian Sync, git / Syncthing, this device only) decides how conflicts are handled. Saves are runs too: "Save" keeps a snapshot, "Load" plays it on. Old saves move over on first start. Renaming a story takes its runs along. api.run() / api.runs(); panel() reports replay and stopped.
  • Picking a run up after an edit is less strict (solo slice 1b): a choice you took is also found when it moved (its text is unique on the screen), and by a guess when only a number in it changed or it was reworded while the rest of the screen stayed the same; the panel says how many steps were guessed. When a step's outcome changed (its rolls, or the choices that came after it) the panel says from which step, and "Stop at step N" stops the run there. Where a run stops, "Go on by index" takes the remaining steps by their position, and "Back to before the edit" plays the run on the version of the story it was last played on (each version a run was played on is kept in the save folder, the newest three per story), until "Use the new version".
  • Player mode (solo slice 1c): a button on the player's bar (and the command "Toggle player mode") hides the author's controls (lock, start from a knot, variables), folds the story's problems into a badge and locks the main story. Edits to the story no longer interrupt the run: it plays on the version it was on, with "The story was updated · Apply". Restarting (or picking another character) starts a new run and keeps the one so far in the saves list. A run picked up after more than an hour shows a line where you left off. Long runs draw their latest 200 paragraphs, the earlier ones behind a button. Commands "Export this run to a file" and "Import a run from a file" (api.exportRun(), api.importRun(path)) back a run up or move it.
  • The dice tray (solo slice 2): under the choices, ask the oracle a yes/no question at one of five odds (d100 against 90/75/50/25/10; the lowest fifth of the yeses is "yes, and", the top fifth of the nos "no, and"), roll a formula or a common die, or roll a table marked oracle: true in the game note (an inspiration table). Answers and rolls show as cards where they were asked, are part of the run (saved, synced, replayed, written to the journal) and change no story variable; back takes the latest one back, and asking again gets the same answer. oracle: in the game note changes the thresholds and can name a chaos resource that moves them (chaosStep per point from its middle). Works without a game note too (oracle and formulas). Tutorial chapter 9 starts with it.
  • Clocks, tracks and changes by hand (solo slice 3): a resource can be drawn as a clock (display: clock, max−min slices) or a track (display: track, boxes of four ticks; its span must be whole boxes), in the panel and the exported page. A resource marked manual: true gets −/+ buttons on the status bar: the player is the game master. A change is part of the run (kept as how much was added, so a replay on an edited story adds it to the value there; shown in the text and the journal, ticks in a row as one line), within the resource's range, undone by back, and takes effect from the next choice. Tutorial 9.2.
  • Write a paragraph and a live journal (solo slice 4): #write:<var> is #input with several lines (Enter for a new line, Ctrl/Cmd+Enter to go on), in the panel and the exported page; the story prints it as one paragraph with its lines. journal: { live: true } in the game note (or the "Live journal" setting for stories without one) writes the run into a journal note as it is played: the note is made on the first move, then each action is appended (a choice with the text it brought and a paragraph written with it, quoted; rolls; the tray's questions; changes by hand), never rewritten; back appends a line saying so. The run records how far the note was written, so it carries on across days and devices and makes up a write that did not happen. When the note is open in the editor, the text is inserted there. Tutorial 9.3.
  • Records (solo slice 5a): records: in the game note keeps lists of short entries (clues, people, threads). The generated ink gives record_add, record_remove, record_count, record_pick (a random entry, rolled with the run's seed and shown as a card) and record_list; each record is a string VAR (escaped by the engine) and a counter. The status bar lists the entries with a × each and a box to add one: the player keeps them too, as part of the run. Without the engine (Inky) entries can be added and counted. Tutorial 9.4.
  • when: <variable> on a resource or a record shows it on the status bar only while that story variable is true, not 0 or not empty, so one game can have modes (a countdown only in its story mode, a list of people only once there are any to meet).
  • The player writes (#input:<var> on a choice): the panel and the exported page put a text field above that choice's button; the line typed goes into the string VAR just before the choice runs, so a story can ask for a name, an oath or a line of a diary. It works in any story, game or not. Like a card played, the text is part of the choice: back, save, load and the language replay carry it, and the turn line and the journal show it ("Name it · Soot"). check-ink --all and --random type a placeholder ([var]); api.play takes { choice, text } and api.choose(choice, text) types into the panel. Writing to a variable the story does not declare is reported in Chinese too.

Tabletop

Dice, tables, cards, maps and parties for porting and writing solo board games (docs/tabletop-prd.md).

  • Game mode, tabletop slice 1 (docs/tabletop-prd.md): free dice and random tables. {roll("2d6+3")} (also d20, d%, d66) rolls outside a check. tables: in the game note lists random tables, rows with a dice range and bilingual text, written inline or read from: the first markdown table of another note (a 1d6/d66 column header names the dice; zh/en columns the text; an id column the row ids); {table("encounter")} rolls one and reads the row, table_roll/table_text/table_id serve stories that branch on the result. Every roll shows as a card in the text and in the dice log, in the panel and the exported page, and follows the run's seed, so back, load and language replay roll the same; the generated ink keeps a story playable without the engine (flat dice). The explorer and check-ink roll tables from a fixed seed; the game note's table problems (no rows, bad dice, gaps or overlaps in the ranges, a note without a table) are reported like the other config problems.
  • Exploding dice and open table ranges: roll("d6!") rolls a die again whenever it shows its top face and adds it (the card shows every face; the fallback uses the exploding average). A table row's range can be open, 6+ or ≤0, so a roll with a modifier that goes past the dice still lands on a row; the checks treat the open end as covering the rest of the dice.
  • Keep highest / lowest and dice pools: roll("4d6kh3") adds the three highest of four dice, 2d20kh / 2d20kl is advantage / disadvantage (one die when the number is left out); roll("5d6>=5") counts the dice showing 5 or more (a bonus adds to the count; 5d10!>=8 explodes, and the extra dice count too). The faces that do not count are faded and struck out on the roll card, in the panel and the exported page, and struck out in the journal. Tables can use them as their dice; the fallback without an engine uses the exact average.
  • Decks (tabletop slice 2): decks: in the game note (id, name, cards with id, name, desc). The generated ink declares LIST <deck> and VAR <deck>_pile; draw("clues") takes a random card out of the pile without replacement (an empty list once it is empty), shuffle("clues") puts every card back, deck_left("clues") counts the pile, and a hand is any list the story keeps (~ hand += draw("clues")). The draw rol...
Read more

0.4.0

Choose a tag to compare

@github-actions github-actions released this 31 Oct 06:31
bc44cb6

Game mode, from the first rules to a playable night. Requires Obsidian 1.13.0 or later.

Breaking

  • pick_character in the generated _engine.ink takes the character id as a string (pick_character("xin")). Regenerate _engine.ink from the game note ("Generate game engine ink" / api.generateEngine()): a story that includes an old engine file no longer runs with the engine. (#15)

Game mode

A story with a game.md note next to it is played as a game; the note's frontmatter is the configuration.

  • Rules engine: 2d6 sum or d100 roll-under checks on choice tags (#check:skill:difficulty), skills as inner voices (#voice:skill), resources with min..max, companions with their own fear and trust, characters as presets. The engine ink is generated from the note; ids are English and player-facing names are localized (name: { zh, en }), bilingual text via t("中文", "English"). (#10, #12, #13)
  • Panel: character picker, HUD, check odds on choice buttons, voice paragraphs and the dice log; each roll shows as a card in the text with tumbling faces; #fx:shake|flash|dark|pulse on a line plays a screen effect when it first appears. (#12, #18)
  • Items: items in the note, starting items per character, the inventory in the HUD, #needs:item locks a choice until the item is carried. (#19)
  • Companion-only characters (playable: false): in the HUD and the story, never in the picker. (#16)
  • Resources are clamped to min..max after every step; the overshoot shows up in check-ink, never in the HUD. (#21, #22)
  • Exported web pages carry the engine, so a game plays in the browser too. (#15)

Checking stories

  • npm run check-ink -- <folder> --all plays every branch and lists the endings; a game is walked once per character, through both sides of every check, and a failed check that changes nothing is a warning. api.explore does the same from Obsidian. (#9, #14, #17)
  • --novelty keeps a long game finite (a state is played on only when something about it is new at its spot); every run reports coverage (knots, stitches, labels and choices never reached), knots the compile graph finds unreachable, and resources pushed out of range. --random N [--seed S] (api.simulate) plays N runs with real dice and reports the odds of each ending and where the resources end up. (#20, #22)
  • npm run export-web -- <main.ink> <out.html> exports from the command line. (#9)

Play panel

  • After a choice the new text scrolls into view, and a line carrying the chosen option marks where it begins; the top bar can be pinned (pin button on the bar, or the setting). (#17, #23)

Other

  • CI runs the community directory's checks; README shows a demo. (#7, #8)

0.3.0

Choose a tag to compare

@github-actions github-actions released this 29 Oct 16:16
d8fe593

Fixes from the Obsidian community directory review.

  • The language setting uses Obsidian's declarative settings API, so it shows up in settings search. Requires Obsidian 1.13.0 or later; older versions keep 0.2.1.
  • Styles no longer use !important.
  • The build no longer depends on builtin-modules.

Release assets carry GitHub build provenance attestations (gh attestation verify main.js -R luoxin9510/inkwright).

0.2.1

Choose a tag to compare

@github-actions github-actions released this 29 Oct 15:55
242bd04

Release assets now carry GitHub build provenance attestations (verify with gh attestation verify main.js -R luoxin9510/inkwright). No changes to the plugin itself; see 0.2.0 for features.

0.2.0

Choose a tag to compare

@github-actions github-actions released this 29 Oct 15:48
8565f29

First release under the new id inkwright (0.1.0 was published as ink-cn).

New since 0.1.0

  • Play panel: variables and visit counts, start from any knot or stitch, undo the last choice, saves (save / load / delete, per story, synced with the vault).
  • Knot graph: diverts, tunnels and threads between knots; knots unreachable from the start are highlighted. Tap a node to open its source or play from it.
  • Export as web page: one self-contained .html next to the story, playable in any browser, with undo, restart and progress kept in the browser.
  • Bilingual stories: declare VAR lang (or VAR 语言) and write text through a function such as {tr("Hello", "你好")}; the panel and exported pages get a language switch that replays the run in the other language. Untranslated lines are reported as warnings.
  • English and Chinese interface, with Chinese translations of compiler errors.
  • Agent API (app.plugins.plugins.inkwright.api) for scripted compile / play / graph / export through the Obsidian CLI.

Requires Obsidian 1.7.2 or later. Desktop and mobile.

v0.1.0

Choose a tag to compare

@luoxin9510 luoxin9510 released this 29 Oct 13:18

第一个版本(自用测试版)。

  • 在 Obsidian 里编辑 .ink 文件,带语法高亮
  • 试玩面板:自动重新编译、点击选项推进、重新开始
  • 中文界面与中文编译报错,点击报错跳到对应文件和行
  • INCLUDE 多文件剧本,主剧本锁定
  • 无限循环保护:超过 2 秒自动停止,不会卡死 Obsidian

通过 BRAT 安装:填入 luoxin9510/ink-cn。手机端尚未在真机上验证。