News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Poll

Restored: ROM space allowing, should attacks be tallied for each weapon type used in combat? (support multiple weapon EXP for weapon swapping)

No. Restored already has passive growth, only end-of-combat weapon should receive bonus.
Yes. All weapons used in combat should receive this bonus credit.

Author Topic: Final Fantasy II Restored  (Read 171614 times)

redmagejoe

  • Sr. Member
  • ****
  • Posts: 326
    • View Profile
Re: Final Fantasy II Restored
« Reply #520 on: April 21, 2021, 03:01:29 am »
That IPS I linked is the Restored patch. That's the name abw's been using for that file since the start of this project, before we had official names for the two branches.

Chicken Knife

  • Hero Member
  • *****
  • Posts: 527
    • View Profile
Re: Final Fantasy II Restored
« Reply #521 on: April 21, 2021, 03:39:29 am »
Thank you for clarifying. I started poking around a bit, and I may have come across another issue. This is probably just a limitation of the original game that we will need to live with for now, but let me bring it up in case it was introduced.

You know how the ferry boat takes you between Paloom and Poft? I think I had inadvertently purchased a trip at Paloom but I never got on the boat. Then I walked all the way to Poft and talked to the sailor who normally offers the trip back to Paloom. Instead he let me purchase another trip to Poft, which I was already in. The boat did not appear outside Poft when I said yes. I walked back to Paloom, got on the boat back to Poft, and then the Poft sailor's dialogue fixed where he offered a trip to Paloom. It would obviously be more coherent if the Poft sailor said that the ship is currently docked in Paloom in this instance, rather than offer you a ticket to the same town you are in.

I'm guessing the fix to this would take time, which abw doesn't have, so not a big deal. We can live with it if it's an original bug.

redmagejoe

  • Sr. Member
  • ****
  • Posts: 326
    • View Profile
Re: Final Fantasy II Restored
« Reply #522 on: April 21, 2021, 03:41:58 am »
That's a known bug from vanilla and is listed in the first post under our to-do list.

Chicken Knife

  • Hero Member
  • *****
  • Posts: 527
    • View Profile
Re: Final Fantasy II Restored
« Reply #523 on: April 21, 2021, 03:43:01 am »
Ah, that list will be helpful for me to review. Thanks.

redmagejoe

  • Sr. Member
  • ****
  • Posts: 326
    • View Profile
Re: Final Fantasy II Restored
« Reply #524 on: April 21, 2021, 12:42:27 pm »
The submission has been updated with the fixes.

Chicken Knife

  • Hero Member
  • *****
  • Posts: 527
    • View Profile
Re: Final Fantasy II Restored
« Reply #525 on: April 22, 2021, 09:01:54 pm »
I have a game breaking bug to report unfortunately.

Immediately after reading this text from the Dark Knight appearing just before the Dreadnought, the game permanently freezes.


redmagejoe

  • Sr. Member
  • ****
  • Posts: 326
    • View Profile
Re: Final Fantasy II Restored
« Reply #526 on: April 22, 2021, 09:09:50 pm »
Your playtesting to get to the bottom of these issues is definitely appreciated. :-\

What exactly happens? Does it stay on this text box and refuse to take any player input? Does the Dark Knight still walk away and just leave you without control of your character? I'm assuming it's a soft lock with BGM still playing and such?

Chicken Knife

  • Hero Member
  • *****
  • Posts: 527
    • View Profile
Re: Final Fantasy II Restored
« Reply #527 on: April 22, 2021, 09:33:02 pm »
I'm happy to help with this. One of my personal goals as an aspiring hacker was to one day *make* a fixed version of NES FF2, so after you guys did all the work to get this far, the least I can do is provide some QC.

To answer your questions, you see the dialogue window close as normal, and immediately after, with the dark knight sprite still in the same position, the game totally freezes, including the BGM coming to a halt. There is no response to button input.

redmagejoe

  • Sr. Member
  • ****
  • Posts: 326
    • View Profile
Re: Final Fantasy II Restored
« Reply #528 on: April 22, 2021, 09:34:15 pm »
Uh oh. That sounds worse than a soft lock. Did we hit a BRK code somewhere?

Mirage

  • Jr. Member
  • **
  • Posts: 4
    • View Profile
