Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Araxxor
Oct 20, 2012

My disdain for you all knows no bounds.
More sidequesting and dealing with a troubled federation.

Adbot
ADBOT LOVES YOU

Araxxor
Oct 20, 2012

My disdain for you all knows no bounds.
Okay I did a bit more digging and I'm going to have to make a correction to my ailment findings. Unfortunately the effects of EX are far less powerful than I stated. All using EX on ailments does is just essentially give you 2 attempts at landing the ailment in 1 turn. My previous findings were due to a result of a series of lucky coincidences and faulty assumptions.

The stuff with the bad luck mitigation was true though.

quote:

And there's a calculation glitch because of course there is. For some reason if the infliction rate reaches a multiple of 100% exactly, the game kind of goes nuts and randomly adds or subtracts 1% or 2% from the final infliction rate. I don't know why this happens.

Turns out the game just aggressively rounds down whenever it can. Basically assume that the game utterly despises decimals whenever it comes to combat math and will annihilate them on sight.

Guarding multiplies the infliction rate by 90%.

I did discover one other oddity though. If the attacker is trying to inflict instant death and they are 20 or more levels above the target, their infliction rate is doubled. I'm not sure why this is there, but it is. It doesn't affect Purge or Perfect Dark's LIFE thresholds.

Also dug out escape rates, which is also pretty simple.

If the party member trying to run is on their 5th (or higher) escape attempt, the escape will automatically succeed.

Otherwise:

quote:

Escape Rate = ((Escape Attempts * 10) + 30 * (Player Level + Player SPD)) / (Enemies' average Level + Enemies' average SPD)

If EX is active, multiply the Escape Rate by 2.
If a Rogue used Ready to Run, multiply the Escape Rate by 2.
Escape rate is then capped between 20% and 100%.
Roll a number between 0 and 99. If the result less than the calculated number, the escape succeeds.

Basically with dead even stats, you have a base 30% chance to run, with each failed escape attempt adding on 10% to this chance. This is then heavily influenced by your level and SPD as it is directly proportional to any living enemies' average level and speed stats. This actually makes it so that you're pretty unlikely to run from stronger encounters, and the 30% extra damage you take trying to run won't help matters. Using Ready to Run will double your escape rates (stacks with EX to quadruple escape rates) and get rid of that extra damage.

Also an utterly bizarre finding that won't affect anyone's playing experiences, and is just some programming related oddity. For some reason the game runs the escape formula calculation 12 times for each party member trying to escape. Said results are never different between all 12 calculations, so I have no idea what the hell is going on there aside from wasting computer cycles.

Araxxor fucked around with this message at 11:47 on Jun 5, 2021

Araxxor
Oct 20, 2012

My disdain for you all knows no bounds.
While doing some research for the Knight writeup, I've discovered... quite a few things.



Congratulations Buront, you've now graduated to DPS.

Anyways, it's been a while since we've had an official game mechanics update. So here's one on the enemy targeting systems. It'll be a bit relevant for one of the Knight's skills in the class showcase that's coming soon.

Game Mechanics: Aggro

When an enemy decides to attack, it has to decide who will be on the receiving end of it. There’s a lot of steps involved in this process, and this update will be covering just how enemy aggro works in this game.

Enemies have an AI routine they follow to determine how to behave. Each enemy has its own individual routine, and their AI also tells them who they should be targeting when performing certain actions. While the action the enemy takes is determined at the start of the turn after all speed calculations are finished, who they target is determined the moment it’s their turn.

Attacks that hit multiple times but can hit different party members during the entire attack will have the aggro determined for each hit.

The first thing checked for is if the enemy should go after a specific party member, such as one with the highest amount of current LIFE. If that’s the case, they’ll always target that party member, no questions asked, and they can’t be persuaded otherwise. Certain attacks are always hard-coded to go after a specific target no matter what, like everyone in the front row.

That won’t always be the case and most of the time enemies will go after a semi-random party member. This is the part of aggro calculations that’s the most involved, as this is pretty much what this entire update is about. Some general rules to keep in mind is that enemies will try to go after the party member with the highest amount of current LIFE and they like to target the front row more often than not. When checking for current LIFE, they check the raw number, not a percentage of it. This means that a party member with 100/200 LIFE will be targeted more often than a party member with 50/50 LIFE.

When an enemy decides to go after a random target, they first decide which row they want to go after. The chances of this depends on the enemy’s AI. More often than not, this is weighted in favor of the front row. Once an enemy has decided which row to target, they cannot be persuaded otherwise outside of one case.

After the enemy decided on a row to target, the game then checks to see if the Provoke buff is active on anyone in that row. Provoke is a skill that Knights and Princesses have access to. For the Knight, it gives a 35% to 70% chance of forcing the enemy to go after them depending on the skill level. And for the Princess, the chance is 35% to 60% instead. If this chance succeeds, that party member is targeted and that’s the end of that.

