11 March 2016 - Forum Rules
Started by redmagejoe, December 10, 2019, 03:09:14 AM
QuoteThe Ripper Knife was meant to do +20 non-reducible damage per hit to the target on top of its normal attack damage. While the game displayed this bonus damage, it was not actually being dealt. This has been fixed so that Rippers do inflict their bonus damage.The Heal Staff is a weapon that was meant to do 0 damage to non-Undead targets and heal them by +30-60 HP per hit, while doing its normal attack damage to Undead targets and +30-60 non-reducible bonus damage per hit. Both effects were bugged: (1) When used against non-Undead targets, the Heal Staff would first deal its normal damage and then heal its normal damage + heal amount; if the normal damage killed the target, the net effect was that the target would be healed by the heal amount + any excess normal damage. This has been fixed so that now only the heal amount is applied. (2) When used against Undead targets, the Heal Staff suffered from the same bug as the Ripper Knife, displaying the sum of its normal and bonus damage but only dealing its normal damage. This has been fixed so that now the bonus damage is also applied.Drain/Osmose effects on physical attacks, such as from the Blood Sword, could drain more than the target's current HP/MP. This has been fixed so that the drain amount is capped at the target's current HP/MP.If a monster was killed by the drain bonus damage from a Blood Sword (not by its normal damage), the monster simply disappeared without displaying its usual death message. This has been fixed so that monsters killed by bonus damage also display their usual death messages.Equipment that grants a bonus to some stat would allow that stat to exceed 99, in which case the stat's tens digit would be displayed as "A" in menus, e.g. "A9" instead of "109". This was obviously a bug and a cap has been imposed in this patch.Equipment that granted bonuses to the same stat were supposed to stack, but the code was improperly written in a way that would not allow for more than one bonus per stat, resulting in only one bonus being applied to the same stat from multiple equipment pieces. This patch changes the behavior to allow stacking bonuses, making it possible to wear multiple pieces to gain a +10/20/30 bonus to Strength or Agility.The Evasion success % calculation was capable of overflowing but only the low byte was used and capped at 99%, resulting in characters with between 256% and 354% Evasion recieving 0% to 98% instead of 99%.There was no overflow protection on the counters in combat for keeping track of actions taken by and performed against you in combat that are used for determining stat level ups at the end of battle. Though extremely unlikely to occur in normal game play, it was possible for these values to overflow back to 0 in a particularly long battle, robbing characters of deserved stat increases. All counters were capped at 128, far higher than is necessary.Overflowing a character's black magic usage counter also incremented that character's white magic usage counter.Due to an addressing oversight, enemy casters who targetted the entire party would add credit to Firion's White Magic counter (for increasing Spirit at the end of battle), rather than to each party member's "hit by magic" counter for raising Magic Defense. All characters were robbed of Magic Defense experience because of this. This patch corrects the addressing error, so that target-all spells hitting the party now properly give each of them Magic Defense experience.The combat action counters were incremented as soon as a target was selected and were not decremented if that action was cancelled, leading to the infamous "target/cancel" bug where a player could artifically inflate the physical, white, black, and per-spell usage counters for all but the last party member. The same logic also leads to the less famous "get credit for stuff that never happened" bug where party members' physical and/or magical defense counters were artificially inflated by including attacks from monsters that were killed before they could act. These closely related bugs have all been fixed by moving the incrementing of combat action counters from when a target is selected to when an action is performed.The original RNG uses a "multiply and round" algorithm that produces non-uniform results, causing the lowest and highest possible values to be only half as likely to be selected as other values. In the case of enemy target selection, this results in the middle 2 characters receiving a disproportionate amount of the enemy's attacks compared to characters 1 and 4. This patch substitutes a "multiply and truncate" algorithm that produces a significantly more uniform random distribution. However, the chance to lose Intellect/Stamina/Strength when gaining Strength/Intellect/Spirit has had its value adjusted to maintain the original game's 1/10 chance instead of the intended 1/6 chance.The logic for determining whether a monster will run or not suffered from multiple overflow errors and has since been brought significantly closer to working as intended. (see first post for the remaining WIP note)There was an approximately 1% chance for "non-breakable" items (e.g. equippable items that can be used as items in battle to cast spells) to be destroyed anyway when used in battle, including unique and valuable items such as the Masmune. "Non-breakable" items are now truly non-breakable.While Square attempted to cap Gil at 9,999,999 when gaining Gil from selling items, their branching code was done incorrectly, resulting in Gil being set to 9,999,999 ($98967F) as soon as it reached 9,961,472 ($980000). Likewise, it could overflow beyond the $FFFFFF byte maximum, wrapping back around to 0 Gil. Square did not even attempt to cap Gil when gaining Gil from battle. Gil is now properly capped at 9,999,999 in all scenarios.
QuoteThere was previously nothing preventing HP and MP from going above 9,999 and 999 or even overflowing beyond their 2 byte range, which eventually could result in an entire party permanently stuck with 0 max HP and MP. This patch properly caps HP at 9,999 and MP at 999.There was no attempt made to prevent stats from attempting to increase at the end of battles when they were maxed (99). While the stats could never go above 99, the code still allowed the message to display saying they had increased, and this caused the code for determining the corresponding stat decreases to fire. This patch prevents any attempts to run stat increase/decrease code on a stat that is already at its cap.Skill levels were capped at 16, but would continue to gain experience and, in the case of Weapons and Spells, erroneously display a message on "level up" at the end of battle. This patch prevents any experience growth (including experience for spells cast outside of battle) or level up messages from appearing on maxed skills.The skill experience calculation suffered from an underflow bug when high-level skills were activated with low usage in low battle rank fights, resulting in enough experience gain to guarantee a level up at the end of battle. This patch corrects the logic to check for underflow and prevent experience gain when underflow occurs.Increases to a character's base stats would not be reflected in their calculated stats until the start of the next battle or an attempt to change the character's equipment. Calculated stats are now automatically updated at the end every battle.
QuoteLevels 8+ of Aura and Barrier did not grant their 8th level benefit, due to a math error by the developers. This patch corrects that error, allowing Aura to grant bonus damage to Undead enemies and Barrier to grant Ice resistance as originally intended.Aura, Barrier, and Dispel display messages announcing which effects they modified, but the messages were displayed in opposite order to the effects, i.e. the level 1 effect displayed the level 8 message, the level 2 effect displayed the level 7 message, etc. These spells' messages now correctly correspond to their effects.When Basuna/Esuna cured multiple status ailments, only the message for the last-cured ailment was displayed. This patch converts the relevant code into a loop so that Basuna/Esuna now display messages for each Ailment that was cured.Basuna would always clear the "Critical HP" ailment.Casting Basuna on a target with only the "Critical HP" ailment would result in displaying the message for successfully casting Fear.Basuna would always cure Poison, even with 0 successes.If Basuna/Esuna failed to clear the highest-ranked ailment present on a character, they would display their failure message even if they did clear other ailments.The bonus amounts from Berserk/Fear/Protect could overflow before being added to the target's associated stat, resulting in low or no effect.Berserk/Blink/Fear/Protect/Shell displayed their failure message whenever the stat they increased became >= 255, even if it was < 255 before.Berserk/Blink/Fear/Protect/Sap/Shell did not display a failure message when they failed to affect their associated stat.Cyclone/Quake/Tsunami were fairly messed up. Their code has multiple nested bugs, so it's hard to be sure what their intended behaviour was. Based on their behavior in later remakes, they have been updated to deal double damage to certain monster families and be completely ineffective against certain other monster families.Dispel failed to write the target's modified resistances back to RAM, resulting in the spell doing nothing. As with weapon effects, the Drain/Osmose spells were capable of draining more than the target's current HP/MP; Osmose was even able to drain MP from creatures with 0 max MP.Fear/Haste/Slow were slightly too powerful, not failing with 0 net successes like other spells.Imbibe decreases the target's evasion % by 1, but there was no check for underflow, so after enough castings the target could end up going from 0% to 255% evasion.After calculating how much HP to restore, Life only wrote the low byte of the value, which could result in the target being revived with 0 HP and immediately pronounced dead again.Protect determined its effect multiplier by checking the target's spell power, but this value was only calculated for the caster when the spell was used. As such, each target other than the caster ended up with a multiplied by 0 bonus. This patch correctly checks the caster's stat rather than the target's so that all targets now benefit from Protect's defense bonus.Sap only acted on the least significant byte rather than the whole of a target's MP.Wall could be exploited by casting it on monsters to ensure that instant death spells would work on them.As the story goes, Ultima was intentionally bugged. It did not scale with its own level like every other spell, it did not scale with the caster's other skill levels as in later remakes, it did not scale at all (aside from the boosts to success rate and power that are applied to all spells). Based on its behavior in later remakes, this patch makes Ultima scale with both its own level and the caster's other skill levels. (see first post for WIP note)The code for using status-curing items in battle forgot to set a key variable before determining which message to display, which could result in incorrect messages being displayed (e.g. if a character suffered from both Amnesia and Curse, curing Curse in battle with a Cross would incorrectly display the message for curing Amnesia).
Quote from: redmagejoe on May 15, 2020, 10:45:41 PMWe've been maintaining an internal list of bug fixes since the first post was getting crowded beyond the character limit. I would like to still have a list of the fixes though, so I may put a link to that up, unless abw is maintaining the one I gave him, in which case I'll ask him about it. As of this posting, however...The entire level up routine code has been optimized and shifted to free up space for bug-fixing, and contains all of the below-listed fixes:The entirety of the code for handling spell behaviors has been rewritten to make the code more concise/efficient, and fix a gross number of bugs including:
Quote from: redmagejoe on May 15, 2020, 12:29:23 PMHaving scanned through the disASM and found where battle messages are stored ($05:$B5A9) and knowing that I'm either looking for any references to $05:$B5A9 with an offset of $13 (Preemeptive Strike) or $15 (Ambushed), or specifically calls to those messages which I doubt will be a thing given the deliberately vague and relative nature of instructions in place of specific conditions, I've eliminated the first 7/17 instances of $05:$B5A9 being relevant.
Quote from: redmagejoe on May 15, 2020, 12:29:23 PMFun new bug discovered. First of all, I wasn't aware that undead enemies would actually run away... You know, being undead and thus supposedly fearless... But apparently if you try to cast Life on a space where an enemy has fled, it will still succeed, said that enemy "fell", "Collapsed!" (is this supposed to come after "fell" for instant death spells?) and play the death sound. No items or gil or anything like that as if you actually killed it, but it is still worth noting, I think.
Quote from: redmagejoe on May 16, 2020, 02:45:59 PMUpdated the first post after some testing with Life on dead enemies, and added a few more items. I'm not sure if the poison/venom monster KO bug is different than what I described, or if the sprites are still there and able to attack, etc etc.
Quote from: redmagejoe on May 15, 2020, 12:29:23 PMAnother minor, interesting one I've been testing, and thought was another translation bug at first. It seems any enemy formation that has both DualHeads and DualDeads also displays in the "enemy names" window that only appears at the start of a battle Stalagmites as well, even if there aren't any Stalagmites present. I'm guessing this is a pointer issue.
Quote from: Rabite890 on May 15, 2020, 11:02:20 PMHoly crap... I had no idea you had fixed that much stuff!
Quote from: abw on May 17, 2020, 03:30:36 PMCasting Esuna in battle on a dead target with enough successes to clear the KO ailment revives the target with 0 HP, resulting in them staying dead.You are able to continue interacting with NPCs that have been removed until you exit the conversation (e.g. you can keep talking to Scott over and over again even after he dies).The NPC Ask/Learn/Item UI is displayed even for NPCs that will never respond to any key terms or items.The Mysidia Cave B4 treasure room uses an incorrect battle background.Parts of Palamecia Castle 7F do not block teleport spells.Killer Fish use the wrong palette depending on their companions.Damage values over 999 prevent the DMG text from being displayed.Characters affected by Toad or Mini always get 0 spell successes in combat, including for the "spells" that power items, which makes the Maiden's Kiss and Mallet items ineffective in combat.A weapon's family or element bonus can push its base damage over 1 byte, but the part of the damage algorithm that calculates a random number between 0 and base damage only uses the low byte of base damage, resulting in significantly reduced damage output in this case.
Quote from: abw on May 17, 2020, 03:30:36 PMAnd here are some other miscellaneous bugs/ideas/food for thought that aren't currently on the front page list (some of these have been brought up before; I'm just centralizing them here):When dual-wielding two weapons of the same type (other than bare-handed), it is possible to gain 2 weapon levels in one battle by raising that character's attack counter high enough (does not apply to Restored).Display all of the ailments affecting a character (e.g. by cycling through displaying them) instead of only the highest-priority ailment.Only display key items in the NPC Item UI.Restore the black backgrounds for character portraits on the status screen?Re-order level up messages to match the order of stats as displayed in the status menu?Preserve a character's row when they get revived outside of battle.Add a row indicator on the main menu screen.Update the status (/equip, but more work) menu screen to display magic penalty, armour resistances, attack elements/families, and weapon special effect.Let multi-target Life/Esuna target dead characters.Use different battle messages for Flee failure when the battle can't be escaped vs. when the character failed their success roll.Display a message for inescapable battles at the beginning of combat.Make Leila and Leon join at full HP?Scale stats for new characters to average party stats?Evasion/Magic Resist levels should probably have a low cap, as it is currently quite easy to become effectively immune to physical attacks and spell successes by casting Blink/Shell.The Blood Sword is just too powerful, especially when you have two of them. Being able to kill the final boss in the first round with a low level party shouldn't be so easy.Implement in-battle row switching (would need to re-run enemy command selection/validation)?Make confused entities target a random entity instead of their own party?Speed up battles by displaying spell animations and their text at the same time, or display animations for all targets simultaneously.Deduct MP cost of spells before completing their effects so that Osmose/Swap can completely restore MP.
Quote from: abw on May 17, 2020, 03:30:36 PMIn other news, I've updated the Bug Fix patch to update calculated stats after each buff from the Tower of Magi orbs and condensed the corresponding code in the Restored patch; the key there was remembering that effective stats are also calculated stats so we don't need to update them separately before calling the code for updating calculated stats. For the orb buffs, that freed up 15 bytes, which was more than enough to add the call to update calculated stats; the same reasoning applied to the level up code in bank 5 freed up a further 80+ bytes there.
Quote from: Chaos Rush on May 18, 2020, 03:23:01 AMJust posting to say, a user had contacted me to report that the FF2 version 2.1a patch doesn't work. They are patching to the Japanese ROM and according to them, it says patch successful but the game is still in Japanese.
Quote from: redmagejoe on May 18, 2020, 08:30:12 AMHey Chaos. I'm assuming the user was TenJoker? It was some confusion on his end and we got it sorted out. I've since updated the page to inform people to PM me rather than you.
Quote from: abw on May 17, 2020, 03:30:36 PMWhen dual-wielding two weapons of the same type (other than bare-handed), it is possible to gain 2 weapon levels in one battle by raising that character's attack counter high enough (does not apply to Restored).
Quote from: abw on May 17, 2020, 03:30:36 PMUpdate the status (/equip, but more work) menu screen to display magic penalty, armour resistances, attack elements/families, and weapon special effect.
Quote from: abw on May 17, 2020, 03:30:36 PMLet multi-target Life/Esuna target dead characters.
Quote from: abw on May 17, 2020, 03:30:36 PMUse different battle messages for Flee failure when the battle can't be escaped vs. when the character failed their success roll.
Quote from: abw on May 17, 2020, 03:30:36 PMScale stats for new characters to average party stats?
Quote from: abw on May 17, 2020, 03:30:36 PMEvasion/Magic Resist levels should probably have a low cap, as it is currently quite easy to become effectively immune to physical attacks and spell successes by casting Blink/Shell.
Quote from: redmagejoe on May 18, 2020, 12:52:16 PM@abw: How would you feel about, assuming it's possible and not simply tied to an inflexible room data table, to change the BGM of Fynn Castle post-liberation to the Rebellion Theme used in the hideout? It seems bizarre that it would still play the eerie castle dungeon theme even when it's occupied and the headquarters for your entire operation. The PSP version retained this, though it feels a strange stylistic choice.
Quote from: redmagejoe on May 18, 2020, 12:52:16 PMAlso a minor downside to the passive skill growth patch in Restored is that Warp loses some of its functionality much earlier, since it would only level through use before.
Quote from: redmagejoe on May 18, 2020, 12:52:16 PMAre there supposed to be encounters in these rooms even before you liberate the castle?
Quote from: abw on May 18, 2020, 08:19:06 PMHmm, yeah, I guess that makes sense. Plus, is there anywhere else you can go post-cyclone that still plays the rebel theme? At least Deist still has the castle theme if you want to hear it some more.
Quote from: abw on May 18, 2020, 08:19:06 PMI agree that auto-levelling Warp is a mixed blessing. There's also a risk of levelling all of your spells so high that you can't cast any of them, but you can always buy a new spell at level 1 and cast it a few times to gain max MP, so I'm not really concerned about that.
Quote from: abw on May 18, 2020, 08:19:06 PMSo, it looks like reviving dead monsters is broken in several places. Assuming you succeed in reviving a monster, its graphic doesn't reappear, the number of remaining monsters isn't incremented, and it becomes untargetable at the end of the round (but you can still beat up on it some more until then). The Life spell restores a minimum of 1/16 of the target's maximum HP, but for mosters with less than 16 maximum HP, they get revived with 0 HP - you would need at least 10 successes to revive a Goblin with 1 HP! Given those issues, instead of fixing them directly I'm just going to make reviving monsters ineffective as part of the fix for trying to revive monsters that have fled.
Quote from: redmagejoe on May 18, 2020, 08:38:04 PMCall this nitpicking, but would it make more sense to remove the Crystal Rod the first time the Mysidian Tower is accessed, rather than when you're swallowed by Leviathan? I panicked for a moment when I couldn't find my Crystal Rod after landing on the island.
Quote from: Cyneprepou4uk on May 22, 2020, 09:47:12 PM@redmagejoe, back to original topic, was there ever a need for a compilable disassembly? Considering that by moving code back and forth it won't be compatible with translations and whatever other patches out there. Or you just wanted to have a better view at the game code, basically what abw has done in his disassembly?
QuoteAfter exiting the Tower of Magi via magic (Warp/Teleport), you appear on top of the base of the tower; walking one square south activates the entrance animation and pulls you back into the tower; the tower entrance code should check to see which way you're walking before activating the entrance.
Page created in 0.139 seconds with 20 queries.