2000Q1/
<!-- MHonArc v2.4.4 -->
<!--X-Subject: Re: [MUD&#45;Dev] [CODE] unique items -->
<!--X-From-R13: "Renlzbbe" <svouhsxlNrebyf.pbz> -->
<!--X-Date: Sun, 19 Mar 2000 21:26:18 &#45;0800 -->
<!--X-Message-Id: 009a01bdfb91$bdae7a40$66dd7ad1@gd0rh -->
<!--X-Content-Type: text/plain -->
<!--X-Head-End-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>MUD-Dev message, Re: [MUD-Dev] [CODE] unique items</title>
<!-- meta name="robots" content="noindex,nofollow" -->
<link rev="made" href="mailto:fibhufky#erols,com">
</head>
<body background="/backgrounds/paperback.gif" bgcolor="#ffffff"
      text="#000000" link="#0000FF" alink="#FF0000" vlink="#006000">

  <font size="+4" color="#804040">
    <strong><em>MUD-Dev<br>mailing list archive</em></strong>
  </font>
      
<br>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
<br clear=all><hr>
<!--X-Body-Begin-->
<!--X-User-Header-->
<!--X-User-Header-End-->
<!--X-TopPNI-->

Date:&nbsp;
[&nbsp;<a href="msg00666.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00668.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Thread:&nbsp;
[&nbsp;<a href="msg00671.html">Previous</a>
&nbsp;|&nbsp;<a href="msg00670.html">Next</a>
&nbsp;]
&nbsp;&nbsp;&nbsp;&nbsp;
Index:&nbsp;
[&nbsp;<A HREF="author.html#00667">Author</A>
&nbsp;|&nbsp;<A HREF="#00667">Date</A>
&nbsp;|&nbsp;<A HREF="thread.html#00667">Thread</A>
&nbsp;]

<!--X-TopPNI-End-->
<!--X-MsgBody-->
<!--X-Subject-Header-Begin-->
<H1>Re: [MUD-Dev] [CODE] unique items</H1>
<HR>
<!--X-Subject-Header-End-->
<!--X-Head-of-Message-->
<UL>
<LI><em>To</em>: &lt;<A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A>&gt;</LI>
<LI><em>Subject</em>: Re: [MUD-Dev] [CODE] unique items</LI>
<LI><em>From</em>: "Draymoor" &lt;<A HREF="mailto:fibhufky#erols,com">fibhufky#erols,com</A>&gt;</LI>
<LI><em>Date</em>: Mon, 19 Oct 1998 14:53:19 -0400</LI>
<LI><em>Reply-To</em>: <A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A></LI>
<LI><em>Sender</em>: <A HREF="mailto:mud-dev-admin#kanga,nu">mud-dev-admin#kanga,nu</A></LI>
</UL>
<!--X-Head-of-Message-End-->
<!--X-Head-Body-Sep-Begin-->
<HR>
<!--X-Head-Body-Sep-End-->
<!--X-Body-of-Message-->
<PRE>
-----
From: J. Coleman &lt;stormknight#alltel,net&gt;

&gt;Does anyone know a good way to handle unique items? I want to have
&gt;players able to make magic items themselves, that are completely custom.
&gt;Magic items in my game will be fairly powerful because of their rarity,
&gt;and the fact that they must be created, and not found. Is there a good
&gt;clean way to keep an "index" file of all magic items that have been
&gt;created this way, and to reference player files to it perhaps? How does
&gt;everyone else do this?


On my mud, ALL items are unique. The way I handle items (all game "objects")
is rather differant from the standard diku method. The main concepts of my
system are as follows:

A: There is no distinction betweens mobiles and items. Both use the same
data structure, with certain AI distintions made within the objects
individually.

B: Each game entity can be a set of rooms, a mob, a player (which can be
either mob-like or an intelligent object), an item or structure of some
sort, a planet, whatever.

C: There are three basic components to any game entity. The Body (Physical
Data), the Mind (AI and mental data), and the Player (players data if the
entity is controlled by a player)

D: The mind is stored in the Body, the Player is stored in the Mind, and the
Body is stored within an Active Room

E: Rooms are stored as a grid of pointers to Room Data within the Body data.

F: Each body contains a linked list of active room structures (rooms on the
grid with other bodies in them). Each of these contains a pointer to the
room data (taken from the grid), the coordinate of the room (4 dimensional
coordinates, X, Y, Z, Body ID), and a linked list of bodies in the room.

G: There is code-created active room that serves like the root for all other
bodies.

The way the system works, there IS no index of objects. When the database is
loaded, the root ActiveRoom is loaded, which is the only activeroom not
inside of a body. That room would contain a body which would have the main
world grid on it and all the active rooms within that world. All active
rooms within the body would be loaded after the body, and each body within
it would be loaded, also checking for active rooms, until everything in the
tree is loaded.

Parsing is similar. I parse the root room with an update_room, then
update_room loops through the bodies in the room, calling update_body on
each, then the update_body would call update_mind (which would update the
player player if there is one), and loop through all the active rooms,
updating them.


This system is nice because it makes the world 100% persistant. Mobs
remember where they are after a reboot, as well as anything else. There are
no formal resets. However, I use special root room where "destroyed"
entities are sent by default. Any repop or resurrection would be handled by
scripts.

There is one thing that might be viewed as a downside, and that is that each
entity is unique. This system works wonderfully for small worlds. For large
worlds (Like I plan mine to be), a special object copy command would be
essencial.

Also, the rooms do use a sort of template system. The same room data can be
assigned to multiple rooms (with exit variables of course). This allows you
to make a large forest of the same statistics, and exit types. The exits can
be defined to either a specific coordinate or to an adjacent grid coordinate
(automatic, used for true templates, like the forest).


Sorry if I went a bit off topic from the original question and into a rant
about my own system. Hope this helps.


--------------------------------------
Philip Loguinov
 Head Coder:   NirvanaDev
   Head Admin: Timeless Journies

Email: fibhufky#erols,com






_______________________________________________
MUD-Dev mailing list
MUD-Dev#kanga,nu
<A  HREF="http://www.kanga.nu/lists/listinfo/mud-dev">http://www.kanga.nu/lists/listinfo/mud-dev</A>

</PRE>

<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<HR>
<ul compact><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><A NAME="00670" HREF="msg00670.html">Re: [MUD-Dev] [CODE] unique items</A></strong>
<ul compact><li><em>From:</em> Marc Bowden &lt;ryumo#merit,edu&gt;</li></ul>
</UL></LI></UL>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<UL>
<LI>Prev by Date:
<STRONG><A HREF="msg00666.html">Re: [MUD-Dev] [CODE] unique items</A></STRONG>
</LI>
<LI>Next by Date:
<STRONG><A HREF="msg00668.html">Re: [MUD-Dev] [CODE] unique items</A></STRONG>
</LI>
<LI>Prev by thread:
<STRONG><A HREF="msg00671.html">[MUD-Dev] Licensing and Clauses</A></STRONG>
</LI>
<LI>Next by thread:
<STRONG><A HREF="msg00670.html">Re: [MUD-Dev] [CODE] unique items</A></STRONG>
</LI>
<LI>Index(es):
<UL>
<LI><A HREF="index.html#00667"><STRONG>Date</STRONG></A></LI>
<LI><A HREF="thread.html#00667"><STRONG>Thread</STRONG></A></LI>
</UL>
</LI>
</UL>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
<ul><li>Thread context:
<BLOCKQUOTE><UL>
<LI><STRONG>RE: [MUD-Dev] Object and class heirarchies -- are they really necessary?</STRONG>, <EM>(continued)</EM>
<ul compact>
<LI><strong><A NAME="00756" HREF="msg00756.html">RE: [MUD-Dev] Object and class heirarchies -- are they really necessary?</A></strong>, 
Brian Ashburn <a href="mailto:BAshburn#us-south,net">BAshburn#us-south,net</a>, Tue 28 Mar 2000, 20:18 GMT
</LI>
<LI><strong><A NAME="00782" HREF="msg00782.html">Re: [MUD-Dev] Object and class heirarchies -- are they really necessary?</A></strong>, 
cg <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Wed 29 Mar 2000, 02:38 GMT
</LI>
</ul>
</LI>
<LI><strong><A NAME="00672" HREF="msg00672.html">[MUD-Dev] The Meta list is now open and active.</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Mon 20 Mar 2000, 18:58 GMT
<LI><strong><A NAME="00671" HREF="msg00671.html">[MUD-Dev] Licensing and Clauses</A></strong>, 
Chris Jacobson <a href="mailto:fear#technologist,com">fear#technologist,com</a>, Mon 20 Mar 2000, 17:35 GMT
<LI><strong><A NAME="00667" HREF="msg00667.html">Re: [MUD-Dev] [CODE] unique items</A></strong>, 
Draymoor <a href="mailto:fibhufky#erols,com">fibhufky#erols,com</a>, Mon 20 Mar 2000, 05:26 GMT
<UL>
<LI><strong><A NAME="00670" HREF="msg00670.html">Re: [MUD-Dev] [CODE] unique items</A></strong>, 
Marc Bowden <a href="mailto:ryumo#merit,edu">ryumo#merit,edu</a>, Mon 20 Mar 2000, 17:35 GMT
</LI>
</UL>
<UL>
<li>&lt;Possible follow-up(s)&gt;<br>
<LI><strong><A NAME="00668" HREF="msg00668.html">Re: [MUD-Dev] [CODE] unique items</A></strong>, 
cg <a href="mailto:cg#ami-cg,GraySage.Edmonton.AB.CA">cg#ami-cg,GraySage.Edmonton.AB.CA</a>, Mon 20 Mar 2000, 06:32 GMT
</LI>
</UL>
</LI>
<LI><strong><A NAME="00664" HREF="msg00664.html">[MUD-Dev] Kanga.Nu has a new IP</A></strong>, 
J C Lawrence <a href="mailto:claw#kanga,nu">claw#kanga,nu</a>, Mon 20 Mar 2000, 01:38 GMT
<LI><strong><A NAME="00650" HREF="msg00650.html">[MUD-Dev] Star Wars gmud?</A></strong>, 
Nathan F Yospe <a href="mailto:yospe#hawaii,edu">yospe#hawaii,edu</a>, Fri 17 Mar 2000, 17:44 GMT
</UL></BLOCKQUOTE>

</ul>
<hr>
<center>
[&nbsp;<a href="../">Other Periods</a>
&nbsp;|&nbsp;<a href="../../">Other mailing lists</a>
&nbsp;|&nbsp;<a href="/search.php3">Search</a>
&nbsp;]
</center>
<hr>
</body>
</html>