In the case of multiple Provoke checks succeeding in a row, the enemy just randomly decides which party member they wish to go after among the ones that have the Provoke buff. However, because Provoke cannot influence which row gets targeted, this means that Provoke does absolutely nothing if the party member with Provoke active is the only person in that row.

If the checks fail or no one has Provoke active, the game then checks to see if the Hide buff is active in the chosen row. Hide is a skill exclusive to Rogues. What it does is grant a 30% to 50% chance to delete the Rogue from the enemy’s aggro calculations, and shrinks the row count by 1 in said calculations.

Unlike with Provoke, multiple Hide checks in the same row cannot succeed at once. The moment one Hide check succeeds, the game will immediately move onto the next step. The same also goes if all Hide checks fail, or the Hide buff simply isn’t active.

However, remember what I said about shrinking the row count by 1? If the Rogue is alone in that row, that will cause the enemy to think there are 0 party members in that row if their Hide checks succeeds. In that case, the enemy will then target the other row and repeat all these procedures so far. That's the only possible way to force an enemy to change their mind about what row they go after.

But what if you only have 1 Rogue on each row and both of their Hide checks succeed? In that case, the enemy will think there are 0 party members in the battle, and will just randomly go after any party member, overriding any successful Hide checks.

If the Hide checks fail or no one has a Hide buff active, the game will then sort the current LIFE stats among all valid targets and ranks the party members accordingly. With party members with higher amounts of current LIFE being more likely to be targeted. If multiple party members have the exact same amounts of current LIFE, then they’re sorted randomly.

If 2 party members are in that row:
-60% chance to target the party member with the highest current LIFE.
-40% chance to target the party member with the lowest current LIFE.

If 3 party members are in that row:
-60% chance to target the party member with the highest current LIFE.
-30% chance to target the party member with the 2nd highest current LIFE.
-10% chance to target the party member with the lowest current LIFE.

If 4 party members are in that row:
-50% chance to target the party member with the highest current LIFE.
-25% chance to target the party member with the 2nd highest current LIFE.
-15% chance to target the party member with the 3rd highest current LIFE.
-10% chance to target the party member with the lowest current LIFE.

If there's only 1 party member in that row... they obviously get targeted. The targeting routine is then terminated, and the game goes on to other combat related calculations, such as accuracy and damage.

The reason the game handles things this way is to make it so that party members with lower amounts of LIFE are less likely to be ganged up on, and this helps spread out the damage your party takes more since the party member with the highest current LIFE will constantly change.

Incidentally this isn’t possible in normal play, but if you somehow cause the enemy to target an invalid party member after everything is said and done, the attack will be ignored by everyone and disappear into thin air.

NHO
Jun 25, 2013

Looks like they paid attention to edge cases and weird error situation.
If attack with no player targeted would have instead crashed the game...
:lobcorp:

Araxxor
Oct 20, 2012

My disdain for you all knows no bounds.
"What exactly are Knights good at?" "Everything."

Anfauglir
Jun 8, 2007
This thread doesn't get nearly enough replies, so just want you to know that I enjoy the hell out of this LP and appreciate the insane amount of work you've been doing to find out all the crazy poo poo this game does.

Blaze Dragon
Aug 28, 2013
LOWTAX'S SPINE FUND

Some of the Knight's skills are so complex and dependent on specific scenarios, I'm surprised. Like needing specific party members to boost their damage. So weird.

Araxxor
Oct 20, 2012

My disdain for you all knows no bounds.
Whoops. Made a mistake with Knight's Fury. Turns out the unconscious Princess bonus was a separate multiplier to the unconscious party member bonus, so they both stack for 1.56x more damage. New damage totals:

1 Knight and 3 unconscious Princesses results in a total of 868% damage.
2 Knights and 2 unconscious Princesses results in a total of 1114% damage.
3 Knights and 1 unconscious Princess results in a total of 1074% damage.

Anfauglir posted:

This thread doesn't get nearly enough replies, so just want you to know that I enjoy the hell out of this LP and appreciate the insane amount of work you've been doing to find out all the crazy poo poo this game does.

Thanks! Learning more on how to reverse engineer this stuff was also a very nice learning experience.

Blaze Dragon posted:

Some of the Knight's skills are so complex and dependent on specific scenarios, I'm surprised. Like needing specific party members to boost their damage. So weird.

This isn't the only time 7th Dragon does something like this. While it does share a lot of roots with EO, it makes some decisions that branch out from the series. Such as enforcing class synergies with requirements, which the rest of the series would also do. Like the Rogue getting a massive damage boost if there's a Samurai in the party, or the Fighter's Link skills, which need either magic damage in the party or the Rogue to use depending on which link skill was being cast.



Granted in this case it was likely to go with the theme of a Princess and her Knight in shining armor.

Araxxor
Oct 20, 2012

