guides:rng-manipulation

This is an old revision of the document!


RNG Manipulation

In a nutshell, RNG in SIFAS works like this: A random number from 0 to 100 is generated. If the number is smaller or equal to the chance, the Skill procs (for example, 33 on a UR's Tap Skill, plus whatever skill chance buffs are active). These random numbers are generated as a chain, which you can imagine as a list: The RNG delivers a list full of random numbers, and every time a Skill is checked for a proc, a number is taken out of it, and compared to the Skill's chance.

This is what you call a sequence - basically, a queue of randomly generated numbers. In SIFAS, each card has their own sequence like that, and it's only used for Skill proc checks on that one card: each time, the first number from the sequence is removed, used for the check, and the next number in the queue is now at the front, ready for another check. This is also called “consuming” a number from the sequence.

In order to keep players from restarting songs over and over hoping for better luck, the generated lists will always be the same for a Live attempt - so if you reset by quitting the app and resume, the queue will spit out the same numbers. That means each card will always receive the same chain of numbers between 0 to 100, and will generally proc its Skills in the same moments if you play the Live the same way as before.

But this is where RNG manipulation is possible: since you will always get the same sequence, you can try to collect information about the numbers in the list over multiple resets, and then change when they are consumed. This way, you can try to have the Skill checks you want to succeed consume the correct numbers.

This guide will go over two examples: one to show how exactly the approach works, trying to go for a single early proc, and a second one applying the approach to an entire Live, showing you how to get as much information as possible about your run's sequence and plan out an optimal run regarding one unit's Skill.

One note before we start: RNG manipulation can only try to move around lucky numbers, but can't get new ones out of nowhere. If you're really unlucky and your sequence is just all numbers greater than 70, no amount of manipulation can help there. The generated numbers will always be the same and can't be changed. Luck still plays a part in your attempts: RNG manipulation isn't a way to make a good run out of a bad run. Instead, it's a way to push good RNG just a little bit further, to get the most of a run with already above average luck - so always run through the Live first as usual to see whether it's even worth it to attempt manipulation.

Basic Example: Early Strategy Switch Cleanse

In this example, let's assume we have a card with a Cleanse Live Show AbilityLive Show Ability: The second Ability of a Card., assigned to the Blue Strategy, that procs with 30% chance on a Strategy switch. Our scoring team is in the Red Strategy, and because you start in the Green Strategy, the goal is to get to Red as fast as possible with a Cleanse proc.

The tables will show the numbers I picked randomly to act as the sequence this example is using, but we'll also be noting down what information we would actually know about the sequence as a player at that point. Right now, we have no idea what our sequence looks like - so we'll have to give the Live a play to see what we can learn.

Real Sequence 42.61 73.43 32.11 13.46 25.12
Known Information ?? ?? ?? ?? ??

The first instinct is to just switch to Red and hope for a first-switch Cleanse, and if it doesn't, just go back and forth between Green and Red until it does. For this example we won't get a proc on the first switch: the Skill proc check will consume the number 42.61, and that number is bigger than the Skill's proc chance (30%). The same happens for the second and third switch. We do finally get a Cleanse on the fourth switch, as 13.46 is less than 30. However, that means we are in the Green strategy at this point - so we need one more switch to get back to Red, and that one procs the Ability too. In total, we need 20 notes to arrive in Red without debuffs.

So, what information did we get? Each switch consumes one number from the sequence to check whether the Cleanse Ability procs. Based on whether the Skill procced or not, we know in what range the consumed number is: because the Skill's chance is 30%, the consumed number must be greater than 30 if the Skill failed to proc, and 30 or less if it did. With this knowledge, we can now reset the run - we'll get the same sequence, and can try to get to the low numbers sooner to get an earlier cleanse.

Real Sequence 42.61 73.43 32.11 13.46 25.12
Known Information >30 >30 >30 ≤30 ≤30
Consumed in Run 1 by Switch at note 0
No proc
Switch at note 5
No proc
Switch at note 10
No proc
Switch at note 15
Proc
Switch at note 20
Proc

As mentioned before, in order to change the outcome of the RNG, we need to change how the sequence is consumed. We need to have more Skill proc checks on the cleanse card to get rid of the high numbers, so that a switch can consume the low number. All Skills consume a number to check for a proc if their condition is met - that includes the Tap Skill, all Insights and the Live Show Ability. The easiest one of those to control is the Tap Skill, so let's focus on that one for now.

Instead of going to Red, we'll switch to the Blue Strategy to allow our Cleanse card to appeal. This also consumes the first number as before, so now we need to consume two more numbers before the low enough number is at the front of the sequence ready for the switch to take. So we just tap two rounds, which means the Tap Skill is checked for proc twice. As a small extra, the Tap Skill does proc on the second tap, because the 32.11 is consumed here which is less than 33. We get even more information about the sequence that way: if the Tap Skill procs, the number must be 33 or less, but since the same number didn't proc the Cleanse Ability on the switch in the previous run, it must be higher than 30 - so the number must be between 30 and 33!

After two taps, a total of three numbers have been consumed - next up in the sequence is the number that we already know is 30 or less, and guaranteed to proc the Cleanse Ability. So if we switch to Red now to meet the Skill's condition, the Skill proc check is executed, the small number is consumed for it, and we get a Cleanse on the second switch.

Real Sequence 42.61 73.43 32.11 13.46 25.12
Known Information >30 >30 >30, ≤33 ≤30 ≤30
Consumed in Run 1 by Switch at note 0
No proc
Switch at note 5
No proc
Switch at note 10
No proc
Switch at note 15
Proc
Switch at note 20
Proc
Consumed in Run 2 by Switch at note 0
No proc
Tap Skill at note 1
No proc
Tap Skill at note 4
Proc
Switch at note 5
Proc

This is the basic idea behind manipulating any seeded RNG like this: find out what numbers are in the sequence, then change how numbers are consumed to match up good numbers with checks you want to succeed. For an actual manipulation in a run though, you wouldn't try to find out the actual numbers like this. Instead, you would watch a Skill with a similar chance as the one you want to proc, and mark the elements of the sequence where that comparison Skill procs. These marked elements are potential moments where you could also proc the desired Skill, so you can focus on making the target Skill do its check on these values - like in the next example.

Advanced Example: Fishing for SR Kanan Procs

In this example, we'll try maximizing the use of an SR Initial Kanan Guest, and try to proc her Live Ability as many times as possible. The first thing we'll have to note is that because of how Guests work, the card in the center position of our Formation will inherit the Guest's Abilities. That means our Center owns the SP Fill Ability we want to proc, and it will consume the Center's sequence, along with all the other Skills that already consume it.

Again, we will need to get some information about what the center's RNG sequence looks like to be able to do manipulation. Luckily, the chance for Kanan's SP Fill Ability is pretty close to the usual Tap Skill chance (30% vs 33%), so we can use Tap Skill procs as a guide: if there is a number in the RNG sequence low enough to proc the Tap Skill, there's a good chance it will also proc the SP Fill Ability. (However, it should be noted that Skill Chance buffs only increase the proc chance for the Tap Skill, not any other Skills, so that gap might widen.)

The first step is to play through the song once - without using any SPs, to avoid meeting the condition on Kanan's Skill, which would change how the RNG sequence is consumed - while writing down on which notes the Tap Skill of our center procs. As before, for this example, we'll just randomly pick some numbers.

0 SPs
12
15
30
39
45
54
60
72
78
90

We’re taking a slightly different approach to writing down the sequence here: instead of writing down the possible range of each element, we just record candidates - notes at which the RNG sequence delivers a number low enough to possibly be useful.

With this, we have a list of at which points a Tap Skill check consumes a number that procs it - we know that at these notes, the value taken from the RNG sequence is 33 or less. That also means that, since these taps are the ones consuming that number, the low number is sitting in front of the queue between notes 9 and 12. With this information, we can “steal” this number for our Kanan SP Fill Ability check. By using the SP Skill between notes 9 and 12, a Skill proc check is executed on the Ability, which takes the number that note 12's Tap Skill check would have usually gotten - we're stealing the proc from the tap, and hopefully it's low enough to proc the SP Fill Ability.

Let's find where the first possible proc is. At each note in the list, we can attempt to steal the proc as described above, so let's try from the top - we'll assume we are loaded with Crown and Piano, and we do have an SP Skill ready at note 12. Before we hit note 12 and our center would proc their Tap Skill, we use the SP Skill, to make Kanan's Ability consume the low number from the sequence. Two things can happen now: it is possible that the SP Fill does not proc, because the number is lower than 33, but higher than 30. In that case, we reset the run, and try the next note instead, so note 15 in this case. In case it does proc, we're successful! For our example, we'll assume that we have gotten a proc on that tap - so we used our SP Skill after we hit note 12, the Ability check consumes the value that note 15 would have usually used, and procs the SP fill.

Due to using the SP Skill, we've now had one extra Skill proc check consuming a number the sequence - so we now need to adjust our list. Because one extra value has been taken from the sequence after this SP, all Tap Skill proc checks will now get the RNG number that the tap before them got. So for example, if note 30 procced the Tap Skill with 0 SPs, after that one extra value was consumed, note 27 will instead get that number and proc the Tap Skill there.

To keep track of it, we add a column on our table, with all procs moved ahead by one Skill check. However, we also have to strike a few numbers because of the Guest Ability cooldown. We have used the SP Skill that procced the Ability after note 12, so the earliest possible next proc is after note 42 - we can ignore all taps before that. (The Skill proc check for the Guest Ability is also not executed while in cooldown. If you use an SP during that time, no extra value from the RNG sequence is consumed, so you can double SP to your heart's content.)

0 SPs 1 SP
12 9
15 12
30 27
39 36
45 42
54 51
60 57
72 69
78 75
90 87

We can easily see our earliest chance to get another Ability proc is at note 51, so now, we can proceed just like before. Use an SP Skill between notes 48 and 51, and see whether it procs - if not, reset and try the next, otherwise, add another column, moving everything ahead by three and striking all notes before the Guest Ability cooldown. Once more as an example, we'll see how it looks if we use SP after note 48, stealing the proc from the tap on note 51, proccing the Ability…

0 SPs 1 SP 2 SPs
12 9
15 12
30 27
39 36
45 42
54 51 48
60 57 54
72 69 66
78 75 72
90 87 84

…and try again, starting from note 84. Like this, we can create a table of all possible Ability proc spots across the entire Live, which we can use as a map to plan out paths through the song for optimal SP filling. These are obviously just possible procs - some of the numbers you'll get from the sequence will be not low enough for Kanan's ability, so get ready for a lot of resetting and experimenting, removing taps that don't work out from the list and trying out even more paths. You'll want the path that gives you the most Ability procs, but you'll also want to avoid long streaks of unlucky numbers keeping you from proccing, and not waste your Bracelet fills on ACs - but if you got lucky with your sequence numbers, you might just find the path that gives your run the edge you need for VolRan.

Of course, making this map is not always that simple. Now that we are looking for procs across the entire Live, other sources of Skill proc checks can become a problem. If the Center has any other Skills that can proc on conditions like AC Clear, SP Skill or on Crit, they can heavily influence when numbers are consumed, and you'll have to consider those in such a table as well and keep track of where the sequence is moving. Make sure you always have an overview of all Skills using the sequence, and consider every proc check that is executed.

Shared RNG Sequences

In addition to the per-card Skill RNG sequences, the game has three more RNG generators shared across all cards. These are the Critical RNG, used to check whether a tap should proc as a Crit, the Strategy Switch RNG, used to choose which Switch Bonus is procced, and a general RNG without any label used for an unknown purpose.

The Critical RNG probably works similar to the Skill RNG: a number between 0 to 100 is generated, and compared with the current card’s Critical chance. If it is below, the Appeal becomes a Critical. As such, manipulation on this RNG is limited: since each tap consumes one number, and a note will always have the same Critical RNG value across all runs, the only way to get more crits is to hit the note with a card that has a higher Critical chance, to meet the required value.

The Strategy Switch RNG is simply a sequence of the numbers 1, 2 and 3, and whenever you switch, a number is consumed, and the card at that position in the switched-to Strategy will use its Switch Bonus. Some manipulation is possible, since that means only the amount of switches matters, not the timing: for example, if you switch to the green Strategy for the first switch of a run, and it procs the Switch Bonus of the first card in that Strategy, but you don’t really like that one - you can reset and switch to the blue Strategy instead, if you can make better use of the Switch Bonus of the first card in that one.

Open Questions

  • What is the general RNG sequence used for? Maybe just graphical effects?
  • What RNG sequence do Accessory skills consume? (Probably the card's Skill sequence as well)
  • Do 100% chance skills still consume a number from the sequence?
  • Via Shiny: Apparently, Switches can consume parts of the Skill RNG as well, to the point where the Strategy you switch to matters. Never noticed that, needs testing.

Contributors to this page:
guides/rng-manipulation.1625601150.txt.gz · Last modified: 2021/07/06 19:52 by Suyooo