PROJECT
ROGUE
A massive multiplayer text-based RPG bot built on Kurigram (Pyrogram) and MongoDB. Deep economy, turn-based combat, dungeon exploration, alchemy, faith systems, and a persistent world cycle.
VIRTUAL CODE STRUCTURE
ARCHITECTURE
All DB calls, API requests and heavy math are awaited — never blocking the Pyrogram event loop. Motor driver throughout.
KURIGRAM · MOTORscan_plugins() uses importlib to dynamically load all *.py files in bot/plugins/. Failed plugins log but never crash boot.
IMPORTLIB · SCAN7 collections: users, items, quests, clans, nations, market, world_state. Pool 20–200. DNS forced to 8.8.8.8 for VPS stability.
MOTOR · ASYNCBackground asyncio task ticks day/night phase at configurable intervals (DAY_NIGHT_INTERVAL_SEC). Survives tick failures gracefully.
WORLD_CYCLE_SERVICECORE GAME SYSTEMS
Three paths at creation: Warrior 🛡️, Rogue 🗡️, Mage 🔮. Each unlocks path-specific skills from SKILLS_CATALOGUE with unique synergies and stat scaling.
MECHANICS.PY · START.PYItem, Enchantment, ItemSkin, Inventory dataclasses (slots=True). 4-slot chests: weapons, armoury, potions, tools. 60-item cap. Enchants stack additively.
INVENTORY.PYGold/Gems/Bank wallet. Gold sinks via durability, market tax, healing costs. Player-to-player trading. NPC shop with programmatic sale events.
MARKET.PY · DB.PYALCHEMY_RECIPES catalogue with reagent requirements. apply_enchant() mutates items with stat bonuses. available_recipes() filters by player ingredients.
SKILLS_ALCHEMY.PYFull pantheon of gods, each with domains and day/night restrictions. Praying grants +10 favour. Blessings and curses applied as status effects.
FAITH.PY · LORE.PYFriend requests, accept/decline flow. Clan creation with 24-char name limit, vault deposit, clan-wide buffs. Nation hierarchy above clans for politics.
SOCIAL.PY · DB.PYCOMBAT ENGINE
STATUS EFFECTS
| EFFECT | TYPE | TICK DMG | DUR | SPECIAL |
|---|---|---|---|---|
| 🟢 Poisoned | DEBUFF | 12 | 3 | — |
| 🩸 Bleeding | DEBUFF | 8 | 4 | -4 DEF |
| 👁️ Blinded | DEBUFF | 0 | 2 | -15 ATK |
| 🧊 Frozen | DEBUFF | 0 | 1 | Skip turn |
| 🕳️ Void-Cursed | DEBUFF | 5 | 5 | -5 all |
| ✨ Blessed | BUFF | — | 4 | +10 Faith |
| 🔥 Enraged | BUFF | — | 3 | +20 ATK/-10 DEF |
| 🌑 Shadow Step | BUFF | — | 1 | Pierce DEF |
| 💜 Arcane Surge | BUFF | — | 2 | 2× INT dmg |
COMBAT STATE
PVP DUEL ENGINE
MOB CATALOGUE
XP 15 · Gold 8
XP 35 · Gold 20
XP 40 · Cursed on hit
XP 70 · Bleed on hit
XP 60 · Bleed on hit
XP 90 · Gold 55
XP 110 · Poison on hit
XP 130 · Blind on hit
XP 150 · Bleed on hit
XP 200 · Gold 120
XP 220 · Poison on hit
XP 200 · Cursed on hit
XP 300 · Cursed on hit
XP 420 · Bleed on hit
XP 380 · Cursed on hit
XP 320 · Gold 200
XP 1000 · Gold 600
XP 3000 · Cursed on hit
XP 5000 · Gold 2000
PLUGIN REGISTRY
All handlers live in bot/plugins/. Auto-loaded on boot via importlib scanner.
STATS & ECONOMY
PLAYER STAT WEIGHTS (LVL 50)
CURRENCY TIERS
| TIER | SYMBOL | USAGE |
|---|---|---|
| Copper | 🪙 | Basic trades, healing |
| Silver | 🥈 | Equipment, enchants |
| Gold | 💰 | Rare items, market tax |
| Gems | 💎 | Premium cosmetics, skins |
DUNGEON LOOT TIERS
| TIER | ITEMS | STAT BONUS |
|---|---|---|
| Common | HP Potion, Wood Sword | HP+50 / ATK+8 |
| Rare | Iron Shield, Silver Blade | DEF+15 / ATK+25 |
| Epic | Mithril Mail, Void Blade | DEF+40 / ATK+60 |
QUEST SYSTEM
QUEST TYPES
| TYPE | DESCRIPTION |
|---|---|
| kill | Slay N specific mob |
| kill_any | Win any N fights |
| dungeon_rooms | Survive N dungeon rooms |
| gold | Accumulate N gold |
| pray | Pray N times today |
| brew | Craft N alchemy items |
| pvp_win | Win N duels |
| lore_drops | Collect N lore fragments |
| arcade_plays | Play N arcade rounds |
| clan_deposit | Deposit N gold to vault |
| market_txn | Complete N market trades |
| visit | Visit a specific system |
STORY ARC — 10 CHAPTERS
LORE & WORLD
The Shattered Hometown. A market town at the edge of Thornwood, half-ruined by the Sundering. Levels 1–10.
STARTER REGIONA cursed ancient forest haunted by bandits, vine horrors, and forest witches. Levels 8–20.
MID REGIONVolcanic highland of the dwarven ruins. Home to automatons, trolls, and lava sprites. Levels 18–35.
HIGH REGIONThe edge of known reality. Void crawlers and shade lords stalk the dark. Night mobs amplified. Levels 30+.
ENDGAME REGIONThe sealed pinnacle. Ancient dragons and void heralds guard the truth of the Sundering. Levels 40–50.
FINAL REGIONFull pantheon with domains, day/night restrictions, boons, and curses. Faith stat affects defence formula. Praying costs no gold.
LORE.PY · FAITH.PY