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

### Author Topic: Lufia: The Ruins of Lore Enhanced Project (Added wiki page for documentation!)  (Read 1335 times)

#### LucasRCD

• Jr. Member
• Posts: 23
• Avatar by @ImmatureWaffles on Twitter
##### Lufia: The Ruins of Lore Enhanced Project (Added wiki page for documentation!)
« on: October 23, 2020, 10:05:09 am »
Original title: A thread about documenting peculiar findings in Lufia: The Ruins of Lore

I really don't have a better and more straightforward name for this project of mine. This all started with me just wanting to rip the game's monster sprites, since The Spriters Resource has no such rips yet. Then this evolved into me just trying to document a bunch of things about the game, trying to see how things work. I've come to find a couple of very interesting things!

I've been keeping track of things in a text file, which started out as merely a bestiary template, then got expanded with other things. I'll just put the non-template part of the file below.

Code: [Select]
`EWRAM 02038E7C = Received EXP at the end of battle (4 bytes)EWRAM 02038E80 = Received Gold at the end of battle (4 bytes)EWRAM 0203D1E0 = Eldin's current EXP (4 bytes)EWRAM 0203D1E4 = Eldin's EXP until next level (4 bytes)EWRAM 0203D20C = Eldin's current JP (4 bytes)EWRAM 02032CA0 = Text is written on the status screen in here?EWRAM 0203D5C6 = DM 1's JP levelEXP formula: Each enemy gives out individual EXP. At the end of battle, the accumulated EXP is summed together, then extra EXP is added at the end, equivalent to accumulated EXP/5. Doesn't apply to bosses.EWRAM 02037E20 = Enemy 1's statsEWRAM 02037B90 = Enemy 2's statsEWRAM 02037CD8 = Enemy 3's statsEWRAM 02037F68 = Enemy 4's stats006D7490 and below = Enemy stat compendiumHP | AP | ATK | DEF | AGL | INT | MGR | Family | Type | Family (1 byte) Type (1 byte)00 = Bird       00 = None01 = Beast      01 = Fire02 = Bug        02 = Water03 = Sea        03 = Wind04 = Dragon     04 = Earth05 = Demon      05 = Light06 = Holy       06 = Dark07 = Plant08 = Object`
A couple of fun miscellaneous things I found out about this game. Some confirmation for these would be nice:

-The game has a very extensive debug mode, much more in-depth than the Lufia II one. It was thanks to it that I was able to kickstart my sprite ripping project.
-Dekar has unused swimming and sleeping sprites, the former implying he was supposed to be switchable into at some point.
-I think all party members have an alternate attack animation that's not used? It generally looks like a dash attack, from what I've seen, I need to investigate this more. Maybe I just haven't experimented enough with Skills to determine if they're actually unused or not.
-The attack animation for Dobens and Hellhounds seemingly don't play in full in-game, but play in full when viewed through debug mode. Their tails shoot like a gun, Hellhounds shooting twice.
-Jellies and Neo Jellies have unused animations. The former have one that's of them teleporting, I think? Their sprite becomes blank at the end of it. Neo Jellies split into smaller ones, resembling golden versions of the regular Jellies.
-Gratze Soldiers and Commanders have back sprites, which are fully animated as well, implying you were supposed to be able to capture them! Maybe the thought of capturing other humans was considered too morbid during development.
-There are technically Job Points in the game, both for party members and Disc Monsters, silently awarded at the end of battle, but they're never actually visibly shown.
-All bosses and the aforementioned Gratze Soldiers/Commanders have their own monster compendium entry! Their stats are stored right below their entries, and the bosses in particular tend to have unique descriptions that are never seen in-game, meaning at some point the monster compendium worked in a completely different way! In its current form, it only shows descriptions of captured monsters, of which there are 198 IIRC. Some bosses have blank descriptions though, like Ragule and the Ancient Cave bosses.
-Speaking of Ancient Cave bosses, there's a completely unused and fully functional boss! Its name is Golden Lord, a golden version of the Jelly Lord. It's located right before Shinju, the third to last Ancient Cave boss. Its HP is higher than Shinju's. Why would they decide to scrap a perfectly fine boss like that? This is why. Its moveset consists of Grand Cross (strongest Light element attack), Ice Breath (which does what it shows in the video), and Rejuvenate (heals 400 HP, similarly to Meditate, another move used by other Ancient Cave bosses). Since you only have one party member for the Ancient Cave, Disc Monsters not counting as other party members, being frozen counts as being dead for game over purposes. It was likely cut because of how unfair the frozen status is for the Ancient Cave in general, I'm pretty sure no enemies capable of inflicting frozen status are included within the battle formations for the Ancient Cave.
-Monster catch rates and levels are stored completely separately from the rest of their stats. Where could they be stored at? No idea.
-This game has the potential for a lot of MissingNo. tier stuff. I've spent way too much time messing around with Disc Monsters to get results like these.

