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

Author Topic: Lufia-Patches by Artemis  (Read 60887 times)

Artemis

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #40 on: October 14, 2016, 01:02:52 pm »
I'm working on savestates.

I think the boundaries should be fixed only if it's considerably easy, as otherwise it's just not worth the effort. I agree.

I'm not sure, though, whether the Ancient Cave armor issue is an actual bug or a design decision instead.


gadesx

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #41 on: October 14, 2016, 01:24:29 pm »
There's many bugs in the US version, the spanish version I played always
has someones too,
- Free Inn stay if you don't have the needed money
- The Egg dragon curation, that give more of 65535 and has low life
- Dragon mountain, there's part of the wall "walkable" behind the bridge
- The palette of 1 or 2 enemies that is the same.

Artemis

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #42 on: October 14, 2016, 01:36:38 pm »
Free inn stay I wouldn't consider a glitch. Instead it's a design decision to ensure you always can refresh yourself easily.

Palettes and Egg Dragon are already fixed.

And where exactly is the Dragon mountain wall?



And here are some savestates:
http://www.mediafire.com/file/k920b2mb5aw2k2d/Savestat.zip
http://www.mediafire.com/file/6zmd9aat15osqfb/savestates2.zip

I'd say the only real important things out of them are the poison bug and the mirror bug as they CAN be really annoying if you're unlucky.
« Last Edit: October 14, 2016, 07:50:49 pm by Artemis »

rainponcho

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #43 on: October 14, 2016, 08:49:38 pm »
Whew! That's a lot of items. Going by priority and then what can be fixed "easily" or fast.

Poison fix
http://s000.tinyupload.com/index.php?file_id=00876775146938062812



Quote
Do you think it would be OK to apply the most recent two patches over that patch, or would I have to create my changes again?

Probably is okay. I just started over with a clean frue rom.


edit: Thank you very much for all the states btw!

Artemis

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #44 on: October 14, 2016, 09:29:08 pm »
Well, making the states was the easier part, anyway :)

I guess the mirror bug might be more complicated as unlike the poison bug the exact conditions in order for it to happen aren't as easy to grasp.


rainponcho

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #45 on: October 14, 2016, 11:01:13 pm »
Dark Summoner gets 2 turns per round. Perish on turn1. Turn2 runs "illegal" or "dummy" or "corrupted" command = crash.

Studying this some more. Maybe we'll get a fix for this weekend.

Artemis

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #46 on: October 15, 2016, 08:51:41 am »
Nah, if an illegal command like this happens in the enemy code happens, instead of freezing it will reset to the intro screen.

It also happens at other enemies, I forgot who exactly, though.

The only constant thing I had was that the mirror spell was activated and an enemy attack got reflected back which killed said enemy. Afaik it can happen in both cases dying by instant death and dying back normal HP damage.

So, the cause does seem to be somewhere in the handling of reflected attacks.

rainponcho

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #47 on: October 15, 2016, 01:35:42 pm »

Artemis

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #48 on: October 15, 2016, 02:07:54 pm »
So, what actually went wrong there? I never really got it as it happened seemingly randomly whereas in most cases everything goes fine instead.

rainponcho

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #49 on: October 15, 2016, 02:34:59 pm »
Pico fix
http://s000.tinyupload.com/index.php?file_id=00060906394930889153

recomp pico.fix.bin lufia2.sfc 2DEA02 8 0


Quote
So, what actually went wrong there? I never really got it as it happened seemingly randomly whereas in most cases everything goes fine instead.

Some enemies have several turns per battle round. If they die during turn1, they're not supposed to have turn2. Game runs turn2 anyways but runs invalid data. Monster logic hangs in a loop - confusion since monster is gone.

If they die during turn2, there's no problem. Or if monster has only 1 turn.

Fix checks whether turn is forfeit - runs 00 stop command when detected.

SunGodPortal

  • Hero Member
  • *****
  • Posts: 2908
  • 2 + 2 = 5
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #50 on: October 15, 2016, 02:37:43 pm »
So, what actually went wrong there? I never really got it as it happened seemingly randomly whereas in most cases everything goes fine instead.

Perhaps part of it is more random than it seems and when certain values make their way into the code via this RNG factor the game gets an invalid variable (relative to the situation) due to a programming oversight.
War is Peace. Freedom is Slavery. Ignorance is Strength.

Artemis

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #51 on: October 15, 2016, 02:49:27 pm »
Some enemies have several turns per battle round. If they die during turn1, they're not supposed to have turn2. Game runs turn2 anyways but runs invalid data. Monster logic hangs in a loop - confusion since monster is gone.

Strange, I just tested against a modified Egg Dragon who has 3 turns. He used Zap on turn 2 which mirror reflected, thus killing him before he could perform turn 3. I had no problems.

However, it might be different because there weren't any other enemies and therefore the whole battle just ended.

But shouldn't the monster logic hang in the loop then nevertheless as well?

rainponcho

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #52 on: October 15, 2016, 03:01:08 pm »
SunGodPortal has a point - the RNG. What the monster chooses to do for the next turn is "random" - it could run valid code that exits. And each monster is scripted differently (Lufia I Guard Daos comes to mind) so some monsters may be bugged and others will always come out okay.

