Changed the contrib README's to use markdown rather than plain txt. Removed the battle for Evennia folder.

This commit is contained in:
Griatch 2015-02-23 10:35:13 +01:00
parent be71aee08f
commit 2edb82095a
5 changed files with 146 additions and 330 deletions

View file

@ -1,49 +0,0 @@
'Contrib' folder
----------------
This folder contains 'contributions': extra snippets of code that are
potentially very useful for the game coder but which are considered
too game-specific to be a part of the main Evennia game server. These
modules are not used unless you explicitly import them. See each file
for more detailed instructions on how to install.
Modules in this folder is distributed under the same licence as
Evennia unless noted differently in the individual module.
If you want to edit, tweak or expand on this code you should copy the
things you want from here into your game folder and change them there.
* Evennia MenuSystem (Griatch 2011) - A base set of classes and
cmdsets for creating in-game multiple-choice menus in
Evennia. The menu tree can be of any depth. Menu options can be
numbered or given custom keys, and each option can execute
code. Also contains a yes/no question generator function. This
is intended to be used by commands and presents a y/n question
to the user for accepting an action. Includes a simple new
command 'menu' for testing and debugging.
* Evennia Line editor (Griatch 2011) - A powerful line-by-line editor
for editing text in-game. Mimics the command names of the famous
VI text editor. Supports undo/redo, search/replace,
regex-searches, buffer formatting, indenting etc. It comes with
its own help system. (Makes minute use of the MenuSystem module
to show a y/n question if quitting without having
saved). Includes a basic command '@edit' for activating the
editor.
* Talking_NPC (Griatch 2011) - An example of a simple NPC object with
which you can strike up a menu-driven converstaion. Uses the
MenuSystem to allow conversation options. The npc object defines
a command 'talk' for starting the (brief) conversation.
* Evennia Menu Login (Griatch 2011) - A menu-driven login screen that
replaces the default command-based one. Uses the MenuSystem
contrib. Does not require players to give their email and
doesn't auto-create a Character object at first login like the
default system does.
* CharGen (Griatch 2011) - A simple Character creator and selector for
Evennia's ooc mode. Works well with the menu login contrib and
is intended as a starting point for building a more full-featured
character creation system.

42
evennia/contrib/README.md Normal file
View file

@ -0,0 +1,42 @@
# Contrib folder
This folder contains 'contributions': extra snippets of code that are
potentially very useful for the game coder but which are considered
too game-specific to be a part of the main Evennia game server. These
modules are not used unless you explicitly import them. See each file
for more detailed instructions on how to install.
Modules in this folder are distributed under the same licence as
Evennia unless noted differently in the individual module.
If you want to edit, tweak or expand on this code you should copy the
things you want from here into your game folder and change them there.
* Barter system (Griatch 2012) - A safe and effective barter-system
for any game. Allows safe trading of any godds (including coin)
* CharGen (Griatch 2011) - A simple Character creator and selector for
Evennia's ooc mode. Works well with the menu login contrib and
is intended as a starting point for building a more full-featured
character creation system.
* Dice (Griatch 2012) - A fully featured dice rolling system.
* Email-login (Griatch 2012) - A variant of the standard login system
that requires an email to login rather then just name+password.
* Extended Room (Griatch 2012) - An expanded Room typeclass with
multiple descriptions for time and season as well as details.
* Line Editor (Griatch 2011) - A fully-featured in-game line-editor
with undo/redo/search/replace/format and other modern features.
* Menu login (Griatch 2011) - A login system using menus asking
for name/password rather than giving them as one command
* Menu System (Griatch 2011) - A general menu system with multiple-
choice options and nodes able to trigger commands and code snippets.
* ProcPool (Griatch 2012) - Process pool mechanisms to offload heavy
operations to a separate computer process asynchronously.
* Slow exit (Griatch 2014) - Custom Exit class that takes different
time to pass depending on if you are walking/running etc.
* Talking NPC (Griatch 2011) - A talking NPC object that offers a
menu-driven conversation tree.
* Tutorial examples (Griatch 2011, 2015) - A folder of basic
example objects, commands and scripts.
* Tutorial world (Griatch 2011, 2015) - A folder containing the
rooms, objects and commands for building the Tutorial world.

View file

