Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Some1and2-XC/discord-bot-v01

Repository files navigation

@some1and2's RPG discord bot

A discord bot developed by @some1and2 the aims to function as an RPG within the format of a discord bot

Functionality

  • Map System

    • The bot has a system which has a json file that has all the map information on it
    • The map works by holding nestled dictionaries that functonally work as directories that lead to the backend names of NPC's
  • Various NPC's

    • The bot uses the backend names of NPC's to index them from the items.plk file to create NPC objects
    • These NPC objects are based on classes which come in a few forms:
      • Shop
      • Text
      • Enemy
    • These NPC's use the interaction variables set to respond to when they are called
  • Menu System

    • The bot also sports a top of the line menu
    • Menu uses menu buttons to cycle through different types of inventories the player has
    • Menu displays important information such as how much cash (the in game currency) a particular player has as well as how much xp each player has
  • Combat System

    • No RPG is complete without a combat system!
    • The combat system thus far is fairly basic, you have a health amount, based on the amount of health xp you have
    • The amount of damage is dependent on the weapon selected, the menu for the combat system has options for various kinds of melee combat weapons
    • After an enemy dies, it drops an amount of cash which is preset in the items.plk file
    • it also either drops the weapon is uses, unless the player already has its weapon in which case it drops that weapons corresponding cash value (also set in items.plk)
  • Leveling System

    • The bot has an exponential leveling system designed to make it harder to get higher of a level the more xp you have
    • The level is calculated by the cumulative amount of xp a player has and is generally calculated on the fly [the player level is not stored anywhere, the xp is]

Basic Structure of Files::

botCV.py

  • The configuration of the discord.py elements as well as settings up how the bot will reaction to messages is mostly set in the botCV.py file.
  • Most commands use IfCommand() function, the basic use is to see if a message starts with a certain string, returning True if it does.
  • The majority of the work to corrdinate responces is done by the back end instead of by the botCV.py file

NPC.py

  • Each type of NPC in the NPC.py file works by having two classes and a function attached to them
  • The main class that is made for each type of NPC has most of the class information
  • The main class calls the Get Text function associated with the NPC type to attach text as an attribute of the main class
  • The secondary class for each NPC is the class for the NPC's buttons
  • The NPC's button class works by responding to actions taken by a user
  • The button reconstructs a new main NPC class to resend a new message [With changed data from the Old NPC class]

Current Work::

See TODO.md to see what is being worked on


Reach out to @some1and2 for clairification if needed

About

some1and2's Discord Bot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages