Skip to content

an Evennia-based, rule agnostic MUD with game systems in place to simulate a living, breathing world to be used to build other games.

Notifications You must be signed in to change notification settings

atebyagrue/living_world

Repository files navigation

living_world

an Evennia-based, rule agnostic MUD with game systems in place to simulate a living, breathing world to be used to build other games.

Summary

Features

  • ngnix reverse proxy to route traffic in webapp
  • an Evennia web & MUD server to host & run the game
  • MariaDB / MySQL / PostgreSQL database backend with automated updates & backups
  • an Adminer web frontend to adminster the database backend
  • several pre-commit hooks are implemented to ensure proper development & standardize our code formatting
    • black is used for python formatting
    • git-lfs is used to ensure that large files are not pushed into the repository
    • secret detection is used to prevent confidential info from be pushed into the repo
  • A DevSecOps pipeline to properly build, test, and deploy code to different environments
  • Test Driven Development is used when it can be to ensure code continuity
  • large files in docs/ tracked in git-lfs and omitted from git pushes
  • MUD
    • Player
      • Dynamic & flexible chargen that allows renaming, rerolls, and attribute swaps
      • Toggles to determine how you'll play (Hardcore Survival Mode, Permadeath, etc.)
    • NPCs
      • Unique Personalities: every NPC in game has several randomly generated personality aspects that determine what actions they take in game. Some may prefer some items or actions over others, some may be strong silent type, some may be verbose. This will create a constantly changing & vibrant world.
      • Vibrant Reactions: NPCs will react to socials, fight opposing factions, complain about the weather, go abotu their life just as though they are living within the world.
      • Disposition: NPCs will remember previous encounters & develop a repertoire with you over time. The more adventures & the better you treat them according to their preferences, their disposition & effectiveness will improve when you are with them.
    • World
      • Transports
      • Global Weather System
      • Factions
  • Misc

TODO Features

  • typeclasses.objects add is_npc to be true if a system-controlled "person", mob, NPC, creature, etc.
  • room.flags['no_trespass'] will omit the connecting exit from wandering NPC finds
  • dev/stage/prog environment detection based on branch / tags
  • automatic version number tagging
  • add GitLab scanning, etc. for proper workflow
  • Dynamic Abliities / Stats on TEMPSHEET
  • Hit Points (traits.gauge; depletable calculated resource)
    • HP.Max = Base (Roll) + Mod (TGH)
    • HP.Min = 0
    • HP.current = modify with calculated amounts (current -= damage_amt; current += heal_amt)
    • HP.Mod updates with changes to TGH + Buffs + Debuffs
    • MP.Max auto-updates whenever HP.Mod changes
    • HP.Base updates with level up
    • HP.Min never updates
    • HP.value to see current
  • Skills (traits.counter)
    • system would add Actor.Skills that could be buffed & debuffed & individually raised with experience
    • Skill.counter updates
    • Skill.Base updates on Skill raise
    • Skill.Mod updates with Buff to Skill
    • Skill.value is Skill.Base + Skill.Mod
    • Skill.Descs is syntatic sugar for current Skill.Value (beginner, experienced, expert, master) accessed via Skill.Desc()
    • skill_debuff()
      • Skill.Ratetarget = Skill.Value (burrent Base + Mod before timed debuff)
      • Skill.Rate is amount recovered per second
      • Skill.Value over time is the recovered value over time
  • Stats/Abilties (traits.static; buffable attributes)
    • Stat.Base the current SET value
    • Stat.Mod updates with sum of all applicable buffs, etc.
      • whenever a buff is applied / ticks / is removed, a sum of all applicable buffs (Actor.score.mod) should be summed up & Stat.Mod == buff_total
      • Examples
        • debuff_str_trickle_amt() - a debuff that removes an amount & is slowly recovered until the entirety is restored
          • at_apply() - Stat.Mod updates with value (Actor.abilities.STR.Mod -= total_amount)
          • at_tick() - update Stat.Mod with an incremental restorative amount (Actor.abilities.STR.Mod -= restore_amount_per_second)
          • Examples: flashbang blindness, sickness
        • debuff_str_total_amt() - a debuff that removes an amount that recoveres the entirety when removed
          • at_apply() Stat.Mod updates with value (Actor.abilities.STR.Mod -= amount)
          • at_remove() update Stat.Mod with total amount (Actor.STR.Mod += amount)
          • Examples: tied_up removed with cut_free
        • buff_INT_trickle() - bonus that wears off over time
          • Examples: Drug_Caffeine wears off over time
        • buff_STR_total() - bonus that applies a total that is removed when it expires
          • Examples: Potion_of_Strength expires
    • Stat.Value is current calculated TEMP value of Base + Mod

Bugs

  • Limbo #2 is duplicated to #6 on initial setup

Requirements

There are a few options how to host your game, details are below. NOTE: if you are unfamiliar with Docker, it is receommended that you stick with the traditional (and easier) "Locally Run" options below.

