A command-line Keeper (Game Master) assistant for Call of Cthulhu 7th Edition, developed as a course project.
It provides tools for managing investigators(players) and NPCs, handling skill checks, sanity (SAN) system,
combat simulation, and multi-day adventure tracking.
This project was developed as part of an undergraduate coursework (INFOSCI102) assignment.
Its primary objective is to demonstrate the practical application of object-oriented programming, state management, and algorithmic thinking using Python.
The project intentionally avoids external libraries and graphical interfaces in order to:
- Emphasize Python fundamentals
- Maintain clear and readable class design
- Faithfully translate tabletop game rules into executable logic
- Create and manage Investigators and NPCs
- Maintain complete character sheets (attributes, skills, HP, SAN)
- Modify character states dynamically during gameplay
- Automated percentile dice (d100) rolls
- Standard Call of Cthulhu success levels:
- Critical Success
- Extreme Success
- Hard Success
- Success
- Failure
- Fumble
- Batch skill checks for multiple characters
- SAN value tracking and loss calculation
- Temporary and permanent insanity rules
- Randomized madness effects with durations
- Daily sanity loss tracking
- Turn-based combat system
- Initiative based on Dexterity (DEX)
- Multiple NPC combat behavior patterns
- Damage calculation with critical hits and fumbles
- Handling of unconsciousness and death
- Multi-day adventure structure
- Daily event progression
- Character recovery between days
- Python 3.6 or higher
- No third-party libraries required
git clone https://github.com/PhoenixForever1023/Call_of_Cthulhu_Keeper_Assistant-English.git
cd Call_of_Cthulhu_Keeper_Assistant-English
python CALL_OF_CTHULHU_TRPG_KEEPER_ASSISTANT.pyWelcome Keeper, to a new adventure of Call of Cthulhu.
-------------Menu-------------
1. Initialize NPCs before start playing.
2. Initialize the investigators before start playing.
3. Start the first day of the adventure.
------------------------------
Which Skill Faces the Unknown? listen
Asano Izumi listen: 60
Opps, a dice rolls 73, listen gets Failure....
Reality tears as violence erupts...
Roll for Initiative, investigators!
First move goes to Evans Jones!
Call_of_Cthulhu_Keeper_Assistant-English/
├── CALL_OF_CTHULHU_TRPG_KEEPER_ASSISTANT.py
├── README.md
├── README-zh.md
└── .gitignore
The program is implemented in a single Python file but logically divided into sections:
- Dice and utility functions
- Character class hierarchy (
Person,Character,NPC) - Manager classes (
NPCManager,InvestigatorManager) - Main game loop and menu system
| Class | Description |
|---|---|
| Person | Base class with combat-related attributes |
| Character | Investigator with skills and sanity mechanics |
| NPC | Non-player character with combat behavior |
| NPCManager | Handles NPC creation and management |
| InvestigatorManager | Manages investigator characters |
Based on Call of Cthulhu 7th Edition core mechanics.
- Quick check for Library Use, Listen and Spot Hidden
- Percentile-based system (1–100)
- Critical success on 01
- Fumbles on 96–00 when a roll fails
- SAN loss on failed sanity checks
- Temporary insanity at 5+ SAN loss in one day
- Permanent insanity at 0 SAN
- Random madness effects
- Initiative determined by DEX
- Available actions: Brawl, Shoot, Dodge
- Weapon-based damage system
- Major wound and unconsciousness handling
This project demonstrates:
- Object-oriented programming in Python
- Robust input validation and error handling
- Multi-day game state management
- Rule-based system design derived from tabletop mechanics
As a course project, this tool prioritizes clarity and correctness over completeness.
Potential extensions include:
- Graphical user interface
- Save/load functionality
- Expanded NPC behavior logic
- Additional Call of Cthulhu subsystems (magic, chases, etc.)
This project is licensed under the MIT License.
See the LICENSE file for details.
- Call of Cthulhu TRPG by Chaosium Inc.
- INFOSCI 102 instructors for guidance and feedback
- Deepseek and ChatGPT for polishing Algorithm and README
- My Friend Irie who assisted with testing
PhoenixForever1023: https://github.com/PhoenixForever1023
Repository: https://github.com/PhoenixForever1023/Call_of_Cthulhu_Keeper_Assistant-English