Giter Club home page Giter Club logo

mod's Introduction

Dungeon Master

MoD: MUD on Discord

A hosted instance is accessible here:

https://discord.gg/KqJrvph the server still exists, however the bot is in a state of disrepair, and I have moved on to other projects.

About

For the uninitiated, a MUD is a Multi-User Dungeon. Think text-based game, but as an online multiplayer game

The goal of the bot is to take hand-crafted game modules and run a MUD with them. A skeleton on which to drape the flesh of world-building.

How do I run an instance?

See the Setup section of the wiki

Brief Usage Overview

A player needs to first join a server where the bot is running, then use the Start command. At that point, the bot will make an entry in the database for that user, and from then on, the user can DM the bot directly, which allows for the simulation of a terminal style environment inside of Discord.

There are some interesting implications here. People can join the same game instance through different servers(as long as the same bot instance is on those different servers), and this allows disparate user groups to interact in the game world, while also maintaining privacy.

Due to how discord bot DMs work, users must remain part of a server hosting the bot instance to continue playing in the same game world.


Features thus far:

Basic demo dungeon

  • This is the basic framework for a dungeon, and serves as a short example of what can be done at a simple level. It can easily be replaced with whatever your actual world is.

Administrative commands (only available to the bot instance owner)

  • db – allows for simple queries to the database, as well as functionality for on-the-fly creation of game elements
  • notbusy - a short-term fix for a higher level problem, fixes a player's busy status if the bot gets interrupted. Will be removed in the future when the true solution is implemented.

Player commands

a lot these commands have aliases, so players can guess around and still manage to trigger them
  • Connect/Disconnect - sets the player to an online/offline state, which prevents pings and messages while offline
  • Look – returns a description of items, rooms, npcs, enemies,
  • Move – change rooms in the mud
  • Attack – specify a target, and get whackin'
  • Stats – get a readout of current player stats
  • Talk – chat it up with an npc
  • Item - equip, uneqip, or discard an item
  • Help - display available commands and syntax
  • Inventory - get a readout of your inventory
  • Describe - set character description and name
  • Say - inter-player communication at a room level, will relay a message to all other players in a room

Effects system

  • allows for the creation and implementation of effects for items, spells, and so on.

Prospective future features:

  • Player housing
  • magic system

I'd like to give a big thanks to the original senior project group who worked with me in getting this thing started: Eric Ortiz, Samantha Santiago, Olivia Spears, Christopher Boquet, and Elijah Jefferson. You guys helped make my crazy idea a reality, and I'm really glad to have worked with you on it.

mod's People

Contributors

djsanti avatar genericskybox avatar gotopher avatar jeffersone9 avatar johnnysn0w avatar olivspears avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mod's Issues

room descr on room entry

give the room description upon entering, at least the first time you're in a new room.
Partially exists atm, but I'd like to also have it print out the available exits.

fix up attack

it's good, but it needs to be BETTER
also maybe implement that reaction combat....

Status Effects

Add status effects to the game!

Some guidelines:

  • status effects should be in their own table, for simplicity
  • should also be stored in player state, as an array of ids, allowing for multiple effects, and by default of this idea, stacking of effects(might want to not have this)
  • maybe they're combat only?
  • items should be able to apply them when used in combat, or at all. (so item usage outside of battle needs to be added before this issue)

generalized data shape for table data:

{
  id: 'effect name',
  description: 'what it do',
  action: 'a value that can be eval'd, so this gets done when the effect activates',
}

Magic system

currently there is a magic slot in Attack for player choice, but that's just a placeholder.
If this is deemed too large in scope, it can certainly be atomized

  • need a mana system(maybe? not uber necessary)
  • need a place to put spells (their own table?)
  • are spells learnable? do they require scrolls to cast?

quest system

quests: {
    active: {
        quest1: 0,
        quest2: 5
    },
    completed: [
        quest0
    ]
}

something like this as a subset of the player infrastructure

throw

undo the hard coding on throw, and make it so that a thrown item does some different damage calc unless it's of a throwing type. Items not meant to be thrown(non-weapons that aren't key items) should do like, 1 damage or something.

in the future, perhaps implement a toggleable game flag that turns on a hyper-detailed physics calculation for damage, based on the weight of an item and the base amount of force needed to throw it in a 10ft arc.

Administrative Commands

Admins may not be tech savvy, so we need to make a series of bot commands, and Admin Toolset, for world creation.

The exact types of tools and functionality are up for debate atm.

The process should be fairly user friendly.

redo talk system

redo the current talk system (almost) completely

npc replies should be parsed into 3 types of states:

  • starts – the only allowable dialogue options for npc talk initiation, and the player cannot return to them without restarting npc dialogue completely. They have a priority field to determine which is shown if a player meets requirements for multiple.
  • intermediates – reachable at any point in a conversation, assuming requirements and proper dialogue tree traversal
  • terminals – sent when a player chooses a terminal option of dialogue, or universally sent when the player uses the leave subcommand

which have the general structure of:

