Beginner Tutorial¶
Welcome to Evennia! This multi-part Beginner Tutorial will help you get off the ground. It consists of five parts, each with several lessons. You can pick what seems interesting, but if you follow through to the end you will have created a little online game of your own to play and share with others!
Use the menu on the right to get the index of each tutorial-part. Use the next and previous links to step from lesson to lesson.
Things you need¶
A Command line
A MUD client (or web browser)
A text-editor/IDE
Evennia installed and a game-dir initialized
A Command line¶
You need to know how to find your Terminal/Console in your OS. The Evennia server can be controlled from in-game, but you will need to use the command-line to get anywhere. Here are some starters:
Note that we usually only show forward-slashes /
for file system paths. Windows users should mentally convert this to
back-slashes \
instead.
A MUD client¶
You might already have a MUD-client you prefer. Check out the grid of supported clients for aid. If telnet’s not your thing, you can also just use Evennia’s web client in your browser.
In this documentation we often use the terms ‘MUD’, ‘MU’ or ‘MU*’ interchangeably to represent all the historically different forms of text-based multiplayer game-styles, like MUD, MUX, MUSH, MUCK, MOO and others. Evennia can be used to create all those game-styles and more.
An Editor¶
You need a text-editor to edit Python source files. Most everything that can edit and output raw text works (so not Word).
Here’s a blog post summing up some of the alternatives - these things don’t change much from year to year. Popular choices for Python are PyCharm, VSCode, Atom, Sublime Text and Notepad++. Evennia is to a very large degree coded in VIM, but that’s not suitable for beginners.
Hint: When setting up your editor, make sure that pressing TAB inserts 4 spaces rather than a Tab-character. Since Python is whitespace-aware, this will make your life a lot easier.
Set up a game dir for the tutorial¶
Next you should make sure you have installed Evennia. If you followed the instructions you will already have created a game-dir. You could use that for this tutorial or you may want to do the tutorial in its own, isolated game dir; it’s up to you.
If you want a new gamedir for the tutorial game and already have Evennia running with another gamedir, first enter that gamedir and run
evennia stop
If you want to run two parallel servers, that’d be fine too, but one would have to use different ports from the defaults, or there’d be a clash. We will go into changing settings later.
Now go to where you want to create your tutorial-game. We will always refer to it as
mygame
so it may be convenient if you do too:evennia --init mygame cd mygame evennia migrate evennia start --log
Add your superuser name and password at the prompt (email is optional). Make sure you can go to
localhost:4000
in your MUD client or to http://localhost:4001 in your web browser (Mac users: Try127.0.0.1
instead oflocalhost
if you have trouble).The above
--log
flag will have Evennia output all its logs to the terminal. This will block the terminal from other input. To leave the log-view, pressCtrl-C
(Cmd-C
on Mac). To see the log again just runevennia --log
You should now be good to go on to the first part of the tutorial. Good luck!
Click here to expand a list of all Beginner-Tutorial sections (all parts).
- Part 1: What we have
- Lessons
- 1. Using commands and building stuff
- 2. The Tutorial World
- 3. Intro to using Python with Evennia
- 3.1. Evennia Hello world
- 3.2. Making some text ‘graphics’
- 3.3. Importing code from other modules
- 3.4. Sending text to others
- 3.5. Parsing Python errors
- 3.6. Passing arguments to functions
- 3.7. Finding others to send to
- 3.8. Multi-line py
- 3.9. Other ways to test Python code
- 3.10. ipython
- 3.11. Conclusions
- 4. Overview of your new Game Dir
- 5. Introduction to Python classes and objects
- 6. Overview of the Evennia library
- 7. Making objects persistent
- 8. Adding custom commands
- 9. Parsing Command input
- 10. Creating things
- 11. Searching for things
- 12. Advanced searching - Django Database queries
- Table of Contents
- 1. Using commands and building stuff
- 2. The Tutorial World
- 3. Intro to using Python with Evennia
- 3.1. Evennia Hello world
- 3.2. Making some text ‘graphics’
- 3.3. Importing code from other modules
- 3.4. Sending text to others
- 3.5. Parsing Python errors
- 3.6. Passing arguments to functions
- 3.7. Finding others to send to
- 3.8. Multi-line py
- 3.9. Other ways to test Python code
- 3.10. ipython
- 3.11. Conclusions
- 4. Overview of your new Game Dir
- 5. Introduction to Python classes and objects
- 6. Overview of the Evennia library
- 7. Making objects persistent
- 8. Adding custom commands
- 9. Parsing Command input
- 10. Creating things
- 11. Searching for things
- 12. Advanced searching - Django Database queries
- Lessons
- Part 2: What we want
- Lessons
- Where do I begin?
- On Planning a Game
- Planning our tutorial game
- Game concept
- Administration
- Building
- Systems
- Do you base your game off an existing RPG system or make up your own?
- What are the game mechanics? How do you decide if an action succeeds or fails?
- Does the flow of time matter in your game - does night and day change? What about seasons?
- Do you want changing, global weather or should weather just be set manually in roleplay?
- Do you want a coded world-economy or just a simple barter system? Or no formal economy at all?
- Do you have concepts like reputation and influence?
- Will your characters be known by their name or only by their physical appearance?
- Rooms
- Objects
- How numerous are your objects? Do you want large loot-lists or are objects just role playing props?
- Is each coin a separate object or do you just store a bank account value?
- Do multiple similar objects form stack and how are those stacks handled in that case?
- Does an object have weight or volume (so you cannot carry an infinite amount of them)?
- Can objects be broken? Can they be repaired?
- Can you fight with a chair or a flower or must you use a special ‘weapon’ kind of thing?
- Will characters be able to craft new objects?
- Should mobs/NPCs have some sort of AI?
- Are NPCs and mobs different entities? How do they differ?
- _Should there be NPCs giving quests? If so, how do you track Quest status?
- Characters
- Can players have more than one Character active at a time or are they allowed to multi-play?
- How does the character-generation work?
- How do you implement different “classes” or “races”?
- If a Character can hide in a room, what skill will decide if they are detected?
- What does the skill tree look like? Can a Character gain experience to improve? By killing enemies? Solving quests? By roleplaying?
- May player-characters attack each other (PvP)?
- What are the penalties of defeat? Permanent death? Quick respawn? Time in prison?
- Conclusions
- Table of Contents
- Where do I begin?
- On Planning a Game
- Planning our tutorial game
- Game concept
- Administration
- Building
- Systems
- Do you base your game off an existing RPG system or make up your own?
- What are the game mechanics? How do you decide if an action succeeds or fails?
- Does the flow of time matter in your game - does night and day change? What about seasons?
- Do you want changing, global weather or should weather just be set manually in roleplay?
- Do you want a coded world-economy or just a simple barter system? Or no formal economy at all?
- Do you have concepts like reputation and influence?
- Will your characters be known by their name or only by their physical appearance?
- Rooms
- Objects
- How numerous are your objects? Do you want large loot-lists or are objects just role playing props?
- Is each coin a separate object or do you just store a bank account value?
- Do multiple similar objects form stack and how are those stacks handled in that case?
- Does an object have weight or volume (so you cannot carry an infinite amount of them)?
- Can objects be broken? Can they be repaired?
- Can you fight with a chair or a flower or must you use a special ‘weapon’ kind of thing?
- Will characters be able to craft new objects?
- Should mobs/NPCs have some sort of AI?
- Are NPCs and mobs different entities? How do they differ?
- _Should there be NPCs giving quests? If so, how do you track Quest status?
- Characters
- Can players have more than one Character active at a time or are they allowed to multi-play?
- How does the character-generation work?
- How do you implement different “classes” or “races”?
- If a Character can hide in a room, what skill will decide if they are detected?
- What does the skill tree look like? Can a Character gain experience to improve? By killing enemies? Solving quests? By roleplaying?
- May player-characters attack each other (PvP)?
- What are the penalties of defeat? Permanent death? Quick respawn? Time in prison?
- Conclusions
- Lessons
- Part 3: How we get there
- Lessons
- Table of Contents
- Part 4: Using what we created
- Part 5: Showing the world