This document describes how skills work in CDlib


Background
==========

Skills are all the pieces of knowledge of different things that a
mortal may gather to manage a long journey through a dangerous life.

Skills defer from stats in that they are not gained through experience,
i.e.  indirectly. Skills are usually bought with money, as training
courses, or gained as rewards after solving a quest. Some races may
also be born with certain skills or have a special talent to learn
them.

There is in theory no limit to the number of different skills in the
game.  However, as all objects in the game should interpret skills in a
similar way there must be a standard. Therefore most skills must be
registred in a central place in the game.



Functionality and implementation
================================

A skill is simply a pair of two numbers. The skill number and the
value.  It is implemented as two lists in all living objects.

	All nonexistant skills are considered to have the value 0.

There are four routines for managing skills:

	set_skill(int skill_type, skill_value)
	query_skill(int skill_type)		/* Skill + bonus */
	query_base_skill(int skill_type) 	/* The real skill of player */
	query_skill_cost(int old_skillvalue, new_skillvalue)

The first two are merely for setting and querying the skill values. The
third is a standardized cost function that returns what the relative
cost for raising between two skill values should be.


Current list of skills
======================

The file /sys/ss_types.h holds a list of the current skills and the
#defined types. The full list of documented skills will be available
with 'man skill_list' or in the file /doc/man/general/skill_list

Most of the skills from the basic skill list are only partially
available to all players. To gain profience in the more specialized
skills a player will have to join a guild. The file 'guilds' has a
special chapter about this.

Guilds that you cannot join (read: rooms like the Adventurers Guild)
may not offer more than a total education of 400 skillevels from the
basic skill list below. Simply add all maximum training levels of all
skills you offer, and see if it is below 400. This leaves you free in
the choice of how many basic skills can be trained, and how high you
allow those basic skills to be trained, as long as you keep in mind the
list below.  A guild may train skill levels 1-90. Skill levels 91-100
are reserved for special training conditions. Examples of such
conditions are quests, duels, mobile and secritive masters etc.

The skills listed below here could be available in any guild up to the
stated level.

Generally available skill	max level	Description
=========================	=========	===========
SS_WEP_*			30		All weapon skills
SS_SPELLCRAFT			20		General spellcraft
SS_APPR_MON			50		Appraise an opponent
SS_APPR_OBJ			50		Find out properties of an obj.
SS_APPR_VAL			50		Value an object
SS_OPEN_LOCK			20		Pick locks
SS_PICK_POCKET			20		Pick pockets
SS_HIDE				50		Hide inside rooms
SS_SNEAK			50		Sneak into rooms
SS_SWIM				50		Swim
SS_CLIMB			50		Climb
SS_ANI_HANDL			50		Handle animals
SS_LOC_SENSE			50		Know where you are
SS_TRACKING			50		Track something in the wild
SS_HUNTING			50		Hunt for a living
SS_LANGUAGE			50		Speak other languages
SS_AWARENESS			50		Be wary of backstab/sneak/hide
SS_TRADING			30		Trade with profit

