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

Author Topic: Lufia 2 Compendium Editor  (Read 9830 times)

Zuqkeo

  • Jr. Member
  • **
  • Posts: 39
    • View Profile
    • Yaworg - Yet another website on retro gaming
Re: Lufia 2 Compendium Editor
« Reply #20 on: November 03, 2018, 03:38:50 pm »
Haha, it's good to hear there's still a community that cares. Artemis and some other hackers are still active so I feel they hopefully can make best use of it (or just look at it, and improve the design all over).

Okay, I found the last working copy of my code as a SVN repository with all source and visual studio project that should(disclaimer untested ::)) compile out-of-the-box. Basically, I separated the entire compendium loading/storing, sprite image/voculabulary decoding in plain C++ that should be portable enough to compile on other compiler vendors/OS's. Only the use of Visual Studio is needed for the GUI part, which is separated from all other code, as designing GUI's in C++ is not the kind of thing one wants to waste time on (all GUI code is in Form1.cpp, which is the only one that is Visual studio specific as it runs in Microsoft's proprietary 'managed' C++.. yuck). It should be easy to separate the rest of the code from the GUI by removing that file. Also in order to support Japanese and glyphs used in other languages more easily I used std::wstring iso std::string to make it a bit easier.

I noticed that currently only the US rom will load, but I do notice that I have implemented optionally recognizing with(out) 200 hex byte header. Once the table in Rom.cpp is filled in for JPN/AUS/NL/GER/ESP the other roms should load too.

Lastly, there's still a lot of unknown/missing parts, such as CM sprites, and handling Reli's IPS relocated version. I think most other ROM hacks use the same offsets, so once the ROM table is extended with his version it should also be able to load those.


SVN repos (version 18, available for 30 days from post): https://ufile.io/v86t9

Exe debug build (available for 30 days from this post): https://ufile.io/mejv9

As said, please use US rom for now. I hope this will run on PC's without Visual Studio installed (untested). There's a small readme included as you might need some additional runtime libraries if not...

« Last Edit: November 05, 2018, 02:14:38 am by Zuqkeo »

gadesx

  • Full Member
  • ***
  • Posts: 220
    • View Profile
Re: Lufia 2 Compendium Editor
« Reply #21 on: November 07, 2018, 09:58:46 am »
Someway to edit scripts?
The spanish translation is shit.

The hack - age of sinistrals change a lot of things, he had to know a lot about the code

EDIT ADD:
Actually, only runs with msvcp100.dll not sure,
msvcr100d.dll (100% sure)
not necessary install full visual studio

Pd: amazing white dragon, strange don'see this on hacks
« Last Edit: November 07, 2018, 12:43:08 pm by gadesx »

Shade Aurion

  • Full Member
  • ***
  • Posts: 113
  • Shadow Keeper
    • View Profile
    • DudeGoBack
Re: Lufia 2 Compendium Editor
« Reply #22 on: November 07, 2018, 07:55:09 pm »
Artemis' Frue Lufia already uses the unused Gades, though, to my knowledge. Shoomy-Doomy Gades, as Relnqshd calls him, is used at the top of Shuman Isle Tower and on Doom Island in Lufia Fixxxer Deluxe, which was the basis of Frue Lufia. (Erim's Eerie Light, Thunder, and Dark Zap fixes are in, too.)

On the subject at hand, I am absolutely always interested in Lufia documentation and editors. If you're willing to keep going on this, I would still find this freaking amazing and I would still love you forever for it. :P

Oh nice, I was only looking at the readme for Frue, not Fixxxer. I am not sure if all of this has been covered in Fixxxer/Frue TBH, but it'd be cool if someone could hack back in the unused enemies (Kraken, King Hidora, White Egg Dragon, etc) and items (Uni Jewel and Power Jelly (Iris Treasure from Master Jelly) and the unused puzzles from the Japanese version (Treasure Sword Shrine, Gordovan Tower and Ancient Tower) perhaps as separate rooms entirely and have both. Maybe apply the larger sprite to Erim too to line up with the other Sinistrals and add back in the Japanese versions of the Sailor and Bunny Girl from the casino. It'd be cool if they weren't replaced entirely and instead replaced only some of the characters for variety's sake. Each of the Sinistrals had a different palette in the prototype build of Lufia 2 too so it'd be awesome if for the Sinistrals you fight several times, if the first time you fought them, they used their secondary palette and they use their main palette in Daos' Fortress. There were unused music tracks in the prototype too so it'd be cool to see them added back in. Lastly, maybe an option at end game before the point of no return to give players an option to change Dekar, Lexis and Tia back into the party so you can level them to 100 and take em in the ancient cave like in Gift Mode but have them automatically switch back to Selan, Guy and Artea if you proceed to the end of the game.

All of that would make a sizeable upgrade to Fixxxer and Frue. It'd take a lot of work but THAT truly would be an ultimate version of Lufia 2.

Zuqkeo

  • Jr. Member
  • **
  • Posts: 39
    • View Profile
    • Yaworg - Yet another website on retro gaming
