Doc refactor/renaming

This commit is contained in:
Griatch 2020-07-11 10:41:33 +02:00
parent 9d8e8d7693
commit b5b265ec3b
115 changed files with 518 additions and 434 deletions

View file

@ -3,13 +3,13 @@
[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,
[around 90 default commands](../../../Components/Default-Command-Help), and while you can override those as you please,
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](../../../Concepts/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](../../../Components/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](../../../Components/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
@ -156,7 +156,7 @@ later, in the [Commands tutorial](./Adding-Commands).
## Get a Personality
[Scripts](../../../Component/Scripts) are powerful out-of-character objects useful for many "under the hood" things.
[Scripts](../../../Components/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](../../../Components/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](../../../Components/Typeclasses), [Scripts](../../../Components/Scripts)
and object-based [Commands](../../../Components/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](../../../Components/Typeclasses) and [Commands](../../../Components/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.

View file

@ -1,4 +1,4 @@
## Django Database queries
# Django Database queries
[prev lesson](./Searching-Things) | [next lesson](../Starting-Part2)
@ -184,7 +184,7 @@ will_transform = (
Running this query makes our newly lycantrrophic Character appear in `will_transform`. Success!
> Don't confuse database fields with [Attributes](../../../Component/Attributes) you set via `obj.db.attr = 'foo'` or
> Don't confuse database fields with [Attributes](../../../Components/Attributes) you set via `obj.db.attr = 'foo'` or
`obj.attributes.add()`. Attributes are custom database entities *linked* to an object. They are not
separate fields *on* that object like `db_key` or `db_location` are.
@ -390,7 +390,7 @@ in a format like the following:
]
```
# Conclusions
## Conclusions
We have covered a lot of ground in this lesson and covered several more complex topics. Knowing how to
query using Django is a powerful skill to have.

View file

@ -53,25 +53,25 @@ This the the structure of the Evennia library:
- evennia
- [`__init__.py`](../../../Evennia-API#shortcuts) - The "flat API" of Evennia resides here.
- [`settings_default.py`](../../../Component/Server-Conf#Settings-file) - Root settings of Evennia. Copy settings
- [`settings_default.py`](../../../Components/Server-Conf#Settings-file) - Root settings of Evennia. Copy settings
from here to `mygame/server/settings.py` file.
- [`commands/`](../../../Component/Commands) - The command parser and handler.
- `default/` - The [default commands](../../../Component/Default-Command-Help) and cmdsets.
- [`comms/`](../../../Component/Communications) - Systems for communicating in-game.
- [`commands/`](../../../Components/Commands) - The command parser and handler.
- `default/` - The [default commands](../../../Components/Default-Command-Help) and cmdsets.
- [`comms/`](../../../Components/Communications) - Systems for communicating in-game.
- `contrib/` - Optional plugins too game-specific for core Evennia.
- `game_template/` - Copied to become the "game directory" when using `evennia --init`.
- [`help/`](../../../Component/Help-System) - Handles the storage and creation of help entries.
- `locale/` - Language files ([i18n](../../../Concept/Internationalization)).
- [`locks/`](../../../Component/Locks) - Lock system for restricting access to in-game entities.
- [`objects/`](../../../Component/Objects) - In-game entities (all types of items and Characters).
- [`prototypes/`](../../../Component/Spawner-and-Prototypes) - Object Prototype/spawning system and OLC menu
- [`accounts/`](../../../Component/Accounts) - Out-of-game Session-controlled entities (accounts, bots etc)
- [`scripts/`](../../../Component/Scripts) - Out-of-game entities equivalence to Objects, also with timer support.
- [`server/`](../../../Component/Portal-And-Server) - Core server code and Session handling.
- [`help/`](../../../Components/Help-System) - Handles the storage and creation of help entries.
- `locale/` - Language files ([i18n](../../../Concepts/Internationalization)).
- [`locks/`](../../../Components/Locks) - Lock system for restricting access to in-game entities.
- [`objects/`](../../../Components/Objects) - In-game entities (all types of items and Characters).
- [`prototypes/`](../../../Components/Spawner-and-Prototypes) - Object Prototype/spawning system and OLC menu
- [`accounts/`](../../../Components/Accounts) - Out-of-game Session-controlled entities (accounts, bots etc)
- [`scripts/`](../../../Components/Scripts) - Out-of-game entities equivalence to Objects, also with timer support.
- [`server/`](../../../Components/Portal-And-Server) - Core server code and Session handling.
- `portal/` - Portal proxy and connection protocols.
- [`typeclasses/`](../../../Component/Typeclasses) - Abstract classes for the typeclass storage and database system.
- [`utils/`](../../../Component/Coding-Utils) - Various miscellaneous useful coding resources.
- [`web/`](../../../Concept/Web-Features) - Web resources and webserver. Partly copied into game directory on initialization.
- [`typeclasses/`](../../../Components/Typeclasses) - Abstract classes for the typeclass storage and database system.
- [`utils/`](../../../Components/Coding-Utils) - Various miscellaneous useful coding resources.
- [`web/`](../../../Concepts/Web-Features) - Web resources and webserver. Partly copied into game directory on initialization.
```sidebar:: __init__.py

View file

@ -59,7 +59,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](../../../Components/Commands)
of Evennia. These manifest in game like the server understanding input like `look` or `dig`.
```sidebar:: Classes
@ -151,28 +151,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](../../../Components/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](../../../Components/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](../../../Component/Channels) are used to manage in-game communication between players.
[Channels](../../../Components/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](../../../Components/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](../../../Components/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](../../../Components/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](../../../Components/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](../../../Components/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.
@ -203,7 +203,7 @@ 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.
- [prototypes.py](github:evennia/game_template/world/prototypes.py) - A [prototype](../../../Component/Spawner-and-Prototypes) is a way
- [prototypes.py](github:evennia/game_template/world/prototypes.py) - A [prototype](../../../Components/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.

View file

@ -99,12 +99,12 @@ yourself and what you get back is now a list of zero, one or more matches!
These are the main database entities one can search for:
- [Objects](../../../Component/Objects)
- [Accounts](../../../Component/Accounts)
- [Scripts](../../../Component/Scripts),
- [Channels](../../../Component/Communications#channels),
- [Objects](../../../Components/Objects)
- [Accounts](../../../Components/Accounts)
- [Scripts](../../../Components/Scripts),
- [Channels](../../../Components/Communications#channels),
- [Messages](Communication#Msg)
- [Help Entries](../../../Component/Help-System).
- [Help Entries](../../../Components/Help-System).
Most of the time you'll likely spend your time searching for Objects and the occasional Accounts.
@ -134,7 +134,7 @@ general search function. If we assume `room` is a particular Room instance,
### Search by Tags
Think of a [Tag](../../../Component/Tags) as the label the airport puts on your luggage when flying.
Think of a [Tag](../../../Components/Tags) as the label the airport puts on your luggage when flying.
Everyone going on the same plane gets a tag grouping them together so the airport can know what should
go to which plane. Entities in Evennia can be grouped in the same way. Any number of tags can be attached
to each object.
@ -168,7 +168,7 @@ This gets all three books.
### Search by Attribute
We can also search by the [Attributes](../../../Component/Attributes) associated with entities.
We can also search by the [Attributes](../../../Components/Attributes) associated with entities.
For example, let's give our rose thorns: