Skip to content

Commit 975290c

Browse files
committed
Fix creatures/characters. Fix classes.
1 parent ccd370d commit 975290c

File tree

10 files changed

+84
-78
lines changed

10 files changed

+84
-78
lines changed

site/crawl-github-pages.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,25 @@ Each markdown file can be loaded individually into an AI model's context:
636636
- **World Building:** [politics.md](politics.md) + [religion.md](religion.md) + [relationships.md](relationships.md)
637637
- **Combat/Items:** [equipment.md](equipment.md) + [creatures.md](creatures.md)
638638
639+
## Recommended Markdown Viewers
640+
641+
For the best reading experience on different platforms:
642+
643+
### Windows
644+
- **[Obsidian](https://obsidian.md/)** (Free) - Excellent for interconnected documents, shows relationships between pages
645+
- **[MarkText](https://github.com/marktext/marktext)** (Free) - Clean, real-time preview editor
646+
- **[Typora](https://typora.io/)** (Paid) - Premium WYSIWYG markdown editor with beautiful rendering
647+
648+
### Cross-Platform
649+
- **[Zettlr](https://www.zettlr.com/)** (Free) - Academic-focused with great cross-reference support
650+
- **[Joplin](https://joplinapp.org/)** (Free) - Note-taking app with excellent markdown support
651+
652+
### Web-Based
653+
- **GitHub** - View files directly in your browser at the repository
654+
- **GitLab/Gitea** - If you prefer other Git platforms
655+
656+
**Recommendation:** Obsidian is particularly good for this documentation because it can visualize the connections between characters, magic schools, and world elements as an interactive graph.
657+
639658
## MCP Server Integration
640659
641660
These files are designed to be served by the MCP server as static content, eliminating the need for dynamic page crawling.

site/public/data/classes.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"classes": {
3-
"base": {
3+
"core": {
44
"warrior": {
55
"name": "Warrior",
66
"description": "Masters of physical combat, skilled with a variety of weapons and armor. The backbone of military forces and those who rely on strength and martial prowess.",
7-
"populationPercentage": 59,
7+
"populationPercentage": 65,
88
"alternativeNames": [
99
"Fighter",
1010
"Knight",
@@ -14,7 +14,7 @@
1414
"rogue": {
1515
"name": "Rogue",
1616
"description": "Experts in stealth, agility, and cunning, often excelling in dexterous skills and unconventional approaches. Include skilled workers, scouts, and those who rely on finesse.",
17-
"populationPercentage": 38,
17+
"populationPercentage": 32,
1818
"alternativeNames": [
1919
"Scout",
2020
"Specialist",

site/src/components/Layout.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ function Layout(props: RouteSectionProps) {
2323
<li><A href="/politics">Politics</A></li>
2424
<li><A href="/religion">Religion</A></li>
2525
<li><A href="/relationships">Relationships</A></li>
26+
<li><A href='/creatures'>Creatures</A></li>
27+
<li><A href='/characters'>Noteable Characters</A></li>
2628
</ul>
2729
</div>
2830
</nav>

site/src/data/index.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -87,24 +87,6 @@ export interface OrganizationsData {
8787
organizations: Record<string, any>
8888
}
8989

90-
export interface OldCreatureData {
91-
name: string
92-
rank: string
93-
ideology: string
94-
morality: string
95-
methodology: string
96-
temperament: string
97-
// abilities?: Record<string, string>
98-
// skills?: Record<string, string>
99-
// traits?: string[]
100-
tags: string[]
101-
description: string
102-
}
103-
104-
export interface OldCreaturesData {
105-
creatures: Record<string, OldCreatureData>
106-
}
107-
10890
// New entity data structures for character and creature cards
10991
enum RankValue {
11092
F = 'F',
@@ -275,11 +257,6 @@ export async function fetchCreaturesData(): Promise<CreaturesData> {
275257
return loadJsonData<CreaturesData>('creatures')
276258
}
277259

278-
// Keep old creatures data for backward compatibility
279-
export async function fetchOldCreaturesData(): Promise<OldCreaturesData> {
280-
return loadJsonData<OldCreaturesData>('creatures')
281-
}
282-
283260
// Helper function to fetch all data at once if needed
284261
export async function fetchAllData() {
285262
const [magic, classes, equipment, organizations, creatures, site] = await Promise.all([

site/src/index.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@ import Alignment from './pages/alignment'
1414
import Religion from './pages/religion'
1515
import Relationships from './pages/relationships'
1616
import Skills from './pages/skills'
17+
import Characters from './pages/characters'
1718
import CharacterDetail from './pages/characters/detail'
1819
import CreatureDetail from './pages/creatures/detail'
19-
import EntitiesDemo from './pages/entities-demo'
20+
import EntitiesDemo from './pages/creatures'
21+
import Creatures from './pages/creatures'
2022

2123
const root = document.getElementById('root')
2224

@@ -32,7 +34,9 @@ render(() => (
3234
<Route path="/alignment" component={Alignment} />
3335
<Route path="/religion" component={Religion} />
3436
<Route path="/relationships" component={Relationships} />
37+
<Route path="/characters" component={Characters} />
3538
<Route path="/characters/:id" component={CharacterDetail} />
39+
<Route path="/creatures" component={Creatures} />
3640
<Route path="/creatures/:id" component={CreatureDetail} />
3741
<Route path="/entities-demo" component={EntitiesDemo} />
3842
</HashRouter>

site/src/pages/entities-demo.tsx renamed to site/src/pages/characters.tsx

Lines changed: 3 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@ import EntityCard from '@/components/EntityCard'
33
import { fetchCharactersData, fetchCreaturesData } from '@data/index'
44

55
// Example usage of EntityCard component with real data
6-
function EntityCardsDemo() {
6+
function Characters() {
77
const [charactersData] = createResource(fetchCharactersData)
8-
const [creaturesData] = createResource(fetchCreaturesData)
98

109
// Convert data objects to arrays for rendering
1110
const characters = () => {
@@ -19,22 +18,9 @@ function EntityCardsDemo() {
1918
}))
2019
}
2120

22-
const creatures = () => {
23-
const data = creaturesData()
24-
if (!data) return []
25-
return Object.entries(data.creatures).map(([id, creature]) => ({
26-
id,
27-
...creature,
28-
// Generate subtitle from available data
29-
subtitle: `Wild Animal` // Could be derived from tags or other data
30-
}))
31-
}
32-
3321
return (
3422
<div class="container">
35-
<h1>Characters & Creatures</h1>
36-
<p>Example usage of the EntityCard component for displaying characters and creatures loaded from JSON data.</p>
37-
23+
<h1>Notable Characters</h1>
3824
<Suspense fallback={<div>Loading entities...</div>}>
3925
<h2>Characters</h2>
4026
<div class="entity-grid">
@@ -51,25 +37,9 @@ function EntityCardsDemo() {
5137
/>
5238
)}</For>
5339
</div>
54-
55-
<h2>Creatures</h2>
56-
<div class="entity-grid">
57-
<For each={creatures()}>{(creature) => (
58-
<EntityCard
59-
id={creature.id}
60-
name={creature.name}
61-
subtitle={creature.subtitle}
62-
description={creature.description}
63-
rank={creature.threatLevel}
64-
rankLabel="Threat Level"
65-
imageUrl={creature.imageUrl || undefined}
66-
basePath="/creatures"
67-
/>
68-
)}</For>
69-
</div>
7040
</Suspense>
7141
</div>
7242
)
7343
}
7444

75-
export default EntityCardsDemo
45+
export default Characters

site/src/pages/classes.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ function Classes() {
3030
label: 'Alternate Names',
3131
priority: 'low',
3232
render: (value) => Array.isArray(value) ? value.join(', ') : value
33+
},
34+
{
35+
key: 'populationPercentage',
36+
label: 'Population Percentage',
37+
priority: 'low',
3338
}
3439
]
3540

site/src/pages/creatures.tsx

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import { createResource, For, Suspense } from 'solid-js'
2+
import EntityCard from '@/components/EntityCard'
3+
import { fetchCharactersData, fetchCreaturesData } from '@data/index'
4+
5+
// Example usage of EntityCard component with real data
6+
function Creatures() {
7+
const [creaturesData] = createResource(fetchCreaturesData)
8+
9+
10+
const creatures = () => {
11+
const data = creaturesData()
12+
if (!data) return []
13+
return Object.entries(data.creatures).map(([id, creature]) => ({
14+
id,
15+
...creature,
16+
// Generate subtitle from available data
17+
subtitle: `Wild Animal` // Could be derived from tags or other data
18+
}))
19+
}
20+
21+
return (
22+
<div class="container">
23+
<h1>Creatures</h1>
24+
<Suspense fallback={<div>Loading entities...</div>}>
25+
<div class="entity-grid">
26+
<For each={creatures()}>{(creature) => (
27+
<EntityCard
28+
id={creature.id}
29+
name={creature.name}
30+
subtitle={creature.subtitle}
31+
description={creature.description}
32+
rank={creature.threatLevel}
33+
rankLabel="Threat Level"
34+
imageUrl={creature.imageUrl || undefined}
35+
basePath="/creatures"
36+
/>
37+
)}</For>
38+
</div>
39+
</Suspense>
40+
</div>
41+
)
42+
}
43+
44+
export default Creatures

site/src/pages/home.tsx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,6 @@ function Home() {
7070
</dt>
7171
<dd>Reserved for the most powerful beings in existence. SSS-rank characters are god-like and can shape the course of history.<br />Combat: can take on entire armies, causing act-of-god level devastation.<br />Skill: unparalleled and can achieve the impossible.</dd>
7272
</dl>
73-
74-
<section class="explore-section">
75-
<h2>Explore the World</h2>
76-
<ul class="world-links">
77-
<li><A href="/magic">Magic System</A></li>
78-
<li><A href="/skills">Skills & Abilities</A></li>
79-
<li><A href="/politics">Political Landscape</A></li>
80-
<li><A href="/classes">Character Classes</A></li>
81-
<li><A href="/equipment">Equipment & Items</A></li>
82-
<li><A href="/alignment">Alignment System</A></li>
83-
<li><A href="/religion">Religions & Deities</A></li>
84-
<li><A href="/relationships">Relationships</A></li>
85-
<li><A href="/entities-demo">Entities Demo</A></li>
86-
</ul>
87-
</section>
8873
</div>
8974
)
9075
}

site/src/pages/relationships.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function Relationships() {
88
<p>Relationship archetypes are common character tropes found in various forms of media, particularly in anime, manga, and visual novels. These archetypes describe different ways characters express their affection and interact with their love interests. When a character is assigned an archetype it should influence or override their alignement temperament, especially in romantic situations.</p>
99

1010
<h3>Common Archetypes</h3>
11-
<p>These make up about 60% of character relationships.</p>
11+
<p>These make up about 80% of character relationships.</p>
1212
<table>
1313
<thead>
1414
<tr>
@@ -124,7 +124,7 @@ function Relationships() {
124124

125125

126126
<h3>Uncommon Archetypes</h3>
127-
<p>These make up about 30% of character relationships.</p>
127+
<p>These make up about 19% of character relationships.</p>
128128
<table>
129129
<thead>
130130
<tr>
@@ -163,7 +163,7 @@ function Relationships() {
163163
</table>
164164

165165
<h3>Rare Archetypes</h3>
166-
<p>These make up about 10% of character relationships.</p>
166+
<p>These make up about 1% of character relationships.</p>
167167
<table>
168168
<thead>
169169
<tr>

0 commit comments

Comments
 (0)