MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
Re: [MUD-Dev] [CODE] unique items
"J. Coleman" wrote:
>
> 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
>
> _______________________________________________
> MUD-Dev mailing list
> MUD-Dev#kanga,nu
> http://www.kanga.nu/lists/listinfo/mud-dev
I reference the base object (though this object may not be found 'in the game').
I then copy it in memory, so that it is a unique instance, and make whatever
changes are needed. To save it, I write it into the pfile (player's file).
This is different from non-modified objects, which I just write as a number
(ie kind of a database ID).
At the time that I load the player into the game, I instantiate new objects
for all of the modified ones that were written out fully, and add a simple
pointer to the base object for those that are written out as numbers only
(non modified.)
That help any?
Ben
--
Ben Greear (greearb#candelatech,com) http://scry.wanfear.com/~greear
Author of ScryMUD: scry.wanfear.com 4444 (Released under GPL)
http://scry.wanfear.com
_______________________________________________
MUD-Dev mailing list
MUD-Dev#kanga,nu
http://www.kanga.nu/lists/listinfo/mud-dev
- Thread context:
- [MUD-Dev] Fw: [RRE]MediaMOO birthday Celebration, March 20th 2000!!!,
Bruce bruce#cubik,org, Fri 17 Mar 2000, 02:36 GMT
- [MUD-Dev] MudDev FAQ part 1,
Marian Griffith gryphon#iaehv,nl, Thu 16 Mar 2000, 22:27 GMT
- Re: [MUD-Dev] MudDev FAQ part 1,
Todd McKimmey rufus#wombatgames,com, Fri 17 Mar 2000, 19:00 GMT
- [MUD-Dev] [CODE] unique items,
J. Coleman stormknight#alltel,net, Sun 19 Mar 2000, 18:25 GMT
- Re: [MUD-Dev] [CODE] unique items,
Ben Greear greearb#candelatech,com, Mon 20 Mar 2000, 01:42 GMT
- Re: [MUD-Dev] [CODE] unique items,
Quzah quzah#hotmail,com, Mon 20 Mar 2000, 01:42 GMT
- Re: [MUD-Dev] [CODE] unique items,
Matthew Mihaly diablo#best,com, Mon 20 Mar 2000, 01:42 GMT
[ Other Periods
| Other mailing lists
| Search
]