Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,7 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Under the hood

- **A game's own kinds of shop, on the server.** A system can now make shops of its own (an Apothecary, a Fence), each with a name and on or off, carried by the system file. An item type's SOLD AT can tick them, a building can be one, and it sells the types that tick it at their prices. Off, or in a game that doesn't make it, a building set to it is no shop. The builder's SOLD AT, + NEW SHOP and the BUILDING TYPE list come next.
- **PLAYERS CHANGE GEAR, on the server.** A table setting (on to start) for systems with their own item types: switched off, the server keeps every column of a player's gear lines as it was saved, and a thing a player adds comes without column values, while their names, counts and where they carry things still change. The GM can always change them. The GAME tab's switch and the sheet's side come next.
- **Who changed a gear line from its item, and when.** When a line named like one of a system's items is given a value of its own in a column (the Cutlass made 2d8), the server now notes who changed it and when: the player from their sheet, or the GM on a player's or an NPC's. It is worked out from what was saved before, never taken from the sheet, kept while the value stays, and dropped when it is put back to the item's. The sheet shows this as UNIQUE next.
- **A stress test for the shops.** 200 items and a 1500-line catalogue, saved, sent to players, bought from with a 100-line cart and sold to with 300 lines at once, each within a time limit; and a 1000-line shelf opened, filtered and sorted in a real browser.
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ CITY_NET/
│ │ ├── sheet.js # A custom system's character sheet as data (tabs, header, sections of text/number/textarea/select fields with visibility, combat sensitivity, who edits it (the owner, or only the GM), max pairs and token/bank links) and its checks, a section able to wait on a house rule; a starter sheet for a system that has none. A section laid out 'choices' is the CHOICES block, drawn by the sheet itself; the starter sheet has one on its CHARACTER tab (listed first, the sheet opening on STATS: `opens`) after IDENTITY when the system has lists, named for the one list or CHOICES (7a3b1). A rests section (R3b): the starter sheet's RESTS, after CHOICES, when rests are finished on each sheet or there are recovery dice; a SPEND XP section, its own layout, on the starter sheet's CHARACTER where XP is spent (7f2c1)
│ │ ├── terms.js # The glossary: the 13 terms a system may rename, their neutral defaults (for the builder), and ownWords, only the terms a system renamed (for the running game)
│ │ ├── parts.js # The parts of the app a system can turn off (bank, shops, GIVE ITEM, vehicles...) and partOn(definition, part); nothing required, so the checks, the starter sheet and the runtime all use it
│ │ ├── buildings.js # A system's own names for the app's building types and shop catalogues, and which it turned off (never new ones); the section's checks, buildingOn / buildingName, and the render copy's part
│ │ ├── buildings.js # A system's own names for the app's building types and shop catalogues, and which it turned off (never new ones); the section's checks, buildingOn / buildingName, and the render copy's part; and the game's own kinds of shop (8a7b1a): buildings.shops, each an id and a name, perhaps off, checked (an id the app's types haven't got, each once, at most 20), ownShops, ownShopOf, shopKindsOf, a building type of the game on as it says and by its name, sent to the browser only where it makes some
│ │ ├── currencies.js # A system's own money: the currencies section's checks, the shaped list (the first the main one; debt and negative off unless on), and an amount written with coins (12 gp 3 sp 4 cp), a symbol and decimals ($4.34, 1.234,56 €, ¥1,234), mirrored in frontend/src/sheets/currencies.ts; each currency's icon, one of CURRENCY_ICON's five or an uploaded /uploads/currency_icons file
│ │ ├── bank.js # A system's bank settings: whether the bank window's celebrations run (off unless a custom system turns them on; built-ins keep them) and its own whale threshold in the main currency
│ │ ├── core.js # A custom system's setup answers: the health model (one pool, two tracks, damage types, harm levels, wound count, hit locations, none) with its settings, advancement styles, common dice and distance unit, and their checks; the health part of the starter sheet each model gives (no answer = the one-pool starter every system had); the distance unit sent to the browser (feet where none was given)
Expand Down Expand Up @@ -481,7 +481,7 @@ CITY_NET/
│ │ ├── healthFormula.js # MAX HEALTH: A FORMULA (7d4): what the formula comes to for a sheet, read as a derived value is (stats, formulas, levels), whole and never below 0; any formula of the sheet's worked out the same way (7d5a); @capacity readable (8a5a)
│ │ ├── healthLevels.js # MAX HEALTH: PER LEVEL (7d5a): level 1 the full die, each level after what it kept or the average, EACH LEVEL ADDS read now, never less than 1 a level; the token's base; REROLL ALL, KEEP HIGHER, a level's gain kept outright (7d5c); ROLL TO BEAT, a pool or a die per level against the maximum, a gain of 0 kept (7d5d); each level saying how it was kept (rolled, set, cleared), level 1 set by the GM, a level averaging its own die (7d7b1); an uploaded sheet's maximum the base for its levels, and a whole upload's health (7d7c)
│ │ ├── items.js # A system's items (7e2a): slots each character has so many of, items whose features need carrying, wearing or wearing in a slot, checked; at the table (7e3a): carried by a readied or stowed gear line of its name, WEAR and TAKE OFF, ATTUNE with a slot free or the GM's anyway, END, the GM's count for one character, what works; GIVE.EXE's list of them, each with what it needs and its words (itemsGivable, 7e3b); INSTALLS (7e4a): each costing against a stat or formula, ADDING TO it up to a limit or TAKING FROM it down to one, an item needing one with a COST; INSTALL with room or the GM's anyway, REMOVE, the line kept in the gear wherever it is, the cost one of its modifiers (overlaid, never written in), each install's cost, value and limit for the sheet; checks the item types and each item's type and values (8a1); encumbrance beside them, and an install's WEIGHS (8a5a); an item's PRICE and IN SHOPS, checked, one IN SHOPS needing a price (8a7a3a)
│ │ ├── itemTypes.js # Item types (8a1; approved mockup item-types, 2026-11-14): each type's columns, NUMBER (a unit), TEXT, DAMAGE, DICE, COUNT (a button, a rest that refills it, the items it reloads from) and PICK ONE (its words), checked; GEAR, WEIGHT and PRICE, where a system makes none; an item's values checked against its type's columns; the types as the sheet is shown them; a line of gear's type, values and counts, from the item it is named like or its own; linesOf, the gear read as the sheet stores it, shared with gearRolls, gearCounts and encumbrance; SOLD AT (8a7a2), the kinds of shop a type's lines are sold at, the General Store where unsaid, and the type shelves a kind of building sells (typeShelvesAt); an item's price (its own, else its type's PRICE column) and whether it is IN SHOPS, one saved before the switch by whether it has a price (8a7a3a); a type's band on the sheet, EQUIPPED, USABLE or PACK, PACK where unsaid (bandOf, G1)
│ │ ├── itemTypes.js # Item types (8a1; approved mockup item-types, 2026-11-14): each type's columns, NUMBER (a unit), TEXT, DAMAGE, DICE, COUNT (a button, a rest that refills it, the items it reloads from) and PICK ONE (its words), checked; GEAR, WEIGHT and PRICE, where a system makes none; an item's values checked against its type's columns; the types as the sheet is shown them; a line of gear's type, values and counts, from the item it is named like or its own; linesOf, the gear read as the sheet stores it, shared with gearRolls, gearCounts and encumbrance; SOLD AT (8a7a2), the kinds of shop a type's lines are sold at, the General Store where unsaid, and the type shelves a kind of building sells (typeShelvesAt); an item's price (its own, else its type's PRICE column) and whether it is IN SHOPS, one saved before the switch by whether it has a price (8a7a3a); a type's band on the sheet, EQUIPPED, USABLE or PACK, PACK where unsaid (bandOf, G1); SOLD AT may tick the game's own shops (8a7b1a)
│ │ ├── uniqueLines.js # UNIQUE, the server's half (G5a; decided 2026-11-20): a gear line named like an item, of its type, with a column of its own that isn't the item's, is that item made unique; who changed each such column and when (`changed: { damage: { by, gm?, at } }`) worked out on every inventory write from what was stored, never from what the sheet sends; kept as it was, the writer's when changed, gone when put back; PLAYERS CHANGE GEAR (G6a): with the table's players_change_gear '0', keepColumns keeps a player's lines' column values as stored and a new line's none (pairLines finds the line each was)
│ │ ├── encumbrance.js # Encumbrance (8a5a; approved mockup item-types, 2026-11-14, decision 7; shown, never enforced): COUNTED BY a NUMBER column, one of each times how many over the lines READIED or STOWED, an installed item only where its install WEIGHS; CAN CARRY a formula among the others (@capacity), what is carried read as @carried; bands as words at a share of it; the checks; each band and the word past them saying WHAT IT MEANS and naming an optional condition (8a5d1), the band as the sheet is told it; BAND_KEY, and CARRYING given CAN CARRY as the band reads it (8a5e1); the bands, the word past them and the condition's name given to the sheet for CARRYING on GEAR (8a6a)
│ │ ├── wornSums.js # What is worn, summed by column (8a5b; approved mockup item-types, 2026-11-14, decision 6): each NUMBER column of a system's own types read as @type_column, the worn items of that type together (@armor_defense), each worn item once as its line has it; no name a stat's, formula's or level's
Expand Down Expand Up @@ -649,6 +649,7 @@ CITY_NET/
│ ├── system_builder_parts_money.test.js # The bank turned off: no money handler moves anything, no balance is told, checkout refuses with no_bank, bank-linked sheet fields (and a section left empty) leave the sheet; every account kept, back with the bank; the bank unchanged where it is on
│ ├── system_builder_parts_shops.test.js # Shops under custom systems: open unless shops or the bank is off; building types, checkout (no_shops) and inventory sales follow; built-ins unchanged
│ ├── system_builder_buildings.test.js # Building types and catalogues renamed or off: the section's checks, the render copy, the routes (only kept types, by the system's names; an off type cannot be given) and checkout (off type no shop, off catalogue not sold), back when turned on; built-ins unchanged
│ ├── system_builder_own_shops.test.js # The game's own shops (8a7b1a): checked, read, a building type of the game, SOLD AT ticking them and checked against the game, carried by the system file; listed for buildings after the app's, given to a building (not off, not unknown), selling the types that tick it, no shop off or in another game
│ ├── system_builder_parts_vehicles.test.js # Vehicles turned off: the garage and its three catalogues off (even if asked for by name), told to the browser, back with vehicles on; built-ins and seating unchanged
│ ├── system_builder_parts_cyberware.test.js # Cyberware turned off: the ripperdoc and its three catalogues off (even if asked for by name), with vehicles off the garage too, back with cyberware on; a custom sheet cannot have a cyberware table; built-ins unchanged
│ ├── system_builder_parts_initiative.test.js # Initiative turned off: no tracker started (asked of the running game, not the message), no roll or NPC-side roll into its combat, ending still allowed; built-ins and a custom system that kept it unchanged
Expand Down
6 changes: 3 additions & 3 deletions backend/__tests__/system_builder_hostile_files.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ describe('the buildings section', () => {
it('refuses a kind it does not have, whatever it is called', () => {
const def = JSON.parse('{"format":1,"name":"X","buildings":{"constructor":{},"__proto__":{"a":1},"toString":{}}}');
expect(problemsOf(def)).toEqual([
'buildings constructor: Only "types" and "catalogues" are set here',
'buildings __proto__: Only "types" and "catalogues" are set here',
'buildings toString: Only "types" and "catalogues" are set here',
'buildings constructor: Only "types", "catalogues" and "shops" are set here',
'buildings __proto__: Only "types", "catalogues" and "shops" are set here',
'buildings toString: Only "types", "catalogues" and "shops" are set here',
]);
});
});
Expand Down
Loading
Loading