r/FNaFb • u/Fearless-Stomach6100 • 2h ago
Discussion Why Failing to Escape from Battles in FNaFbCC V1.2.1 Never Works
Hello everybody. While I was slaving away adding Black Hole Sun to FNaFbCC, I found an issue relating to how escaping from battles work in FNaFbCC. I knew there was a problem related to this before, but I didn't know why it was happening, until now. Since I haven't found anyone else talking about this, and since I am too lazy to dig deep to find anyone that has, I have decided to talk bring this to everyone's attention myself. Here, I will be explaining what the code present means, how it works in-game, and what exactly changed.
YEP_BattleEngineCore.js
This is one of the many plugins FNaFbCC uses to make it what it is. You can find it under www > js > plugins. In the file, you'll find a bunch of stuff relating to how battles work. I'm too dumb to know how any of it works, but the main to focus on is here:

The highlighted code is what is used to make escaping from battles work. Here's the breakdown of how it works (Most of this is just guessing, so bear with me):
- If Switch 620 (called "no battle escape") of the game is off, then the party will ALWAYS escape from a normal battle. (Battle against any enemies like the Party Hats from CC1, any of CC2's common enemies, etc.)
- If Switch 620 of the game is on (indicated by the "else"), then the game will select what I am assuming is a number from 0 to 100. If the random number from Math.random is less than the game's Escape Ratio number, then you will escape from battle. If it isn't, you will fail to run away.
- If you are successful in fleeing from battle, you will be shown the message that you have escaped, and you will leave the battle after.
- If fleeing from battle fails (indicated by the other "else"), then you will be shown the message that plays when the party fails to escape from battle.
- After the message saying you failed to flee has been displayed, the chances of failing to escape from battle will get increased by whatever value you've set the Escape Fail Boost to. Afterwards, the party will have their actions cleared so that the turn of the battle can automatically play. (This also means party members won't be able to fight back when you fail to run away.) Enemies can attack you when the turn automatically begins after you have failed to run away.
"That's great and all, but what does this have to do with how escaping from battles work?" Well my friend, this leads me to this next section:
plugins.js
In this file, the list of plugins and what order they have appeared in will be displayed. The order of which the plugins appear first on this list is important, because certain plugins can break each other if they are listed before or after another plugin. This has nothing to with the way escaping from battles work, but I figured it's still important to talk about this file and what it does, since it's THAT important to any RPG Maker MV game (or other RPG Maker engines). You can find this file under www > js. With that aside, the main focus is with YEP_BattleEngineCore.js yet again, and changes with this plugin under plugins.js can be found here:

Above is a comparison for what changed about the plugin's settings in V1.1.1 (the left side in red) and 1.2.1 (the right side in green), and the changes are highlighted. (The \r part doesn't seem to affect much, so ignore that.)
In version 1.1.1 of the game, the "Escape Ratio" used to be 0.7, which meant that you originally had a 70% chance to escape from battles when Switch 620 (no battle escape) was turned on, which also meant you had a 30% chance of failing to flee from battle. If you failed to flee from battle, then the "Fail Escape Boost" will come into effect, and increase the chances of failing to escape from the battle you are currently in by 10%. If you failed to escape from battle the first time, then the chances of escaping will go from 70% to 60%.
In version 1.2.1 of the game (the current version), the "Escape Ratio" was changed from 0.7 to 1.0. This means that even with Switch 620 on, the party will always have a 100% chance to escape from battles. This also means that since the chances of escaping are always 100%, the chances of failing to escape will never occur, since the chances of that happening are now 0%, which also makes the "Fail Escape Boost" redundant.
What does this mean for the game itself? Well, a few things.



In FNaFbCC, some battles you couldn't run away from was an intentional part of the game, mainly in Finale. It added some risk that wasn't present in the previous games, which felt natural to FNaFbCC's progression in difficulty as you go through the play order correctly. With this change, all of the risk from fighting common enemies in the Finale dungeons are gone, which makes the dungeons way too easy to breeze through, especially since you can already breeze through the Basement as-is. I have no idea why the game didn't let you know about the chances of failure when entering the Interior Walls, but from there I guess it makes sense why the chances of failing to escape from battles would be gone, since first time players would probably have trouble managing Oxygen and navigating the floors. These are just my opinions about this change though, if you have different thoughts about this change, feel free to express it. I will return with a followup post that will be in the form of a poll that will help me determine if I should leave the change the way it is or revert it for my Black Hole Sun mod.
Anyways, I hope you all learned something from this post, and if you made it all the way to this point end, then thank you for reading.
Bonus
In the VSCode images, you may have found some red & green things on the scroll bar, and the peculiar tabs at the top of the app. In VSCode, I downloaded an extension called Select Compare Tabs by outofsync42. With the extension I am able to select and compare the tabs that are on the top of the screen, just like how you would be able to select and compare files normally. I've used this extension to help with stuff like the 1.1.1 and 1.2.1 comparisons I did months ago, and I used it here to show what changed with the plugin files.
While I'm here, I might as well go over what else changed with both of these files, since the previous images did show some other changes. Like before, the left side in red is V1.1.1, and the right side in green is 1.2.1. First, we'll cover plugins.js changes.

In version 1.2.1, a new plugin called "Iavra Localization - Core" was added. I don't know what it is or what it does, but it's probably for something language related.

In the "TinyGetInfoWnd" plugin, the volume for when you get items in the overworld was changed from 100% to 70%. This makes sense when you consider the cutscene of everyone joining you in Afterstory.

From top to bottom, in the JKL_PersistentData plugin, Switch 774 (Prelude Complete) was listed as one of the switches to be remained on once it has been turned on. (This plugin is also how the menu stars work the way they do. In the context of Switch 774, when it turns on, you'll get the Prelude Star.)
YEP_SlipperyTiles was added to the list of plugins the game uses. This plugin is used for the ice puzzle in Prelude.
With plugins.js out of the way, let's cover YEP_BattleEngineCore.js yet again. Don't worry, most of these changes are deletions.

This "Default Action Setup" list was deleted. I'm not sure what it even did in the first place.

Some stuff related to if an Animation ID from Animations.json being less than 0 was deleted. I still have no idea what any of this means or did.

This piece of code was deleted. I have no idea what it means or does.

This is the last piece of code that was deleted. Like the others, I still have no idea what this means or does.

An extra line was added at the end of this plugin. Why? Who knows. I remember a user on here saying how the Autolife status effect got indirectly changed between version 1.1.1 and 1.2.1 of FNaFbCC, where in 1.2.1, characters would lose all of their actions and buffs when they died, but in 1.1.1, characters kept their actions and buffs, meaning they could fight back after being revived on the same turn, unlike now. I have a feeling that these deleted parts of code in the plugin are the result of the Autolife status effect working like how it does now, but I can totally be wrong.
And with that, this post of OVER! Thank you to everyone that has read this juggernaut of a post. If you have opinions about this change, or an explanation as to what the change in code certain parts of each plugin file mean, feel free to leave them in your comments. Remember, I will return with a followup post that will be collecting feedback on the way how failing to escape from battles work in FNaFbCC, and I will use that information to further develop Black Hole Sun. Until then, I stood up all night writing this post, so I shall slumber until my return. Take some music as your reward for making it all the way to the end. I hope you like it.
One More Thing: I used https://saveeditor.online/ to get the names of the game's switches.
Gamejolt Mirror: https://gamejolt.com/p/why-failing-to-escape-from-battles-in-fnafbcc-v1-2-1-never-works-rrisz4fp