daleken/
daleken/data/notes/
daleken/data/player/
daleken/data/system/poses/
daleken/doc/Homepage/images/
daleken/log/
<html>
<head>
<title>Player File Information</title>
<link rel="stylesheet" type="text/css" href="doc.css"
      title="Documentation Standard Style">
</head>
<body bgcolor="#ffffff">

<table class="main" width="600" border="0">
<tr><td>
<div align="right">
DalekenMUD 1.12 documentation.
<br>Updated 9 November 2000.
</div>
</td></tr>

<tr><th class="heading">
<h1>Player File Information</h1>
</th></tr>

<tr><td>

<p>Player files are ASCII files.  These are in the format described in <a href="files.html">files.html</a>, you should read this file before continuing here.</p>

<p>A player file contains a single player section, named <code>Char</code>, that in turn contains one or more object sections.</p>

<p>An old Internet dictum says 'be conservative in what you send and liberal in what you accept'.  Thus Daleken writes player files in a fixed order, but accepts flexible ordering, partial files, et cetera.  Standard rules apply to assigning default values and chaining linked lists (see <a href="files.html">files.html</a>).</p>

<p>Players are saved with their equipment off.  This differs with the orginal Envy and means that modifications to objects can be made between times the player is logged on without adverse effects like having to clear the character's affects.  Special care is taken that the correct race and sex are saved as these can be modified.  The upshot of this is that only permanent attributes are saved in a player's file, all modifiers are applied after loading.</p>

<p>Within an <code>Obj</code> section all the object values, including the object's current wear location are saved.  Objects which have been 'oset' retain all of
their values.  Here editing an object which is currently being worn requires
no extra care; the corresponding <code>Char</code> state will be changed
accordingly.</p>

<p>Object nesting is handled specially using a simple inclusion within the <code>{}</code> block of the container object.  Thus the position of curly braces is critical in determining how objects are nested.</p>

<p>You may add new fields to players and objects.  Because of the
line-oriented ASCII format, changing a structure size in <code>types.h</code>
will never invalidate a player file.  Naturally, you must ensure that when an
old file which does not contain a line for a new field is read in, the new
field is set to some reasonable default value.  This is done by using the
database reading structures properly (see <a href="files.html">files.html</a>
for more information).</p>

</td></tr>

<tr><th class="heading">
<h2>How to Add a New Character Field</h2>
</th></tr>

<tr><td>
<ol>
<li>Add the field to the appropriate structure in <code>merc.h</code>.</li>
<li>Initialize the field in <code>create_char</code> or
    <code>clear_char</code> in <code>db.c</code>.</li>
<li>Add fields to the data description tables in db_io.c</li>
<li>If necessary implement the special Read/Write/Fix function for the data.</li>
<li>Use the field.</li>
</ol>

</td></tr>

<tr><th class="heading">
<h2>How to Add a New Object Fields</h2>
</th></tr>

<tr><td>
<ol>
<li>Add the field to the appropriate structure in <code>types.h</code>.</li>
<li>Initialize the field in <code>create_object</code> in
    <code>db.c</code>.</li>
<li>Add fields to the data description tables in db_io.c</li>
<li>If necessary implement the special Read/Write/Fix function for the data.</li>
</ol>

</td></tr>

<tr><th class="heading">
<h2>Immortal Commands</h2>
</th></tr>

<tr><td>

<p>This is a complete list of what can be saved for a player character.  Note that some of these fields will be missing in a file, as they are default.</p>

