Question about Double-Beat Rune?

If you are stuck in the Dunan Unification Wars; or wish for more details on the gameplay systems, this is the place.
Post Reply
User avatar
Sasarai10
Forum Moderator
Posts: 1743
Joined: Sat Apr 21, 2012 3:18 pm

Question about Double-Beat Rune?

Post by Sasarai10 »

Hi it's been a while since i've posted here!

Started to play Suikoden 2 again and i have a question related with it.

I've managed to drop 3 Double-Beats in a row from the Cutrabbits in North Sparrow Pass. Was i just lucky or there's a certain pattern that triggers this actually?
Omnigamer
Posts: 324
Joined: Wed Feb 13, 2013 11:48 am

Re: Question about Double-Beat Rune?

Post by Omnigamer »

You were just lucky. Depending on which enemy groups you fought, your chances go up with the number of cutrabbits present. For example, a group of 6 CutRabbits have an effective drop rate of about 11.5%.

As far as patterns go, the random number generator used in the game is seeded from the beginning of the game, and then re-seeded on each load of a save file. Every step you take while running will advance the value, and after a while in areas where enemies are active it will just advance every frame regardless of what you do. So no, there's no realistic way to manipulate a drop or force a particular pattern.
User avatar
Pyriel
Webmaster
Posts: 1229
Joined: Wed Aug 18, 2004 1:20 pm

Re: Question about Double-Beat Rune?

Post by Pyriel »

It's sort of tough to do composite odds on drops. Each one is an independent event in some ways, and dependent in others. Compiling the odds for the entire enemy party is a convenient shorthand, but not all that realistic.I hate trying to work out complex probabilities when dealing with computers. The RNG in this game is so simple that I hesitate to even call the game rolling a random number stochastic. And driving down to that level is enough to make my head swim.

But yeah, you were just lucky. If you loaded up the game at the Journeyman's Crystal and you do that again and recreate the series of event exactly (down to how long you spent on the title screen and what you did to load the save), you might be able to repeat it. Almost certainly not, though.
Omnigamer
Posts: 324
Joined: Wed Feb 13, 2013 11:48 am

Re: Question about Double-Beat Rune?

Post by Omnigamer »

At least based on my own testing, you can "manipulate" certain events from a save in real time with some consistency. The problem is that it's still based on the actual game time of the save, so it's consistent for just that game time. You mash through title screen, and then the Continue/Load menu can be buffered so there's no issue there. But again, this is only for events from a save, and has to be redone for each and every save with a different game time. So it's not particularly useful in any scenario unless you have some program that will spit out the RNG progression along with relevant event triggers (like battles).
User avatar
Pyriel
Webmaster
Posts: 1229
Joined: Wed Aug 18, 2004 1:20 pm

Re: Question about Double-Beat Rune?

Post by Pyriel »

That's true. There's most likely a seed function in there that I missed when I was looking at the drop code, and if it goes off the game clock rather than the system clock, there's no way to manipulate it reliably without cheating. Based on the system clock, it would be hugely difficult, but not completely impossible.
Omnigamer
Posts: 324
Joined: Wed Feb 13, 2013 11:48 am

Re: Question about Double-Beat Rune?

Post by Omnigamer »

For reference, below is the relevant disassembly (I'm not sure which module it's from though):

Code: Select all


TEXT:8006DE10 init_srand:                              # DATA XREF: TEXT:8006B058o
TEXT:8006DE10 lui $s0, 0x8011
TEXT:8006DE14 lw $v0, dword_8010AF94
TEXT:8006DE18 nop
TEXT:8006DE1C beqz $v0, loc_8006DEE8 ## jump to 8006DEE8 ifeq (MEM32(0x8010AF94),0)

TEXT:8006DE20 lw $v0, dword_8010D704
TEXT:8006DE28 nop
TEXT:8006DE2C sll $a0, $v0, 5
TEXT:8006DE30 subu $a0, $v0
TEXT:8006DE34 sll $a0, 2
TEXT:8006DE38 addu $a0, $v0
TEXT:8006DE50 sll $a0, 3 ## $a0 = 1000 * frame counter

TEXT:8006DE3C lui $v0, 0x8011
TEXT:8006DE44 li $v0, 0x8000 ## $v0 = 0x80118000
TEXT:8006DE40 lw $v1, dword_8010D6D0 ## $v1 = MEM32(0x8010D6D0)
TEXT:8006DE48 addu $v1, $v0 ## $v1 += $v0

TEXT:8006DE4C lhu $a1, 0x1A56($v1)
TEXT:8006DE54 sll $v0, $a1, 2
TEXT:8006DE58 addu $v0, $a1
TEXT:8006DE5C sll $v0, 1 ## $v0 = 10 * game seconds

TEXT:8006DE60 addu $a0, $v0 ## $a0 += $v0

TEXT:8006DE64 lhu $a1, 0x1A54($v1)
TEXT:8006DE6C sll $v0, $a1, 2
TEXT:8006DE70 addu $v0, $a1
TEXT:8006DE74 addu $a0, $v0 ## $a0 += 5*game minutes

TEXT:8006DE68 lhu $v1, 0x1A52($v1)
TEXT:8006DE7C addu $a0, $v1 ## $a0 += game hours

TEXT:8006DE78 jal srand ## $v0 = srand($a0)

TEXT:8006DE80 lw $v1, -0x506C($s0) ## $v1 = MEM32(0x8010AF94)
TEXT:8006DE84 li $v0, 2
TEXT:8006DE88 bne $v1, $v0, loc_8006DEA0
TEXT:8006DE8C lui $v0, 0x8011
TEXT:8006DE90 lui $v1, 0x8011
TEXT:8006DE94 sw $0, dword_8010D614
TEXT:8006DE98 j loc_8006DEE4
TEXT:8006DE9C li $v0, 1
The frame counter is constantly going and is not stored in the save file. Logic says this would mean you could get any one of 60 different seeds from the same save file, but in my testing there seems to be some frame rule that only allows you to load on every other frame.
User avatar
Pyriel
Webmaster
Posts: 1229
Joined: Wed Aug 18, 2004 1:20 pm

Re: Question about Double-Beat Rune?

Post by Pyriel »

That's just the plain old seed routine from the SLUS file. I never traced it, so I didn't realize what it was tied to.

Is it called frequently? Just to look at it, I'd guess it was part of the initialization state machine (it's part of the usual, massive, switch/case block anyhow), but it looks like it could also reseed every time an area is loaded.
Omnigamer
Posts: 324
Joined: Wed Feb 13, 2013 11:48 am

Re: Question about Double-Beat Rune?

Post by Omnigamer »

I've only investigated it in the context of loading from saves. It wouldn't surprise me if it loaded it at various points in time throughout gameplay, but I never bothered to set breakpoints on it.
Metsu
Posts: 66
Joined: Wed Apr 15, 2015 9:27 am

Re: Question about Double-Beat Rune?

Post by Metsu »

Glad I found this explanation. I've only debugged the "rng" mechanism in another playstation jRPG. It uses the system "rng" only, which is called zero to many times per frame. It technically isn't a time either, since it just keeps overflowing a number every time it is called. Found it weird too that it is initialized to 0x24040001 and is called 142 times IIRC on the bootup with the playstation logo. From there, I watched the entire intro of the game I was playing and it never calls it. But as soon as you start a new game, it starts calling the rng function.

I can't tell if it's the same as some of the things you're saying (outside of using the game clock method instead). I was always curious on if other games used this the same way. Interesting stuff! :)
Post Reply