Re: Lufia 2 Compendium Editor
« Reply #23 on: November 08, 2018, 01:50:49 am »
Thanks for the info Gadesx. I think so far the editor only allows for modifying the easy/static data in-place. Allowing scripts to be modified requires effort, as in moving data to new/extended ROM banks like the patches do.

On the bright side, I've am working on improvements right now. Extracted the vocabularies and was able to decompress the descriptions, and also the map namps (incl. the bugged s3y kingdom / U mov E cave). A guy named "PaD" also had some info on how to handle the compressed map tiles/data.

Reli's documents of the rom are a good starting point, but there's just so much data that needs to be sorted out, I first need to understand the way it's stored before working on expanding/moving everything otherwise it will break down. I'll try to keep posted the upcoming time.

vivify93

  • Hero Member
  • *****
  • Posts: 960
  • White Wizard
    • View Profile
Re: Lufia 2 Compendium Editor
« Reply #24 on: November 08, 2018, 05:38:50 am »
Bunny Girl from the casino.
She's in Frue (And Fixxxer) too. Everything in Reli's Fixxxer Deluxe is in all versions of Frue
All my life I've tried to fight what history has given me.

Artemis

  • Full Member
  • ***
  • Posts: 207
    • View Profile
Re: Lufia 2 Compendium Editor
« Reply #25 on: November 08, 2018, 05:59:58 am »
Same as Uni Jewel - which now is a rare drop from the Unicorn/Narwhal enemy.

In Spekkio and Kureji there's also Kraken, King Hydra and the white Egg Dragon.
Spekkio also has the red Tarantula and a green Egg Dragon enemy as well.


Speaking of Erim's alternate sprite, I don't get what's so special about it, though. It's used exactly where it has to be used, that is, to line up her perfectly fine when actually together with the other Sinistrals on screen.

vivify93

  • Hero Member
  • *****
  • Posts: 960
  • White Wizard
    • View Profile
Re: Lufia 2 Compendium Editor
« Reply #26 on: November 08, 2018, 03:34:28 pm »
The small sprite was used to A. Make her look smaller next to Arek in the opening, and B. Make it so when she's reflected in the tower with the mirror, she lines up to herself. The bigger sprite was intended to be used when she faces Maxim and co., but it doesn't really matter since it's easily conveyed who she is anyway.