@ -1,171 +0,0 @@
Battle for Evennia
------------------
Evennia contrib - Griatch 2012 (WORK IN PROGRESS)
This is the beginnings of what will be a tutorial for building a
simple yet still reasonably playable and not-quite-bog-standard
starting game in Evennia. The tutorial text itself will eventually be
found from the Dev blog and from the wiki.
Ideas & Initial Brainstorm
---------------------------
This is to be a hack&slash game. Characters fight mobiles and each
other for random loot and better weapons. The highscore is based on
most accumulated gold. They can sell loot to NPC merchants for gold,
and also buy stuff others sold there (spending gold). Characters get
better in the skills they use (no levels). They automatically collect
loot when they kill things, and they cannot drop it (but they can give
it away and, most importantly sell it). Death sends the player back to
a starting position, but gives all but their weakest gear to their
nemesis (they keep all their gold though).
Inventory of code we need:
- Loot/Equipment lists of Weapons, Armour, Potions and Spells - maybe partly randomly generated.
- Way to spawn in-game objects based on the loot lists
- Character creation module (choose skills, attributes, assigns starting gear)
- 3 Attributes, about 10 skills (some magic?)
- Experience -> skill increase code
- Skill success code - same between PCs as between NPC and PC
- Combat code (twitch-based? Turn-based? Turn based seems easier to balance. Same for NPC vs PC and PC vs PC)
- Mobile code (same for NPCs and enemies)
- 'Give' mechanism (should require consent by receiver)
- No quests, for simplicity. Use gold as a highscore.
- Death respawn mechanism
Elaboration based on Brainstorm
-------------------------------
* Loot/Equipment lists and spawn - These could be global-level
dictionaries in a module. Each dictionary gives info such as name,
description and typeclass. Attributes could be set or
randomized. The loot-spawner (probably a handler tied to a dead
mob, treasure chest etc) would use utils.variable_from_module to
extract a random item-template.
* Characters have 3 attributes: Wile, Strength and Agility. At
creation, they distribute points between them. Wile is used for
bartering with merchants, and using Magic. Strength determines
hand-weapon damage and how heavy armour can be worn. Agility
determines ability to dodge, initiative and using lighter weapons.
Health is based on an average of all three attributes (i.e. all
chars start with the same health).
* Skills are as follows (may change):
- Long blades (str) ability to hit with swords and also axes.
- Blunt (str) usage of blunt weapons like clubs. Good on armoured foes.
- Spears (agi) usage of spears and hillebards. Bonus on first attack, minus on initiative.
- Daggers (agi) usage of daggers and short blades. Bonus on initiative, bad on armour
- Unarmoured (agi) usage of your fists and feet. Very fast. Bad on armour.
- Dodge (agi) avoiding blows by swift footwork
- Feint (agi) faign attacks to keep the enemy guessing
- Shield (str) absorbing hits with a shielf
- Platemail (str) utilizing heavy armour
- Chainmail (max(str, agi)) utilizing medium armour
- Leather (agi) utilizing light armour
- Barter (wil) barter with merchants for a good price
- Magic (wil) use of single-use magical scrolls to achieve various effects
- Potions (wil) making the best of potions with various effects
- Heal (wil) fixing yourself (or a friend) up between combat. Also judge opponent's wounds.
* Experience simply rises upon kills and is distributed between the
skills used in the battle (so we need to log this). After N amount of
XP in a skill, that skill automatically goes up one
point. Increasing skills at least N points in 3+ different skills
of a certain type (str, agi, wil) will increase the most trained
Attribute by one point.
* Skill success is a comparison between the value of a random.gauss
centered around the attacker's skill value vs the result of a
random.gauss centered on the defender's skill. Certain
weapons/defense combinations might be especially effective against
one another (or not). The difference is the base damage, then
adjusted by weapon and armour. In the case of bartering, skill
challenge is between barter skill of both sides; difference
influences the discount/higher price offered for selling/buying.
* Attacking another player or NPC will start a combat queue.
Combat happens in turns. Each turn each player may enter two actions,
picking among the following:
- attack
- parry (with weapon)
- shield
- feint
- dodge
- flee <direction>
- block (anti-flee)
- switch <weapon>
Emoting is free in each round, but movement is forbidden unless one
tries to flee (agi challenge, or cancelled by block action). All
combattants involved in a fight submits their actions, then combat
is resolved simultaneously by the code. Order of the two actions
matter, so for example if both attack, neither is trying to parry,
but may hit each other simultaneously. If both parry, shield or
dodge, it means both are dancing about each other. If one feints
and the other parries or dodges, they will have a disadvantage on
the next defensive movement. A successful parry will give the
parried attacker a disadvantage on their next attack. And so on.
Another player may "join the queue" at any time by attacking one of
the combatting PCs. They get to insert their actions together with
the rest on the next round. A round should probably have a timeout
to avoid a Character clogging the queue.
* Mobiles will use "a global ticker system" where they
subscribe. They act the same way as PCs in combat, except with a
semi- random selection of actions they take (they will probably be
more predictable than PCs). Adding aggressive and passive mobiles
should be straightforward, as well as un-killable ones (merchants).
* The inventory of a defeated enemy is automatically transferred to
the winner's inventory. If there are many alternative pieces of
equipment, they get to keep the weakest one, otherwise it's all
transferred. There are no limits to carrying except the fear of
losing gear. This should hopefully prevent hoarding of good items.
One can give item(s) to another player - that player must then
conceed to receiving it (use Y/N module in contrib.menusystem).
There is no way of dropping items on the ground; one must either
give them away or sell them for gold to a merchant.
* Gold is used for buying items from merchants, but is also the
highscore. Whereas sell prices are fixed, buy prices are not fixed
but is based on a percentage of the gold carried, adjusted by the
barter skill (this should defeat inflation quite effectively). Items
sold to merchants are made available for other players to buy.
* Death means loosing inventory (except weakest item, as mentioned),
but no loss of gold. Otherwise death is cheap - one respawns at a
random starting position (probably needing special-aliased rooms to
use for this - maybe with one-way exits).
Rough plan for order of implementation
--------------------------------------
1) Conflict resolution system - work out how basic challenges should work, what format ingoing Skills
should have and how generic bonuses from attributes and equipment affect things. Make a generic
API for it. Try to list all supported plus/minues equipment may offer.
2) Using skills - create XP and automatic skill improvement code
3) Define new Character typeclass that stores skills/attributes in a way that the conflict
system understands. Chars should also have the ability to "wear" things, so some
sort of slot system is needed. Gold needs to be stored in a separate variable.
4) Create "sell/buy" command stump, for testing the Skill resolution code with fixed on-character values.
5) Create Combat queue code for turn-taking combat. Reiterate so that it works with the generic form of
Skills and conflict resolution.
6) Create all included skills and their associated commands.
7) Test commands manually with two PC characters in the Combat queue and in other challenge situations.
8) Create loot-creation mechanism based on equipment lists, for spawning semi-random items and gear.
9) Create Death-respawn mechanism, including loss of equipment and transfer of same to the winner.
10) Create NPC/mobile object runner Script. Use a copy of Character typeclass for mobiles, except some
automation hooks and AI states. Tie loot creation to the death of NPCs.
11) Test PC vs NPC combat and other challenges.
12) Create merchants as interactive, immortal NPCs with the "barter" skill.
13) Create Character creation module, for assigning attributes/skills when first starting.
Add appropriate commands to ooccmdset.
14) Add "give" command to command set. Remove unused commands like "drop" (or make it admin-only). Possibly
expand "look" command to allow to look across exits into the next room. Also add "highscore" command for
viewing game statistics.
15) <starting building of game world>

