Make tutorial parts into separate subfolders for now

This commit is contained in:
Griatch 2020-07-01 21:28:04 +02:00
parent 12602dc09f
commit 221caf5187
14 changed files with 40 additions and 41 deletions

View file

@ -10,7 +10,7 @@ Here are some pointers to get you going.
Evennia is developed using Python. Even if you are more of a designer than a coder, it is wise to
learn how to read and understand basic Python code. If you are new to Python, or need a refresher,
take a look at our two-part [Python introduction](Python-basic-introduction).
take a look at our two-part [Python introduction](Part1/Python-basic-introduction).
### Explore Evennia interactively

View file

@ -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
[~90 default commands](Default-Command-Help), and while you can override those as you please,
@ -9,7 +9,7 @@ they can be quite useful.
Connect and log into your new game and you will end up in the "Limbo" location. This
is the only room in the game at this point. Let's explore the commands a little.
The default commands has syntax [similar to MUX](../../Concept/Using-MUX-as-a-Standard):
The default commands has syntax [similar to MUX](../../../Concept/Using-MUX-as-a-Standard):
command[/switch/switch...] [arguments ...]
@ -127,14 +127,14 @@ dropped in the room, then try this:
lock box = get:false()
Locks represent a rather [big topic](../../Component/Locks), but for now that will do what we want. This will lock
Locks represent a rather [big topic](../../../Component/Locks), but for now that will do what we want. This will lock
the box so noone can lift it. The exception is superusers, they override all locks and will pick it
up anyway. Make sure you are quelling your superuser powers and try to get the box now:
> get box
You can't get that.
Think thís default error message looks dull? The `get` command looks for an [Attribute](../../Component/Attributes)
Think thís default error message looks dull? The `get` command looks for an [Attribute](../../../Component/Attributes)
named `get_err_msg` for returning a nicer error message (we just happen to know this, you would need
to peek into the
[code](https://github.com/evennia/evennia/blob/master/evennia/commands/default/general.py#L235) for
@ -152,11 +152,11 @@ 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-Command-Tutorial).
later, in the [Commands tutorial](../Adding-Command-Tutorial).
## Get a Personality
[Scripts](../../Component/Scripts) are powerful out-of-character objects useful for many "under the hood" things.
[Scripts](../../../Component/Scripts) are powerful out-of-character objects useful for many "under the hood" things.
One of their optional abilities is to do things on a timer. To try out a first script, let's put one
on ourselves. There is an example script in `evennia/contrib/tutorial_examples/bodyfunctions.py`
that is called `BodyFunctions`. To add this to us we will use the `script` command:
@ -185,14 +185,14 @@ When you are tired of your character's "insights", kill the script with
script/stop self = tutorial_examples.bodyfunctions.BodyFunctions
You create your own scripts in Python, outside the game; the path you give to `script` is literally
the Python path to your script file. The [Scripts](../../Component/Scripts) page explains more details.
the Python path to your script file. The [Scripts](../../../Component/Scripts) page explains more details.
## Pushing Your Buttons
If we get back to the box we made, there is only so much fun you can have with it at this point. It's
just a dumb generic object. If you renamed it to `stone` and changed its description, noone would be
the wiser. However, with the combined use of custom [Typeclasses](../../Component/Typeclasses), [Scripts](../../Component/Scripts)
and object-based [Commands](../../Component/Commands), you could expand it and other items to be as unique, complex
the wiser. However, with the combined use of custom [Typeclasses](../../../Component/Typeclasses), [Scripts](../../../Component/Scripts)
and object-based [Commands](../../../Component/Commands), you could expand it and other items to be as unique, complex
and interactive as you want.
Let's take an example. So far we have only created objects that use the default object typeclass
@ -208,7 +208,7 @@ The same way we did with the Script Earler, we specify a "Python-path" to the Py
to use for creating the object. There you go - one red button.
The RedButton is an example object intended to show off a few of Evennia's features. You will find
that the [Typeclass](../../Component/Typeclasses) and [Commands](../../Component/Commands) controlling it are
that the [Typeclass](../../../Component/Typeclasses) and [Commands](../../../Component/Commands) controlling it are
inside [evennia/contrib/tutorial_examples](api:evennia.contrib.tutorial_examples)
If you wait for a while (make sure you dropped it!) the button will blink invitingly.
@ -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)

View file