There might be deeper reasons also.

Artemis

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #53 on: October 15, 2016, 03:05:02 pm »
Okay, but one question: Can the same happen as well in case of heroes? Like, if Guy does his Octo-Strike, but the first attack gets reflected by Daos' Dark Reflector and therefore kills him before he can do the seven other hits.

Or in the case a capsule monster does one of these two times in a row-attacks.

Does the fix cover these cases as well?

rainponcho

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #54 on: October 15, 2016, 07:19:58 pm »
Sky Garden jump fix
http://s000.tinyupload.com/index.php?file_id=43232932813750290602

save state note: enter tower and go back outside to activate fix, same with pico fix


I'm thinking hero multi-strikes are covered by fix - same library of scripting codes. But I should check how Octo Strike works - maybe uses a special code.


edit: Octo Strike uses same code. Covered by fix.
« Last Edit: October 15, 2016, 07:31:09 pm by rainponcho »

Artemis

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #55 on: October 15, 2016, 09:16:03 pm »
So I guess all multi-strikes are fine then and covered as well, right? Like the Multi Sword's regular attack as well as the Capsule Monsters' multi-strike attacks.

rainponcho

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #56 on: October 15, 2016, 10:07:01 pm »
daos shrine 4f - boundary fix
http://s000.tinyupload.com/index.php?file_id=92920454254742068205


Multi Sword could glitch imo - only strike1 uses the multi-attack code (octo uses all 8, same as other monsters). Have different idea how to fix this.


edit:
Old Sky Garden patch accidentally reverted poison and mirror fixes - all zeroed out.


This is clean sky garden patch
http://s000.tinyupload.com/index.php?file_id=60943848939525556525


Re-apply poison after either sky garden patch.


Plus mirror v2:
http://s000.tinyupload.com/index.php?file_id=87324546678156238187

(this will work in all cases - checks death every script byte code)


There's a lot of patches to-date. This is clean aio - use on original frue rom.
http://s000.tinyupload.com/index.php?file_id=28154313254712454764
« Last Edit: October 15, 2016, 10:48:25 pm by rainponcho »

Artemis

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #57 on: October 16, 2016, 10:41:35 am »
All the patches work with Spekkio and Kureji as well, right?

And I have some more savestates. Don't care any more about getting the present ready in time. ^^
http://www.mediafire.com/file/4w8lwwhof9su34y/savestates3.zip

There's also the Dragon Mountain wall Gadesx mentioned, but I can't reproduce it and it doesn't seem to always glitch.

rainponcho

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #58 on: October 16, 2016, 10:59:29 am »
Merix Shop Walls
http://s000.tinyupload.com/index.php?file_id=08988766984738771389


Spekkio and Kureji = definitely probably yes. 95% edits are in-place.

Expansion bank E1:8000 - city cross, zap, poison asm, mirror asm. Should be good everywhere since it was clearly empty.


edit:
This is very experimental for pot sprite glitch. Could create also sorts of sprite problems.

1da50 = ea ea ea
1df5c = ea ea ea ea
1df65 = ea ea ea

There's still a bug where sprite can transform when walking (due to above changes). I can fix this but I need lots of verification about above patch.


edit2:
Capsule Monster Feeding fix

Option 1 - 14908h @ fe 00 00
Yum = fussy + 1

Option 2 - 14908h @ ea ea ea
Yum = fussy + 0

Yuck = fussy - 1

(*) fussy = item craving level


edit-x:
Inn stay never checks money. When it deducts, it clips at zero if negative.


edit-y:
Pot glitch. When you pick it up, it changes "sprite tileset" of underneath object. +8. Which causes the sprite glitch.

I have no idea when this is actually used. So very experimental still.


edit-z:
Ancient Stairs death fix
http://s000.tinyupload.com/index.php?file_id=03133666378410568884

asm uses expanded rom. should be pretty safe hack - triggers only on ancient cave reset conditions.


edit-a1:
Remaining boundary issues (spikes, wall knocked down, pillars) - I'm really not too sure about them. Game uses a special code handler which forces "free walk" when "destroyed". Since it's dynamic, I can't just edit a static nametable.

They either require really dirty ugly specific case asm hacks. Or I'd have to use a tile trick where you can only walk up-down-right on one of these special tiles. Which has its own problems.

These will take time and a decent playthrough so I understand how the game's puzzle logic works. Undecided.


Dragon Mountain - when I get around playing this game, I'll check it too.


Ancient Cave Armor "bug" - Sounds possibly a mistake. This could take awhile to rip apart the dungeon rng though. These asm hacks have been tough so far, with a lot of good fortune so far. But this is decently interesting.


Music glitch - Could be hard. Sounds like spc700 memory corruption.

Lufia report - Guess I don't understand yet. Very worn down so I'm likely taking a break and going back to finish playing Lufia I.


Thanks for all. Me time. Here goes.
« Last Edit: October 16, 2016, 10:10:20 pm by rainponcho »

Artemis

  • Full Member
  • ***
  • Posts: 183
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #59 on: October 16, 2016, 10:25:37 pm »
I see. Awesome work! :)