View file

@ -1,110 +0,0 @@
===============================================================
Evennia Tutorial World
Griatch 2011
===============================================================
This is a stand-alone tutorial area for an unmodified Evennia install.
Think of it as a sort of single-player adventure rather than a
full-fledged multi-player game world. The various rooms and objects
herein are designed to show off features of the engine, not to be a
very challenging (nor long) gaming experience. As such it's of course
only skimming the surface of what is possible.
================================================================
Install
================================================================
Log in as superuser (#1), then run
@batchcommand contrib.tutorial_world.build
Wait a little while for building to complete. This should build the
world and connect it to Limbo.
Log is as a non-superuser to play the game as intended. The
tutorial area's systems mostly ignores the presence of a
superuser (so use that to examine things "under the hood" later).
================================================================
Comments
================================================================
The tutorial world is intended for you playing around with the
engine. It will help you learn how to accomplish some more advanced
effects and might give some good ideas along the way.
It's suggested you play it through (as a normal user, NOT as
Superuser!) and explore it a bit, then come back here and start
looking into the (heavily documented) build/source code to find out
how things tick - that's the "tutorial" in Tutorial world after all.
Please report bugs in the tutorial to the Evennia issue tracker.
* Spoilers below - don't read on unless you already played the
tutorial game. *
===============================================================
Tutorial World Room map
===============================================================
?
|
+---+----+ +-------------------+ +--------+ +--------+
| | | | |gate | |corner |
| cliff +----+ bridge +----+ +---+ |
| | | | | | | |
+---+---\+ +---------------+---+ +---+----+ +---+----+
| \ | | castle |
| \ +--------+ +----+---+ +---+----+ +---+----+
| \ |under- | |ledge | |along | |court- |
| \|ground +--+ | |wall +---+yard |
| \ | | | | | | |
| +------\-+ +--------+ +--------+ +---+----+
| \ |
++---------+ \ +--------+ +--------+ +---+----+
|intro | \ |cell | |trap | |temple |
o--+ | \| +----+ | | |
L | | \ | /| | | |
I +----+-----+ +--------+ / ---+-+-+-+ +---+----+
M | / | | | |
B +----+-----+ +--------+/ +--+-+-+---------+----+
O |outro | |tomb | |antechamber |
o--+ +----------+ | | |
| | | | | |
+----------+ +--------+ +---------------------+
Hints/Notes:
o-- connections to/from Limbo
intro/outro areas are rooms that automatically sets/cleans the
Character of any settings assigned to it during the
tutorial game.
The Cliff is a good place to get an overview of the surroundings.
The Bridge may seem like a big room, but it is really only one
room with custom move commands to make it take longer
to cross. You can also fall off the bridge if you
are unlucky or take your time to take in the view too
long.
In the Castle areas an aggressive mob is patrolling. It implements
rudimentary AI but packs quite a punch unless you have
found yourself a weapon that can harm it. Combat is only
possible once you find a weapon.
The Catacombs feature a puzzle for finding the correct Grave
chamber.
The Cell is your reward if you fail in various ways. Finding a
way out of it is a small puzzle of its own.
The Tomb is a nice place to find a weapon that can hurt the
castle guardian. This is the goal of the tutorial.
Explore on, or take the exit to finish the tutorial.
? - look into the code if you cannot find this bonus area!