Re: Final Fantasy II Restored
« Reply #529 on: April 22, 2021, 11:29:19 pm »
Just started playing through the Restored version, and I'm liking it so far (just got the Snowcraft). The passive skill growth is especially nice, since it helped cut down on the skill grind. As for the issue with the Dark Knight dialogue, I haven't run into any problems with that, so I wouldn't know what's causing it.

abw

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: Final Fantasy II Restored
« Reply #530 on: April 22, 2021, 11:53:16 pm »
Yeah, I was afraid of that - calling the routine for setting up the scripted motion variables is the other thing this block of code handles. Apparently there was a reason I hadn't pushed this change out earlier :P.

I've uploaded another fix.

redmagejoe

  • Sr. Member
  • ****
  • Posts: 326
    • View Profile
Re: Final Fantasy II Restored
« Reply #531 on: April 23, 2021, 12:09:15 am »
Since it would be extra work to maintain and was an experimental feature anyway, I think I'm going to remove from the upload the "No Growth Barrier" version. Expect the submission page to be updated soon.

Thank you to everyone who is playtesting. I humbly ask that you try your best to break the game beyond those bugs listed on the front page after your "average player" playthrough. :P

mcgeepride

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Final Fantasy II Restored
« Reply #532 on: April 26, 2021, 07:49:08 am »
Great work!
I really only use the bug-fixed version, I think that an optional patch should be included that frees some the inventory space like the restored version.

abw

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: Final Fantasy II Restored
« Reply #533 on: April 27, 2021, 12:21:52 am »
Sorry, I didn't see this earlier. For all the ones that can be triggered in the original game, we've either fixed them or decided they probably aren't bugs, but the issues that can only be triggered by hacking are still present. I suppose we ought to fix them too :P.

player hp and mp can exceed 9999 and 999 respectively, both can reach up to 65535, exceeding resets values. (already know this is known though)
This one is fixed.

enemy hp and mp can similarly overflow to above, if enemy hp or mp reach close enough to 65535 and cure is casted, it may overflow their hp, thus the next hit would kill.
This one is not fixed, but it can't be triggered without hacking since no enemy has more than 10000 HP/MP and there's no way you can cure more than 55535 HP/MP.

attack stat can overflow if it hits above 255, it could be achieved if a weapon had 205 or greater attack and user's strength is 99 while not equipping a shield
This one is not fixed, but it can't be triggered without hacking since the strongest weapon in the game has an attack power of 150 and strength can't add more than 49 points.

it could more easily happen in battle if berserk is used while at high enough level.
This one is fixed.

its possible to overflow weapon/spell growth if you target cancel or do the same action 256 consecutive times in a single battle (though have not confirmed it can occur with magics), the end result is leveling up every battle afterward automatically.
This one is fixed.

if Starfall is put into enemy AI outside of final battle, it will not be used at all, if used forcibly via player using item magic, the spell animation will freeze the game.
This one is not fixed. There's nothing special in the damage calculation for Starfall, so maybe this is coming from the animation handler? I do know that the final battle Emperor is the only creature of his size and is positioned differently from every other monster in the game, so possibly some Starfall animation math is relying on that difference.

the wall bug is the result of wall forcing the animation of whatever spell directed at the target to play in full, and since instant death spell animations remove the enemy graphic from field, it works as the vanish/doom of ff2. If it was possible to instead have wall force a specific animation like how absorb forces cure animation, that could fix?
This one is fixed, by forcing a specific spell animation. The code for killing monsters in the animation handlers still exists and can be reclaimed if more space in bank B is needed.

having any status effect that does not wear off at end of battle, at end of battle, prevents any growth in any used skill or spell, rather than just for petrify, toad, and KO.
This one we've left as-is. Personally, I'm inclined towards implementing a more nuanced system, where different ailments prevent different types of growth, possibly something like Blind does not prevent growth, Venom prevents stat growth, Curse, Stone, and KO prevent all growth, Amnesia prevents spell skill growth, and Toad prevents weapon and spell skill growth.

The graphic of the final battle Emperor is missing a tile in battle, Tile EA. However, it is a blank tile, a quick hex edit of the name table location (which fortunately is not compressed), will fix it. :P
Ha, that's a funny one and is indeed a quick change. It makes no difference to the original graphics, but I suppose using EA instead of 00 would make it easier for people to edit the Emperor's graphics with a tile editor without needing to track down and modify the name table in ROM.

