Types of guilds
===============

Guilds are built on this idea: A living character has en ethic background
that he has common with other characters in his neighbourhood. He has
choosen a profession in which he specializes. He also has an amateuristic
interest in which he has some skill. Besides this he is a member of some
local clubs and organizations.

Guilds are divided in to 'major' and 'minor' guilds. Major guilds are
powerful guilds that give considerable advantage to its members. Minor
guilds are very little more than 'secret societies' and 'clubs' that
only add to the feeling of the game or at most provide very simple
features to its members. A player can be a member od as many minor guulds
as he likes.

The major guild is a guild that primarily is intended to give a background
and some racially characteristic traits to its members. It can ber a tribe
of dwarves for examples that only lives in the high mountains and sport
braided moustaches (females and males alike). The race guild should
_not_ define inherent magic or extranormal abilities and skills in the
player since all races are meant to be alike. In this respect the race
guild can be seen as the least powerful of all major guilds, but it is
of the greatest improtance as seen from the player's point of view since
it supplies him with a background and a place of origin. A basic part of
the race guild should be a player 'soul' with race-specific emotes of
different kinds.

The occupational guild is the more common sort of guild. It gives the 
player a profession with skills realating to that profession. It is here
that we find the fighter, the magician, the cleric, the thief etc.

The layman guild is the 'everyman' version of the occupational guild. A
fighter that wants to learn the basics of magic will typically enroll
here. An occupational guild will typically have a layman branch as well
where members of other occupational guilds can become members. Naturally
the level of skill proficiency in the layman guild is quite lower than
in the occupational guild. This type of guild also covers guilds that
can't conveniently be categorized as 'race' or 'occupational'.


Entering and leaving guilds
===========================

The guild can choose to accept or deny any player for any reason. Also,
the punishment for leaving a guild can be anything, even death, AS
LONG AS the player is informed of this BEFORE he joins the guild.

The punishment for leaving a major guild should be very strict. It should
be very small, maybe even none, for leaving minor guilds.


There is one basic rule governing guilds:
=========================================

	Guilds should cost a certain percentage of all gained xp
	in a 'guild tax'. The actual %tax should depend on the
	advantages gained through the guild.

There will in time be a list of %costs for typical guild features. This is
some preliminary limits. Note that these % values may change and then you
probably has to change the tax the player pays. 


Typically minor guild:

	0%	Simple descriptions and items to separate the player
		from nonguild members. No helping features for combat,
		transportation, healing, etc allowed.

Typically race guild:

	1%	Simple helps such as one or two minor items that gives
		up to 10% help in combat against minor monsters. Maybe 
		guildspecific armour or weaponry.

	2-5%	Helping items giving 10-25% aid in combat, this can be
		weapon, armours or consumable healing. Can also sell
		members consumable help, such as potions for strength
		or healing.

Layman guild:

	5-10%	Minor spell magic and other combat improving features.
		Combat aid may be 25-50%.

Occupational guild:

	10-20%	Normal spell magic and qualified support in combat. The
		combat efficiency may be doubled, ie 50-100% combat aid.

Extra costs (possibly making exceptiopns to the stated rules) :
	Inherent telepatic abilities
		Tell between members		 2% tax + 5 mana when used
		Talkline in guild		10% tax + 3 mana for each
			reciever of the message, who pays the fee in mana is
			up to the guildmaster as long as it is payed by the
			players.
		

	1%	If your guild has a shop, bank, pub and other places money
		is in use, where the members has advantages he won't normally
		find. Like, better trade for members at a shop. Add 1% for
		each such location.

	1%	For each 50 number in skills a player can train, over the max
		values listed in 'skills'.

	(more to come, maybe,
	come with suggestions of things you want a pricetag on)

When you sum up for the tax, an occupational guild may have a max of 30% in
tax, layman 20% as max and race 15%. That would make a player that has joined
three types of guilds with max tax, paying 65% of his experienced gained as
tax, both quest experience as well as combat exp.

With %aid in combat is meant that a given player with the helping features
fight that much better than without help. Having 100% aid in combat therefore
means that the fighting capability is doubled, it does not mean that monsters
fall dead instantly.


Implementation
==============

Basically guilds are solved with autoloading shadows. Shadows are pieces
of code that are added to the object in runtime and overloads the original
objects functions. So if a shadow defines 'query_title' and it shadows
a player, then when 'query_title' is called in the player, it gets called
in the shadow instead. There is a number of functions that a shadow can
not define, these are the functions defined 'nomask' in the object that is
to be shadowed. Functions like 'query_wiz_level' for example :-)

There are some examples in the /doc/examples/guild/ directory.

To implement the 'tax', you must set the correspondin guild pref, much like
the learn prefs. When a player joins the guild a starting value will be
set according to the query_tax() function. If you want to change the tax
the player pays later, you must call set_guild_pref() in the player. When
you do stat on a player you will see what tax he pays to different types 
of guilds.


Skills
======

The number and types of skills available in a guild is naturally dependant
on the type of guild. A guild ought to be clearly defined and only cover ONE
field of interest, not several. So for example a fighter-cleric guild
will _never_ be accepted under any circumstances.

A minor guild should not offer any skills at all. They are simply not 
intended to provide anything more than a bit of feeling in the game.

As for the major guilds, the limits should be set like this:

Any major guild can offer education of up to 700% of skills. This simply
means that if the guild offers weapon education up to 40% in five different
types of weapons, climbing up to 90% and all appraising skills (3) up to
80% adding up to a total of: 40 * 5 + 90 + 80 * 3 = 530%. The guild can
now choose to offer another 170% in other skills as well.

Race guilds:
	Specialized skills could be considered if they are in the line of
	the game. Take for example 'minecraft' for dwarves. However, think
	carefully in advance before defining a skill that maybe never will
	be used. The race guild should rather make a selection from the
	ordinary list (see the ('skills' chapter) and exclude weapons and
	skills that their race never would bother with.

	The maximum teaching level in any of those skills is 90.

Occupational guilds:
	Again, do use some afterthought before introducing specialized skills
	that no-one but you will ever use. Remember to choose skills from
	the basic list that reflect solely on th occupation. If you are
	found offering magic skills in a thief guild, you're in troubble!

	The maximum taching level in any of those skills is 90.

Layman guilds:
	The same rules apply to the layman guild as to the corresponding
	occupational guild. However, the maximum teaching level of the skills
	is 50.

GUILD STATS

Each type of guild is given a stat in the player. As all stats it is 
governed by how much experience the player gains. Each time the player
gains experience %tax of it will end up in the guilds stat.

For normal stats, players can set the %pref values. For the guild stat
this % value is the guild tax. This also means that if a player has
joined a guild, then he can not set his learn prefs to more than 100 - %tax

Only the normal stats are used to decide if it is time for a mortal to
become a wizard. The average should be 100. The guild stats are not
included in this, so the xp that goes to the guilds are in a sense lost
to the mortal.

It is up to the guild to supply an interpretation of the guild stat. Some
might choose not to do this and that is quite ok. The main purpose is to
tax the players for joining a guild. It is of course more entertaining if
the guild stat actually means something.

If you want one or more variables in the player measuring some prestige or
other advancement in the guild, this is easily solved using the skills
mechanism. Skills are in effect extra identifiable variables stored in the 
player. You do not of course have to display the value as a skill.

