Skip to content

WR36/Python-Console-RPG

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚔️ Python Console RPG (python-console-rpg)

A turn-based, command-line Role-Playing Game (RPG) built with a modular architecture in Python.

✨ About the Project

This project is a text-based RPG designed to run within the terminal/console. The structure is modular, which facilitates easy expansion and the addition of new features such as new events, items, and enemy types in the future.

📌 Key Features

  • Turn-Based Combat: Includes logic for critical hit chance and dodging.
  • Progression System: Levels, Experience Points (XP), and automatic player stat increases upon leveling up.
  • Random Events: Traps, healing finds, mini-quests with trade-offs, and sudden enemy encounters.
  • Shop: Allows the player to buy potions and permanent stat upgrades that apply immediately.
  • Save/Load: Uses JSON files (player.json) to persist player progress.

🧱 Module Structure

File Description
main.py The main game loop, menu, and navigation between modules.
fight.py All combat logic (attack, HP check, reward distribution).
events.py Handles random events that trigger during the adventure mode.
shop.py Contains the store logic (displaying items and handling purchases).
items.py The catalog of all available items and their effects.
level.py Logic for leveling up, granting XP, and displaying player statistics.
data.py Holds the default data structures for the player and other entities.
storage.py Functions for saving and loading player data to/from JSON.

🛠 Setup and Running

Python 3.x is required to run the game.

Getting Started

  1. Clone the repository:
    git clone https://github.com/WR36/Python-Console-RPG.git
    cd python-console-rpg
  2. Run the main file:
    python main.py
    (A new save file, player.json, will be automatically created upon the first run).

⚙️ Development Status

Currently implemented features include:

  • Core player stats: hp, max_hp, gold, damage, xp, level, crit_chance, and dodge_chance.
  • Shop functionality (items apply effects immediately; no inventory slots yet).
  • Combat and random event logic.

Planned Features: A more complex inventory system, quests, and distinct area maps.

🤝 Contribution

If you have ideas for improvements or find a bug, feel free to open an Issue or submit a Pull Request!


🛠 Next Step: Fixing Critical Bugs

To continue development, please confirm you will use this content in a README.md file, and let's get back to fixing the two critical code issues that prevent your game from running:

  1. Update data.py (to define the missing stats).
  2. Fix main.py (to handle enemy generation).

Would you like to start with updating data.py now?

About

A modular, turn-based console RPG written in Python.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages