Page 7 of 9

Re: Bug Report: Teledahn

Posted: Wed Mar 14, 2012 6:34 pm
by Tsar Hoikas
Well, the random number generator is seeded by cavern time ;)

But in all reality, TOC is using the same script we are. You're just having really terribly awful luck. Such is how it goes with chance-based events. I could regale you with tales about my varying luck with salvaging rare items from absolute junk in Guild Wars, but I won't ;)

Re: Bug Report: Teledahn

Posted: Wed Mar 14, 2012 8:50 pm
by johnsojc
Guild Wars... endless farming... buy a salvage kit... will it be charcoal or a diamond or just some wood? Been there... done that. So far I have suppressed any urge to pre-order GW2 by renewing some interest in digging around in the guts of Uru.

Re: Bug Report: Teledahn

Posted: Thu Mar 15, 2012 12:49 pm
by Tsar Hoikas
Nah, it'll be 27 bones when you already have 800 bones in storage.

Re: Bug Report: Teledahn

Posted: Fri Mar 16, 2012 5:42 pm
by Acorn
something else about Shroomie!

I've discovered that whenever I first link in, it takes exactly 25 pulls of the feed lever before she appears. Not so random! If I hang around in Teledahn, to wait for the 4 minutes to elapse, then the pattern is more like the other shards - for example, one series following the initial 25 was 7 pulls, then 2, 2,3,1. But if I link out and then link back, I need 25 again.

I've counted 25 on five different occasions over 3 days.

For comparison, my series in minkata was 6, 0 (triggered on the path), 3,1,1,2

Does anyone else fancy checking this?

Re: Bug Report: Teledahn

Posted: Fri Mar 16, 2012 9:20 pm
by johnsojc
This seems odd as I couln't see anything in the code that might cause this. That's not to say it's not happening, only that I can't see any reason why it should.

If I'm feeling masochistic over the weekend I'll give it a try. if this is repeatable by others and is consistenly the same, then maybe the one commented out debug statement in the brain routine that returns the random number generated might be a candidate for being reenabled to print into the log on a future build so we can see just how random it really is.

Code: Select all

        #~ print "randnum = ",randnum,"probability = ", probability*100

Re: Bug Report: Teledahn

Posted: Sat Mar 17, 2012 3:25 am
by Acorn
Actually, I think it's working to a set sequence. I've had 25,7,2,3 then 25,7,2,2,3,1 then 25,7,2,3,3,1 not quite identical but one time I pulled the lever I got the sound but no animation so maybe that accounts for the slight difference.

I'm going to try wiping the book again, to see if it triggers a different sequence.

Edit - new book, power still on, lagoon gate door closed, and still 25 pulls followed by 7. The only thing left to try is a new avvie!

Re: Bug Report: Teledahn

Posted: Sat Mar 17, 2012 4:33 am
by Wamduskasapa
Acorn wrote:Actually, I think it's working to a set sequence. I've had 25,7,2,3 then 25,7,2,2,3,1 then 25,7,2,3,3,1 not quite identical but one time I pulled the lever I got the sound but no animation so maybe that accounts for the slight difference.

I'm going to try wiping the book again, to see if it triggers a different sequence.
The repetitive sequence for my Avatars are a bit different (25,46,45,46) for #12181 and (27,12,41,12) for #28272

Re: Bug Report: Teledahn

Posted: Sat Mar 17, 2012 5:21 am
by D'Lanor
Branan wrote:We haven't touched the script.
You have. The deprecated whrandom module was replaced with the random module. Looks like a find and replace job to me. Did you actually test this? Oh Well, I guess that is being done now. ;)

Re: Bug Report: Teledahn

Posted: Sat Mar 17, 2012 5:23 am
by johnsojc
Verified: Entering the lagoon zone near the feeder can trigger a chance for Shroomie to appear.

:o :shock: :?: On the 26th pull of the lever Shroomie appeared. May I say I find this just a bit too odd to dismiss out of hand since so many other people are getting similar results.
Additional appearances (without leaving the age): 7th pull, 1st pull, 3rd pull.

Huh? Really? whrandom was changed? Ah, ha!

original code:

Code: Select all

    def WillShroomieBeSeen(self,probability):
        randnum = whrandom.randint(0,100)
latest code:

Code: Select all

    def WillShroomieBeSeen(self,probability):
        randnum = random.randint(0,100)
Now I'm curious as to why this routine was changed and if it might have an undesired result and how many other parts of the game might be affected. I guess I will peek at both scripts and see if I can figure anything out... don't hold your breath that I will understand a bit of it ;)

Yep! Just as I thought... I don't understand a line of the code :oops: . whrandom seems to use the system time to seed the generator. random appears to do things a a bit diffently although it seems vastly more versatile. I'm inclined to think what we are seeing might be found here but I couldn't say what (or if) there is really a problem. WIthout having the value of the number returned by random in the log file, I don't know how we can tell if something obviously strange is happening.

Re: Bug Report: Teledahn

Posted: Sat Mar 17, 2012 6:42 am
by D'Lanor
It was changed because whrandom is no longer available in Python 2.7, but that doesn't appear to be the problem.

I have investigated this on a private shard. If I enable that debug print then each time I link to Teledahn the random module produces the exact same sequence of "random" numbers. This indicates that random.seed() fails when it is called during OnFirstUpdate. The random module will then use its default seeding from the first time it was imported in the current MOUL session.

That means randomness will only work if you quit between Teledahn visits. Or we'll just have to call random.seed() somewhere else in the code.

Edit: Yep, the seeding updates fine on link-in with random.seed() under OnServerInitComplete. :D