any status effect afflicted by weapon will hit whether your equipment has resist to spells that inflict that ailment or not, the only prevention of physical attack afflicted debuffs is high magic defense, gained either naturally or via shell spell being stacked in battle. The bugfix of later versions of ff1 treated their counterpart of this instance as a bug while ignoring the ff2 version in later ports, enabling ancient sword to inflict curse with ease, or if killer bow was accessible, one hit kill any enemy in the game.
This one we've left as-is under the belief that the same effects can be inflicted both magically and physically.

another issue with Wall is it blocks exclusively black magic category spells, even beneficial spells like berserk or haste get blocked, future ff2 ports allow buffing black magic to be unaffected by wall, but also disallow wall from blocking white magics (presumably because it would be far too powerful a spell when it blocks even ultima).
This one we've left as-is, but it could be interesting to change Wall's behaviour in Restored. Yet another issue with Wall is that no enemy casts black magic under level 4, so you have to get Wall up to level 4 before it has a chance to do anything useful; fixing that is more of a rebalancing project than a bug fix.

Well, that's all I can think of right now, if i can recall any more, i may post.
Thanks for the list - some of these were new to me!

You know how the ferry boat takes you between Paloom and Poft? I think I had inadvertently purchased a trip at Paloom but I never got on the boat. Then I walked all the way to Poft and talked to the sailor who normally offers the trip back to Paloom. Instead he let me purchase another trip to Poft, which I was already in. The boat did not appear outside Poft when I said yes. I walked back to Paloom, got on the boat back to Poft, and then the Poft sailor's dialogue fixed where he offered a trip to Paloom. It would obviously be more coherent if the Poft sailor said that the ship is currently docked in Paloom in this instance, rather than offer you a ticket to the same town you are in.

I'm guessing the fix to this would take time, which abw doesn't have, so not a big deal. We can live with it if it's an original bug.
I had spent some time looking at this earlier, and it turns out to not be a difficult change to make as long as you don't mind cutting some corners. The slightly tricky part is that the ROM only contains the Paloom dock position in the new game initialization data, and the ferry's position after the game starts is determined by running through its motion scripts. Rather than writing a bunch of code for checking the ferry's current position, deciding which town it was closest to, and then if it's in the wrong town determining the ferry position for the right town by running through the appropriate motion script, I've just hardcoded the ferry to appear outside of the current town whenever you talk to a ticket agent. While I do find it annoying, (this part of) the original behaviour does not appear to be a bug, so I've only made it in the Restored patch.

redmagejoe

  • Sr. Member
  • ****
  • Posts: 326
    • View Profile
Re: Final Fantasy II Restored
« Reply #534 on: April 27, 2021, 12:32:19 am »
The ferry thing may have also been an oversight or time-crunch sort of thing rather than by intentional design. They did, after all, fix it in ports. Considering that money is taken from the player regardless, I'm inclined to petition for the hardcoded ferry to also be a Bug Fix thing since it very much feels "not as intended" even to the average player. I'll leave that to your discretion, though.

I'll update the submission when I get a chance.
« Last Edit: April 27, 2021, 04:07:03 am by redmagejoe »

Chicken Knife

  • Hero Member
  • *****
  • Posts: 527
    • View Profile
Re: Final Fantasy II Restored
« Reply #535 on: April 27, 2021, 08:53:02 pm »
Quote
This one we've left as-is. Personally, I'm inclined towards implementing a more nuanced system, where different ailments prevent different types of growth, possibly something like Blind does not prevent growth, Venom prevents stat growth, Curse, Stone, and KO prevent all growth, Amnesia prevents spell skill growth, and Toad prevents weapon and spell skill growth.
This is a cool thought process, but its complexity might be a bit counterintuitive to the average player. If you were going to go with this system, the one I would disagree with is poison/venom preventing all stat growth.  That status generally seems pretty minor, and having such a broad impact rubs me wrong. Maybe I could see stamina impacted? In any case, I'd probably put my two cents down on allowing all growth in all cases except for  Petrify and KO. This convoluted game system can use a bit of simplicity, I'd say. And P.S., it's very rare to see any RPG give out experience penalties for ending the battle with active status ailments outside of K.O, Petrify or maybe Curse.

