News:

11 March 2016 - Forum Rules

Main Menu

Final Fantasy II Restored

Started by redmagejoe, December 10, 2019, 03:09:14 AM

Previous topic - Next topic

ScarabEnigma

So recently, I was working on my own stuff and decided to start doing some editing on jade, and....

For whatever reason, the displays on Jade showed very high hp values and AI scripts seemed to have been rearranged (i.e. the emperor had the AI of a abyss worm, green dragon had perfect evade, etc).

This was displayed when loading a ff2 rom that had chaos rush and the standard bugfix patch patched in that order.

I also tested loading a rom which did the reverse and patched bugfix before chaos rush and a plain bugfix only and got the same results.

Chaos rush patch alone meanwhile showed all the displays just fine, save for the text display due to different text table arrangement.

Additionally tested with restored version and again, same results as bugfixed.


I'm concerned given I'm in no capability to modify party initial stats, weapons, spells, or monster AI outside of Jade and I'm certain trying to use Jade would lead to rom getting bricked :banghead:, yet I want to use the bugfix for the sake of gameplay improvements. I don't think applying the bugfix to a already modified (player stats, weapons, spells, monster AI) demiforce translated rom would turn out right at all.

redmagejoe

#621
I don't know anything about Jade, but I'm fairly certain that there shouldn't be any errant behavior with Bug Fix or Restored as you've described. Is it possible that Jade is a tool designed with very specific memory addresses in mind (i.e. an unmodified ROM) and the rearrangements for Bug Fix are throwing anomalous results, making Jade somewhat less than ideal for this specific situation?

ScarabEnigma

In game testing shows the stats are just fine, but its likely that yes the changes from bugfix/restored have messed up the visuals. There's no other reliable means for me to edit the most impactful aspects without use of Jade, I'm not versed enough in direct hex editing. and considering jade is the one ff2 editor currently that dramatically can alter gameplay, it kinda complicates things unless i can confirm patching a already modified rom works, but my only modified rom is also demiforce which bugfix doesn't state should be patched to. Rather confused on this situation...

abw

