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
- every tick loop through the players
- for each player load the roomname_monsters.txt
- execute any current action [flee (maybe later), attack, continue combat, special attack (if enough mp or stamina)]
- 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)
- Process any special commands from the player [spells, special attacks based on stamina]
- Write results of action to the player file [damage, mp use, stamina use]
- Write any new inventory to the room file. Expire any inventory that is old TBD....
- 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