๐ Documentation Index
Welcome to TribeGen! Here's what to read based on your needs.
๐ I Want to Start Playing Now
โ Read START.md (2 min)
- Quick startup instructions
- Troubleshooting
- How to play
๐ฎ I Want to Understand the Game
โ Read GETTING_STARTED.md (10 min)
- Complete overview
- Features explained
- Code examples
- Testing checklist
๐ ๏ธ I Want to Develop & Add Features
โ Read ARCHITECTURE.md (15 min)
- System architecture
- Database schema
- How to add events
- How to add stats
- How to add injuries
๐ I Want Complete Feature Documentation
โ Read README.md (10 min)
- Full feature list
- Game mechanics
- Tech stack
- Installation options
๐ฏ I Want to See What's Ready & What's Not
โ Read DESIGN.md (8 min)
- What's implemented
- What's scaffolded
- Next steps
- Quick reference
๐ป I Want API Documentation
โ Read API_REFERENCE.md (10 min)
- All endpoints
- Request/response formats
- Data types
- Error codes
๐ I Want a Development Roadmap
โ Read TODO.md (5 min)
- Priority tasks
- Known issues
- Future ideas
- Testing commands
๐ I Want Project Statistics
โ Read PROJECT_SUMMARY.md (8 min)
- File structure
- Features checklist
- Metrics
- Design patterns
โ๏ธ I Want to Setup & Configure
โ Read QUICKSTART.md (3 min)
- Different setup options
- Configuration
- Troubleshooting
---
Reading Order (Recommended)
For Players
1. START.md - Run the game 2. QUICKSTART.md - Game mechanics 3. README.md - Features
For Developers
1. START.md - Get it running 2. GETTING_STARTED.md - Understand structure 3. DESIGN.md - See what's ready 4. ARCHITECTURE.md - Deep dive 5. API_REFERENCE.md - API details 6. TODO.md - What to build next
For Architects
1. PROJECT_SUMMARY.md - Overview 2. ARCHITECTURE.md - Design details 3. Database schema - Data structure 4. DESIGN.md - Implementation notes
---
Quick Reference
File Types
| Extension | What | Where |
|---|---|---|
| .php | Game code | src/, public/ |
| .html | Web interface | public/ |
| .css | Styling | public/css/ |
| .js | Frontend logic | public/js/ |
| .md | Documentation | Root directory |
| .json | Configuration | assets/, project root |
| .db | Database | data/ |
Directories
| Directory | Purpose |
|---|---|
public/ | Web-accessible files (index.php, HTML, CSS, JS) |
src/ | Application code (classes, database, API) |
src/Classes/ | Game logic classes |
src/Database/ | Database management |
src/Events/ | Event system |
src/Utilities/ | Helper functions |
src/api/ | API endpoints |
assets/ | Game assets (sprites, images) |
data/ | Game database and user saves |
Classes
| Class | Purpose | File |
|---|---|---|
User | Authentication | src/Classes/User.php |
Kobold | Character system | src/Classes/Kobold.php |
Tribe | Tribe management | src/Classes/Tribe.php |
Item | Item system | src/Classes/Item.php |
Injury | Injury tracking | src/Classes/Injury.php |
NPC | NPC system | src/Classes/NPC.php |
Event | Base event class | src/Events/Event.php |
EventManager | Event management | src/Events/EventManager.php |
Database | Database access | src/Database/Database.php |
---
Key Concepts
Stat System
- 7 stats: Vitality, Intelligence, Medicine, Crafting, Personality, Will
- Range: 0-100
- Display: Text (terrible โ godlike)
- Scaling: Babies have reduced effective stats
Age System
- Egg (age < 0)
- Baby (0-3, reduced stats)
- Adult (4-34, full stats)
- Old (35-59, reduced + injuries)
- Very Old (60+, many injuries)
Game Flow
- User login โ Create tribe โ Generate kobolds โ Select members โ Play
- Each month: Initiate events โ End month โ Progression
- Game continues until all kobolds dead
Event System
- Player-initiated: Hunting, Exploration, Farming
- Month events: Random based on season
- Events modify tribe state and generate story
---
Getting Help
1. Check TODO.md - Known issues and solutions 2. Check ARCHITECTURE.md - How systems work 3. Read code comments - Every major function documented 4. Check API_REFERENCE.md - For endpoint issues
---
Checklists
First Time Setup โ
0 of 5 tasks completed
- Read START.md
- Run
php -S localhost:8000 -t public/ - Create account
- Create tribe
- Play the game
Before Development โ
0 of 5 tasks completed
- Read GETTING_STARTED.md
- Read ARCHITECTURE.md
- Understand project structure
- Know how events work
- Know stat system
Adding New Feature โ
0 of 5 tasks completed
- Check TODO.md for similar features
- Read ARCHITECTURE.md for system design
- Look at existing similar code
- Write and test
- Update documentation
---
Links to Documentation Files
Getting Started
- START.md - Run the game (2 min read)
- GETTING_STARTED.md - Complete guide (10 min read)
- QUICKSTART.md - Setup options (3 min read)
Understanding
- README.md - Features (10 min read)
- DESIGN.md - Implementation (8 min read)
- ARCHITECTURE.md - Technical (15 min read)
Development
- API_REFERENCE.md - API docs (10 min read)
- TODO.md - Roadmap (5 min read)
- PROJECT_SUMMARY.md - Overview (8 min read)
---
Quick Commands
Run the game
php -S localhost:8000 -t public/
Test database initialization
php -r "require 'vendor/autoload.php'; \TribeGen\Database\Database::getInstance()->initializeTables(); echo 'OK';"
View database tables
sqlite3 data/tribegen.db ".tables"
---
Document Statistics
| Document | Length | Read Time | Topic |
|---|---|---|---|
| START.md | 1 page | 2 min | Running the game |
| GETTING_STARTED.md | 3 pages | 10 min | Overview |
| QUICKSTART.md | 2 pages | 3 min | Setup |
| README.md | 3 pages | 10 min | Features |
| DESIGN.md | 5 pages | 8 min | Implementation |
| ARCHITECTURE.md | 6 pages | 15 min | Technical |
| API_REFERENCE.md | 5 pages | 10 min | API |
| TODO.md | 4 pages | 5 min | Roadmap |
| PROJECT_SUMMARY.md | 7 pages | 8 min | Summary |
Total: ~36 pages of documentation
---
Next Steps
1. Decide your path: Player or Developer? 2. Read the appropriate documents: Based on your path 3. Follow the instructions: Start with START.md 4. Enjoy! ๐ฎ
---
Last Updated: January 27, 2025 Status: Ready for Use โ
Source
| 1 | # ๐ Documentation Index |
| 2 | |
| 3 | Welcome to TribeGen! Here's what to read based on your needs. |
| 4 | |
| 5 | ## ๐ I Want to Start Playing Now |
| 6 | โ Read **[START.md](START.md)** (2 min) |
| 7 | - Quick startup instructions |
| 8 | - Troubleshooting |
| 9 | - How to play |
| 10 | |
| 11 | ## ๐ฎ I Want to Understand the Game |
| 12 | โ Read **[GETTING_STARTED.md](GETTING_STARTED.md)** (10 min) |
| 13 | - Complete overview |
| 14 | - Features explained |
| 15 | - Code examples |
| 16 | - Testing checklist |
| 17 | |
| 18 | ## ๐ ๏ธ I Want to Develop & Add Features |
| 19 | โ Read **[ARCHITECTURE.md](ARCHITECTURE.md)** (15 min) |
| 20 | - System architecture |
| 21 | - Database schema |
| 22 | - How to add events |
| 23 | - How to add stats |
| 24 | - How to add injuries |
| 25 | |
| 26 | ## ๐ I Want Complete Feature Documentation |
| 27 | โ Read **[README.md](README.md)** (10 min) |
| 28 | - Full feature list |
| 29 | - Game mechanics |
| 30 | - Tech stack |
| 31 | - Installation options |
| 32 | |
| 33 | ## ๐ฏ I Want to See What's Ready & What's Not |
| 34 | โ Read **[DESIGN.md](DESIGN.md)** (8 min) |
| 35 | - What's implemented |
| 36 | - What's scaffolded |
| 37 | - Next steps |
| 38 | - Quick reference |
| 39 | |
| 40 | ## ๐ป I Want API Documentation |
| 41 | โ Read **[API_REFERENCE.md](API_REFERENCE.md)** (10 min) |
| 42 | - All endpoints |
| 43 | - Request/response formats |
| 44 | - Data types |
| 45 | - Error codes |
| 46 | |
| 47 | ## ๐ I Want a Development Roadmap |
| 48 | โ Read **[TODO.md](TODO.md)** (5 min) |
| 49 | - Priority tasks |
| 50 | - Known issues |
| 51 | - Future ideas |
| 52 | - Testing commands |
| 53 | |
| 54 | ## ๐ I Want Project Statistics |
| 55 | โ Read **[PROJECT_SUMMARY.md](PROJECT_SUMMARY.md)** (8 min) |
| 56 | - File structure |
| 57 | - Features checklist |
| 58 | - Metrics |
| 59 | - Design patterns |
| 60 | |
| 61 | ## โ๏ธ I Want to Setup & Configure |
| 62 | โ Read **[QUICKSTART.md](QUICKSTART.md)** (3 min) |
| 63 | - Different setup options |
| 64 | - Configuration |
| 65 | - Troubleshooting |
| 66 | |
| 67 | --- |
| 68 | |
| 69 | ## Reading Order (Recommended) |
| 70 | |
| 71 | ### For Players |
| 72 | 1. **START.md** - Run the game |
| 73 | 2. **QUICKSTART.md** - Game mechanics |
| 74 | 3. **README.md** - Features |
| 75 | |
| 76 | ### For Developers |
| 77 | 1. **START.md** - Get it running |
| 78 | 2. **GETTING_STARTED.md** - Understand structure |
| 79 | 3. **DESIGN.md** - See what's ready |
| 80 | 4. **ARCHITECTURE.md** - Deep dive |
| 81 | 5. **API_REFERENCE.md** - API details |
| 82 | 6. **TODO.md** - What to build next |
| 83 | |
| 84 | ### For Architects |
| 85 | 1. **PROJECT_SUMMARY.md** - Overview |
| 86 | 2. **ARCHITECTURE.md** - Design details |
| 87 | 3. **Database schema** - Data structure |
| 88 | 4. **DESIGN.md** - Implementation notes |
| 89 | |
| 90 | --- |
| 91 | |
| 92 | ## Quick Reference |
| 93 | |
| 94 | ### File Types |
| 95 | |
| 96 | | Extension | What | Where | |
| 97 | |-----------|------|-------| |
| 98 | | .php | Game code | `src/`, `public/` | |
| 99 | | .html | Web interface | `public/` | |
| 100 | | .css | Styling | `public/css/` | |
| 101 | | .js | Frontend logic | `public/js/` | |
| 102 | | .md | Documentation | Root directory | |
| 103 | | .json | Configuration | `assets/`, project root | |
| 104 | | .db | Database | `data/` | |
| 105 | |
| 106 | ### Directories |
| 107 | |
| 108 | | Directory | Purpose | |
| 109 | |-----------|---------| |
| 110 | | `public/` | Web-accessible files (index.php, HTML, CSS, JS) | |
| 111 | | `src/` | Application code (classes, database, API) | |
| 112 | | `src/Classes/` | Game logic classes | |
| 113 | | `src/Database/` | Database management | |
| 114 | | `src/Events/` | Event system | |
| 115 | | `src/Utilities/` | Helper functions | |
| 116 | | `src/api/` | API endpoints | |
| 117 | | `assets/` | Game assets (sprites, images) | |
| 118 | | `data/` | Game database and user saves | |
| 119 | |
| 120 | ### Classes |
| 121 | |
| 122 | | Class | Purpose | File | |
| 123 | |-------|---------|------| |
| 124 | | `User` | Authentication | `src/Classes/User.php` | |
| 125 | | `Kobold` | Character system | `src/Classes/Kobold.php` | |
| 126 | | `Tribe` | Tribe management | `src/Classes/Tribe.php` | |
| 127 | | `Item` | Item system | `src/Classes/Item.php` | |
| 128 | | `Injury` | Injury tracking | `src/Classes/Injury.php` | |
| 129 | | `NPC` | NPC system | `src/Classes/NPC.php` | |
| 130 | | `Event` | Base event class | `src/Events/Event.php` | |
| 131 | | `EventManager` | Event management | `src/Events/EventManager.php` | |
| 132 | | `Database` | Database access | `src/Database/Database.php` | |
| 133 | |
| 134 | --- |
| 135 | |
| 136 | ## Key Concepts |
| 137 | |
| 138 | ### Stat System |
| 139 | - 7 stats: Vitality, Intelligence, Medicine, Crafting, Personality, Will |
| 140 | - Range: 0-100 |
| 141 | - Display: Text (terrible โ godlike) |
| 142 | - Scaling: Babies have reduced effective stats |
| 143 | |
| 144 | ### Age System |
| 145 | - Egg (age < 0) |
| 146 | - Baby (0-3, reduced stats) |
| 147 | - Adult (4-34, full stats) |
| 148 | - Old (35-59, reduced + injuries) |
| 149 | - Very Old (60+, many injuries) |
| 150 | |
| 151 | ### Game Flow |
| 152 | - User login โ Create tribe โ Generate kobolds โ Select members โ Play |
| 153 | - Each month: Initiate events โ End month โ Progression |
| 154 | - Game continues until all kobolds dead |
| 155 | |
| 156 | ### Event System |
| 157 | - Player-initiated: Hunting, Exploration, Farming |
| 158 | - Month events: Random based on season |
| 159 | - Events modify tribe state and generate story |
| 160 | |
| 161 | --- |
| 162 | |
| 163 | ## Getting Help |
| 164 | |
| 165 | 1. **Check TODO.md** - Known issues and solutions |
| 166 | 2. **Check ARCHITECTURE.md** - How systems work |
| 167 | 3. **Read code comments** - Every major function documented |
| 168 | 4. **Check API_REFERENCE.md** - For endpoint issues |
| 169 | |
| 170 | --- |
| 171 | |
| 172 | ## Checklists |
| 173 | |
| 174 | ### First Time Setup โ |
| 175 | - [ ] Read START.md |
| 176 | - [ ] Run `php -S localhost:8000 -t public/` |
| 177 | - [ ] Create account |
| 178 | - [ ] Create tribe |
| 179 | - [ ] Play the game |
| 180 | |
| 181 | ### Before Development โ |
| 182 | - [ ] Read GETTING_STARTED.md |
| 183 | - [ ] Read ARCHITECTURE.md |
| 184 | - [ ] Understand project structure |
| 185 | - [ ] Know how events work |
| 186 | - [ ] Know stat system |
| 187 | |
| 188 | ### Adding New Feature โ |
| 189 | - [ ] Check TODO.md for similar features |
| 190 | - [ ] Read ARCHITECTURE.md for system design |
| 191 | - [ ] Look at existing similar code |
| 192 | - [ ] Write and test |
| 193 | - [ ] Update documentation |
| 194 | |
| 195 | --- |
| 196 | |
| 197 | ## Links to Documentation Files |
| 198 | |
| 199 | **Getting Started** |
| 200 | - [START.md](START.md) - Run the game (2 min read) |
| 201 | - [GETTING_STARTED.md](GETTING_STARTED.md) - Complete guide (10 min read) |
| 202 | - [QUICKSTART.md](QUICKSTART.md) - Setup options (3 min read) |
| 203 | |
| 204 | **Understanding** |
| 205 | - [README.md](README.md) - Features (10 min read) |
| 206 | - [DESIGN.md](DESIGN.md) - Implementation (8 min read) |
| 207 | - [ARCHITECTURE.md](ARCHITECTURE.md) - Technical (15 min read) |
| 208 | |
| 209 | **Development** |
| 210 | - [API_REFERENCE.md](API_REFERENCE.md) - API docs (10 min read) |
| 211 | - [TODO.md](TODO.md) - Roadmap (5 min read) |
| 212 | - [PROJECT_SUMMARY.md](PROJECT_SUMMARY.md) - Overview (8 min read) |
| 213 | |
| 214 | --- |
| 215 | |
| 216 | ## Quick Commands |
| 217 | |
| 218 | ### Run the game |
| 219 | ```bash |
| 220 | php -S localhost:8000 -t public/ |
| 221 | ``` |
| 222 | |
| 223 | ### Test database initialization |
| 224 | ```php |
| 225 | php -r "require 'vendor/autoload.php'; \TribeGen\Database\Database::getInstance()->initializeTables(); echo 'OK';" |
| 226 | ``` |
| 227 | |
| 228 | ### View database tables |
| 229 | ```bash |
| 230 | sqlite3 data/tribegen.db ".tables" |
| 231 | ``` |
| 232 | |
| 233 | --- |
| 234 | |
| 235 | ## Document Statistics |
| 236 | |
| 237 | | Document | Length | Read Time | Topic | |
| 238 | |----------|--------|-----------|-------| |
| 239 | | START.md | 1 page | 2 min | Running the game | |
| 240 | | GETTING_STARTED.md | 3 pages | 10 min | Overview | |
| 241 | | QUICKSTART.md | 2 pages | 3 min | Setup | |
| 242 | | README.md | 3 pages | 10 min | Features | |
| 243 | | DESIGN.md | 5 pages | 8 min | Implementation | |
| 244 | | ARCHITECTURE.md | 6 pages | 15 min | Technical | |
| 245 | | API_REFERENCE.md | 5 pages | 10 min | API | |
| 246 | | TODO.md | 4 pages | 5 min | Roadmap | |
| 247 | | PROJECT_SUMMARY.md | 7 pages | 8 min | Summary | |
| 248 | |
| 249 | **Total: ~36 pages of documentation** |
| 250 | |
| 251 | --- |
| 252 | |
| 253 | ## Next Steps |
| 254 | |
| 255 | 1. **Decide your path**: Player or Developer? |
| 256 | 2. **Read the appropriate documents**: Based on your path |
| 257 | 3. **Follow the instructions**: Start with START.md |
| 258 | 4. **Enjoy!** ๐ฎ |
| 259 | |
| 260 | --- |
| 261 | |
| 262 | Last Updated: January 27, 2025 |
| 263 | Status: Ready for Use โ |