My disdain for you all knows no bounds.
Been doing some more digging through the game, and glad I did cause it turns out I missed quite a bit. For one thing, there's no "enemy type", it's a value I misread as something else. It's actually a series of flags that give the enemy in question additional benefits... or penalties. And that's basically 31 updates I have to comb through and correct later. :shepface: Oh well, at least going forward the info should be correct and I can make updates without worry. Maybe.

Boss?: Only bosses have this. Function is unknown.

Has a Shadow?: Checks if the enemy's sprite displays a shadow underneath it or not.

Acts Twice Per Turn?: Allows the enemy to act 2 times in 1 turn if enabled. Only 1 boss in the entire game has this flag. (And it's not even a dragon.)

Disables Escape?: Prevents the escape option from succeeding if enabled. If all enemies with this flag are dead, escape attempts can succeed again. Escape attempts failed in this manner do not count as failed escapes.

Small?: Microanatomy can activate against enemies with this flag enabled.

Large?: Macroanatomy can activate against enemies with this flag enabled.

Incidentally there's only one random encounter that counts as Large. Most dragons and bosses actually fall under this so Macroanatomy can activate against them. That being said the conditions to activate that skill can seem... inconsistent. Generally by large they mean "fills up the entire screen." And even then some averagely large sprites count as large enemies, while other sprites of the same size actually count as medium sized and won't activate either skill.

Dragon?: Checked for under 2 conditions: If the battle was not started through a random encounter and the enemy is a dragon, a 0.95x to 1.3x multiplier is applied to their damage and ailment multipliers. This depends on how much of the surrounding Bloom outside of the dungeon or area on the world map is gone.

The other condition is if a monster is joining an on going battle. If the monster is a dragon, the game will say "Oh no! A Dragon!!" Otherwise, the game will instead say "A new monster jumped in!"

Death Resistant?: Prevents Instant Death effects from activating until the enemy's LIFE is below 10%. Once that condition is fulfilled, Instant Death inflictions are calculated normally. Only bosses and dragons have this flag.

I also found the encounter tables and how encounters work. Which also relates to an odd bug no one had any explanation for.



So each encounter formation is grabbed into a small little table and is assigned a weight on how often you'll be running into that formation on the assigned tiles. You'd think all those encounters would have an equal chance of being chosen, right? Wrong. Instead of rolling out of 250, the game rolls for a number out of a fixed 255. Fortunately the game has a failsafe for this. If the RNG rolls a number that surpasses all the weighted values, it just defaults to the last encounter in the list, making that encounter typically the most common one you'll see. (Also on a related note, the game also accepts 0 from the RNG as a valid input, meaning that the first encounter has +1 added to its weight, making it slightly more common.)

That relates to this aforementioned bug:

blizzardvizard posted:

I ran into one. No overworld sprite, just in a regular random encounter. It was a Triceratops, incidentally. I did have frameskip turned on at the time, though, so maybe it had to do with that RNG screwage thing you mentioned.



See normally dragons aren't supposed to be loaded up into a random encounter table. They're only supposed to be called when you run into a dragon on the map. But a mistake was made here that dragged those 2 dragons into the Rorakka Cavern encounter table on the Kazan entrance screen.

Fortunately they have a weight of 0 so they shouldn't be encountered... except that's not what happens. Due to the "extra RNG" oddity I mentioned earlier and that said results default to the last encounter, that actually means the Triceratop has a 5/256 chance to be encountered (1 in 51.2 encounters or a 1.9~% chance.) Making it rare but not outright impossible to run into.

You'll never see a Gryphonus in a random battle on that screen though.

Also I found the gathering node data at long last, so you can see those in the updates from now on. (Not that gathering is exactly much of an interesting or helpful mechanic in 7th Dragon.)

So how about that one Ore Node on Mt. Jomaron that has a chance to give out Dragon Eggs, huh? I'm sure more sources of EX replenishment will always be welcome-

quote:

-Dragon Egg: 1%
-Tamafite: 60%
-Aquamarine: 39%

Um.

Erm.

Yeah please don't farm for these from that node.

Blaze Dragon
Aug 28, 2013
LOWTAX'S SPINE FUND

LPs that end up datamining the game because there are so many obscure and unknown things in it are so much fun.

Oublietteer
Jul 30, 2018

Is that you, Edea Lee?

Blaze Dragon posted:

LPs that end up datamining the game because there are so many obscure and unknown things in it are so much fun.
Yes! This has all been very entertaining and informative.

It’s funny that the one enemy in this game that acts twice isn’t a dragon, when acting twice is their hallmark in the other games.

Araxxor
Oct 20, 2012

My disdain for you all knows no bounds.
Oh wow, thanks for the gold thread you all!

Oublietteer posted:

It’s funny that the one enemy in this game that acts twice isn’t a dragon, when acting twice is their hallmark in the other games.

You theoretically could make a ROM hack where that flag is enabled for every single dragon. :v: I am curious on how that would end up working out, though there's quite a few fights that would horribly break. (Invisible's the big one I can think of for ones encountered so far. The AI would either spam Chandelle twice in one turn giving the players a free turn, or end up using it every single turn which would be quite harrowing to fight against.)