That is all for now, I think. Since I'm fresh meat to this sort of thing, take some of my findings with a grain of salt.

October 23, 2020, 12:20:15 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Update: I've begun doing proper breakpoints, and I'm documenting my findings. I tried my best to explain things with my severely limited knowledge.

Code: [Select]
`EWRAM 02038E7C = Received EXP at the end of battle (4 bytes)----> 08013A7A = Jumps into here upon killing an enemy in battle (adds)  \-> 03007C90 = Then increments this----> 0801418A = Jumps from 08013A7A to here upon killing the last enemy in battle (bl)  \-> 03007C30 = Then increments this once, then two more times, after jumping below each one, incrementing one time after each jump----> 080141F4 = Then jumps here from 0801418A (mov)----> 0801425E = Then jumps here from 080141F4 (str)`
Maybe some of you can decipher what I meant when I wrote descriptions for these.

October 24, 2020, 08:18:49 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Another update: Updated thread's title. I'm gonna be using the gained knowledge and documentation to hopefully be able to create an enhancement hack. It's gonna take forever for it to get off the ground, but I'm already too far down to come back out.

I've got a couple of plans for changes to the game in this hack:

-A visible JP counter on the status screen, right next to EXP, plus visible JP rewards at the end of battles.
-Save tiles in the middle of dungeons like in past games. This one will require graphic editing and learning how to alter dungeon maps and tile properties, plus learning about and documenting the save routine used by priests. For this to work, somehow I'll need to make it so stepping into these tiles will bring up the save screen, but also make it so it doesn't go back to the main priest menu, where there's three options: Save, Cure, and Remove. Maybe there's a way to isolate this routine.
-Allowing Bau to get Jobs. Bau gets AP growths but has no use for them. Dekar doesn't get AP, ever, as a comparison, and they both fulfill similar roles. Granted Bau is strong enough to not necessarily require skills learned from Jobs, but he's just so boring to use comparatively.
-Fixing the collision in that one screen in Mera Volcano, where you can get out of bounds thanks to misplaced exits.

Wish me luck.
« Last Edit: October 29, 2020, 08:37:51 pm by LucasRCD »
Lufia afficionado, forum game player. Former SMW hacker.

#### LucasRCD

• Jr. Member
• Posts: 23
• Avatar by @ImmatureWaffles on Twitter
##### Inserting/replacing graphics in GBA games? (Updated post)
« Reply #1 on: October 24, 2020, 11:42:49 am »
I'm trying to add some custom graphics to Lufia: The Ruins of Lore, more specifically, I'm trying to add the 16x16 save point tile from previous Lufia games into some of the tilesets. I thought I'd be able to easily do that with NLZ GBA Advance or unLZ-GBA, but no such luck

I wanna make it look like this. I replaced a corner tile that's virtually indistinguishable from the background black color. This could be remedied later by map editing. Any help with what I should be doing?

October 24, 2020, 11:59:47 am - (Auto Merged - Double Posts are not allowed before 7 days.)
An addendum: Here's the save point, edited to use the same colors as the switch in the same image. Leaving this here just in case?

October 24, 2020, 08:11:30 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Another addendum: I can't believe I forgot to mention this but the graphics break when I try inserting them. That's what I've been meaning to ask! How do I insert graphics without the program spitting out errors, or the ROM breaking?
« Last Edit: October 24, 2020, 08:12:39 pm by LucasRCD »
Lufia afficionado, forum game player. Former SMW hacker.

#### FAST6191

• Hero Member
• Posts: 3008
##### Re: Inserting/replacing graphics in GBA games? (Updated post)
« Reply #2 on: October 24, 2020, 09:48:53 pm »
In another thread we found the various compression tools don't do so well at editing/insertion and will possibly use the wrong type of compression (as in the non graphical one despite being a graphics focused program and seemingly not giving an option to be VRAM safe versions).