View file

@ -0,0 +1,104 @@
# Evennia Tutorial World
Griatch 2011, 2015
This is a stand-alone tutorial area for an unmodified Evennia install.
Think of it as a sort of single-player adventure rather than a
full-fledged multi-player game world. The various rooms and objects
herein are designed to show off features of the engine, not to be a
very challenging (nor long) gaming experience. As such it's of course
only skimming the surface of what is possible.
## Install
Log in as superuser (#1), then run
@batchcommand tutorial_world.build
Wait a little while for building to complete and don't run the command
again. This should build the world and connect it to Limbo.
If you are a superuser (User `#1`), use the `@quell` command to play
the tutorial as intended.
## Comments
The tutorial world is intended for you playing around with the engine.
It will help you learn how to accomplish some more advanced effects
and might give some good ideas along the way.
It's suggested you play it through (as a normal user, NOT as
Superuser!) and explore it a bit, then come back here and start
looking into the (heavily documented) build/source code to find out
how things tick - that's the "tutorial" in Tutorial world after all.
Please report bugs in the tutorial to the Evennia issue tracker.
**Spoilers below - don't read on unless you already played the
tutorial game**
## Tutorial World Room map
?
|
+---+----+ +-------------------+ +--------+ +--------+
| | | | |gate | |corner |
| cliff +----+ bridge +----+ +---+ |
| | | | | | | |
+---+---\+ +---------------+---+ +---+----+ +---+----+
| \ | | castle |
| \ +--------+ +----+---+ +---+----+ +---+----+
| \ |under- | |ledge | |along | |court- |
| \|ground +--+ | |wall +---+yard |
| \ | | | | | | |
| +------\-+ +--------+ +--------+ +---+----+
| \ |
++---------+ \ +--------+ +--------+ +---+----+
|intro | \ |cell | |trap | |temple |
o--+ | \| +----+ | | |
L | | \ | /| | | |
I +----+-----+ +--------+ / ---+-+-+-+ +---+----+
M | / | | | |
B +----+-----+ +--------+/ +--+-+-+---------+----+
O |outro | |tomb | |antechamber |
o--+ +----------+ | | |
| | | | | |
+----------+ +--------+ +---------------------+
## Hints/Notes:
* o-- connections to/from Limbo
* intro/outro areas are rooms that automatically sets/cleans the
Character of any settings assigned to it during the
tutorial game.
* The Cliff is a good place to get an overview of the surroundings.
* The Bridge may seem like a big room, but it is really only one room
with custom move commands to make it take longer to cross. You can
also fall off the bridge if youare unlucky or take your time to
take in the view too long.
* In the Castle areas an aggressive mob is patrolling. It implements
rudimentary AI but packs quite a punch unless you have
found yourself a weapon that can harm it. Combat is only
possible once you find a weapon.
* The Antechamber feature a puzzle for finding the correct Grave
chamber.
* The Cell is your reward if you fail in various ways. Finding a
way out of it is a small puzzle of its own.
* The Tomb is a nice place to find a weapon that can hurt the
castle guardian. This is the goal of the tutorial.
Explore on, or take the exit to finish the tutorial.
* ? - look into the code if you cannot find this bonus area!