Locally Run

This is running the game server on the PC/server/SBC that will be hosting the game.

  • This is the easiest.
  • Requirements: python3.x, pip, virtualenv, open ports for users to connect to.
  • Database is the sqllite3 default internal database system.

Dockerized Run

This is running a Docker container of the game.

  • This is more complicated, but more flexible.
  • Requirements: dokcer, docker-compose, open ports for users to connect to.
  • Database can be default, external server, or even another Docker container on the same server.

Externally Hosted Database

Evennia is setup to use sqllite3 by default which all runs internally. However, you may wish to externalize your database (to a MySQL server, PostgreSQL Docker contianer, etc.). Since the configuration can differ from localilzed to dockerized to remote, the makemigrations & migrations cannot be automated & must be done manually & then COPIED into the container.

If used a Dockerized environment, then ensure that the database container is up & running PRIOR to running the migration commands or you will not push your required database changes into the database.

Setup

It may be useful to know that in my setup, I typically use the chocolatey package manager & it's defaults for installing software in Windows environments.

Linux / OSX

python3 -m venv venv
source venv/bin/activate
pip install -U pip
pip install evennia pre-commit

Windows

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
& 'C:\Python311\python.exe' -m venv venv
.\venv\Scripts\activate
python -m pip install --upgrade pip
pip install evennia pre-commit pywin32 googletrans
windows users once:
  py -m evennia

cd mygame
evennia migrate
evennia start

Virtualenv may need to bypass in powershell

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Bypass -Force

Use

  • NOTE: you must setup an admin user & instantiate the database (see "Evennia Setup" below) before the container can be brought up

Evennia Setup

  • from the project folder, activate your virtualenv
    • Linux/OSX: source ./venv/bin/activate
    • Windows: ./venv/Scripts/activate
  • Setup you custom admin values
    • Set Environment Variables the values you wish to use for admin access to your game
      • Linux/OSX
        • export DJANGO_SUPERUSER_USERNAME=root
          export DJANGO_SUPERUSER_PASSWORD=rootpass1234!
          export [email protected]
          
      • Windows (Powershell in Windows 11; need ot verify...)
        • $env:DJANGO_SUPERUSER_USERNAME=root
        • $env:DJANGO_SUPERUSER_PASSWORD=rootpass1234!
        • $env:DJANGO_SUPERUSER_EMAIL=[email protected]
    • Alternative
      • cp EXAMPLE.env && edit .env with values you want
  • cd living_world
  • evennia makemigrations && evennia migrate && evennia start
    • enter your values
  • docker-compose up -d

Troubleshooting

  • Error:
    • Cause:
    • Remediation:

BUGS

  • BUG: no connectivity, "Favico.js library not found or the online version could not be reached. Check so Javascript is not blocked in your browser."

TODO

This list should be represented by backlog tickets in the Jira Backlog. However, this is a one-man show, so there may be a bit of disconnect.

  • getters
    • traits (stats + traits)
      • base
      • value (base + mod)
  • setters
  • NewStats (Stats) =
  • Abilities = AGI, PRE, STR, TGH

Overview

  • NPC Commands
  • Chargen
  • TDD
    • Chargen
      • CharCmdSet
    • Weather & Buffs
    • Transport
    • Merchant
    • Innkeepers
    • Guards
      • block passage
      • bribe
      • skill check
    • Exits
      • States: open > close > lock > unlock
      • Types
      • Skill Check: athletics vs. dodge
  • Misc.

Mobs/LivingMixin/NPCs

Mobs can posssibly be piloted by a dev, so they need minimal commands to interact with the world (look, take, drop, etc.)

  • CmdSetMob: movement, fighting
  • CmdSetNPC: item use & management, comms (talking), buy/sell, open/close doors
  • CmdSetPlayer: displays, playerprefs, comms (communication channels, reading), account

Game Systems

  • Details on Game Systems can be found here

About

I've been playing TTRPG's since the 80's. Text-based games have always been more fun to me. ALso, having a blidn friend that I wanted to be able to play gaem swith online helped. As of the current 2020's, I've only played as a played a handful of times. I am but a simple Forever GM. Covid. It started as a character generator for my players. I then decided to extend this & build a MUD, so that they could solo play their characters between group sessions, and then bring back the results. In my hopes to play one of my own awesome games, I decided to make modify the MUD with systems that coudl change & surpise me. Procedurally generated areas. Weather ssytems. Randomized NPC reactions. Now Generative A.I. & ChatGPT is a thing & it's getting incorporated. With my ADHD, I can no longer focus on a single ruelset or setting. I decided it'd be more productiove to create a vanilla world with systems wto make it seem realistic & alive; leaving the ruleset, setting & combat to be easily swapped out while starting from a good, repeatable, proven system. This is that system. Enjoy!

References

About

an Evennia-based, rule agnostic MUD with game systems in place to simulate a living, breathing world to be used to build other games.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published