{
  "starts": {
    "1": {
      "reply": "Hi there!!! I hope I feel better soon!!",
      "prompts": [
        {
          "prompt": "[0] Ask how he is",
          "progression": "5"
        },
        {
          "prompt": "[1] Ask where you are",
          "progression": "6"
        }
      ],
      "reqs": ["player.inventory.keys[6].used"]
    }
  }
}

where the reqs array is sent through a forEach, and evaluated using template literals(which might not work, we'll see) to see if a player meets the reqs. This allows for Very dynamic dialogue.

Addditionally, all 3 types of dialogue should be able to have reqs.

All types of dialogue should be able to set flags as well

"flags": [
  { 
    "property": "player.inventory.keys[6].used",
    "value": true
  }
]

fix the busy player bug

anytime the bot restarts when a player is doing an action that sets them to a "busy" state, they get stuck in that state until the ?notbusy command is used.

solution:
the proposed idea is to have a function that resets the busy status of all players on bot start/restart

player-set descriptions

players should be able to set descriptions of themselves for RP purposes

I'm keen on ?describe, followed by keywords like nickname or self, that way players can change their nickname or their self-description with ease.

player nicknames

we should allow players to set a nickname at the beginning of an adventure. My recommendation is to add that as part of ?start, and then make a secondary ?describe command that can also be used to modify a players self-description later (#72 ).

Create a few basic entries in Dynamo

Fill dynamo with an entry for each type of object we'll have in the game.
Something in a room like a chair, an entity, an exit, and a room.

each should be Look-able and therefore have an associated description and name. We also might want to do something like ID generation if that helps(we can just hardcode, although making an automated section for that might be nice).

This issue is part of #9

automate server channel creation

add a command that allows an admin to auto-gen all the necessary rooms and roles for a server, per rooms in the db.

  • it should iterate through all rooms, checking for their existence, creating them if they don't
  • it should also create roles for those rooms.

Hearthing bug

hearthing does not remove the player from the room they leave

make the bot run in DMs

convert the bot to have the player's current room stored in their state, and then allow all references to player location to reference that instead.

the last part is moving all messages to send to DMs, although there is the issue of getting all relevant players for a room and perhaps the simplest solution is to keep a list of players in each room, the only side-effect then will be the duplication of info, players and rooms will store player location, but for different access reasons.
Rooms store players to dissemenate player actions to all players present, players store rooms to have a cohesive movement structure.

this also raises the issue of, players should be able to set themselves as online/offline to avoid getting dm pings when not playing the game.

the solution to that is a pair of connect/disconnect commands would be useful, to toggle a player state in the room object.

so the likely structure for the playerlist in rooms is

{
  "playerID": "asdfasdf",
  "online": false
}

and for players, just a simple

{
  "room": "aroomID",
}

Pagify help command

it's currently exceeding the 2000 character limit, so we need some way of making it not do that

search command

A “search” command would be great, to interact with items in a room

implementation:
let's players find items within objects in a room. i.e. ?searching a pile of rocks gives the player a key that was buried in them.

refactor look

it's a logical mess , and also needs to work on items and self inside of DMs

idea:
generate object list of all things that the player can look at:

  • the player, and other players in the room
  • things in player inventory
  • items, enemies, and npcs in the room

it should be a list of aliases and ids

Move Command

requirement: be able to invoke a /move command

so this should reassign a user's role. First it should add the room the user is to move into, and then remove the room role for the room the user is in. This will force discord to change the user's room.

Piecing it out

So, we already have an outline. A good place to start.

Now we need to figure out which pieces should be made in what order. We also need to determine some finer foundational points, like:

  • which API implementation we're going to use (my preference is either the python one, or the javascript one). Those can be found here

  • How we'll be implementing DynamoDB. From what I understand, we can host it locally or directly on AWS (someone will likely become our backend/project expert on this). Maybe we'll host locally for dev and then setup an AWS instance for production? That's up to everyone to decide.
    So I've got the locally hosted dynamo up and ready mostly. Haven't tried to interact with it, but it runs.

  • What kind of development system are we going for? I've already setup a Kanban project board, and my preference is definitely scrumban, but you guys may have better/different ideas.

This is a large project, but I have no doubt that given enough effort, we'll pull through.

PVP

PVP!
A lot of people have requested this, and it's going to require some sort of handshake logic prior to implementation.

  • do we set it as a per room basis?
  • or maybe it's dependent on player 1 asking player 2 for a duel?

Create a command system

Make it like a traditional text-based game, with the following basic commands to start:
Look
Talk
Attack
Help

And make sure these commands are understood by the bot we're implementing

consumable items

needs implementation such that items are usable inside and outside of combat

  • health potions are the first thing to get working but
  • also make sure stuff like stat modifying potions are also available
  • does this include adding status effects to player state?

Look Command (lite)

requirement: be able to invoke a /look command

we can likely just use a placeholder return for now, and worry about having it return a description from dynamo later

shop

take the old talk functionality and add it as a new command called shop

Fix Vagrant warning

if someone could fix the warning that vagrant gives on vagrant up where it talks about the NIC interface being vulnerable, that'd be great. IF that isn't happening for anyone else, that'd be useful info as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.