http://members.iinet.net.au/~freeaxs/gbacomp/#BIOS%20Decompression%20Functions and http://problemkaputt.de/gbatek.htm#biosdecompressionfunctions tending to be where I point people that need to read up on compression. The GBAcrusher program on the former also being a good tool, even if you have to manually insert it afterwards.

I assume also you sorted any palette issues if the older title (presumably on a different system) used something else, and also dodged graphics mode issues if for some reason the object in question thought GBA 8bpp was in rather than the more normal 4bpp mode.

#### Vanya

• Hero Member
• Posts: 1855
##### Re: Lufia: The Ruins of Lore Enhanced + Documentation Project
« Reply #3 on: October 25, 2020, 07:57:10 am »
Never played this one. This is the 3rd game on portable, no?

#### KingMike

• Forum Moderator
• Hero Member
• Posts: 7060
• *sigh* A changed avatar. Big deal.
##### Re: Lufia: The Ruins of Lore Enhanced + Documentation Project
« Reply #4 on: October 25, 2020, 10:08:29 am »
Please use one thread to discuss the same topic.
"My watch says 30 chickens" Google, 2018

#### KingMike

• Forum Moderator
• Hero Member
• Posts: 7060
• *sigh* A changed avatar. Big deal.
##### Re: Lufia: The Ruins of Lore Enhanced + Documentation Project
« Reply #5 on: October 25, 2020, 10:09:04 am »
Never played this one. This is the 3rd game on portable, no?

4th game total. This one is on GBA.

The third game was The Legend Returns for GBC.
"My watch says 30 chickens" Google, 2018

#### LucasRCD

• Jr. Member
• Posts: 23
• Avatar by @ImmatureWaffles on Twitter
##### Re: Lufia: The Ruins of Lore Enhanced + Documentation Project
« Reply #6 on: October 25, 2020, 11:18:43 am »
Please use one thread to discuss the same topic.
Ah, my bad. Still used to how a previous forum I frequented handled this sort of thing (asking for help and showing off/discussing your own project having their own separate subforums), which is why I created a new topic on a different subforum rather than using this thread.

4th game total. This one is on GBA.

The third game was The Legend Returns for GBC.
Correct. Ruins of Lore is the second portable Lufia, and technically the last original Lufia game, with Curse of the Sinistrals for the DS being a remake/reimagining of Lufia II. It was also the last Lufia game period, which is unfortunate. Maybe someday Square (who I think holds the rights to the series nowadays?) will revive the series with a remake of the original Lufia.

Now back on topic: I'm still trying to document what each part of the bestiary means. I still have yet to see if monsters and Disc Monsters share the same moves, and if I alter the enemy version, it'll alter the learnset for the Disc Monster version of that enemy.

Another thing I wanna do with this project is implement some bug fixes. These would be the bugs that would be fixed:

-Crafting Nectar doesn't use up the materials required to craft it, meaning you can amass an infinite supply of the best restorative item in the game with ease.
-Blue Tea sells for more Gold than you buy it for, allowing for amassing infinite Gold in an easy, but time consuming way, as the amount of profit you make isn't very high each time.
-If you use the Sacrifice skill on yourself, it works as a full heal instead of instantly killing you/dealing 999 damage to yourself.
-You can get out of bounds in the Mera Volcano dungeon due to a misplaced screen exit in two rooms.

I'm not sure how I would fix some of these, but I will find a way to do so eventually.

October 25, 2020, 06:25:59 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
http://members.iinet.net.au/~freeaxs/gbacomp/#BIOS%20Decompression%20Functions and http://problemkaputt.de/gbatek.htm#biosdecompressionfunctions tending to be where I point people that need to read up on compression. The GBAcrusher program on the former also being a good tool, even if you have to manually insert it afterwards

That's great, but a comprehensive step by step tutorial of what I should be doing would be great. It looks like I have to install a bunch of other crap to be able to insert the graphics? I'm asking this because I really have no experience with this kind of graphics insertion. I assume you have prior experience with these tools and can teach me how to do things the correct way.
« Last Edit: October 25, 2020, 06:25:59 pm by LucasRCD »
Lufia afficionado, forum game player. Former SMW hacker.

#### Ok Impala!

• Jr. Member
• Posts: 64
##### Re: Lufia: The Ruins of Lore Enhanced + Documentation Project
« Reply #7 on: October 26, 2020, 11:00:43 am »
Now this is a game I haven't heard from in a long time. The GBA Lufia game was fun, but the lack of save points was a strange design decision, especially since this was a portable game. Would be great if you could fix that. Though, it sounds like that might not be that easy. I wish you luck!