Incidentally I was wondering about the Melluride Mines gather rates given you needed to hunt for 10 Melluride to open the shop.

Melluride Mines Screen 1:
Ore Node 1:
-Little Stone: 50%
-Kathrocite: 40%
-Melluride: 9%
-Melluride Hunk: 1%
Ore Node 2:
-Mana Water: 30%
-Nagmetite: 55%
-Melluride: 14%
-Melluride Hunk: 1%

Melluride Mines Screen 2:
Ore Node 1:
-Kathrocite: 40%
-Nagmetite: 40%
-Melluride: 19%
-Melluride Hunk: 1%
Ore Node 2:
-Hypno Crystal: 10%
-Nagmetite: 50%
-Melluride: 38%
-Melluride Hunk: 2%
Ore Node 3:
-Kathrocite: 10%
-Nagmetite: 10%
-Melluride: 76%
-Melluride Hunk: 4%

I also was not expecting the stick in a rock to be that rare though I suppose it makes sense given it's an entirely free weapon and a substantial upgrade to a battle Healer build. The one Stella found for Edward was gotten from the 4% one at least so that's the best place to snag it if you're hunting that down.

Next update is going to have a lot of dragons to slaughter. (50 of them in the next side dungeon!) That'll cut things down pretty close to the threshold to proceed to lategame (As Doma Volcano has 33 dragons to murder), so Flame Eater's dungeon will be tackled after that. Then the game can finally move onto late-game after that mission.

Araxxor
Oct 20, 2012

My disdain for you all knows no bounds.
Are you all ready for yet another surprise mechanic? While fiddling around with things I noticed something was off with one of my assumptions from before which led to new discoveries. First, the basic rundown.

quote:

Every time you exit a battle, or enter a new location that has random encounters, a counter is set to 100. Each tile you step on in an area subtracts a number from 0 to 6 (It’s random, but certain tiles have certain ranges that could possibly be subtracted.) When the number goes past 0, you get into a battle. Oh and if said number dips past a certain threshold, the petals on the flower fill up. The counter’s numbers corresponds to these number of petals:

100: No petals
99: 1 petal
89: 2 petals
79: 3 petals
69: 4 petals
59: 5 petals
49: 6 petals
39: 7 petals
29: 8 petals
19: Orange petals

Yeah that's completely and utterly wrong. This is actually describing the percentage of how much the encounter meter is filled. The encounter rate actually works differently from this.

What the game actually does is generate a random number from 4000 to 5999 and sets that as your encounter meter. Each tile you step on subtracts a certain number from this.

Most overworld tiles subtracts 180. Overworld forest tiles on the other hand, subtracts 300. Tiles in dungeons are a little more specified, but generally they'll either subtract nothing, 80, or 130. If you're playing the USA patch, just halve those numbers.

Now here's where the actual surprise mechanic comes in.

Araxxor posted:

Oh yes, Pokeytax, I believe I discovered a bug with the USA patch. In some odd circumstances (No idea when exactly this triggers, but it seems to be consistent with a fresh load?) Whenever you teleport using a portal, or save your game at a portal, (Simply interacting with the portal or save location and then cancelling will not trigger the bug), then go back to the overworld, the encounter rate goes back to the original version's levels. (Address of the encounter meter is located at 0x0217C146, in case you didn't know.) This lasts until you get into a battle, or just enter a new location, at which point the encounter rate goes back to the USA patch's intended values. Bloom damage appears to be functioning normally, at the very least.

For the rest of you that are playing with the patch, this bug can be circumvented by just simply reentering the portal location and exiting again. The encounter rates go back to normal then.

First things first, the address stated is for the visual of the encounter meter and is actually irrelevant. The actual address for the encounter rate is located at 0x02188A5C. (And is also a 2 byte value, not a 1 byte value like with the other address.)

Anyways, this is actually not a bug! It is a surprise from the game itself. You see, each time the game refreshes the encounter rate, it has a 5% chance to sucker punch you and set the encounter rate to a mere 1500! Meaning that you'll get into an encounter ultra fast. On the other hand, there's is another 5% chance that the game will decide to be generous and set the encounter rate to 10000. Meaning that in those cases, it can take twice as long to get into an encounter.

The RNG used here for the encounter rate is not frame based and is basically static until something advances it, which explains why I constantly got sucker punched after a fresh load. Pokeytax's patch works perfectly fine. It was actually the game itself silently playing a practical joke on me.

MayOrMayNotBeACat
Jul 22, 2017


Araxxor posted:

