News:

11 March 2016 - Forum Rules

Main Menu

Lufia-Patches by Artemis

Started by FlamePurge, September 01, 2015, 04:42:13 AM

Previous topic - Next topic

Artemis

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

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

#42
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.

rainponcho

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

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

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

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.


Artemis

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

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

Quote from: Artemis 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.

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.
Cigarettes, ice-cream, figurines of the Virgin Mary...

Artemis

Quote from: rainponcho on October 15, 2016, 02:34:59 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

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

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

#54
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.

Artemis

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

#56
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

Artemis

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

#58
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.

Artemis