Quote
Ha, that's a funny one and is indeed a quick change. It makes no difference to the original graphics, but I suppose using EA instead of 00 would make it easier for people to edit the Emperor's graphics with a tile editor without needing to track down and modify the name table in ROM.
Did I read correctly that we are leaving it up to individual players to redraw a missing tile on the Emperor's sprite? I'd suggest that this tile be drawn appropriately and implemented in the finished Bugfix & Restored versions. When I get there and size up the issue for myself, I'd be happy to draw something up and send you a patch. Fixing sprite issues is one of my things, after all. :P

Quote
The ferry thing may have also been an oversight or time-crunch sort of thing rather than by intentional design. They did, after all, fix it in ports. Considering that money is taken from the player regardless, I'm inclined to petition for the hardcoded ferry to also be a Bug Fix thing since it very much feels "not as intended" even to the average player. I'll leave that to your discretion, though.
I agree that this should be in both versions. The concept of there only being one boat which might be at one town or the other was sort of neat... kind of... but the implementation of it was a mess, and I think it's a lot more intuitive to just be able to make a ship appear after buying passage in either town. I don't think anyone would be particularly attached to the messed up way it works right now.
« Last Edit: April 27, 2021, 08:59:32 pm by Chicken Knife »

Leviathan Mist

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Re: Final Fantasy II Restored
« Reply #536 on: April 27, 2021, 11:26:31 pm »
It's nice to see this project still being discussed, even while on hiatus. I've been thinking about starting another playthrough soon, I'll post when I do. Assuming the most recent version will be uploaded at the time.

abw

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: Final Fantasy II Restored
« Reply #537 on: April 28, 2021, 12:01:20 am »
The ferry thing may have also been an oversight or time-crunch sort of thing rather than by intentional design. They did, after all, fix it in ports. Considering that money is taken from the player regardless, I'm inclined to petition for the hardcoded ferry to also be a Bug Fix thing since it very much feels "not as intended" even to the average player. I'll leave that to your discretion, though.
Yup, that also sounds quite possible, and if the behaviour was changed in later versions, that adds weight to it being unintentional. Part of me was thinking that operating a ferry service might be just a wee bit harder in a world at war than under peaceful conditions and your party might realistically be the ferry's only customers, in which case the ferry only moving after you board it sort of makes sense.

As for still taking your money when you already have a ticket, probably I'd only skip deducting the price from party gold. It would be nice if we had some text to use in that case ("hey, you already bought a ticket!" or something), but I'm trying to avoid tying these patches to any particular language or translation.

This is a cool thought process, but its complexity might be a bit counterintuitive to the average player. If you were going to go with this system, the one I would disagree with is poison/venom preventing all stat growth.
My thought there was that if your body is busy trying and failing to fight off some kind of toxin, then gaining physical stats like Strength or Agility or HP doesn't make much sense; being that ill generally also has an adverse effect on your mental capacity, so gaining Intellect etc. also seems wrong.

[poison/venom] generally seems pretty minor, and having such a broad impact rubs me wrong.
I'd also like to make Poison/Venom deal non-trivial damage, probably something percentage based (1/16? 1/32? current HP or max HP? I'm not sure where the right balance is). Right now they deal 0-2/2-4 damage per round, which is barely worth bothering with even at the start of the game, let alone when you have hundreds or thousands of HP to spare.

Did I read correctly that we are leaving it up to individual players to redraw a missing tile on the Emperor's sprite?
Yes and no. In the Emperor's tile set, tiles 00 and EA are identical solid black tiles, so which one gets used makes no difference to the original graphics. Many of the items on ScarabEnigma's bug list only apply if you're hacking the game, though, and in the context of creating a graphics hack, having that section of the tile map be $E8,$E9,$EA,$EB is nicer to work in a tile editor with than the existing $E8,$E9,$00,$EB.

Topaz Light

  • Jr. Member
  • **
  • Posts: 4
  • Right on!!
    • View Profile
Re: Final Fantasy II Restored
« Reply #538 on: April 28, 2021, 07:28:09 pm »
I'm looking to make some of my own changes to the specific rates at which certain skill types grow, and looking through this thread, I found this calculation for skills that gain "experience" with each use (spells, weapon ranks, evasion, magic defense):

