The -seed command and objects
#5
Thrugg,Mar 11 2004, 07:28 PM Wrote:I think you're talking about the very involved discussion we had on the diabloii.net single player forum after someone found a Tyrael's Might after using -seed.
It was a while back though and it is a very busy forum.

I am a little surprised by the idea that the object seed is used for both type and quality - no reason to doubt of course but then can you explain the rack-running process?  When you hit the same rack over and over in single play, it will drop the same item type (always in most cases, but with some variety in others).  However, the quality of the item varies around seemingly randomly.

My explanation (with no basis from code digging, just educated guessing) is that the rack is created when the map is created, and since the map seed is retained in SP the rack is given the same object seed every time, and this means it drops the same item every time.  That it varies can possibly be explained by the fact that it might not be created until it is "spawned", like a monster - eg a rack right next to a WP will always drop the same, but if you have to run to it, the path you take is crucial, and if you approach from a different direction it changes the item type.  However since the quality varies randomly (no matter how careful you are), I assumed that was being determined from the global random stream, not the rack's object seed.  Otherwise repitition would be more serious than it seems.

Of course racks and monsters may work more differently than I have been assuming.  I realise the quality of a rack drop is worked out through an entirely different bit of code.
Hmmm, let me think again :)

Anyway, picking base item from a TC and picking quality is all in same routine so coupled. The seed used there is....hmm.....have to check again :) Racks does NOT however pick base item and quality through that function and thus works differently. Have not checked it out lately though. I would suspect the common object seed is used in part since it is a pramatere to all object functions.
There are three types of people in the world. Those who can count and those who can't.
Reply


Messages In This Thread
The -seed command and objects - by Jarulf - 03-10-2004, 05:26 PM
The -seed command and objects - by bernard shakey - 03-10-2004, 08:01 PM
The -seed command and objects - by librarian - 03-11-2004, 05:33 PM
The -seed command and objects - by Thrugg - 03-11-2004, 06:37 PM
The -seed command and objects - by Jarulf - 03-12-2004, 04:55 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)