Quote from: ScarabEnigma on January 05, 2022, 03:57:29 PM
Pardon me. But I was thinking about finally giving out the bugfix patch a try but the specifications as to how to apply the patch are confusing. do you apply the patch onto a base jp or chaos rush patched rom? or can you do demi force version via patching that onto jp rom that got the bugfix patch? I cannot tell what its saying clearly  :(
I was taking some care to maintain compatibility with the Chaos Rush translation patch, but hadn't done the same for the Neo Demiforce patch. Consequently, it looks like the current Restored patches are incompatible with the title screen changes in Demi's patch due to some addresses shifting. I've moved some NOPs around to fix that, but unfortunately I lack the time to do more than minimal testing, so I'm not submitting them here yet; if you want to check them out, you can grab the updated Bug Fix here and Restored here.

Quote from: ScarabEnigma on February 05, 2022, 10:08:11 PM
I don't have a link, but its possible to see for yourself in game by equipping a tome to a character's belt slot then switching it into either hand midbattle, and select ff2 speedruns that simply break the game into pieces with all its manners of glitches without care use the tome glitch to do huge damage.
Ah, I see. A little bit of digging led to a 2010 post from our friend TaoTao (https://tasvideos.org/Forum/Posts/247067; there's some other good reading on that page too). Unlike the out-of-battle menu, the in-battle menu code for swapping items doesn't check for item ID >= #$70, which allows you to swap tomes in; this carries through to the code for updating your weapon type, which ends up reading non-weapon data, and then to the code for updating your skill counters after battle, which ends up writing to totally wrong addresses, leading to some impressive bugs that can even corrupt your saved games. Sounds a bit like Relm's Sketch glitch from FFVI, no?

Quote from: ScarabEnigma on February 20, 2022, 08:24:40 PM
In game testing shows the stats are just fine, but its likely that yes the changes from bugfix/restored have messed up the visuals. There's no other reliable means for me to edit the most impactful aspects without use of Jade, I'm not versed enough in direct hex editing. and considering jade is the one ff2 editor currently that dramatically can alter gameplay, it kinda complicates things unless i can confirm patching a already modified rom works, but my only modified rom is also demiforce which bugfix doesn't state should be patched to. Rather confused on this situation...
I've also never used Jade. Is it configurable in any way? The fix for Holy Lances being consumable items involved adding a new spell (a non-consumable version of the Holy tome), so all the monster data is shifted by 7 bytes to make room for that, which would mess up hardcoded addresses in Jade. That fix could be implemented in code rather than data, which possibly would make Jade happy again (or not - the Restored patches change a lot of addresses), but again, that would take more time than I have available these days :(.

ScarabEnigma

Quote from: abw on February 21, 2022, 08:37:42 PM
Ah, I see. A little bit of digging led to a 2010 post from our friend TaoTao (https://tasvideos.org/Forum/Posts/247067; there's some other good reading on that page too). Unlike the out-of-battle menu, the in-battle menu code for swapping items doesn't check for item ID >= #$70, which allows you to swap tomes in; this carries through to the code for updating your weapon type, which ends up reading non-weapon data, and then to the code for updating your skill counters after battle, which ends up writing to totally wrong addresses, leading to some impressive bugs that can even corrupt your saved games. Sounds a bit like Relm's Sketch glitch from FFVI, no?
Indeed it does, ff games seem to always have something that bricks the system potentially.

Quote from: abw on February 21, 2022, 08:37:42 PM
I've also never used Jade. Is it configurable in any way? The fix for Holy Lances being consumable items involved adding a new spell (a non-consumable version of the Holy tome), so all the monster data is shifted by 7 bytes to make room for that, which would mess up hardcoded addresses in Jade. That fix could be implemented in code rather than data, which possibly would make Jade happy again (or not - the Restored patches change a lot of addresses), but again, that would take more time than I have available these days :(.
Wait, you outright created a new spell slot for holy casted by holy lance? meanwhile Jade gets around that via the weapon editor allowing you to choose what weapon or shield casts what spell and ultimately other item cast related bugs are 'cured' in a sense. and given some enemy AI spells are outright dupes of tome spells(can't remember which exactly off the top of my head), I actually put those slots to more efficient use by using the tome spells in the monster ai over the dupes while editing the dupes into unique spells for other purposes, which honestly would be a much better fix.

idk about Jade being configurable per say, its a old editor created by lenophis long ago but its not going to be updated since its been so long for leno that they'd have to remake it to update it. But yeah, outright creating a new spell which i did not see coming, and shifting the bytes definitely messes up the interface quite a bit. Suppose I'll just continue what im working on, on a demiforce patch and whatnot, later test what will happen with bugfix/restored given the new spell on holy lance might actually cause a issue (I edited holy lance to use a different spell, among countless other changes).

abw

Quote from: ScarabEnigma on February 22, 2022, 01:04:08 AM
Wait, you outright created a new spell slot for holy casted by holy lance?
Yup. In the original version, there's only 1 spell effect that casts Holy, and it's shared by both Holy Lances and Holy Tomes and comes with a 100% break chance, so there isn't really any way to fix the "Holy Lance has a 100% break chance" bug via in-place data editing without affecting other spell effects such as the one used by Holy Tomes, and fixing it in code instead of adding new spell data would take more than the 5 bytes for a new spell effect.

However, there are 2 unused spell effects (for key item #$0F ???? and Cottages), so I've pushed updated Bug Fix and Restored patches that steal the Cottage spell slot to use for unbreakable Holy, which should make Jade happy again (or at least happier). I also noticed a couple of other patch-related issues while doing some light testing, so I've included fixes for those in the new patches too.

ScarabEnigma

Quote from: abw on March 17, 2022, 02:14:49 PM
However, there are 2 unused spell effects (for key item #$0F ???? and Cottages), so I've pushed updated Bug Fix and Restored patches that steal the Cottage spell slot to use for unbreakable Holy, which should make Jade happy again (or at least happier).

Errr... my apologies, but wouldn't it be better to use what I had mentioned for the unbreakable holy bit? I had said previously that some enemy AI spells are dupes of tome spells, however i couldn't recall off the top of my head, but i found the following, not as much as i recalled though.

magic with matching lvls that get used in both spell tome slots and AI slots (thus two instances of same effect)
-Drain VIII
-Aspil VIII

The differences between the tome and AI versions is the AI ones have no consumption assigned, and lower accuracy in Aspil's case (100 for tome, 60 for enemy), but not drains(100 acc on both). Could just assign the sorceror AI to use drain 8 from tome list over the later drain 8 on the list and the difference is minimal, but still slot in the unbreakable holy 16 and fix the wizard staff bug without making the aero spell group targeting :P.

flamefury

Hey guys FYI the PSP version of Ultima was cracked and explained in detail here:

https://finalfantasy.fandom.com/wiki/Ultima_(Final_Fantasy_II)

Feel free to use it if you want to be accurate to the remakes.

Completely unrelated, does anyone know where and how the scoring for Arcane Labyrinth in the PSP version works? I was trying to find where the affinity values for each key word are stored and how it gets tallied as you go through the dungeons to determine the final prize, but I've been having trouble thinking of good ways to hack and reverse engineer it.

redmagejoe

Thank you for this, Flamefury! This should be very helpful to making Ultima work properly! I don't know if/when abw might be able to look at this project again, but this is a great boon. :)

AwesomeHairo

Thanks, abw. I'll go check out the "Firion's name thing in battle" soon.

I'm almost done playtesting my localised translation and I've noticed this regarding the gil amount:





Unfortunately, I have no idea it would happen whenever I gain money (by selling) or spend money, so I don't know the amount before this occurs. But is this a known issue?

jrt05

Hello, I just wanted to give some feedback on this hack.

1. I really like what you did. You fixed a ton of things that needed to be fixed.
2. You made this game more grindy while fixing the select/cancel bug.

I am playing a no-exploit run. That means no select/cancel, no attacking my own party, no using sap, etc. Its really good that you fixed the RNG, I've been charting how many times my characters get attacked, it's fairly even.

The majority of fights last 1-2 rounds. During those fights, the enemies rarely attack me, since they are dead, or in the back row. This means my characters defenses are extremely slow ty raise. This is because of the fix in "The same logic also leads to the less famous 'get credit for stuff that never happened' bug".

Also, fights that only last 1 round, usually only 1 or 2 characters gets a combat skill. Because of the already grindy nature of the game, and the difficulty of raising defense (especially evasion), and how important evasion is, I think it would have been better to keep the "get credit for stuff that never happened" bug, especially since you can't exploit it in any meaningful way.

Anyways, thanks for the hack.

AwesomeHairo

Quote from: jrt05 on April 23, 2022, 09:13:47 AM
Also, fights that only last 1 round, usually only 1 or 2 characters gets a combat skill. Because of the already grindy nature of the game, and the difficulty of raising defense (especially evasion), and how important evasion is, I think it would have been better to keep the "get credit for stuff that never happened" bug, especially since you can't exploit it in any meaningful way.

Anyways, thanks for the hack.

Hi, jrt05. I've recently finished the game with the bug fixes. This is my first time playing the Famicom version while having beaten the remakes several times. From my experience, the bug fixes have made them similar to the remakes in that the beginning is grindy while the end is easy (especially using the likely-intended Blood Sword way of beating the final boss). If you play the first few parts of the game without leveling up your shields, the game will be unfair by the time you reach Kashuan Keep since these damn rats will always inflict Poison while hitting your party. So there shouldn't be any difficulty raising Evasion if you do the "equip dual shields and wait for monsters to run" method at the beginning. My Agility, thus my Evasion, has improved and the game felt fair until I reach Deist Cave. Then it occured to me that leveling up Blink IS required.

I'm sure many people share my sentiment, but because I feel inclined to grind my spells (thus stats get increased in the meantime), it feels like I over-grinded by the time I reach Palamecia Coliseum or beyond that. I didn't really need to get Berserk or Haste past level 3, it seems, but when I do, in combination with Blink and my super high Evasion (4-99%), the game just becomes a matter of running away and curb-stomping unrunnables.

So instead on relying on what is clearly a bug (thus should be fixed), the next time I'll play, I'll remember that Esuna, Raise, Blink, Fire, Blizzard, Thunder and Curse are probably the only spells that should get to Level 5 (The Cure/Teleport combination should go without saying). I'd say keep Berserk and Haste at Level 1 so make boss fights more epic, and have characters stop wearing shields from a certain point. Most of the elemental attacks from enemies are multi hitting anyway, thus doing small damage to each of your characters, even if you don't have an Ice Shield for Snowstorm/Blizzard 12, for example. I don't think shields are important if you have your Evasion high like I did.

jrt05

Quote from: AwesomeHairo on April 23, 2022, 08:41:08 PM
So there shouldn't be any difficulty raising Evasion if you do the "equip dual shields and wait for monsters to run" method at the beginning. My Agility, thus my Evasion, has improved and the game felt fair until I reach Deist Cave.

What method is this? I just equip 2 shields, then use attack like normal? And slowly kill them that way?

AwesomeHairo

Quote from: jrt05 on April 23, 2022, 10:27:17 PM
What method is this? I just equip 2 shields, then use attack like normal? And slowly kill them that way?

Pretty much due to still being able to damage the monster with two shields somehow with a critical hit haha. But what it's supposed to do is have the monsters attack you and you get points toward your shield skill level, thus a higher chance of Agility, thus higher Evasion. Since you are using the Attack command (and not taking it back), it does count toward increasing Strength, too!

After a while, the monsters will run away since they have very low morale values around the starting area, but like I said, due to a "feature", you can still somehow damage using two shields sometimes.

I already forgot, but I think you can naturally get the Shield skill level to Level 3 by the time you come back to get Minwu, which is enough to get the Evasion train going.

abw

Quote from: ScarabEnigma on March 17, 2022, 07:53:35 PM
Errr... my apologies, but wouldn't it be better to use what I had mentioned for the unbreakable holy bit?
If I had more free time, probably, but between verifying that the break chance byte really is unused by monsters (given the other bugs related to breakability, this is not something I care to accept on faith alone) and testing the changes (no handy save states), it was simply faster to steal the Cottage effect. I'm getting maybe an hour or two of useful free time per month and have several other things that also want my attention, so time is a huge issue for me at this point.

Quote from: flamefury on April 05, 2022, 11:23:32 AM
Hey guys FYI the PSP version of Ultima was cracked and explained in detail here:
Nice! That damage formula seems even more OP than what we're currently using, which is already pretty strong for a reasonably-levelled character. The PSP version is easier overall right? If so, I'm not sure whether we should update the NES formula to match the PSP's or not.

Quote from: AwesomeHairo on April 21, 2022, 07:12:45 PM
I'm almost done playtesting my localised translation and I've noticed this regarding the gil amount: [...] But is this a known issue?
Yes, that looks like the same issue I noticed myself and fixed in the latest patches (linked above, not submitted to RHDN yet). The actual gil amount in RAM is fine, but there was an error in the new display code.

Quote from: jrt05 on April 23, 2022, 09:13:47 AM
Hello, I just wanted to give some feedback on this hack.

1. I really like what you did. You fixed a ton of things that needed to be fixed.
Thanks!

Quote from: jrt05 on April 23, 2022, 09:13:47 AM
2. You made this game more grindy while fixing the select/cancel bug.

I am playing a no-exploit run. That means no select/cancel, no attacking my own party, no using sap, etc. Its really good that you fixed the RNG, I've been charting how many times my characters get attacked, it's fairly even.

The majority of fights last 1-2 rounds. During those fights, the enemies rarely attack me, since they are dead, or in the back row. This means my characters defenses are extremely slow ty raise. This is because of the fix in "The same logic also leads to the less famous 'get credit for stuff that never happened' bug".

Also, fights that only last 1 round, usually only 1 or 2 characters gets a combat skill. Because of the already grindy nature of the game, and the difficulty of raising defense (especially evasion), and how important evasion is, I think it would have been better to keep the "get credit for stuff that never happened" bug, especially since you can't exploit it in any meaningful way.
In my own playthroughs after understanding how the mechanics work, I actually found that my stats stayed more-or-less where they needed to be just by playing the game normally, except for max MP and magic skill levels, which still required much grinding to raise. The Restored patch attempts to address the skill level issue by allowing passive growth on skills, which gets you higher level spells with far less work, which in turn reduces the amount of grinding required to get max MP boosts (since higher level spells cost more MP which means you don't need to cast as many of them to get enough MP loss to trigger stat gain, so there's less need for artificially dragging out battles in order to have enough rounds to cast enough spells to lose enough MP).

It's definitely still not perfect, but these are mostly bugfix patches; balance is a separate issue.

For evasion specifically, the RNG fix generally has a greater impact on evasion growth than changing the action counting from command selection to command execution; the latter costs you at most 1 point per enemy per battle, but the former spreads monster attacks out evenly, which makes it harder for any one character to be attacked enough times to overcome their growth barrier.

Quote from: AwesomeHairo on April 24, 2022, 11:46:27 AM
Pretty much due to still being able to damage the monster with two shields somehow with a critical hit haha.
Shields still count as weapons, they just have really low damage values and no accuracy bonus :P.

flamefury

Quote from: abw on April 24, 2022, 03:38:46 PM
Nice! That damage formula seems even more OP than what we're currently using, which is already pretty strong for a reasonably-levelled character. The PSP version is easier overall right? If so, I'm not sure whether we should update the NES formula to match the PSP's or not.

Had to do some digging to find the formula you were using, this is the one right?
Quote from: abw on May 16, 2021, 04:38:53 PM
This we knew about, though we're not sure what the damage formula is in the remakes. For this project, Ultima currently works mostly like a normal unresistable spell but its base spell power is 25 + the sum of all of the caster's skill levels (counting from 0); whether that's too powerful or not is still undecided.

I made a quick chart to compare the progress of the damage. I didn't include random bonus or critical hit just for the sake of stability:



As I understood magic damage, it does a guaranteed number of hits equal to its level, plus an additional number of missable hits equal to its level, so I made a row for 32 hits (Ultima Lv16, no hits missing) in case that was how it was done for Restored (though looking at it now, I'm guessing that's not what you did, seems way overpowered haha).

The PSP Ultima only ever does hits equal to its level. It is also a little bit funny because the +100 isn't part of what gets multiplied by the Ultima level.

But as you can see, the PSP Ultima is actually weaker until the character's level sum is 288, when it starts to grow much faster.

On a "normal"ish playthrough of the PSP version I just completed (was magic-only at the start, but I started to grind up weapons a little bit by the time I got Ultima), I ended the game with Ultima 16 and it only did ~900-1000 or so damage (Looks like I was in the 120~144 level sum range), still getting outdamaged by Holy and Flare at Lv8~10. I don't see any way of having the PSP Ultima overpower Holy/Flare in a casual playthrough, and the only way it'd get to that stage is if someone was specifically grinding it up. They'd need to be somewhere in the 168~216 level sum range, which is 21~27 Lv8 weapons and/or spells to overpower the Lv8 Holy/Flares I was dealing (~1400 vs high MDEF targets, ~2000 against more common mobs and bosses).

I think it's a fair thing to put in. In general, it's a weaker option unless you put in the time to make it overpowered.

AwesomeHairo

If you guys want some more data to decide what to do with Ultima, I can share how much damage Flare and Ultima has done from my characters.

Starting with Maria, with her 53 Intellect and Level 3 Flare, she does around 170 to 225 damage on enemies in Semitt Falls (where the weakest enemies can be found after the Cyclone).

Firion has 2 out of the 8 Weapon Skills (Sword and Shield) at Level 8. He has Cure 11, Esuna 6, Teleport 7, Raise 6, and Blink 6. Ultima itself is 3. The damage it makes in the same location is from around 320 to 425.

flamefury

Quote from: AwesomeHairo on April 27, 2022, 05:23:58 PM
If you guys want some more data to decide what to do with Ultima, I can share how much damage Flare and Ultima has done from my characters.

Starting with Maria, with her 53 Intellect and Level 3 Flare, she does around 170 to 225 damage on enemies in Semitt Falls (where the weakest enemies can be found after the Cyclone).

Firion has 2 out of the 8 Weapon Skills (Sword and Shield) at Level 8. He has Cure 11, Esuna 6, Teleport 7, Raise 6, and Blink 6. Ultima itself is 3. The damage it makes in the same location is from around 320 to 425.

For a little more context, under PSP formula, your Firion (Level sum = 55, tier 2) Ultima 3 would deal 3 * (2 + 1)^2 + 100 = 127 minimum. Then random bonus is 256 % 127 = 127 so the range is 127~254.

Comparable to the Flare 3, much weaker than the Restored Ultima.

Pokecoder

Are you planning to do anything about the ability to switch weapons mid-battle in order to level up different weapons? This is quite abusable if you start with shields and then switch to another weapon like swords after attacking a few times with the shields, as the game will apply all shield weapon exp to the swords at the end of battle.
pokemon xenoverse is the only site where you can find every kind of pokemons games
www.pokemonxenoverse.com

abw

Quote from: flamefury on April 27, 2022, 12:54:50 AM
Had to do some digging to find the formula you were using, this is the one right?
Sometime shortly after that the formula was updated to divide the sum of skill levels by 8, because
Quote from: flamefury on April 27, 2022, 12:54:50 AM
As I understood magic damage, it does a guaranteed number of hits equal to its level, plus an additional number of missable hits equal to its level, so I made a row for 32 hits (Ultima Lv16, no hits missing) in case that was how it was done for Restored (though looking at it now, I'm guessing that's not what you did, seems way overpowered haha).
is exactly how it works, and that was indeed way overpowered :D.

"Working like a normal unresistable spell" translates to "spell power is increased by floor(caster's Spirit / 4)" + "average number of hits = spell level + spell level * accuracy %" + "target's magic evasion is ignored", so the formula for Ultima looks more like:

spell power = 25 + floor(caster's Spirit / 4) + floor(sum(caster's skill levels) / 8) [skill levels are 0..15, not 1..16]

and then that spell power gets passed in to the standard routine for unresistable spell damage:

average damage = (spell power * (1 + random(0..spell power)) + spell power * 0.05) * (spell level * accuracy %)

So in the PSP formula, it looks like the base damage value incorporates most of the damage calculation, and the average damage is basically the base damage * 1.05, but in the NES version, the spell power is part of a larger calculation, and the average damage is basically (spell power * 1.55) * number of hits.

The damage functions scale very differently (PSP is quadratic in skill levels vs. linear in ours), but in general, the PSP version appears to be more powerful than our current version for low levels of Ultima (where the +100 dominates) regardless of the caster's overall power and when the caster has at least 50% of their maximum power (where the skill level squared dominates) regardless of Ultima's level.

What does all that mean for Restored? I don't know - balance is not my strong suit :P.

If it makes any difference, note that in the NES version, the magic system only has magic evasion (chance to reduce number of hits), but not magic defense (reduce damage per hit).

Quote from: Pokecoder on April 29, 2022, 03:47:56 AM
Are you planning to do anything about the ability to switch weapons mid-battle in order to level up different weapons? This is quite abusable if you start with shields and then switch to another weapon like swords after attacking a few times with the shields, as the game will apply all shield weapon exp to the swords at the end of battle.
That's an idea that's been considered, but it would require larger RAM changes than we've had to make so far. Leaving aside the issue of me not having any time to implement it, I'd also want to have a better RAM map to be confident of not breaking something else accidentally.