I think it'd be interesting to see an implementation of the beta battle sprites for those Sinistrals that don't match their overworld sprites anymore. (It wasn't just a palette, it was an entire sprite difference. here) Erim in particular is an egregious example--her battle sprite was remade with a red cape, but her world map sprite is still based off of her beta battle sprite.
All my life I've tried to fight what history has given me.

Shade Aurion

  • Full Member
  • ***
  • Posts: 113
  • Shadow Keeper
    • View Profile
    • DudeGoBack
Re: Lufia 2 Compendium Editor
« Reply #27 on: November 08, 2018, 09:31:50 pm »
Dekar the Great's edited sprites for Lufia 5 are pretty nice. Someone finally did something about Erim's fucked up nose lmao http://www.lufiaworld.com/forum/download/file.php?id=10&sid=ae3733b8332f88a053cbf73d63aefa2d

They have a facebook page for the project too if anyone wants to get in touch with them, last updated a month ago https://www.facebook.com/lufiav/

--

I think the reason i'd see a point in the bigger Erim sprite is simply because Sinistrals are supposed to be gigantic. They're repeatedly referenced as being giants. Glad Bunny Girl and Uni Jewel made it in. I'm not up to there in my DudeGoBack playthrough. Can Spekkio be patched onto Frue Lufia Addendum 2.2? They seem like nice changes overall.

Everything else I mentioned would make a nice update though. Especially those japanese version puzzles since having both puzzle variants only gives more puzzle fun to a puzzle rich game. Something else I remembered is as far as I know, the Sinistral's Island actually has a map with no collision detection you can enter passed the "don't run away" block in end game. If collision were added and a warp palace added to the warp point on that map and connected to somewhere, you could feasibly add in a way to leave after entering pushing the point of no return to the Daos fight itself, though a re-entry point would need to be added. Just an idea anyways.

I'm not complaining about Fixxxer or Frue either btw. They are amazing updates to one of my favourite games and likely took a LONG time and a lot of work. I'm more or less thinking how you could push the limit to make them better still without taking too many creative liberties. I'm currently really enjoying my lets play of them <3
Love your work Artemis

Artemis

  • Full Member
  • ***
  • Posts: 207
    • View Profile
Re: Lufia 2 Compendium Editor
« Reply #28 on: November 09, 2018, 08:24:59 am »
First patch Spekkio and then the addendum. I don't see why it shouldn't work. Though it doesn't work for Kureji.

Are you kazeugma on twitch, by any chance?

Shade Aurion

  • Full Member
  • ***
  • Posts: 113
  • Shadow Keeper
    • View Profile
    • DudeGoBack
Re: Lufia 2 Compendium Editor
« Reply #29 on: November 10, 2018, 01:16:46 am »
First patch Spekkio and then the addendum. I don't see why it shouldn't work. Though it doesn't work for Kureji.

Are you kazeugma on twitch, by any chance?

I'll have to give it a try for sure :3
Nah, i'm either known by this name or as my Let's Play group DudeGoBack

Artemis

  • Full Member
  • ***
  • Posts: 207
    • View Profile
Re: Lufia 2 Compendium Editor
« Reply #30 on: November 10, 2018, 04:41:38 am »
As you're quite at the beginning, at that point you can switch to Spekkio without missing anything really.

The only minor difference is the behaviour of Red Jellies.

Zuqkeo

  • Jr. Member
  • **
  • Posts: 39
    • View Profile
    • Yaworg - Yet another website on retro gaming
Re: Lufia 2 Compendium Editor
« Reply #31 on: November 14, 2018, 04:05:40 pm »
No pics at the moment, but just a minor update as there is at least some (internal) activity/progress:
-Decoded capsule monster sprites (can't locate their palettes). they're not within the compressed files (like monsters), nor in Reli's docs... probably have to run geigers debugger for that.
-Decoded vocabularies and decompressed ip/item/spell descriptions
-Decoded monster/CM attack name string tables
-Decoded map sprites, graphics, palettes, and properties (e.g, voice pitch, #walk frames)
-Decoded PC (playable characters) properties and starting equipment, AC stat boosts
-Decoded map headers, incl decompressing (glitched) names
-Working on map information e.g. events, tile maps, chests, script, etc. This is quite a big chunk, once thus is decrypted most of Lufia's data will be usable.

After this, expanding the rom and writing new offset/tables should make it possible to actually do something useful other than viewing. Still that will take more time and effort.
« Last Edit: November 14, 2018, 04:11:05 pm by Zuqkeo »

gadesx

  • Full Member
  • ***
  • Posts: 220
    • View Profile
Re: Lufia 2 Compendium Editor
« Reply #32 on: November 15, 2018, 01:36:45 pm »
From debug menu there's a lot of flags.
I suppose there is no documentation about what does everything.
Someone told me the flag that activate retry, etc
Making codes I disabled the NPCS of Ancient cave.
Its funny enter, get equipment red-blue, get exp, money. And escape using magic or any item. Providence its the same as Escape.

Maybe I try someday make a doc to know the changes.
Imagine disable all puzzles lol.
A lot of work to search

Artemis

  • Full Member
  • ***
  • Posts: 207
    • View Profile
Re: Lufia 2 Compendium Editor
« Reply #33 on: November 15, 2018, 02:02:17 pm »
Well, I told you about me stepping back these days, but... Can you imagine that your editor will be able to alter story events somewhen?

That is, I'm speaking long-time here, like in some months/years.


As I'm thinking about heavily rewriting the whole story which is a dramaturgical mess, anyway.

Thorbs

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Lufia 2 Compendium Editor
« Reply #34 on: November 15, 2018, 04:21:41 pm »
I noticed that currently only the US rom will load, but I do notice that I have implemented optionally recognizing with(out) 200 hex byte header. Once the table in Rom.cpp is filled in for JPN/AUS/NL/GER/ESP the other roms should load too.

That sounds incredible.
Having a universal tool that can edit ROMs of all regions for this game would be pretty handy, and I am grateful that the editor has been created with other revisions of the game in mind.

I wish you good luck with this editor, looking forward to further progress.  :thumbsup:
« Last Edit: November 15, 2018, 05:16:20 pm by Thorbs »

Zuqkeo

  • Jr. Member
  • **
  • Posts: 39
    • View Profile
    • Yaworg - Yet another website on retro gaming
Re: Lufia 2 Compendium Editor
« Reply #35 on: November 17, 2018, 04:32:38 pm »
Artemis, I don't know how far it will end up, but with Reli's L2_Script.txt file I am starting to grasp how to decode the script. It's still in the works, but the parser can read/decode the first two maps (over/undersea world map). Turns out there are no runtime scripts and the setup script only sets the BG music & resets event flag $C0 and $C2, which I don't know what their purpose is at this time, but it does decode successful.

It also reads the beginning of Map002 (intro scene with Arek), which has extensive script. It's starting to make sense how it operates moving NPCs and generating text. Though, apart from reading & writing data in (un)expanded ExLoRom, visualizing and making it editable for a human on at least a reasonable level (i.e. not writing hex opcodes and knowing every intrinsic) is a big task.

If anybody happens to know some more about the missing parts (all the ??) in Reli's doc, again any info will be welcome. It will save me a lot of puzzling. I only found some info the cutting room info page which states the use of some of the event flags and the Japanese font decoding.


Thanks Thorbs, with maybe some extra work for decoding the Japanese font/vocabularies, I do think it should work for all as the format of the roms that I've seen is compatible only at different absolute offsets.

November 23, 2018, 02:24:16 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
It seems to read out map and parse sprites from the 'static' setup script that is executed when the map is loaded...

Don't ask me why the programmers setup the Dual blade in the center and its shadow higher, that's how it is. :P They are (re)moved by the scripts that actively run the intro scene.

« Last Edit: November 23, 2018, 02:24:17 pm by Zuqkeo »