Anyways, this is actually not a bug! It is a surprise from the game itself. You see, each time the game refreshes the encounter rate, it has a 5% chance to sucker punch you and set the encounter rate to a mere 1500! Meaning that you'll get into an encounter ultra fast.

This deserves a hearty "gently caress you 7th Dragon."

cdyoung
Mar 2, 2012
So much crazy math. and here I thought etrian odyssey had crazy math.

Chuu
Sep 11, 2004

Grimey Drawer
I've wondered, how does playtesting work these types of games? Is it just the devs going at it, or do they have dedicated QA?

Just wondering how they choose what knobs to fiddle with when they're trying to balance all this stuff.

Araxxor
Oct 20, 2012

My disdain for you all knows no bounds.

Araxxor posted:

Also as it turns out completing 3 missions is what progresses the game to late-game, not all 4. So there won't be a vote right away for a party swap after Earthshaker dies, so I'll be doing a bit more sidequesting after this.

Major change of plans! As it turns out, there's a little loophole here. Turning in 3 of the missions is what's being tracked here. It doesn't track the Imperials' deaths. So you can actually kill all 4 of these Imperial Dragons before progressing to lategame. There's no getting around the 333 Dragon kill count though. I accidentally found this out because as it turns out, I forgot to turn in the Earthshaker mission while fiddling around with things while planning out some more of the LP. :sweatdrop:

So as a result, the next update will have the last bit of sidequesting for a long while (and said update will come out a lot sooner than I anticipated due to having to cut things off early thanks to that discovery) and the updates after that will deal with Flame Eater and Dreadnought full blast. Flame Eater's dungeon has 33 dragons, Dreadnought's has 54! Which would bring us pretty close to the 333 threshold, so yeah no room for side stuff anymore until late-game comes.



Also no regrets. Found a way to freeze the encounter rate so I could lawn mow in peace while holding down frameskip the entire time. According to the in-game clock, this apparently took more than an hour. Probably would have been 2 without disabling encounters and playing at normal speeds.

Araxxor
Oct 20, 2012

My disdain for you all knows no bounds.
Learning new techniques, going grave robbing on archaeological digs, there's quite a bit here! On and there's a party vote in this update at long last!

Araxxor fucked around with this message at 13:40 on May 11, 2022

Blaze Dragon
Aug 28, 2013
LOWTAX'S SPINE FUND