@ -56,7 +56,7 @@ and how you point to it correctly.
## commands/
The `commands/` folder holds Python modules related to creating and extending the [Commands](../../Component/Commands)
The `commands/` folder holds Python modules related to creating and extending the [Commands](../../../Component/Commands)
of Evennia. These manifest in game like the server understanding input like `look` or `dig`.
```sidebar:: Classes
@ -148,28 +148,28 @@ knows where they are and will read them to configure itself at startup.
### typeclasses/
The [Typeclasses](../../Component/Typeclasses) of Evennia are Evennia-specific Python classes whose instances save themselves
The [Typeclasses](../../../Component/Typeclasses) of Evennia are Evennia-specific Python classes whose instances save themselves
to the database. This allows a Character to remain in the same place and your updated strength stat to still
be the same after a server reboot.
- [accounts.py](github:evennia/game_template/typeclasses/accounts.py) (Python-path: `typeclasses.accounts`) - An
[Account](../../Component/Accounts) represents the player connecting to the game. It holds information like email,
[Account](../../../Component/Accounts) represents the player connecting to the game. It holds information like email,
password and other out-of-character details.
- [channels.py](github:evennia/game_template/typeclasses/channels.py) (Python-path: `typeclasses.channels`) -
[Channels](Channels) are used to manage in-game communication between players.
- [objects.py](github:evennia/game_template/typeclasses/objects.py) (Python-path: `typeclasses.objects`) -
[Objects](../../Component/Objects) represent all things having a location within the game world.
[Objects](../../../Component/Objects) represent all things having a location within the game world.
- [characters.py](github:evennia/game_template/typeclasses/characters.py) (Python-path: `typeclasses.characters`) -
The [Character](../../Component/Objects#Characers) is a subclass of Objects, controlled by Accounts - they are the player's
The [Character](../../../Component/Objects#Characers) is a subclass of Objects, controlled by Accounts - they are the player's
avatars in the game world.
- [rooms.py](github:evennia/game_template/typeclasses/rooms.py) (Python-path: `typeclasses.rooms`) - A
[Room](../../Component/Objects#Room) is also a subclass of Object; describing discrete locations. While the traditional
[Room](../../../Component/Objects#Room) is also a subclass of Object; describing discrete locations. While the traditional
term is 'room', such a location can be anything and on any scale that fits your game, from a forest glade,
an entire planet or an actual dungeon room.
- [exits.py](github:evennia/game_template/typeclasses/exits.py) (Python-path: `typeclasses.exits`) -
[Exits](../../Component/Objects#Exit) is another subclass of Object. Exits link one Room to another.
[Exits](../../../Component/Objects#Exit) is another subclass of Object. Exits link one Room to another.
- [scripts.py](github:evennia/game_template/typeclasses/scripts.py) (Python-path: `typeclasses.scripts`) -
[Scripts](../../Component/Scripts) are 'out-of-character' objects. They have no location in-game and can serve as basis for
[Scripts](../../../Component/Scripts) are 'out-of-character' objects. They have no location in-game and can serve as basis for
anything that needs database persistence, such as combat, weather, or economic systems. They also
have the ability to execute code repeatedly, on a timer.

View file

@ -7,7 +7,7 @@ is a mature and professional programming language that is very fast to work with
That said, even though Python is widely considered easy to learn, we can only cover the most immediately
important aspects of Python in this series of starting tutorials. Hopefully we can get you started
but then you'll need to continue learning from there. See our [link section](../../Links) for finding
but then you'll need to continue learning from there. See our [link section](../../../Links) for finding
more reference material and dedicated Python tutorials.
> While this will be quite basic if you are an experienced developer, you may want to at least
@ -614,8 +614,7 @@ If `ipython` is installed, `evennia shell` will use it automatically.
evennia shell
...
IPython 7.4.0 -- An enhanced Interactive Python. Type '?' for help
In [1]:
In [1]:
You now have Tab-completion:
> import evennia

View file

@ -1,6 +1,6 @@
# Python basic tutorial part two
[In the first part](Python-basic-introduction) of this Python-for-Evennia basic tutorial we learned
[In the first part](Part1/Python-basic-introduction) of this Python-for-Evennia basic tutorial we learned
how to run some simple Python code from inside the game. We also made our first new *module*
containing a *function* that we called. Now we're going to start exploring the very important
subject of *objects*.

View file

@ -1,6 +1,6 @@
# Evennia Starting Tutorial
[Next lesson](Building-Quickstart)
[Next lesson](Part1/Building-Quickstart)
This is a multi-part Tutorial that will gradually take you from first installation to making your
own first little game in Evennia. Let's get started!
@ -22,9 +22,9 @@ own first little game in Evennia. Let's get started!
## Lessons of Part 1 - "What we have"
1. Introduction & Overview (you are here)
1. [Building stuff](Building-Quickstart)
1. [The Tutorial World](Tutorial-World-Introduction)
1. [Python basics](Python-basic-introduction)
1. [Building stuff](Part1/Building-Quickstart)
1. [The Tutorial World](Part1/Tutorial-World-Introduction)
1. [Python basics](Part1/Python-basic-introduction)
1. [Python classes](Python-basic-tutorial-part-two)
1. [Running Python in- and outside the game](Execute-Python-Code)
1. [Understanding errors](Understanding-Errors)
@ -102,4 +102,4 @@ first enter that gamedir and run
You should now be good to go!
[Next lesson](Building-Quickstart)
[Next lesson](Part1/Building-Quickstart)

View file

@ -649,6 +649,6 @@ The simple "Power" game mechanic should be easily expandable to something more f
useful, same is true for the combat score principle. The `+attack` could be made to target a
specific player (or npc) and automatically compare their relevant attributes to determine a result.
To continue from here, you can take a look at the [Tutorial World](Tutorial-World-Introduction). For
To continue from here, you can take a look at the [Tutorial World](Part1/Tutorial-World-Introduction). For
more specific ideas, see the [other tutorials and hints](Tutorials) as well
as the [Developer Central](Developer-Central).