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

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

rainponcho

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #140 on: October 28, 2016, 02:06:41 pm »
Quote
Like in the battle system it should be enough to test the problem itself? No real potential to screw some other stuff up?

There's a smaller chance it could mess up something else. You'd have to play a lot of battles in lots of rare ways to have a remote chance of catching something.


Quote
So nothing more to specifally test?

You'd have to be very annoying to the game - try lots of stuff testers couldn't think of. Given how many exotic bugs have been found and fixed, there's probably still more lurking in the deep hiding spots.


Quote
I've played through the Ancient Cave a bit--still trying to get a Blue Chest armor for Tia, a blue chest weapon for Maxim, and blue chest helmets for Dekar and Maxim. (Selan was the first fully-outfitted person. Woohoo!) I've had no problems at all.

Cool!

I don't think either of us changed Blue Chest ratios so it's still that 5%-ish chance every level.

Artemis

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #141 on: October 28, 2016, 08:46:54 pm »
Problem is old method treats broken wall as "free" tile - walk any direction at height 0. New fix correctly checks wall boundary flags. But now uses original wall height of 3. Skill ring items fly over monster's head (3 wall vs 0 enemy) = miss. There is a possible method to fix this engine bug, which requires a whole gameplay of testing (like pot glitch). In theory, any broken wall could have this height problem. Can't fix this for awhile.

Thinking about it and instead of fixing the whole engine, would it be possible to just disable the ring menu options at that tile - just exactly as it is on the adjacent tile to the top.

I compared it to another similar wall and that's probably how it's supposed to be, anyway.

Here's a savestate at the another place where this is done correctly:
http://www.mediafire.com/file/hqr1atzaqsxhjjq/lufia2.006
« Last Edit: October 28, 2016, 09:23:35 pm by Artemis »

rainponcho

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #142 on: October 28, 2016, 10:28:07 pm »
Ancient Tower 4f - wallfix + ring disabled
*edit* - broke exit


edit2: Going to redo (some) boundary tile fixes. Found better way - thanks for that savestate. Also hero is not allowed to use sword in a door frameway (ancient tower 4f vs. tower of truth 1f) - might look into this also (:shrug:)
« Last Edit: October 28, 2016, 11:38:18 pm by rainponcho »

vivify93

  • Hero Member
  • *****
  • Posts: 942
  • White Wizard
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #143 on: October 29, 2016, 06:13:42 am »
Here's a small but annoying glitch. In the Config menu, if you set "Status Cursor" to "Memory," when you save the game and exit it either via turning off the system or resetting, it gets set back to its default, "Clear." The other config options get saved, though.
All my life I've tried to fight what history has given me.

rainponcho

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #144 on: October 29, 2016, 02:33:27 pm »
Undo old Ancient Tower 4F fix (92b07). Then apply this one.
http://s000.tinyupload.com/index.php?file_id=49040591915383291583

Proper wall fix + Skill ring fix. Only affects this one wall, no others.


Have to "proper" check Ancient Shrine 1F + Shrine of Vengenace pillars again, to be sure.

Artemis

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #145 on: October 29, 2016, 04:56:35 pm »
Have to "proper" check Ancient Shrine 1F + Shrine of Vengenace pillars again, to be sure.

As far as I can tell, these fixes work without problems.

So that leaves the status cursor thing, eh?

rainponcho

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #146 on: October 29, 2016, 07:33:22 pm »

Artemis

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #147 on: October 29, 2016, 09:24:09 pm »
One question about the save999 patch: So it correctly saves the max HP/MP - and the current HP/MP are set to exactly 1000, but of course only if it's bigger than 1000. And every in-game way of healing like inns just heals them normally without problems. Is everything I said correct?

If so, that's good. I mean there has to be some kind of penalty for over the top farming. :)
« Last Edit: October 29, 2016, 09:38:01 pm by Artemis »

rainponcho

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #148 on: October 29, 2016, 10:27:54 pm »
Test results:
Load game. Current HP + MP = 999. Max HP + MP = whatever value you saved at (1000+). Resting at inn gives current hp, mp at max values (> 999). Potions also work like normal.