When you wrote "We get a mistranslation. Or text that was accidentally pasted from somewhere else. He’s supposed to be repeating his last line from the previous conversation here." you actually showed the Quest Complete message, not what Bassoon (shouldn't have) said.

Araxxor
Oct 20, 2012

My disdain for you all knows no bounds.

Blaze Dragon posted:

When you wrote "We get a mistranslation. Or text that was accidentally pasted from somewhere else. He’s supposed to be repeating his last line from the previous conversation here." you actually showed the Quest Complete message, not what Bassoon (shouldn't have) said.

Fixed, thanks.

BisbyWorl
Jan 12, 2019

Knowledge is pain plus observation.


Punishment is absolutely hysterical in a game where getting someone to 1HP is trivial.

Oublietteer
Jul 30, 2018

Is that you, Edea Lee?
3x LPer’s choice

So many cryptic sub events...

Jade Rider
May 11, 2007

All the pages have been censored except for "heck," and she misread that one.


Nila, Haru, and Edward.

Eeepies
May 29, 2013

Bocchi-chan's... dead.
We'll have to find a new guitarist.
Stella, Arc, and Haru.

TeeQueue
Oct 9, 2012

The time has come. Soon, the bell shall ring. A new world will come. Rise, my servants. Rise and serve me. I am death and life. Darkness and light.
Stella, Edward, and Buront

BisbyWorl
Jan 12, 2019

Knowledge is pain plus observation.


Stella, Arc, and Nila.

AweStriker
Oct 6, 2014

Nila, Buront, and Edward.

theshim
May 1, 2012

You think you can defeat ME, Ephraimcopter?!?

You couldn't even beat Assassincopter!!!
Nila, Stella, Dia

Araxxor
Oct 20, 2012

My disdain for you all knows no bounds.
Votes so far:

Stella: 6
Nila: 5
Edward: 5
Ark: 3
Haru: 2
Buront: 2
Dia: 1

My choice: 3

Chuu
Sep 11, 2004

Grimey Drawer
Assuming it's not too late:

Stella, Nila, LPer's Choice

cdyoung
Mar 2, 2012

Oublietteer posted:

3x LPer’s choice

So many cryptic sub events...

Araxxor
Oct 20, 2012

My disdain for you all knows no bounds.
Voting is closed! Final results:

Stella: 7
Nila: 6
Edward: 5
Ark: 3

Haru: 2
Buront: 2
Dia: 1

My choice: 6

Looks like the party will be Stella, Nila, Edward, and Ark!

Chuu posted:

Assuming it's not too late:

Stella, Nila, LPer's Choice

Generally I leave votes open for a few days, or if it's been a while and there hasn't been any votes.

Araxxor
Oct 20, 2012

My disdain for you all knows no bounds.

Araxxor posted:

Oh yes, Pokeytax, I believe I discovered a bug with the USA patch. In some odd circumstances (No idea when exactly this triggers, but it seems to be consistent with a fresh load?) Whenever you teleport using a portal, or save your game at a portal, (Simply interacting with the portal or save location and then cancelling will not trigger the bug), then go back to the overworld, the encounter rate goes back to the original version's levels.

Araxxor posted:

The RNG used here for the encounter rate is not frame based and is basically static until something advances it, which explains why I constantly got sucker punched after a fresh load. Pokeytax's patch works perfectly fine. It was actually the game itself silently playing a practical joke on me.

I did some more digging and can elaborate on just why exactly this happens.

For whatever reason, the RNG used for that part of the game doesn't start out with a different seed every time you boot up the game or perform a soft reset, it always gets set to 0 and advances from there. This means that things involved with that RNG will play out the same way every single time in a sense. The only thing that advances that RNG is triggering a screen transition (Using a Portal does not count), getting into a battle/getting out of battle, generating Bloom tiles, and the actions of NPCs. And Portals typically don't have NPCs.

And because the RNG started out at a value of 0, this meant that the random encounter rate generator always uses that value to saddle me with the low low value of 1500 for the encounter rate upon a fresh load. Thanks game, really appreciate that.

This also means if you use a save point in the middle of a dungeon, you'll be immediately stuck with an almost instant random battle upon booting up the game from there, as the encounter meter is like the very first thing checked for.

Of course because it's fairly static, it can actually be exploited. As it turns out, this bit of RNG also controls the types of Bloom tiles that can spawn. Including Bloom Seed Bloom tiles. A few exploits were discovered that can guarantee the spawn of a Bloom Seed in certain screens because of this which can lead to super easy power leveling. I'll talk about those later when we get to those places.

Speaking of the Bloom, I looked into its generation mechanics as well. The actual Bloom tile generation is simple. The game is just told where to place the large Bloom tiles and the small Bloom tiles whenever the Bloom spawns in that location. That's it. It's basically a secondary map overlaid on top of the game maps.

As for the special Bloom tiles, it's also pretty simple. When the game loads the overworld or a new dungeon map, it runs an RNG roll for every single Bloom tile loaded. The following applies to both overworld and dungeon Bloom.

A random number is generated between 0 and 65535 inclusive. If the number is equal to 1310 or above, the Bloom tile is normal, nothing special. Essentially a 64226 out of 65536 chance, or a 98~% chance for the Bloom to be normal. (1 out of 1.02 Bloom tiles.)

If the number is between 655 and 1309 inclusive, then the Bloom will be set to the kind that takes 8 steps to destroy and gives out 1% max EXP. Resulting in a 655 out of 65536 chance, or a 1~% chance to generate as that type. (1 out of 100 Bloom tiles)

If the number is between 65 and 654 inclusive, then the Bloom will be set to the kind that takes 12 steps to destroy and gives out 2% max EXP. Resulting in a 590 out of 65536 chance, or a 0.9~% chance to generate as that type. (1 out of 111 Bloom tiles)

If the number is between 0 and 64 inclusive, then the Bloom will take 20 steps to destroy, and have a Bloom Seed hiding in it. Resulting in a 65 out of 65536 for those to generate, or a 0.1~% chance. (1 out of 1008 Bloom tiles.)

Also regarding the bad luck I ran into on item drops, it seems that's also the result of a fairly static RNG where the game is basically stuck on a bad series of rolls upon booting.

Also here's a bit of an update on some technical stuff. These kinds of updates will most likely not be necessary to understand just how to play the game, so if you're looking for advice on the game, feel free to skip these kinds of updates. At least this one maybe. I don't know who here could even make use of this information, or if the people that could even make use of this information are even reading this thread, but I might as well document it anyways and lay it all out.

Resources: The Inner Workings of the Random Number Generator

Just a disclaimer that there may be several things I have missed, as I didn't look super deeply into this, and I may add more to this update as more discoveries are made.

Random number generators, or RNG for short, are pretty much in just about every video game to introduce randomness in various factors of the gameplay or even just doing something mundane like making visual effects less repetitive. There are a bunch of other resources that can explain this concept far better and in more detail, but the basic rundown is that computers can't actually generate random numbers. They can only simulate such a task. So how people went about faking randomness in computers was to essentially come up with a math formula that would continuously generate a sequence of numbers that seems random.

Of course said formula or whatever other techniques used to make such a sequence has to start from somewhere. The value that kicks this off is known as a seed. Generally that's also where the biggest part of the randomness comes into play and helps disguise the fact that random number generators truly aren't random is by starting off with a different seed each time so the sequence of events that results from it is hard to replicate as possible, but if you somehow started out from the same seed from another play session, you would find that the events would play out the same time if you followed the same triggers as the other session.

That does leave a bit of a chicken and egg situation where the starting seed would have to be random in order to induce randomness. A common technique to work around that limitation is to fetch the current date and time at the time on the system upon booting the software, and then converting it to a value to start off with essentially a random seed, as time constantly moves forward and each moment is different from the last. Of course generally nothing is stopping you from just setting the time and date to the same value as another session to start off with the same seed.

7th Dragon does not do this. Instead all of the random number generators it uses has the same starting seed of 0. It only tries to disguise this by triggering the RNG roll, also known as advancing the RNG, several times before settling on a starting value. And even then the value is consistent on booting. (Though for some reason the starting value can be different between different emulators for some reason.) This pretty much means you can be stuck in a predictable sequence of events if you're on the lookout for them, and if you know how to, you can exploit this to get the results you want.

The game actually has multiple RNGs it makes use of during the game, not just 1.



The game has 5 RNG values it uses during the game, all of which are 4 bytes long and are unsigned values. That means the number cannot be negative, and the value caps at a maximum of 4,294,967,295, or 0xFFFFFFFF in hexadecimal. The 4 addresses that are seen here are where the RNG values for the first 4 RNGs are located in the game's memory. The 5th one on the other hand is only loaded during battle, and its location is shuffled around quite a bit, which is why it's not listed here.

Now as for the formula used for advancing the RNG sequence, the following is used for all of the random number generators in the game. The randomly generated number is run through this formula every time the RNG is called and used for a function, and this can happen every so often, or several times within one frame.

RNG = (RNG * 1,566,083,941) + 2,531,011

The resulting value is cut off at the last 4 bytes in hexadecimal, with all digits past that being completely ignored. If the RNG is equal to 0 (Like at startup), it'll just add the value of 2,531,011 and continue on its merry way.

If the game only needs a 2 byte value to work with, it has a couple of methods for truncating the generated 4 byte value. It will either take the generated value and add 1 to it, and then perform a modulo operation on the number with an operand of 65535, or 0xFFFF in hexadecimal. This means that the number is divided by 65535, but the actual result of the operation is ignored. The remainder of the value is what the game cares about. Since the remainder can't be equal to 65535, as that would set the remainder to 0, it can be used as a way to effectively shorten the range of the random number rolled for.

Alternatively the game just shifts the RNG value in binary to the right 16 times in to shorten the value to a 2 byte value. If you're wondering what that means...

Imagine 32 people on a mountaintop. All of them have information that adds up into a blob that you can't exactly decipher in that state. So you ask them to organize into a line from left to right, each with a bit of information you can actually work with. The first 16 people from the left all have the bits you want. You care not for the other 16 people on the right side of the line, as they are all useless. So in order to get rid of them, you go to the left side of the line, and shove the line 16 spaces to the right, which causes them to fall off the mountain's peak to their doom. You can now ask the remaining 16 people for the information they have, and proceed to convert that back into into one big blob of information that's relevant to the task at hand.
And then after you're done with that information, you shove the remaining 16 people off the peak to make a decorative crater at the mountain's base. You can then repeat the process with the next set of 32 people.
...Couldn't you have explained that in a less morbid way?
Why couldn't you just have asked the first 16 people for the information in the first place!?
Because computers are jackasses.

At any rate, here are the functions each of the listed RNG values are used for, and how often they're advanced.

RNG 1: Handles most of the gameplay RNG that happens on the field. This RNG is called for generating special Bloom tiles, generating the encounter meter, determining what direction NPCs and dragons will walk in if they're set to random movement, and what formation of monsters you'll run into on a random encounter. This RNG is easily the most static of the bunch, as it is the only RNG value that is not rolled several times on booting the game, and that the events that call for the RNG only occur under certain conditions and only advance the RNG once for each trigger.

The actions that advance it are getting into a battle or getting out of battle, triggering a screen transition such as going into a town our out into the overworld (using a portal to teleport to another portal doesn't count), generating Bloom tiles from going into a Bloom infested area or using a Bloom Seed, and the actions of NPCs which dragons also fall under. This includes changing directions, though their idle animations can also advance the RNG.

RNG 2: I have absolutely no idea what this is even used for. It's advanced quite a bit on boot and then stops. But past that point it never seemed to change or be used for anything as far as I could tell.

RNG 3: Handles graphical effects such as particle effects and sprite animations. Not advanced on boot, only once the game is loaded. This constantly advances during the field, though is mostly paused during battles. During battles it only really advances if the character uses an action with an animation, or an enemy dies and they spawn particle effects as the sprite disappears from the battle.

RNG 4: Another primarily gameplay related random number generator. Primarily used in combat related functions that have random outcomes, such as accuracy, and infliction rates. This also includes preemptives and surprise attacks, as well as item drop rates. Entirely static in the field, though it's advanced for quite a bit on booting and is paused until combat is initiated, at which point it's advanced once whenever an action that requires the use of RNG is called.

RNG 5: No idea what this is used for. Only loaded during battle, and is constantly advancing. Once the battle ends, it falls into disuse or outright removed from the game's memory until the next battle.

Because RNG 1 and 4 are fairly static until called and control some of the more important parts of the game, this actually opens them up a lot to RNG manipulation if you know what you're doing. Though only a few methods for manipulating RNG 1 are known at this time. Manipulating RNG 1 and 4 would basically be theorycrafting at this point.

Araxxor fucked around with this message at 00:49 on Jun 30, 2021

Epicmissingno
Jul 1, 2017

Thank gooness we all get along so well!

Araxxor posted:

If the number is between 655 and 1309 inclusive, then the Bloom will be set to the kind that takes 8 steps to destroy and gives out 1% max EXP. Resulting in a 655 out of 65536 chance, or a 1~% chance to generate as that type. (1 out of 100 Bloom tiles)

If the number is between 65 and 654 inclusive, then the Bloom will be set to the kind that takes 8 steps to destroy and gives out 1% max EXP. Resulting in a 590 out of 65536 chance, or a 0.9~% chance to generate as that type. (1 out of 111 Bloom tiles)

Wait, what's the difference between these two, then?

Araxxor
Oct 20, 2012

My disdain for you all knows no bounds.

Epicmissingno posted:

Wait, what's the difference between these two, then?

Whoops, that should have been 12 steps and 2% max exp for the second.

Araxxor fucked around with this message at 14:40 on Jun 29, 2021

Oublietteer
Jul 30, 2018

Is that you, Edea Lee?
I enjoyed the RNG talk.

Is it possible some of those values were used at one point but were dropped after? I could understand if they didn’t want to risk breaking anything by removing something theoretically useless. But I’m not an expert on this area, so I don’t know how reasonable that is.

cdyoung
Mar 2, 2012
So many rng based mechanics.

This game seems to literally be held together by faith, some tape and chewed gum.

Commander Keene
Dec 21, 2016

Faster than the others



Araxxor posted:

Okay those computer issues and complications have been dealt with. Let's get back to work.

We encounter a unique foe. Welcome to 7th Dragon.



Incidentally I also took this time to really dig through and organize the data and my back end stuff for the LP. One of the big misconceptions I had was that conditional drops in this game were based off of getting the killing blow with them. They're not. Unlike in Etrian Odyssey, 7th Dragon conditionals don't care how you kill an enemy. They just track that you hit them with the correct damage type at some point. Ice resistant enemy has an Ice damage conditional? No need to time it so you kill the enemy with Ice. Just smack the enemy with Ice at some point and you qualify.

On the flip side, this also makes it easy to get disqualified from certain conditional types, such as not using a specific damage type against an enemy for the entire fight.

On the other other hand, conditional drops are mostly just used for meat drops. There's like 1 or 2 cases where this is used for actual rare drops. So if you don't have a Fighter, you can mostly ignore this mechanic entirely, as it's basically sort of a flavor thing really.
Good to see this back. Also, I was just thinking that this game didn't do as much to make its dragons seem like the alien monstrosities like in the 2020 LP, and then you go and fight the Rainbouroboros. :allears:

Still not caught up though, I haven't read the most recent update, though.

cdyoung
Mar 2, 2012

Commander Keene posted:

Good to see this back. Also, I was just thinking that this game didn't do as much to make its dragons seem like the alien monstrosities like in the 2020 LP, and then you go and fight the Rainbouroboros. :allears:

Still not caught up though, I haven't read the most recent update, though.

I mean, another one is a mountain. True they're not really weird like the Subway train Dragon, or... whatever the hell some of the others, were, but there are 999 dragons in this game, there needs to be some variety aside from "winged lizard with 4 legs," or "winged lizard with 2 legs" or winged lizard that can't fly," or Wingless lizard with horns," or "Giant snake with teeth."

Adbot
ADBOT LOVES YOU

Commander Keene
Dec 21, 2016

Faster than the others



cdyoung posted:

I mean, another one is a mountain. True they're not really weird like the Subway train Dragon, or... whatever the hell some of the others, were, but there are 999 dragons in this game, there needs to be some variety aside from "winged lizard with 4 legs," or "winged lizard with 2 legs" or winged lizard that can't fly," or Wingless lizard with horns," or "Giant snake with teeth."
Yeah, and the mountain dragon is cool, as well as the one you have to fight in freefall, but none of them were really eldritch, before Rainboroborous imo. Like the first dragon in 2020 starts actually warping reality to make its lair, so even though it's a fairly standard winged lizard IIRC, it still has that otherworldly quality to it. Fighting a rainbow in the shape of an infinity symbol is just going beyond in a way that feels similar to me.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply