Repository navigation
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: truehas 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 withcounts: { arrow: 12 }.slots:and an item'sslot:giveequip(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 --randomreports 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>orsystem: { path: <folder>, version: 1 }. The pack'ssystem.mdfrontmatter goes under the game's (lists joined by id, the game's entry wins; anything else the game sets replaces the pack's), itsfrom:notes are read relative to the pack, and the generated engine INCLUDEs the pack'srules.ink. A pack that is missing, or of another major version than the game asks for, is reported. Markdown tables takespawn/生成andcount/数量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 readscrawl_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 withsystem: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) andparty_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 indocs/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 withspawn("foe", "goblin"),stat(id, "life"),set_stat,add_stat,despawn,alive("foe"),pick_one("foe", "random" | "lowest:life" | …),nth_one,name_of. A kind'sremovestat 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 withspawn_from("lair"). With kinds, party members answer the same functions by id, andalive/pick_one/nth_onetake"party"for the standing members.check-ink --randomandapi.simulatecount 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
manualcan 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-inknames the choices that take several cards at once, which it plays as a sample rather than every combination.