Artemis

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #149 on: October 29, 2016, 10:35:29 pm »
Did you make it so because of my suggestion or because it worked better this way than storing the current HP/MP values completely as well?

rainponcho

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #150 on: October 29, 2016, 10:52:18 pm »
Both.

When you store a current hp, mp value > 1023 (3FF), you get save corruption with weird values problem. Damage not reversible. Cannot recover old values.

Used 999 because that's the typical "max" value game shows you. And it's only 24 points from the absolute max when saving.

And 999 is an easy to understand number.


edit: It'd take a filthy amount of expansion work to save correct hp, mp values. Game is not equipped to handle 1024 (400) because it uses bit compression techniques (03 = 2 bits max, 04 = 3 bits => incorrect storage, readback).
« Last Edit: October 29, 2016, 11:00:18 pm by rainponcho »

Artemis

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #151 on: October 29, 2016, 10:55:42 pm »
I tested it and the saved value is actually 1000 instead of 999. But considering that 999 (in case if it's actually exactly 999) gets saved properly as 999 (instead of 1000), I guess that's fine and there are no problems, right?

rainponcho

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #152 on: October 29, 2016, 11:11:06 pm »
Huh. That's funny. You're right. Checked uploaded patch and it saves 1000.

Hex edit save_999.ips - 66h = E7. That will make it 999.


No problems either way. But for precision sake, that's the updated patch.

Artemis

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #153 on: October 29, 2016, 11:21:27 pm »
Okay, however, everything should work now.

October 29, 2016, 11:28:23 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
And there is absolutely no problem regarding saving the maximum HP/MP values, right?
« Last Edit: October 29, 2016, 11:28:23 pm by Artemis »

rainponcho

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #154 on: October 29, 2016, 11:44:58 pm »
I don't know of any problems with max hp, mp. It looks like it works so far, surprising that it's possible to even get that high above 999.

Artemis

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #155 on: October 30, 2016, 12:02:34 am »
Hmm, I tested it with high values (over 9000) and it didn't work correctly any more.

Can you make it so that the max values also get capped at 999 in the same way? (But of course you still can get more HP/MP, you just cannot in-game save it any more.)
« Last Edit: October 30, 2016, 12:17:27 am by Artemis »

rainponcho

  • Sr. Member
  • ****
  • Posts: 275
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #156 on: October 30, 2016, 09:45:36 am »
Savestate? I hex edited max hp to zero then saved. On loading, game recomputed max hp from scratch back to correct value. So it's some math formula based on lv + # stat potions used?

This could require limiting in-game max hp, mp when "invisible" ceiling is reached using special method.

Artemis

  • Full Member
  • ***
  • Posts: 188
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #157 on: October 30, 2016, 09:55:00 am »
That might explain it as I used some over 9000-sources.

However, could you make a similar cap for max values nevertheless. Because when farming for a good 'maximum' value, 999 just looks better than 1003 or 1005. Considering it's annoying to exactly dose the HP and MP sources, but then saving and reloading would auto-correct all these surplus max HP and max MP.

But for Kureji Lufia it's good to have the possibility of having more than 999, so it really only should get capped when saving and reloading.
« Last Edit: October 30, 2016, 10:12:58 am by Artemis »

gadesx

  • Full Member
  • ***
  • Posts: 216
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #158 on: October 30, 2016, 02:02:49 pm »
In the 90's I played up to get all characters with 999HP
battling this enemy
that drop Life Potion in Bound Kingdom to Aleyn tower a lot of time.

Later discovered that Bone Gorem drop Spell Potion.

Btw my cartridge erased my saves at random times and I lost all many times.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6581
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: Lufia-Patches by Artemis
« Reply #159 on: October 30, 2016, 08:46:23 pm »
If high values corrupt save files, would it be possible to find the save function and do ASM hacks to it to add bounds checking for all the values as they are read from RAM and replace with safe values if needed (before being written to SRAM)?
"My watch says 30 chickens" Google, 2018