Re: differentiating objects

From: Bart Lauwers (Bart.Lauwers@rug.ac.be)
Date: 05/09/95


In reply to your question,

On Tue, 9 May 1995, Melissa wrote:
> 
>    Just in case someone else has pored over this aspect of the code...
> What makes an altered item different? Such as item #100 is a dagger.
> I enchant it. what item is it now? If it's the same, then how does the 
> game know which one it is? Okay, now if I am a god, how would I stat, Id, 
> or whatever that dagger only? I typically get the first item with that 
> number, but I want the magic one.

 In fact there are two ways of storing objects, type one is the obj file
format which defines the object prototype. This prototype is the object you
will first load, create or whatever. Now then on those objects you can cast
spells and such and those adjusts make the object "changed". These 
changes are kept in the player-object files ( or any object saving code, 
should have those caracteristics saved). p.e. In the mud code it is 
objsave.c that saves the player's objects (look in the function 
obj_to_file or something like that if you want accurate description).
Any changes by spells or whatever on the object are then saved accordingly...

 Now if you are a god and you wish to stat such an item you best get to 
know the how manyeth obj of that type it is. (just use where dagger)
Then type stat 5.dagger if your dagger was on fifth place.

 Anyways I hope this helps...



This archive was generated by hypermail 2b30 : 12/07/00 PST