Skip to content

Commit b72018e

Browse files
author
Garrett Vorbeck
committed
refactor: rename hexCrawler to hexMapper, add hexTravel, and enhance CollapsibleTable with subtitle support
1 parent 9f95b39 commit b72018e

10 files changed

Lines changed: 164 additions & 105 deletions

File tree

src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const allCards: CardProps[] = [
3030
cards.npcGenerator,
3131
cards.genericGenerator,
3232
cards.dungeonCrawler,
33-
cards.hexCrawler,
33+
cards.hexMapper,
3434
cards.advancedMoves,
3535

3636
// Information & Credits

src/__tests__/App.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ vi.mock("@/data/cards", () => ({
6565
contentType: "text",
6666
content: "Dungeon exploration",
6767
},
68-
hexCrawler: {
69-
title: "Hex Crawler",
68+
hexMapper: {
69+
title: "Hex Mapper",
7070
contentType: "text",
7171
content: "Hex exploration",
7272
},

src/components/content/CollapsibleTable.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ const CollapsibleTable: React.FC<CollapsibleTableProps> = ({ table }) => {
2020
{table.title && (
2121
<h3 className={DESIGN_TOKENS.table.title}>{table.title}</h3>
2222
)}
23+
{table.subtitle && (
24+
<h4 className={DESIGN_TOKENS.table.subtitle}>{table.subtitle}</h4>
25+
)}
2326
<table className={DESIGN_TOKENS.table.container}>
2427
<tbody>
2528
{table.rows.map((row, rowIndex) => (

src/data/cards/acknowledgements.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,18 @@ const acknowledgements: CardProps = {
44
title: "Acknowledgements & Credits",
55
contentType: "text",
66
preContent:
7-
"Roll Alone is a solo TTRPG toolkit heavily inspired by and built upon the foundation of Karl Hendricks' excellent One Page Solo Engine, with additional content, modifications, and digital enhancements for the modern solo player.",
7+
"Roll Alone is a solo TTRPG toolkit heavily inspired by and built upon the foundation of Karl Hendricks' excellent One Page Solo Engine, with additional content, modifications, and digital enhancements.",
88
content:
99
"This toolkit would not be possible without the incredible work of these creators:",
1010
postContent: [
1111
"**Primary Inspiration:**",
1212
"• **One Page Solo Engine** by [Karl Hendricks (Inflatable Studios)](https://inflatablestudios.itch.io/)",
13-
" The core framework and philosophy that makes Roll Alone possible",
13+
"• **BFRPG Hexcrawl Adventures** by [Luke Kennedy & BFRPG](https://www.basicfantasy.org/forums/viewtopic.php?t=4183&sid=90c0b497d499f09f628a14d2204a1de6)",
14+
"• **Little GM Emulator** by [Gustavo Coelho](https://gcpcoelho.itch.io/little-gm-emulator)",
15+
"---",
16+
"**Roll Alone created by:** [Garrett Vorbeck](https://iamgarrett.com) – rollal.one",
1417
"",
15-
"**Roll Alone created by:**",
16-
"[Garrett Vorbeck](https://iamgarrett.com) – rollal.one",
17-
"",
18-
"**License:**",
19-
"Roll Alone additions: Available for personal use",
20-
"Original OPSE content: CC-BY-SA 4.0",
18+
"**License:** CC-BY-SA 4.0",
2119
],
2220
};
2321

src/data/cards/hexCrawler.ts

Lines changed: 0 additions & 92 deletions
This file was deleted.

src/data/cards/hexMapper.ts

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
import { CardProps } from "@/data/definitions";
2+
3+
const hexMapper: CardProps = {
4+
title: "Hex Mapper",
5+
contentType: "table",
6+
preContent:
7+
"Use this to generate overland exploration. Start by rolling for your first hex. When entering adjacent hexes, roll 3d12 to generate the next Hex.",
8+
content: [
9+
{
10+
title: "Hex Terrain - Starting/Random (1d6)",
11+
collapsible: true,
12+
defaultCollapsed: true,
13+
rows: [
14+
["1", "Mountains"],
15+
["2", "Hills"],
16+
["3-5", "Plains"],
17+
["6", "Swamp"],
18+
],
19+
},
20+
{
21+
title: "New Hex - Adjacent Terrain",
22+
rows: [
23+
["**Terrain (Current)**", "**1d12 (New)**"],
24+
["Mountains", "1-6: Mountains"],
25+
["", "7-10: Hills"],
26+
["", "11: Plains"],
27+
["", "12: Swamp"],
28+
["Hills", "1-4: Mountains"],
29+
["", "5-8: Hills"],
30+
["", "9-11: Plains"],
31+
["", "12: Swamp"],
32+
["Plains", "1: Mountains"],
33+
["", "2-3: Hills"],
34+
["", "4-9: Plains"],
35+
["", "10-12: Swamp"],
36+
["Swamp", "1: Mountains"],
37+
["", "2: Hills"],
38+
["", "3-8: Plains"],
39+
["", "9-12: Swamp"],
40+
],
41+
},
42+
{
43+
title: "New Hex - Adjacent Vegetation",
44+
rows: [
45+
["**Vegetation (Current)**", "**1d12 (New)**"],
46+
["Dense Forest/Jungle", "1-6: Dense Forest"],
47+
["", "7-10: Light Forest"],
48+
["", "11: Grassland"],
49+
["", "12: Barren"],
50+
["Light Forest", "1-4: Dense Forest"],
51+
["", "5-8: Light Forest"],
52+
["", "9-11: Grassland"],
53+
["", "12: Barren"],
54+
["Grassland", "1: Dense Forest"],
55+
["", "2-3: Light Forest"],
56+
["", "4-9: Grassland"],
57+
["", "10-12: Barren"],
58+
["Barren", "1: Dense Forest"],
59+
["", "2: Light Forest"],
60+
["", "3-8: Grassland"],
61+
["", "9-12: Barren"],
62+
],
63+
},
64+
{
65+
title: "New Hex - Adjacent Water (Optional)",
66+
rows: [
67+
["**Water (Current)**", "**1d12 (New)**"],
68+
["Lake", "1-8: Lake"],
69+
["", "9-10: River"],
70+
["", "11: Coast"],
71+
["", "12: None"],
72+
["River", "1-2: Lake"],
73+
["", "3-8: River"],
74+
["", "9-10: Coast"],
75+
["", "11-12: None"],
76+
["Coast", "1: Lake"],
77+
["", "2-3: River"],
78+
["", "4-8: Coast"],
79+
["", "9-12: None"],
80+
["None", "1: Lake"],
81+
["", "2-4: River"],
82+
["", "5-7: Coast"],
83+
["", "8-12: None"],
84+
],
85+
},
86+
{
87+
title: "Point of Interest",
88+
subtitle: "Roll d6. On a 1, the hex has a point of interest (1d12).",
89+
rows: [
90+
["1-2", "Settlement"],
91+
["3-4", "Ruins"],
92+
["5-6", "Natural landmark or resource"],
93+
["7-8", "Monster lair"],
94+
["9-10", "Tomb"],
95+
["11", "Temple"],
96+
["12", "Dungeon entrance"],
97+
],
98+
},
99+
],
100+
};
101+
102+
export default hexMapper;

src/data/cards/hexTravel.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import { CardProps } from "@/data/definitions";
2+
3+
const hexTravel: CardProps = {
4+
title: "Hex Mapper",
5+
contentType: "table",
6+
preContent:
7+
"Use this to generate overland exploration. Start by rolling for your first hex. When entering adjacent hexes, roll 3d12 to generate the next Hex.",
8+
content: [
9+
{
10+
title: "Danger Level (d6)",
11+
rows: [
12+
["1", "Safe"],
13+
["2-3", "Unsafe"],
14+
["4-5", "Risky"],
15+
["6", "Deadly"],
16+
],
17+
},
18+
{
19+
title: "Travel Events (d6)",
20+
rows: [
21+
["1", "Random Encounter"],
22+
["2-5", "None"],
23+
["6", "RANDOM EVENT then SET THE SCENE"],
24+
],
25+
},
26+
{
27+
title: "Travel Time (d6 hours)",
28+
rows: [
29+
["Desert/Arctic", "+2 hours (harsh conditions)"],
30+
["Swamp", "+3 hours (difficult terrain)"],
31+
["Grassland", "Base time (easy travel)"],
32+
["Forest/Jungle", "+1 hour (dense vegetation)"],
33+
["River/Coast", "Base time (following paths/shores)"],
34+
["Ocean/Lake", "Special (requires boats/swimming)"],
35+
["Mountain", "+4 hours (steep, treacherous)"],
36+
],
37+
},
38+
],
39+
postContent: [
40+
"*Terrain steps are circular:",
41+
"*Desert → Swamp → Grassland → Forest → River → Ocean → Mountain → Desert",
42+
],
43+
};
44+
45+
export default hexTravel;

src/data/cards/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ export { default as plotHookGenerator } from "./plotHookGenerator";
1616
export { default as npcGenerator } from "./npcGenerator";
1717
export { default as genericGenerator } from "./genericGenerator";
1818
export { default as dungeonCrawler } from "./dungeonCrawler";
19-
export { default as hexCrawler } from "./hexCrawler";
19+
export { default as hexMapper } from "./hexMapper";
20+
export { default as hexTravel } from "./hexTravel";
2021
export { default as advancedMoves } from "./advancedMoves";
2122

2223
// Row 3: Information & Credits

src/data/definitions.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export interface CardProps {
1010

1111
export interface TableData {
1212
title?: string;
13+
subtitle?: string;
1314
rows: string[][];
1415
collapsible?: boolean;
1516
defaultCollapsed?: boolean;

src/styles/tokens.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ export const DESIGN_TOKENS = {
2424
cellBorder: "border-r border-gray-600",
2525
headerCell: "font-semibold text-center bg-gray-700 text-white",
2626
regularCell: "text-gray-300",
27-
title: "text-lg font-medium text-white mb-3",
27+
title: "text-lg font-medium text-white mb-2",
28+
subtitle: "text-sm text-gray-400 mb-3",
2829
},
2930

3031
// Post content (note) styling

0 commit comments

Comments
 (0)