From 221caf5187a4424848d91ce51a2d2f56e9cfdab2 Mon Sep 17 00:00:00 2001 From: Griatch Date: Wed, 1 Jul 2020 21:28:04 +0200 Subject: [PATCH] Make tutorial parts into separate subfolders for now --- docs/pylib/create_toctree.py | 4 ++-- docs/source/Contrib/Contrib-Overview.md | 2 +- docs/source/Evennia-Introduction.md | 2 +- docs/source/Howto/Howto-Overview.md | 4 ++-- .../Howto/Starting/Coding-Introduction.md | 2 +- .../{ => Part1}/Building-Quickstart.md | 22 +++++++++---------- .../Starting/{ => Part1}/Gamedir-Overview.md | 16 +++++++------- .../{ => Part1}/Python-basic-introduction.md | 5 ++--- .../Tutorial-World-Introduction.md | 0 .../Python-basic-tutorial-part-two.md | 2 +- docs/source/Howto/Starting/Starting-Part1.md | 10 ++++----- .../Tutorial-for-basic-MUSH-like-game.md | 2 +- docs/source/Setup/Extended-Installation.md | 2 +- docs/source/toc.md | 8 +++---- 14 files changed, 40 insertions(+), 41 deletions(-) rename docs/source/Howto/Starting/{ => Part1}/Building-Quickstart.md (92%) rename docs/source/Howto/Starting/{ => Part1}/Gamedir-Overview.md (93%) rename docs/source/Howto/Starting/{ => Part1}/Python-basic-introduction.md (99%) rename docs/source/Howto/Starting/{ => Part1}/Tutorial-World-Introduction.md (100%) diff --git a/docs/pylib/create_toctree.py b/docs/pylib/create_toctree.py index c03838a926..d2d15fead3 100644 --- a/docs/pylib/create_toctree.py +++ b/docs/pylib/create_toctree.py @@ -31,9 +31,9 @@ def create_toctree(): """Get the path relative the source/ dir""" pathparts = path.split("/") # we allow a max of 4 levels of nesting in the source dir - ind = pathparts[-4:].index(_SOURCEDIR_NAME) + ind = pathparts[-5:].index(_SOURCEDIR_NAME) # get the part after source/ - pathparts = pathparts[-4 + 1 + ind:] + pathparts = pathparts[-5 + 1 + ind:] url = "/".join(pathparts) # get the reference, without .md url = url.rsplit(".", 1)[0] diff --git a/docs/source/Contrib/Contrib-Overview.md b/docs/source/Contrib/Contrib-Overview.md index a0a42f58d7..d9359b92e9 100644 --- a/docs/source/Contrib/Contrib-Overview.md +++ b/docs/source/Contrib/Contrib-Overview.md @@ -15,7 +15,7 @@ longer-form documentation associated with particular contribs. ## The tutorial-world -- [The tutorial world introduction](../Howto/Starting/Tutorial-World-Introduction) +- [The tutorial world introduction](../Howto/Starting/Part1/Tutorial-World-Introduction) ## Menu-builder diff --git a/docs/source/Evennia-Introduction.md b/docs/source/Evennia-Introduction.md index 614599176f..cd7963bf1f 100644 --- a/docs/source/Evennia-Introduction.md +++ b/docs/source/Evennia-Introduction.md @@ -47,7 +47,7 @@ a [screenshot](Screenshot). Once you installed Evennia yourself it comes with its own tutorial - this shows off some of the possibilities _and_ gives you a small single-player quest to play. The tutorial takes only one -single in-game command to install as explained [here](Howto/Starting/Tutorial-World-Introduction). +single in-game command to install as explained [here](Howto/Starting/Part1/Tutorial-World-Introduction). ## Brief summary of features diff --git a/docs/source/Howto/Howto-Overview.md b/docs/source/Howto/Howto-Overview.md index 50b7ce5874..1f615f1e5e 100644 --- a/docs/source/Howto/Howto-Overview.md +++ b/docs/source/Howto/Howto-Overview.md @@ -15,8 +15,8 @@ in mind for your own game, this will give you a good start. ### Part 1: What we have 1. [Introduction & Overview](Starting/Starting-Part1) -1. [Building stuff](Starting/Building-Quickstart) -1. [Python basics](Starting/Python-basic-introduction) +1. [Building stuff](Starting/Part1/Building-Quickstart) +1. [Python basics](Starting/Part1/Python-basic-introduction) 1. [Python classes](Starting/Python-basic-tutorial-part-two) 1. [Running Python in- and outside the game](Starting/Execute-Python-Code) 1. [Understanding errors](Understanding-Errors) diff --git a/docs/source/Howto/Starting/Coding-Introduction.md b/docs/source/Howto/Starting/Coding-Introduction.md index f33a4b4ceb..7ac39a06df 100644 --- a/docs/source/Howto/Starting/Coding-Introduction.md +++ b/docs/source/Howto/Starting/Coding-Introduction.md @@ -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 diff --git a/docs/source/Howto/Starting/Building-Quickstart.md b/docs/source/Howto/Starting/Part1/Building-Quickstart.md similarity index 92% rename from docs/source/Howto/Starting/Building-Quickstart.md rename to docs/source/Howto/Starting/Part1/Building-Quickstart.md index 573e849826..266d3ecdef 100644 --- a/docs/source/Howto/Starting/Building-Quickstart.md +++ b/docs/source/Howto/Starting/Part1/Building-Quickstart.md @@ -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) diff --git a/docs/source/Howto/Starting/Gamedir-Overview.md b/docs/source/Howto/Starting/Part1/Gamedir-Overview.md similarity index 93% rename from docs/source/Howto/Starting/Gamedir-Overview.md rename to docs/source/Howto/Starting/Part1/Gamedir-Overview.md index c76c98edc1..707d8982d1 100644 --- a/docs/source/Howto/Starting/Gamedir-Overview.md +++ b/docs/source/Howto/Starting/Part1/Gamedir-Overview.md @@ -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. diff --git a/docs/source/Howto/Starting/Python-basic-introduction.md b/docs/source/Howto/Starting/Part1/Python-basic-introduction.md similarity index 99% rename from docs/source/Howto/Starting/Python-basic-introduction.md rename to docs/source/Howto/Starting/Part1/Python-basic-introduction.md index 395ef5a5e0..586066648c 100644 --- a/docs/source/Howto/Starting/Python-basic-introduction.md +++ b/docs/source/Howto/Starting/Part1/Python-basic-introduction.md @@ -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 diff --git a/docs/source/Howto/Starting/Tutorial-World-Introduction.md b/docs/source/Howto/Starting/Part1/Tutorial-World-Introduction.md similarity index 100% rename from docs/source/Howto/Starting/Tutorial-World-Introduction.md rename to docs/source/Howto/Starting/Part1/Tutorial-World-Introduction.md diff --git a/docs/source/Howto/Starting/Python-basic-tutorial-part-two.md b/docs/source/Howto/Starting/Python-basic-tutorial-part-two.md index 82db593af6..bc2504d642 100644 --- a/docs/source/Howto/Starting/Python-basic-tutorial-part-two.md +++ b/docs/source/Howto/Starting/Python-basic-tutorial-part-two.md @@ -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*. diff --git a/docs/source/Howto/Starting/Starting-Part1.md b/docs/source/Howto/Starting/Starting-Part1.md index 99a8d9f516..0f5a14b4b0 100644 --- a/docs/source/Howto/Starting/Starting-Part1.md +++ b/docs/source/Howto/Starting/Starting-Part1.md @@ -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) diff --git a/docs/source/Howto/Starting/Tutorial-for-basic-MUSH-like-game.md b/docs/source/Howto/Starting/Tutorial-for-basic-MUSH-like-game.md index 361e84dcf6..1b2416737d 100644 --- a/docs/source/Howto/Starting/Tutorial-for-basic-MUSH-like-game.md +++ b/docs/source/Howto/Starting/Tutorial-for-basic-MUSH-like-game.md @@ -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). \ No newline at end of file diff --git a/docs/source/Setup/Extended-Installation.md b/docs/source/Setup/Extended-Installation.md index 7ce36f5cc8..8f48f19fa3 100644 --- a/docs/source/Setup/Extended-Installation.md +++ b/docs/source/Setup/Extended-Installation.md @@ -438,7 +438,7 @@ logged in, stand in the `Limbo` room and run @batchcommand tutorial_world.build -to build [Evennia's tutorial world](../Howto/Starting/Tutorial-World-Introduction) - it's a small solo quest to +to build [Evennia's tutorial world](../Howto/Starting/Part1/Tutorial-World-Introduction) - it's a small solo quest to explore. Only run the instructed `@batchcommand` once. You'll get a lot of text scrolling by as the tutorial is built. Once done, the `tutorial` exit will have appeared out of Limbo - just write `tutorial` to enter it. diff --git a/docs/source/toc.md b/docs/source/toc.md index c0c923cea8..a865a3df0d 100644 --- a/docs/source/toc.md +++ b/docs/source/toc.md @@ -94,16 +94,17 @@ - [Howto/Starting/Add a simple new web page](Howto/Starting/Add-a-simple-new-web-page) - [Howto/Starting/Adding Command Tutorial](Howto/Starting/Adding-Command-Tutorial) - [Howto/Starting/Adding Object Typeclass Tutorial](Howto/Starting/Adding-Object-Typeclass-Tutorial) -- [Howto/Starting/Building Quickstart](Howto/Starting/Building-Quickstart) - [Howto/Starting/Coding Introduction](Howto/Starting/Coding-Introduction) - [Howto/Starting/Coordinates](Howto/Starting/Coordinates) - [Howto/Starting/Execute Python Code](Howto/Starting/Execute-Python-Code) - [Howto/Starting/First Steps Coding](Howto/Starting/First-Steps-Coding) - [Howto/Starting/Game Planning](Howto/Starting/Game-Planning) -- [Howto/Starting/Gamedir Overview](Howto/Starting/Gamedir-Overview) - [Howto/Starting/Implementing a game rule system](Howto/Starting/Implementing-a-game-rule-system) - [Howto/Starting/Parsing command arguments, theory and best practices](Howto/Starting/Parsing-command-arguments,-theory-and-best-practices) -- [Howto/Starting/Python basic introduction](Howto/Starting/Python-basic-introduction) +- [Howto/Starting/Part1/Building Quickstart](Howto/Starting/Part1/Building-Quickstart) +- [Howto/Starting/Part1/Gamedir Overview](Howto/Starting/Part1/Gamedir-Overview) +- [Howto/Starting/Part1/Python basic introduction](Howto/Starting/Part1/Python-basic-introduction) +- [Howto/Starting/Part1/Tutorial World Introduction](Howto/Starting/Part1/Tutorial-World-Introduction) - [Howto/Starting/Python basic tutorial part two](Howto/Starting/Python-basic-tutorial-part-two) - [Howto/Starting/Starting Part1](Howto/Starting/Starting-Part1) - [Howto/Starting/Starting Part2](Howto/Starting/Starting-Part2) @@ -112,7 +113,6 @@ - [Howto/Starting/Starting Part5](Howto/Starting/Starting-Part5) - [Howto/Starting/Turn based Combat System](Howto/Starting/Turn-based-Combat-System) - [Howto/Starting/Tutorial Searching For Objects](Howto/Starting/Tutorial-Searching-For-Objects) -- [Howto/Starting/Tutorial World Introduction](Howto/Starting/Tutorial-World-Introduction) - [Howto/Starting/Tutorial for basic MUSH like game](Howto/Starting/Tutorial-for-basic-MUSH-like-game) - [Howto/Starting/Web Tutorial](Howto/Starting/Web-Tutorial) - [Howto/Tutorial Aggressive NPCs](Howto/Tutorial-Aggressive-NPCs)