MudOS mudlib 0.9 doesn't have a system of either levels or experience points. A player's abilities are completely summed up by his statistics, which are permanent and unchanging, and his skills, which improve with use at a rate depending on the underlying statistics. (For traditionalists, we plan to offer a XP system in the not-too-distant future.) Statistics are meant to represent the player's intrinsic abilities. The default mudlib comes with four: strength, intelligence, dexterity, and constitution. They are stored as part of the player properties in a mapping called stat. You can reference each individual stat by using the nested mapping calls: ie, strength = query("stat/strength"). They are distributed randomly from 5-25 with racial modifiers. At the moment, this is the only impact race has on the game. There is no way to change them in the default mudlib, by conscious design decision. Skills, in contrast, represent the part of the players' abilities that can be improved. Skills are not stored as part of the player's properties. Instead, it is declared as a seperate variable in /std/living/skills.c, and all living objects inherit it. There are 12 player skills in the default mudlib; five combat skills, four magic skills, and three miscellaneous skills. These skills are initialized when the player's save file is created, and that is the only place where they are explicitly listed in the mudlib, so that if you want to add new skills or remove existing ones that is the only place you have to change them. In all other places in the mudlib, the skills are stored in a mapping variable and anything in the mapping is presumed to be a skill. Skills are set in the player object by calling set_skill(). Set_skill takes three arguments. The first argument is the name of the skill, ie "Thrusting weapons". The names are case-sensitive: in the default mudlib all skill names start with capital letters. The second argument is the number the skill is to be set to. The third argument is the statistic which controls how rapidly the player can advance in the skill. This should only be called once, from creation.c. For example, you might initialize a skill in your character creation progam with something like this: set_skill ("Document writing", 12, "intelligence") ; which would create a skill in the player (or possibly monster) called Document writing (case matters) which is set at a level of 12 and whose advancement is controlled by the intelligence statistic. Each time a player uses a skill, he is credited with a number of skill use points for doing so. If he accumulates enough use points, his skill level rises by one point. The number of skill points needed to increase the skill level from level N to level N+1 is (50-stat)*(2N+1), where stat is the relevant statistic (str, int, dex, con) set in the set_skill call. Thus, the player's skill level is proportional to the square of his total use points (trust me, that's how that formula works out). You give a player use points by calling the function improve_skill(). Improve_skill takes two arguments, the first being the skill to improve and the second being the number of use points to credit. Since the combat skills are most frequently used, using them earns one use point, and the points of other actions are scaled to make each skill advance at about the same rate. For example, the heal spell and the missile spell credit you with 5 use points for casting them, while the fireball spell credits 10 (since it costs more sp). This is the most common method of improving a player's skills. For example, when a player successfully steals an item from a monster, we call this: improve_skill ("Theft", 10) ; which credits the player with 10 skill use points in Theft. It is also possible to give a player a temporary increase in his skills, say through a magic spell or through drugs or some such. To do this, you can call the function modify_skill. It takes three arguments: the name of the skill, the amount by which the skill level should be raised, and the time that which the raise is to be in effect. The "raise" can be negative, so that this can also be used to lower a player's abilities, although it does not check for the skill to be non-negative: you have to do this yourself, unless you want to permit negative skill levels (which you may or may not want.) You can find the player's current skill level, including temporary modifications, with the function query_skill(). It takes one argument, which is the skill name, and returns the skill level. There are two other query functions: query_skills returns the skill levels mapping and query_skill_points returns the mapping of the use points needed to improve to the next level. As with all mappings, a pointer to the true object is returned so any changes will be reflected in the player object. There are two other functions of note defined in the skill system which you should not use generally but which may have some use. The first is init_skills, which initializes the skill mapping if it does not already exist. This is called at creation. The second is change_skill_level, which takes a skill name and an int as arguments and sets the skill level to the int, without affecting either the related statistic or the points. You should not use this to improve skills through usage - call improve_skill for that - but you should use it when you want to change the skill level other than by improvement with use. In the default mudlib it is called only from the guilds, when a player trains in a skill. Mobydick@TMI-2 11-13-92