Name Last Update
commands Loading commit data...
help Loading commit data...
inventory Loading commit data...
mobs Loading commit data...
players Loading commit data...
rooms Loading commit data...
webrepl @ bad4ac9f
.gitignore Loading commit data...
README.md Loading commit data...
commandhandler.py Loading commit data...
inventoryhandler.py Loading commit data...
main.py Loading commit data...
mobs.txt Loading commit data...
mudserver.py Loading commit data...
release.py Loading commit data...
roomloader.py Loading commit data...
spawner.txt Loading commit data...
utils.py Loading commit data...
welcome.txt Loading commit data...
wifiweb.py Loading commit data...

ESP8266 MUD

This project is a simple mud that runs entirely within an ESP8266 and can be accessed via the wifi portal it connects to.

Next Steps

  1. every tick loop through the players
  2. for each player load the roomname_monsters.txt
  3. execute any current action [flee (maybe later), attack, continue combat, special attack (if enough mp or stamina)]
  4. Write results of action to the roomname_monsters.txt if the monster is killed or mp / stamina has changed. - Sidenote.. don't store inventory, get a list of possible inventory and randomize on death and drop on the ground (no corpses)
  5. Process any special commands from the player [spells, special attacks based on stamina]
  6. Write results of action to the player file [damage, mp use, stamina use]
  7. Write any new inventory to the room file. Expire any inventory that is old TBD....
  8. Every minute respawn mobs for any room the players are in.

Mob Format

Mobs folder:

monstername.json

Example:

{
    "name": "cricket",
    "desc": "A small green chirping insect with large legs suited for jumping.",
    "aa": "1d2",
    "spawn": {
        "hp": "2d2",
        "mp": "0",
        "sta": "10",
    },
    "say": [
        "A cricket quietly chirps",
        "A cricket moves quietly"
    ],
    "sp": [],
    "at": [
        {"name": "kick", "cost":5, "dmg": "2d4", "desc": "The cricket kicks with powerful legs"},
        {"name": "antenna tickle", "cost":2, "dmg": "1d3" "desc": "The cricket brushes you with antenna"},
    ]

}

All damage rolls are described in the number of times to roll and the random amount in dice format: 1d20 = 1 to 20, 2d6 = 2 to 12

  • name - The name that will be displayed to the user when the monster is described
  • desc - The description that will be displayed to the user when the monster is looked at
  • aa - Auto-Attack amount that will be applied for every tick
  • spawn - The values used when the spawner creates the monster to seed the values. A direct integer means the value will be set to that value always.
    • hp - the starting hp range
    • mp - the starting mp range
    • sta - the stamina used to perform special attacks or actions
  • say - Things when not in combat the monster will express to anyone in the room.
  • sp - A list of spells that appear in the spells/ folder
  • at - Special attacks
    • name - The special attack name
    • cost - The cost in stamina of the attack
    • dmg - the amount of damage caused by this attack
    • desc - the description to display when the attack is performed