mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Fixed all errors in doc building
This commit is contained in:
parent
9fbfc8f8d0
commit
76761825d0
80 changed files with 766 additions and 767 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Our own commands
|
||||
|
||||
[prev lesson](Searching-Things) | [next lesson](More-on-Commands)
|
||||
[prev lesson](./Searching-Things) | [next lesson](./More-on-Commands)
|
||||
|
||||
In this lesson we'll learn how to create our own Evennia _Commands_. If you are new to Python you'll
|
||||
also learn some more basics about how to manipulate strings and get information out of Evennia.
|
||||
|
|
@ -183,7 +183,7 @@ class CmdEcho(Command):
|
|||
First we added a docstring. This is always a good thing to do in general, but for a Command class, it will also
|
||||
automatically become the in-game help entry! Next we add the `func` method. It has one active line where it
|
||||
makes use of some of those variables we found the Command offers to us. If you did the
|
||||
[basic Python tutorial](Python-basic-introduction), you will recognize `.msg` - this will send a message
|
||||
[basic Python tutorial](./Python-basic-introduction), you will recognize `.msg` - this will send a message
|
||||
to the object it is attached to us - in this case `self.caller`, that is, us. We grab `self.args` and includes
|
||||
that in the message.
|
||||
|
||||
|
|
@ -393,4 +393,4 @@ We also upset a dragon.
|
|||
In the next lesson we'll learn how to hit Smaug with different weapons. We'll also
|
||||
get into how we replace and extend Evennia's default Commands.
|
||||
|
||||
[prev lesson](Searching-Things) | [next lesson](More-on-Commands)
|
||||
[prev lesson](./Searching-Things) | [next lesson](./More-on-Commands)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Using the game and building stuff
|
||||
|
||||
[prev lesson](../Starting-Part1) | [next lesson](Tutorial-World-Introduction)
|
||||
[prev lesson](../Starting-Part1) | [next lesson](./Tutorial-World-Introduction)
|
||||
|
||||
In this lesson we will test out what we can do in-game out-of-the-box. Evennia ships with
|
||||
[around 90 default commands](../../../Component/Default-Command-Help), and while you can override those as you please,
|
||||
|
|
@ -152,7 +152,7 @@ the raw description of your current room (including color codes), so that you ca
|
|||
set its description to something else.
|
||||
|
||||
You create new Commands (or modify existing ones) in Python outside the game. We will get to that
|
||||
later, in the [Commands tutorial](Adding-Commands).
|
||||
later, in the [Commands tutorial](./Adding-Commands).
|
||||
|
||||
## Get a Personality
|
||||
|
||||
|
|
@ -313,4 +313,4 @@ You will now find your new `History` entry in the `help` list and read your help
|
|||
After this brief introduction to building and using in-game commands you may be ready to see a more fleshed-out
|
||||
example. Evennia comes with a tutorial world for you to explore. We will try that out in the next section.
|
||||
|
||||
[prev lesson](../Starting-Part1) | [next lesson](Tutorial-World-Introduction)
|
||||
[prev lesson](../Starting-Part1) | [next lesson](./Tutorial-World-Introduction)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Creating things
|
||||
|
||||
[prev lesson](Learning-Typeclasses) | [next lesson](Searching-Things)
|
||||
[prev lesson](./Learning-Typeclasses) | [next lesson](./Searching-Things)
|
||||
|
||||
We have already created some things - dragons for example. There are many different things to create
|
||||
in Evennia though. In the last lesson we learned about typeclasses, the way to make objects persistent in the database.
|
||||
|
|
@ -49,5 +49,5 @@ You can find the parent class for Accounts in `typeclasses/accounts.py`.
|
|||
_TODO_
|
||||
|
||||
|
||||
[prev lesson](Learning-Typeclasses) | [next lesson](Searching-Things)
|
||||
[prev lesson](./Learning-Typeclasses) | [next lesson](./Searching-Things)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
## Django Database queries
|
||||
|
||||
[prev lesson](Searching-Things) | [next lesson](../Starting-Part2)
|
||||
[prev lesson](./Searching-Things) | [next lesson](../Starting-Part2)
|
||||
|
||||
```important:: More advanced lesson!
|
||||
|
||||
|
|
@ -398,4 +398,4 @@ query using Django is a powerful skill to have.
|
|||
This concludes the first part of the Evennia starting tutorial - "What we have". Now we have a good foundation
|
||||
to understand how to plan what our tutorial game will be about.
|
||||
|
||||
[prev lesson](Searching-Things) | [next lesson](../Starting-Part2)
|
||||
[prev lesson](./Searching-Things) | [next lesson](../Starting-Part2)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Overview of the Evennia library
|
||||
|
||||
[prev lesson](Python-classes-and-objects) | [next lesson](Learning-Typeclasses)
|
||||
[prev lesson](./Python-classes-and-objects) | [next lesson](./Learning-Typeclasses)
|
||||
|
||||
```sidebar:: API
|
||||
|
||||
|
|
@ -125,5 +125,5 @@ to look it up in the docs:
|
|||
5. You can now read what this does and what methods are on it. If you want to see the full source, click the
|
||||
\[[source](src:evennia.objects.objects#DefaultObject)\] link.
|
||||
|
||||
[prev lesson](Python-classes-and-objects) | [next lesson](Learning-Typeclasses)
|
||||
[prev lesson](./Python-classes-and-objects) | [next lesson](./Learning-Typeclasses)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Overview of your new Game Dir
|
||||
|
||||
[prev lesson](Python-basic-introduction) | [next lesson](Python-classes-and-objects)
|
||||
[prev lesson](./Python-basic-introduction) | [next lesson](./Python-classes-and-objects)
|
||||
|
||||
Next we will take a little detour to look at the _Tutorial World_. This is a little solo adventure
|
||||
that comes with Evennia, a showcase for some of the things that are possible.
|
||||
|
|
@ -202,10 +202,10 @@ people change and re-structure this in various ways to better fit their ideas.
|
|||
|
||||
- [batch_cmds.ev](github:evennia/game_template/world/batch_cmds.ev) - This is an `.ev` file, which is essentially
|
||||
just a list of Evennia commands to execute in sequence. This one is empty and ready to expand on. The
|
||||
[Tutorial World](Tutorial-World-Introduction) was built with such a batch-file.
|
||||
[Tutorial World](./Tutorial-World-Introduction) was built with such a batch-file.
|
||||
- [prototypes.py](github:evennia/game_template/world/prototypes.py) - A [prototype](../../../Component/Spawner-and-Prototypes) is a way
|
||||
to easily vary objects without changing their base typeclass. For example, one could use prototypes to
|
||||
tell that Two goblins, while both of the class 'Goblin' (so they follow the same code logic), should have different
|
||||
equipment, stats and looks.
|
||||
|
||||
[prev lesson](Python-basic-introduction) | [next lesson](Python-classes-and-objects)
|
||||
[prev lesson](./Python-basic-introduction) | [next lesson](./Python-classes-and-objects)
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
# Persistent objects and typeclasses
|
||||
|
||||
[prev lesson](Evennia-Library-Overview) | [next lesson](Creating-Things)
|
||||
[prev lesson](./Evennia-Library-Overview) | [next lesson](./Creating-Things)
|
||||
|
||||
Now that we have learned a little about how to find things in the Evennia library, let's use it.
|
||||
|
||||
In the [Python classes and objects](Python-classes-and-objects) lesson we created the dragons Fluffy, Cuddly
|
||||
In the [Python classes and objects](./Python-classes-and-objects) lesson we created the dragons Fluffy, Cuddly
|
||||
and Smaug and made them fly and breathe fire. So far our dragons are short-lived - whenever we `restart`
|
||||
the server or `quit()` out of python mode they are gone.
|
||||
|
||||
|
|
@ -253,7 +253,7 @@ You are specifying exactly which typeclass you want to use to build the Giantess
|
|||
desc = You see nothing special.
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
We used the `examine` command briefly in the [lesson about building in-game](Building-Quickstart). Now these lines
|
||||
We used the `examine` command briefly in the [lesson about building in-game](./Building-Quickstart). Now these lines
|
||||
may be more useful to us:
|
||||
- **Name/key** - The name of this thing. The value `(#14)` is probably different for you. This is the
|
||||
unique 'primary key' or _dbref_ for this entity in the database.
|
||||
|
|
@ -359,7 +359,7 @@ You got a lot longer output this time. You have a lot more going on than a simpl
|
|||
- **Session id(s)**: This identifies the _Session_ (that is, the individual connection to a player's game client).
|
||||
- **Account** shows, well the `Account` object associated with this Character and Session.
|
||||
- **Stored/Merged Cmdsets** and **Commands available** is related to which _Commands_ are stored on you. We will
|
||||
get to them in the [next lesson](Adding-Commands). For now it's enough to know these consitute all the
|
||||
get to them in the [next lesson](./Adding-Commands). For now it's enough to know these consitute all the
|
||||
commands available to you at a given moment.
|
||||
- **Non-Persistent attributes** are Attributes that are only stored temporarily and will go away on next reload.
|
||||
|
||||
|
|
@ -621,4 +621,4 @@ Typeclasses are a fundamental part of Evennia and we will see a lot of more uses
|
|||
this tutorial. But that's enough of them for now. It's time to take some action. Let's learn about _Commands_.
|
||||
|
||||
|
||||
[prev lesson](Evennia-Library-Overview) | [next lesson](Creating-Things)
|
||||
[prev lesson](./Evennia-Library-Overview) | [next lesson](./Creating-Things)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# More about Commands
|
||||
|
||||
[prev lesson](Adding-Commands) | [next lesson](Creating-Things)
|
||||
[prev lesson](./Adding-Commands) | [next lesson](./Creating-Things)
|
||||
|
||||
In this lesson we learn some basics about parsing the input of Commands. We will
|
||||
also learn how to add, modify and extend Evennia's default commands.
|
||||
|
|
@ -145,8 +145,8 @@ change (no code changed, only stuff in the database).
|
|||
## Adding a Command to an object
|
||||
|
||||
The commands of a cmdset attached to an object with `obj.cmdset.add()` will by default be made available to that object
|
||||
but _also to those in the same location as that object_. If you did the [Building introduction](Building-Quickstart)
|
||||
you've seen an example of this with the "Red Button" object. The [Tutorial world](Tutorial-World-Introduction)
|
||||
but _also to those in the same location as that object_. If you did the [Building introduction](./Building-Quickstart)
|
||||
you've seen an example of this with the "Red Button" object. The [Tutorial world](./Tutorial-World-Introduction)
|
||||
also has many examples of objects with commands on them.
|
||||
|
||||
To show how this could work, let's put our 'hit' Command on our simple `sword` object from the previous section.
|
||||
|
|
@ -497,4 +497,4 @@ In this lesson we got into some more advanced string formatting - many of those
|
|||
the future! We also made a functional sword. Finally we got into how to add to, extend and replace a default
|
||||
command on ourselves.
|
||||
|
||||
[prev lesson](Adding-Commands) | [next lesson](Creating-Things)
|
||||
[prev lesson](./Adding-Commands) | [next lesson](./Creating-Things)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Starting to code Evennia
|
||||
|
||||
[prev lesson](Tutorial-World-Introduction) | [next lesson](Gamedir-Overview)
|
||||
[prev lesson](./Tutorial-World-Introduction) | [next lesson](./Gamedir-Overview)
|
||||
|
||||
Time to dip our toe into some coding! Evennia is written and extended in [Python](http://python.org), which
|
||||
is a mature and professional programming language that is very fast to work with.
|
||||
|
|
@ -71,6 +71,9 @@ While combining different strings is useful, even more powerful is the ability t
|
|||
of the string in-place. There are several ways to do this in Python and we'll show two of them here. The first
|
||||
is to use the `.format` _method_ of the string:
|
||||
|
||||
> py print("This is a {} idea!".format("good"))
|
||||
This is a good idea!
|
||||
|
||||
```sidebar:: Functions and Methods
|
||||
|
||||
Function:
|
||||
|
|
@ -85,8 +88,6 @@ sits and can thus affect it in various ways. You access it with the period `.`.
|
|||
string has a resource `format(...)` that modifies it. More specifically, it replaced the `{}` marker
|
||||
inside the string with the value passed to the format. You can do so many times:
|
||||
|
||||
|
||||
|
||||
> py print("This is a {} idea!".format("bad"))
|
||||
This is a bad idea!
|
||||
|
||||
|
|
@ -649,4 +650,4 @@ practice you will be writing most your code in Python modules.
|
|||
To that end we also created a first new Python module in the `mygame/` game dir, then imported and used it.
|
||||
Now let's look at the rest of the stuff you've got going on inside that `mygame/` folder ...
|
||||
|
||||
[prev lesson](Tutorial-World-Introduction) | [next lesson](Gamedir-Overview)
|
||||
[prev lesson](./Tutorial-World-Introduction) | [next lesson](./Gamedir-Overview)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Python Classes and objects
|
||||
|
||||
[prev lesson](Gamedir-Overview) | [next lesson](Evennia-Library-Overview)
|
||||
[prev lesson](./Gamedir-Overview) | [next lesson](./Evennia-Library-Overview)
|
||||
|
||||
We have now learned how to run some simple Python code from inside (and outside) your game server.
|
||||
We have also taken a look at what our game dir looks and what is where. Now we'll start to use it.
|
||||
|
|
@ -93,7 +93,7 @@ The form `from ... import ... as ...` renames the import.
|
|||
> Avoid renaming unless it's to avoid a name-collistion like above - you want to make things as
|
||||
> easy to read as possible, and renaming adds another layer of potential confusion.
|
||||
|
||||
In [the basic intro to Python](Python-basic-introduction) we learned how to open the in-game
|
||||
In [the basic intro to Python](./Python-basic-introduction) we learned how to open the in-game
|
||||
multi-line interpreter.
|
||||
|
||||
> py
|
||||
|
|
@ -153,7 +153,7 @@ Next we have a `class` named `Object`, which _inherits_ from `DefaultObject`. Th
|
|||
actually do anything on its own, its only code (except the docstring) is `pass` which means,
|
||||
well, to pass and don't do anything.
|
||||
|
||||
We will get back to this module in the [next lesson](Learning-Typeclasses). First we need to do a
|
||||
We will get back to this module in the [next lesson](./Learning-Typeclasses). First we need to do a
|
||||
little detour to understand what a 'class', an 'object' or 'instance' is. These are fundamental
|
||||
things to understand before you can use Evennia efficiently.
|
||||
```sidebar:: OOP
|
||||
|
|
@ -412,4 +412,4 @@ with one in the child class. We also used `super()` to good effect.
|
|||
We have used pretty much raw Python so far. In the coming lessons we'll start to look at the extra bits that Evennia
|
||||
provides. But first we need to learn just where to find everything.
|
||||
|
||||
[prev lesson](Gamedir-Overview) | [next lesson](Evennia-Library-Overview)
|
||||
[prev lesson](./Gamedir-Overview) | [next lesson](./Evennia-Library-Overview)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Searching for things
|
||||
|
||||
[prev lesson](Creating-Things) | [next lesson](Django-queries)
|
||||
[prev lesson](./Creating-Things) | [next lesson](./Django-queries)
|
||||
|
||||
We have gone through how to create the various entities in Evennia. But creating something is of little use
|
||||
if we cannot find and use it afterwards.
|
||||
|
|
@ -261,5 +261,5 @@ these tools will be all you need ...
|
|||
... but not always. In the next lesson we will dive further into more complex searching when we look at
|
||||
Django queries and querysets in earnest.
|
||||
|
||||
[prev lesson](Creating-Things) | [next lesson](Django-queries)
|
||||
[prev lesson](./Creating-Things) | [next lesson](./Django-queries)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# The Tutorial World
|
||||
|
||||
[prev lesson](Building-Quickstart) | [next lesson](Python-basic-introduction)
|
||||
[prev lesson](./Building-Quickstart) | [next lesson](./Python-basic-introduction)
|
||||
|
||||
The *Tutorial World* is a small and functioning MUD-style game world shipped with Evennia.
|
||||
It's a small showcase of what is possible. It can also be useful for those who have an easier
|
||||
|
|
@ -115,5 +115,5 @@ should hopefully have given you a little taste of some of the possibilities of
|
|||
move on with how to access this power through code.
|
||||
|
||||
|
||||
[prev lesson](Building-Quickstart) | [next lesson](Python-basic-introduction)
|
||||
[prev lesson](./Building-Quickstart) | [next lesson](./Python-basic-introduction)
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ focused on free form storytelling. Even if you are not interested in MUSH:es, th
|
|||
first game-type to try since it's not so code heavy. You will be able to use the same principles for
|
||||
building other types of games.
|
||||
|
||||
The tutorial starts from scratch. If you did the [First Steps Coding](Starting-Part1) tutorial
|
||||
The tutorial starts from scratch. If you did the [First Steps Coding](./Starting-Part1) tutorial
|
||||
already you should have some ideas about how to do some of the steps already.
|
||||
|
||||
The following are the (very simplistic and cut-down) features we will implement (this was taken from
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue