diff options
| author | historia <[not public]> | 2026-06-11 19:24:25 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-06-11 19:24:25 -0400 |
| commit | 6b2b4bf470b655f01c5a21c5f558a6102402c214 (patch) | |
| tree | 10970b523999b87ea09c63486906f0c5314f3542 /TODO.md | |
| parent | 1b9e2da3b3c438d8dc53d3489725dd5ba0022777 (diff) | |
| download | thehouseoficarus-6b2b4bf470b655f01c5a21c5f558a6102402c214.tar.gz | |
feat: map implemented with BFS
Diffstat (limited to 'TODO.md')
| -rw-r--r-- | TODO.md | 119 |
1 files changed, 94 insertions, 25 deletions
@@ -9,10 +9,10 @@ Not generic fantasy. Takes place on a terraformed asteroid. Technology has regre ## Skills (23 total, all go from 1-99) ``` -Combat: Attack, Strength, Defense, Hitpoints, Ranged, Science, Technology -Gathering: Fishing, Woodcutting, Mining, Hacking, Scavenging, Farming +Combat: Attack, Strength, Defense, Hitpoints, Ranged, Science, Technology, Assassin +Gathering: Fishing, Woodcutting, Mining, Hacking, Scavenging, Farming, Thieving Production: Cooking, Smithing, Crafting, Fletching, Alchemy, Construction, Firemaking -Utility: Thieving, Agility, Assassin +Utility: Agility ``` ## Architecture @@ -46,12 +46,12 @@ data/ Objects and mobs in rooms can have behaviors. Four types exist: -| Type | Verbs | Use | -|------|-------|-----| +| Type | Verbs | Use | +| -------- | --------------------- | -------------------------------------------------------------------------- | | `gather` | mine, chop, cut, fish | Resource gathering with skill checks, tool requirements, depletion/respawn | -| `use` | use | Crafting stations — consume items, produce output, optional skill checks | -| `talk` | talk, speak, ask | NPC conversation trees with choices, conditions, actions | -| `toggle` | pull, push | Levers, switches, gates — set world flags, conditional on existing values | +| `use` | use | Crafting stations — consume items, produce output, optional skill checks | +| `talk` | talk, speak, ask | NPC conversation trees with choices, conditions, actions | +| `toggle` | pull, push | Levers, switches, gates — set world flags, conditional on existing values | Behaviors are defined in `data/behaviors/<id>.yaml`. Objects reference them with `behavior: <id>`. Mobs can also carry `behavior: <id>` — StartAction falls back to mob lookup when no object matches. @@ -69,27 +69,27 @@ Set `nest_chance: 256` on a gather behavior to give a 1/256 independent chance t Used by exits, talk options, on-enter scripts, and toggle checks: -| Field | Scope | Example | -|-------|-------|---------| -| `flag` | World (shared by all players) | `flag: gate_open` | +| Field | Scope | Example | +| ------------- | ------------------------------ | -------------------------------- | +| `flag` | World (shared by all players) | `flag: gate_open` | | `player_flag` | Per-character (quest progress) | `player_flag: finished_tutorial` | -| `has_item` | Player inventory check | `has_item: bronze_key` | -| `all_of` | All sub-conditions must pass | Nested list of conditions | -| `any_of` | Any sub-condition passes | Nested list of conditions | -| `not` | Invert the check | `not: true` | +| `has_item` | Player inventory check | `has_item: bronze_key` | +| `all_of` | All sub-conditions must pass | Nested list of conditions | +| `any_of` | Any sub-condition passes | Nested list of conditions | +| `not` | Invert the check | `not: true` | ### Node Actions (talk dialog) Set on nodes in talk behaviors: -| Field | Effect | -|---|---| -| `set_flags` | Sets world flags (global) | +| Field | Effect | +| ------------------ | ------------------------------------------------------ | +| `set_flags` | Sets world flags (global) | | `set_player_flags` | Sets player-local flags (per-character, saved to YAML) | -| `give_item` | Gives an item to inventory | -| `take_item` | Removes an item from inventory | -| `teleport` | Moves player to a room ID | -| `heal` | Restores hitpoints | +| `give_item` | Gives an item to inventory | +| `take_item` | Removes an item from inventory | +| `teleport` | Moves player to a room ID | +| `heal` | Restores hitpoints | All fields in a single action are processed together. @@ -193,14 +193,83 @@ See WORLDBUILDING.md for full examples of every data type with explanations. ## Action Plan -### Phase 1: Core Skill Chains (breadth over depth) +### Phase 1: Tiny ASCII Map + +- [ ] Limit the room description to 70 characters wide. Add a setting named "maxWidth" in an appropriate section of config.yaml along with comment explaining it. + +Next to the block of room description text should be an ASCII mini-map showing the current room as @ and a grid of the rooms and connections surrounding it. A full-size ASCII map for the "map" command will eventually be implemented so keep that in mind for methodology and potential functions we can reuse. +Each line of the map should print on the maxWidth+2 character after the description (so there's always at least one space between the description and map) +If the map is longer than the description, just keep printing new lines for the map. + +The first line is always ╔═════╗ +The last line is always ╚═════╝ +Each of the 5 inner lines begins and ends with ║ + +The map shows up to 9 rooms and any exits connecting them. The 5 inner lines have 7 characters each (including the border) which be defined like this: + +Line 1: [║, Room A (shown if there is a west exit from North Room or north exit from West Room), — if there is a west exit from North Room, North Room, — if there is an east exit from North Room, Room B (shown if there is an east exit from North Room or north exit from East Room), ║] +Line 2: [║, | if there is a north exit from West Room, Blank, | if there is a north exit from Current Room, ↑ if there is an up exit from Current Room, | if there is a north exit from East Room, ║] +Line 3: [║, West Room, — if there is a west exit from Current Room, @, — if there is an east exit from Current Room, East Room, ║] +Line 4: [║, | if there is a south exit from West Room, ↓ if there is a down exit from Current Room, | if there is a south exit from Current Room, Blank, | if there is a south exit from East Room, ║] +Line 5: [║, Room C (shown if there is a west exit from South Room or south exit from West Room), — if there is a west exit from South Room, South Room, — if there is an east exit from South Room, Room D (shown if there is an east exit from South Room or south exit from East Room), ║] + +Note that North Room, East Room, South Room, and West Room can still show up even if there isn't a direct link from the current room to them. For example if there is a to East Room, then that has an exit north, then that room has an exit west, the 'north room' still shows up on the map. + +Each room has a parameter map_symbol to identify it on the map. + +This is how the map looks when every possible room and exit is shown. o is the map_symbol for each room in this example: + +╔═════╗ +║o—o—o║ +║| |↑|║ +║o—@—o║ +║|↓| |║ +║o—o—o║ +╚═════╝ + +This is a map with fewer connections. Note that 'Room A' and 'North Room' show up despite only being connected through East Room and Room B. + +╔═════╗ +║o—o—o║ +║ |║ +║o—@—o║ +║| ║ +║o ║ +╚═════╝ + + +Here's how the room description would look limited to 70 characters long with the map to the right: + +Central Market +The market square pulses with the unbridled energy of a thousand ╔═════╗ +voices, a symphony of commerce and humanity that hasn't changed in ║o—o—o║ +generations. Overhead, September clouds drift lazily across the sky, ║| |↑|║ +occasionally releasing weak sunlight that transforms the ancient ║o—@—o║ +stone beneath countless feet into patches of burnished gold. ║|↓| |║ + ║o—o—o║ + ╚═════╝ + +- [ ] This is a feature that can be toggled with the "tinymap" toggle. If the toggle is off, don't print the map at all. +- [ ] Add a toggle "left-tinymap". If this is enabled, the map should be printed on each line before the room description. For example: + +Central Market +╔═════╗ The market square pulses with the unbridled energy of a thousand +║o—o—o║ voices, a symphony of commerce and humanity that hasn't changed in +║| |↑|║ generations. Overhead, September clouds drift lazily across the sky, +║o—@—o║ occasionally releasing weak sunlight that transforms the ancient +║|↓| |║ stone beneath countless feet into patches of burnished gold. +║o—o—o║ +╚═════╝ + + +### Phase 2: Core Skill Chains (breadth over depth) - [x] Woodcutting — tree objects + axes, shared depletion, bird's nests - [ ] Cooking — fire/range object (`use` type), raw fish/meat → cooked food - [ ] Smithing — furnace + anvil objects (`use` type), ore → bars → weapons/armor - [ ] Fletching — fletching table object (`use` type), logs → arrow shafts/bows - [ ] Equipment: bronze/iron weapons, axes, cooked trout, arrows, bows -### Phase 2: World Depth +### Phase 3: World Depth - [ ] Shop system — talk node action for buy/sell interface with credits - [ ] Bank system — deposit/withdraw items at bank booth objects - [ ] Ranged combat — bows/crossbows/ammo, add Ranged to combat formulas @@ -208,7 +277,7 @@ See WORLDBUILDING.md for full examples of every data type with explanations. - [ ] Flee command - [ ] Equipment skill requirements -### Phase 3: Polish +### Phase 4: Polish - [ ] Hacking, Thieving, Agility, Alchemy, Construction, Crafting, Scavenging, Farming, Assassin - [ ] Quest system (already supported via talk nodes + world/player flags) - [ ] PvP combat, multi-combat zones |