#### LucasRCD

• Jr. Member
• Posts: 23
• Avatar by @ImmatureWaffles on Twitter
##### Re: Lufia: The Ruins of Lore Enhanced + Documentation Project
« Reply #8 on: October 26, 2020, 11:17:43 am »
Another update: I've decided to start documenting how items work. The first thing I did was restore the functionality of the unused Goddess Statue item so it works like its Lufia II counterpart, even down to its description. Goddess Statues in Lufia II were an item you could obtain at a casino, and was notoriously buggy in the North American release. There's a casino in this game, but it's just for show. There's nothing you can really do in it, aside from getting the Rogue job and the scene where you're first introduced to Dekar. I'll see if I can implement a way to obtain those in the casino, maybe as a shop or a repeatable prompt where you need to exchange a certain item for a Goddess Statue.

October 26, 2020, 11:56:39 am - (Auto Merged - Double Posts are not allowed before 7 days.)
Add another thing to the bucket list of changes I'm gonna be making with this hack. Inspired by that one hack of Lufia: The Legend Returns that alters item, spell, and IP ability names so they're more consistent with past games, I'm gonna be doing the same to this game. The randomly altered spell names bothered me, and makes the game feel less like Lufia as a result. In fact, I'm already applying these changes right now as I type this! It's easy changes.

October 26, 2020, 12:15:44 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
AND if I can, I'll add a couple more learnable skills for jobs! For some reason you can't actually obtain magic such as Empower (this game's equivalent of Trick), Heal Full (Strongest from The Legend Returns), etc. Some of these stats can only be raised in battle by the consumption of items, which is a very slow and time consuming process.

October 26, 2020, 03:12:43 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Yeah... I've made a disappointing discovery. Multi target healing cannot heal fixed amounts. The amout of HP healed is multiplied based on the number of living party members currently on screen, so if the base amount of HP healed is 50, it'll heal 200 HP if there are four living party members on screen. But if there are only three who are alive, it'll only heal 150 HP.

This is never a concern in the main game because the only multi heal spell heals 999 HP, and only because its minimum HP value is set to an absurdly high number. There's probably a way to make it so healing doesn't use current amount of living party members as a way to multiply the amount healed, as it should always assume there's 4 party members alive. But I also wanna make sure it doesn't interfere with every other spell. God I wish I wasn't the only one working on this.

October 26, 2020, 10:43:14 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
The biggest issue with having to work alone in projects like these is that it's extremely easy to get yourself sidetracked with trying to document and alter other things. I'm starting to wonder if I'll be able to do anything at all with this. I've already run into a couple of roadblocks. I have no idea how to locate the save routine, how to edit NPCs and shop lists. Trying to make use of breakpoints is getting me nowhere.

October 27, 2020, 09:07:34 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Been meaning to ask, am I doing a fine enough job with the way I document things? I try and make things look and sound as comprehensive as possible for laymen such as myself, hence why everything sounds so simplistic and probably not very accurate and specific

I'm going back to try and document the enemy table. Here's what I've got so far:

Code: [Select]
`06D7490 and below = Enemy stat compendiumEvery enemy entry is 292 bytes long. Learnable moves appear to be stored separately from the monters themselvesBytes 1-50 = Enemy nameBytes 51-112 = Enemy descriptionBytes 113-127 = Data padding? Some enemies appear to fill some of these bytesByte 128 = Element in battleByte 129 = No idea. Family type in battle, perhaps?Byte 130 = No idea`
Yes I'm trying to document what each of the bytes do. It's gonna take a while but hey. I hope it'll be of some use to you guys. You could theoretically create your own enemies this way. I don't know if there's much room for it, about the only things you could modify without affecting the used enemies are enemy 0 (No Name, which is a placeholder enemy) and the unused Golden Lord boss. There probably is a way of adding more enemy entries but I don't want to risk breaking the ROM.

I'll try and see if I can get help with other things such as graphics inserting some other time.

October 29, 2020, 08:40:26 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Another update, this time a rather major one: I'm not gonna be using this thread to document stuff anymore, but instead I created a Datacrystal page for Lufia: The Ruins of Lore, and so I'll be shifting my documentation there! The page itself is extremely barebones at the moment, but that will be remedied within due time.
« Last Edit: October 29, 2020, 08:40:26 pm by LucasRCD »
Lufia afficionado, forum game player. Former SMW hacker.