<b>Char</b> {
<dl>
<dt>Name</dt><dd>The name of the character (number).</dd>
<dt>Level</dt><dd>The level of the character (number).</dd>
<dt>Trust</dt><dd>The immortal level of the character (number).</dd>
<dt>SubLevel</dt><dd>The sublevel of the character (number).</dd>
<dt>Race</dt><dd>The immortal level of the character (number:race).</dd>
<dt>Class</dt><dd>The class of the character (number:class).</dd>
<dt>ShortDesc</dt><dd>A short description, setname. (string).</dd>
<dt>LongDesc</dt><dd>A longer description. (string).</dd>
<dt>Desc</dt><dd>The longest description. (string).</dd>
<dt>Sex</dt><dd>The sex of the character (number:sex).</dd>
<dt>InRoom</dt><dd>Where the character is. (number).</dd>
<dt>Recall</dt><dd>The character's recall point. (number).</dd>
<dt>Played</dt><dd>Time played in seconds. (number).</dd>
<dt>Hp</dt><dd>Hits. (number).</dd>
<dt>MaxHp</dt><dd>Maximum hits. (number).</dd>
<dt>Mana</dt><dd>Mana array. (number).</dd>
<dt>MaxMana</dt><dd>Maximum mana array. (number).</dd>
<dt>Move</dt><dd>Moves. (number).</dd>
<dt>MaxMove</dt><dd>Maximum moves. (number).</dd>
<dt>Gold</dt><dd>Gold amount carried. (number).</dd>
<dt>Tnl</dt><dd>To Next Level experience. (number).</dd>
<dt>Pos</dt><dd>Position. (number:position).</dd>
<dt>Prac</dt><dd>Number of unspent practices. (number).</dd>
<dt>Align</dt><dd>Alignment. (number).</dd>
<dt>Wimpy</dt><dd>Flee threshold. (number).</dd>
<dt>Deaf</dt><dd>Bits for blocking channels. (number:channel).</dd>
<dt>Parts</dt><dd>Body parts. (number:limbs).</dd>
<dt>Damaged</dt><dd>Damaged body parts. (number:limbs).</dd>
<dt>Wimpy</dt><dd>Flee threshold. (number).</dd>
<dt>Act</dt><dd>Config flags. (number/vector:act).</dd>
<dt>Affect {</dt><dd>Composite object affects.
	<dl>
	<dt>Name</dt><dd>Skill number (number:skill).</dd>
	<dt>Duration</dt><dd>Remaining time (number).</dd>
	<dt>Level</dt><dd>Caster level/spell power (number).</dd>
	<dt>Location</dt><dd>What the affect applys to (number:apply).</dd>
	<dt>Modifier</dt><dd>How much affect it has (number).</dd>
	<dt>Bits</dt><dd>Bit affects (number/vector:affect).</dd>
	</dl> }
</dd>
<dt>Event {</dt><dd>Impending events.
	<dl>
	<dt>When</dt><dd>Time remaining (number).</dd>
	<dt>Type</dt><dd>Event type (number:event).</dd>
	<dt>Flags</dt><dd>Event flags (number:evextra).</dd>
	<dt>Text</dt><dd>Additional saved string (string).</dd>
	<dt>Data</dt><dd>Additional saved numbers (number).</dd>
	</dl> }
</dd>
<dt>PcData {</dt><dd>Player character only information.
	<dl>
	<dt>Title</dt><dd>Character's title (string).</dd>
	<dt>Prompt</dt><dd>Prompt (string).</dd>
	<dt>Password</dt><dd>Encrypted password (string).</dd>
	<dt>ImmName</dt><dd>Special immortal title (string).</dd>
	<dt>Bamfin</dt><dd>Goto arrival message (string).</dd>
	<dt>Bamfout</dt><dd>Goto leave message (string).</dd>
	<dt>Setmin</dt><dd>Arrival message (string).</dd>
	<dt>Setmout</dt><dd>Leave message (string).</dd>
	<dt>ImmSkill</dt><dd>Access to immortal commands (string).</dd>
	<dt>Familiar</dt><dd>Familiar's hitpoints (number).</dd>
	<dt>Bounty</dt><dd>Gold bounty (number).</dd>
	<dt>Killed</dt><dd>Number of kills (number).</dd>
	<dt>Died</dt><dd>Number of deaths (number).</dd>
	<dt>Strength</dt><dd>Strength attribute (number).</dd>
	<dt>Intelligence</dt><dd>Intelligence attribute (number).</dd>
	<dt>Wisdom</dt><dd>Wisdom attribute (number).</dd>
	<dt>Dexterity</dt><dd>Dexterity attribute (number).</dd>
	<dt>Constitution</dt><dd>Constitution attribute (number).</dd>
	<dt>Magic</dt><dd>Magic attribute by sphere (number).</dd>
	<dt>Thirst</dt><dd>Need to drink (number).</dd>
	<dt>Full</dt><dd>Stomach level (number).</dd>
	<dt>Drunk</dt><dd>Inebriation level (number).</dd>
	<dt>Bank</dt><dd>Bank account balance (number).</dd>
	<dt>Page</dt><dd>Pager length (number).</dd>
	<dt>Security</dt><dd>OLC Security (number).</dd>
	<dt>Language</dt><dd>What language is spoken (number:language).</dd>
	<dt>Quest {</dt><dd>Complex quest object.
		<dl>
		<dt>Time</dt><dd>Time remaining (number).</dd>
		<dt>Score</dt><dd>Quest points (number).</dd>
		</dl> }
	</dd>
	<dt>Board</dt><dd>Last note read by board (number).</dd>
	<dt>Religion</dt><dd>Player's religion (special).</dd>
	<dt>Clan</dt><dd>Player's clan/guild/order (special).</dd>
	<dt>Multiclass</dt><dd>Skill in each class (number).</dd>
	<dt>Skill</dt><dd>Skill level by skill (number).</dd>
	<dt>Alias {</dt><dd>Compex alias object list.
		<dl>
		<dt>Name</dt><dd>Name/Keyword (string).</dd>
		<dt>Command</dt><dd>Command list (string).</dd>
		</dl> }
	</dd>
	</dl> }
</dd>
<dt>Obj {</dt><dd>Objects that are carried.
	<dl>
	<dt>Vnum</dt><dd>Object's virtual number (number).</dd>
	<dt>Key</dt><dd>The unique key for the object (number).</dd>
	<dt>Name</dt><dd>Name/keywords (string).</dd>
	<dt>ShortDesc</dt><dd>Short description (string).</dd>
	<dt>Desc</dt><dd>Long description (string).</dd>
	<dt>Action</dt><dd>Action message (string).</dd>
	<dt>Required</dt><dd>Required skill (number:skill).</dd>
	<dt>Extra</dt><dd>Extra flags (number:extra).</dd>
	<dt>Wear</dt><dd>Possible wear locations (number:wear).</dd>
	<dt>Location</dt><dd>Current wear location (number:wear-loc).</dd>
	<dt>Type</dt><dd>Object type (number:type).</dd>
	<dt>Level</dt><dd>Object level (number).</dd>
	<dt>Weight</dt><dd>Weight (number).</dd>
	<dt>Cost</dt><dd>Base gold cost (number).</dd>
	<dt>Condition</dt><dd>Condition/1000 (number).</dd>
	<dt>Affect {</dt><dd>Complex affect - same as for Char, but without Duration. }</dd>
	<dt>ExDesc {</dt><dd>An extra description.
		<dl>
		<dt>Keyword</dt><dd>Name/Keywords (string).</dd>
		<dt>Text</dt><dd>Description text (string).</dd>
		</dl> }
	</dd>
	<dt>Event {</dt><dd>Complex event - same as for Char. }</dd>
	<dt>Values</dt><dd>Array of type specific values (number).</dd>
	<dt>Obj {</dt><dd>Nested objects, this has the same format as here. }</dd>
	</dl>
</dd>

</dl>

</td></tr>

<tr><th class="heading">
<h2>Immortal Commands</h2>
</th></tr>

<tr><td>

<p>Immortal commands in Daleken are considered Skills.  Each command is
stored as a string in the field Immskill.  Each immortal must have the level
and the string in the field Immskill in order to use that particular imm
command. This allows for customized immortals with customized skills.</p>

<p>To give an immortal a particular imm skill, edit the playerfile with your
favorite text editor and add in the <code>Char|PcData</code> section:</p>

<pre>
Immskill	"wizhelp";
</pre>

<p>As an example:</p>

<pre>
Char {
Name		"Kahn";
...
PcData {
Immskill	"imtlset mset sset advance";
...

};
};
</pre>
</td></tr>
</table>
</body>
</html>