<!-- MHonArc v2.4.4 --> <!--X-Subject: Re: [MUD-Dev] [CODE] unique items --> <!--X-From-R13: "Chmnu" <dhmnuNubgznvy.pbz> --> <!--X-Date: Sun, 19 Mar 2000 17:42:45 -0800 --> <!--X-Message-Id: 20000319190506.81257.qmail#hotmail,com --> <!--X-Content-Type: text/plain --> <!--X-Reference: Marcel-1.46-0316215352-0b0Ky&5#catling,demon.nl --> <!--X-Reference: 00bd01bf903c$b28d37a0$0d00a8c0#wombatgames,com --> <!--X-Reference: 38D51245.6ADC#alltel,net --> <!--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:quzah#hotmail,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> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] <br clear=all><hr> <!--X-Body-Begin--> <!--X-User-Header--> <!--X-User-Header-End--> <!--X-TopPNI--> Date: [ <a href="msg00663.html">Previous</a> | <a href="msg00661.html">Next</a> ] Thread: [ <a href="msg00666.html">Previous</a> | <a href="msg00665.html">Next</a> ] Index: [ <A HREF="author.html#00662">Author</A> | <A HREF="#00662">Date</A> | <A HREF="thread.html#00662">Thread</A> ] <!--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>: <<A HREF="mailto:mud-dev#kanga,nu">mud-dev#kanga,nu</A>></LI> <LI><em>Subject</em>: Re: [MUD-Dev] [CODE] unique items</LI> <LI><em>From</em>: "Quzah" <<A HREF="mailto:quzah#hotmail,com">quzah#hotmail,com</A>></LI> <LI><em>Date</em>: Sun, 19 Mar 2000 11:07:40 -0800</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 <stormknight#alltel,net> Subject: [MUD-Dev] [CODE] unique items > Didn't see this in the faq anywhere, and I can't seem to find any good > implementations of it anywhere, so here goes: > > Does anyone know a good way to handle unique items? I want to have > players able to make magic items themselves, that are completely custom. > Magic items in my game will be fairly powerful because of their rarity, > and the fact that they must be created, and not found. Is there a good > clean way to keep an "index" file of all magic items that have been > created this way, and to reference player files to it perhaps? How does > everyone else do this? > > -Justin I'll assume you're using a diku variant, as you haven't told us what you are using. The rest is easy. Since you're probably using vnums, just set the unique items to -N or something like that. Store all unique items in a seperate file. Load the file when the game boots. Save it when you shut down or make any changes to the items. In the player file, just simply do something like: UniqueItem NumberOfItem Piece of cake. (This assumes you use keyword/value pairs, which I highly recommend over your typical diku-dump of values.) The 'NumberOfItem' would represent the number in the list. Each item in the list would be the next highest available -N number. Thus, the first one would be vnum -1, the second as -2, and so on. Since they are unique, you just fully construct them/store them in your unique item file, rather than reconstruct them from a vnum/template. That's probably the simplest way to handle it. (Unless you just add a bit flag for "unique" and fully save/fully load all data from player files, but then you still have to make an index of them all ... so my suggestion is better than that, or so I think.) Quzah. _______________________________________________ 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="00665" HREF="msg00665.html">Re: [MUD-Dev] [CODE] unique items</A></strong> <ul compact><li><em>From:</em> "J. Coleman" <stormknight#alltel,net></li></ul> </UL></LI></UL> <!--X-Follow-Ups-End--> <!--X-References--> <UL><LI><STRONG>References</STRONG>: <UL> <LI><STRONG><A NAME="00637" HREF="msg00637.html">[MUD-Dev] MudDev FAQ part 1</A></STRONG> <UL><LI><EM>From:</EM> Marian Griffith <gryphon#iaehv,nl></LI></UL></LI> <LI><STRONG><A NAME="00651" HREF="msg00651.html">Re: [MUD-Dev] MudDev FAQ part 1</A></STRONG> <UL><LI><EM>From:</EM> "Todd McKimmey" <rufus#wombatgames,com></LI></UL></LI> <LI><STRONG><A NAME="00659" HREF="msg00659.html">[MUD-Dev] [CODE] unique items</A></STRONG> <UL><LI><EM>From:</EM> "J. Coleman" <stormknight#alltel,net></LI></UL></LI> </UL></LI></UL> <!--X-References-End--> <!--X-BotPNI--> <UL> <LI>Prev by Date: <STRONG><A HREF="msg00663.html">Re: [MUD-Dev] [CODE] unique items</A></STRONG> </LI> <LI>Next by Date: <STRONG><A HREF="msg00661.html">Re: [MUD-Dev] [CODE] unique items</A></STRONG> </LI> <LI>Prev by thread: <STRONG><A HREF="msg00666.html">Re: [MUD-Dev] [CODE] unique items</A></STRONG> </LI> <LI>Next by thread: <STRONG><A HREF="msg00665.html">Re: [MUD-Dev] [CODE] unique items</A></STRONG> </LI> <LI>Index(es): <UL> <LI><A HREF="index.html#00662"><STRONG>Date</STRONG></A></LI> <LI><A HREF="thread.html#00662"><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] MudDev FAQ part 1</STRONG>, <EM>(continued)</EM> <ul compact> <LI><strong><A NAME="00651" HREF="msg00651.html">Re: [MUD-Dev] MudDev FAQ part 1</A></strong>, Todd McKimmey <a href="mailto:rufus#wombatgames,com">rufus#wombatgames,com</a>, Fri 17 Mar 2000, 19:00 GMT <UL> <LI><strong><A NAME="00659" HREF="msg00659.html">[MUD-Dev] [CODE] unique items</A></strong>, J. Coleman <a href="mailto:stormknight#alltel,net">stormknight#alltel,net</a>, Sun 19 Mar 2000, 18:25 GMT <UL> <LI><strong><A NAME="00663" HREF="msg00663.html">Re: [MUD-Dev] [CODE] unique items</A></strong>, Ben Greear <a href="mailto:greearb#candelatech,com">greearb#candelatech,com</a>, Mon 20 Mar 2000, 01:42 GMT <UL> <LI><strong><A NAME="00666" HREF="msg00666.html">Re: [MUD-Dev] [CODE] unique items</A></strong>, Kevin Scott London <a href="mailto:london#cs,utk.edu">london#cs,utk.edu</a>, Mon 20 Mar 2000, 05:26 GMT </LI> </UL> </LI> <LI><strong><A NAME="00662" HREF="msg00662.html">Re: [MUD-Dev] [CODE] unique items</A></strong>, Quzah <a href="mailto:quzah#hotmail,com">quzah#hotmail,com</a>, Mon 20 Mar 2000, 01:42 GMT <UL> <LI><strong><A NAME="00665" HREF="msg00665.html">Re: [MUD-Dev] [CODE] unique items</A></strong>, J. Coleman <a href="mailto:stormknight#alltel,net">stormknight#alltel,net</a>, Mon 20 Mar 2000, 05:26 GMT </LI> </UL> </LI> <LI><strong><A NAME="00661" HREF="msg00661.html">Re: [MUD-Dev] [CODE] unique items</A></strong>, Matthew Mihaly <a href="mailto:diablo#best,com">diablo#best,com</a>, Mon 20 Mar 2000, 01:42 GMT </LI> <LI><strong><A NAME="00669" HREF="msg00669.html">Re: [MUD-Dev] [CODE] unique items</A></strong>, Lord Ashon <a href="mailto:ashon#wsunix,wsu.edu">ashon#wsunix,wsu.edu</a>, Mon 20 Mar 2000, 17:35 GMT </LI> <LI><strong><A NAME="00674" HREF="msg00674.html">Re: [MUD-Dev] [CODE] unique items</A></strong>, J C Lawrence <a href="mailto:claw#cp,net">claw#cp,net</a>, Tue 21 Mar 2000, 20:24 GMT </LI> </UL> </LI> </UL> </LI> </ul> </LI> </UL></BLOCKQUOTE> </ul> <hr> <center> [ <a href="../">Other Periods</a> | <a href="../../">Other mailing lists</a> | <a href="/search.php3">Search</a> ] </center> <hr> </body> </html>