Currently, exp gain for any skill with at least 1 action (this includes Evasion and Magic Resist skill levels in addition to weapon/spell levels) is calculated as
Code: [Select]
(base growth amount for type of skill) + (# of actions) + (battle rank) - (base growth barrier for type of skill) - (skill level)

What I'm hoping to change is the "base growth barrier for type of skill" constants here. Where are those located in the ROM, and which values correspond to which skill type?
Who has lost his tail?
The forgotten one of the ship that sails the cosmos.

ScarabEnigma

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: Final Fantasy II Restored
« Reply #539 on: April 29, 2021, 03:51:20 pm »
ultimately, the 'bugs' I mentioned previously were many discoveries when doing some ff2 hacking of my own. Suppose I have some more bugs or quirks discovered that oughta be mentioned.

Sure the attack stat overflow bug cannot trigger normally, however if the dual wield bug were fixed based on how it functions in later versions, then it'd be possible to achieve more than 255 attack via dual wielding, which should apply both attack values together.

weapon type doesn't determine two handed required, rather some other thing does, so any bow changed to a non bow weapon type will still possess the bow's two handed requirement.

Evasion percent for physical or magical can exceed 99%, the result is action speed in battle that enemies cannot keep up with and preemptive strikes happening far more often than they should, and of course overflow can occur, most easily achieved with high shield level

multiple pieces of equipment that increase the same stat by 10 cannot stack cumulatively. Wearing gold hairpin, black garb, and thief gloves for example should raise agility by 30, but only increase by 10
  - its also possible for stat boost via equipment to enable a stat to exceed 99 in value, yield A0 for example if a stat
    boost of 10 were applied to a stat currently at 99

the reason why the black tiles at the bottom left corner of screen don't flash the color of active spell casts or flashing spell animations is because its a single color tile, similarly to FF when editing dialogue. If you were to edit the palette of the battle menu to add blue, you'd see the entire screen where the menu is at will become blue as well.

when hitting a elemental weakness, the spell automatically hits target and if damages, does bonus damage, ultimately if a enemy has a weakness to a status element, mind, matter, body, or death, the debuff used will unconditionally hit. Meanwhile resist does the opposite and spell unconditionally misses or if damaging, does halved damage with 0 accuracy

Even if enemy has 0 morale stat (the stat that affects chances of running away), high enough party hp will still cause them flee, even if say... their attack patterns could still compete on doing damage to the party

the damage formula for Tnad, Wave, and Quak is same as standard, except it ignores enemy magic defense and elemental resistance, although absorb still works.

The original japanese version and the unreleased english prototype featured no tiles behind the menu portraits of characters, resulting in a black background much more suited for portrait depictions, I cannot recall why demiforce did away with that but it'd be neat to see it restored, just unsure how to do that.

I read there is consideration to demake the later port bgms, but have you considered implementing the 4 unused ff2 music tracks? The shop theme (obvious where this goes), second dungeon theme (was remixed in ff6 as magic house, and probably would work great as the bgm in mysidia cave and maybe snow cavern?), airship theme, and battle 3. As for which of the later port bgm versions to try and backport, I'd suggest the WSC bgms where they initially debuted, they are 8 bit but at the same time not nes 8 bit.

Why is it that the chocobo in chocobo's forest appears and disappears and only is facing frontward while doing a side walk? Because all those shop and revival stations use a invisible npc which uses the blanked chocobo front facing sprite sheet. Were you to use yy-chr or similar to give the chocobo sprite space a full sheet, you'll see a chocobo at the counter of every shop, inside the goddess statue, and hanging out on the revival sigil at the rebel base. It probably would've been a bit more viable to instead use the dark emperor's sprite space, blank out the front facing and have the back facing be frontward facing, since despite only viewable facing forward, the emperor in both incarnations has a complete sheet of directions faced. Although i don't know the success of actually having the dark emperor spawn on screen facing backwards during their debut, meanwhile a unique event trigger wall at the final floor of pandemonium triggers the dialogue and battle if you stand anywhere on the row of tiles before where the emperor is positioned.

Well, that's all that comes to mind once again. not sure if ill have anything else worth mentioning for the time being.