News:

11 March 2016 - Forum Rules

Main Menu

Ultima: Exodus (NES) *Editor*

Started by Fox Cunning, May 14, 2020, 11:25:34 AM

Previous topic - Next topic

Fox Cunning

Hello, folks.

Not sure how many will be interested, but I just wanted to say that I'm still working on this editor as I had promised a while ago.
The goal is still far away (I haven't even started looking into the music/sound code yet), but so far so good - it can modify maps, NPCs, dialogue text, most palettes and a few more things.

Here's a quick progress video for the curious.

8.bit.fan

Hi Fox Cunning,

This will be tremendous! I am very much interested in this! :)
Keep up the amazing work and I look forward to this! :thumbsup:

Cheers! :beer:

8-bit fan
In the year of 200X, a super robot named Mega Man...
http://www.8bitfan.info/
FF4 Ultima Discord: https://discord.gg/4MqjwJt

Ayavata

Wow! I registered (finally) with this site just to respond to your post.

I've been hex editing UE for years. I can't say for certain the ROM addresses posted on the internet were copied from my old posts on other forums and message boards, but I discovered what has been posted well over 10 years ago.

I would LOVE to know how you found the dialogue. I have searched endlessly. I know the simple text table which begins at 8A, but after a long while decided the dialogue (which I know is drawn from the text table) was compressed or encoded in some way beyond my meager skills. I even found several places where dialogue could be changed for another in the same board (allowing you to switch one NPC message for another). I have always had plans to edit the weapons (for instance), as well as the address which assigns "melee or projectile," etc but since the shop text doesn't simply pull from the text table, I could never change the weapon names in the shops, only in the inventory.

In short, YES I for one would love an editor. Good luck in your work.

Fox Cunning


@8-bit fan, glad to have your interest and attention :beer:

Here's another quick little video with a second test: https://youtu.be/zuY9bBT7b_c


Quote from: Ayavata on May 14, 2020, 09:53:10 PM
Wow! I registered (finally) with this site just to respond to your post.

I've been hex editing UE for years. I can't say for certain the ROM addresses posted on the internet were copied from my old posts on other forums and message boards, but I discovered what has been posted well over 10 years ago.

I would LOVE to know how you found the dialogue. I have searched endlessly. I know the simple text table which begins at 8A, but after a long while decided the dialogue (which I know is drawn from the text table) was compressed or encoded in some way beyond my meager skills. I even found several places where dialogue could be changed for another in the same board (allowing you to switch one NPC message for another). I have always had plans to edit the weapons (for instance), as well as the address which assigns "melee or projectile," etc but since the shop text doesn't simply pull from the text table, I could never change the weapon names in the shops, only in the inventory.

In short, YES I for one would love an editor. Good luck in your work.
If you like, I have saved all my notes are in this Google Drive folder. I'm just not publicising it much because they are still my raw notes, i.e. a bit messy.
"Dialogue Hack.txt" probably has all the info you want. There is also a disassembly of the string unpacking routines in "String Routines.asm".

Text compression is actually achieved via a simple 6-bit packing algorithm, then the unpacked string is turned into nametable entries, plus a few special characters (e.g. $3F = end of string, $3E = newline, $30 = read uncompressed text from $(99), etc).

Note that I don't have any special skills either ;D this is my first NES hack.
To figure out the text compression I watched the nametable entries being written to RAM at $0580 when text was displayed; then I set write breakpoints to find the routine that was generating uncompressed data, and finally followed the traced backwards to see where it was reading it from.

Weapon names are in more than one place, both compressed and uncompressed, so it's a bit of a pain to find and change all of them.
Also, when you change anything you'd have to reallocate memory for your text and rebuild the pointers table (unless you only want to make text either smaller or the same size).
An editor of course can automate that, and mine can already do it in a fraction of a second ;)

cospefogo

OH YES.

I am here too, following closely all your posts, Fox!
Thanks for everything so far!
"Replicants are like any other machine - they're either a benefit or a hazard.
If they're a benefit, it's not my problem."

Fox Cunning

 :beer:


Another little progress video: https://youtu.be/6iJl3jiUIbk
Curently the final touches to the NPC editor and the palette editor.


Next I will finish the text editor which is almost complete, and then I'll start working on party / item stats.

iridium_ionizer

Your YouTube videos definitely demonstrate a very impressive and feature-rich editor. Does the map editing currently include the overworld?

Fox Cunning

Quote from: iridium_ionizer on May 26, 2020, 11:59:09 AM
Does the map editing currently include the overworld?
Yes!
And also the ability to turn Ambrosia into a second continent that behaves exactly like Sosaria - including Moongates and the ability to circumnavigate the map seamlessly.
 

Ideally, the editor should allow making an entirely new game using the same base engine.

Ayavata

That's amazing! UE definitely deserves to have an editor after all these years, its great to know you are able to give it a proper treatment.

After reading through your notes this last week (thank you so much for sharing those!) I had two questions:

1. Is there any way to edit the ordering of magic spells? I saw where you noted the costs were hardcoded (and you had to change two places in order to drop MP consumption), but would there be any way to alter the order you "learn" them in? Switching "02 05 55 d5" etc seems to switch spells, but the costs are still the same. I.E., Missile can be switched with Light, but still costs 5 MP, even when its place is altered or the second byte is changed to 10 etc.
2. Initial party placement in battles? So maybe more like Quest of the Avatar? Have you found how the game decides where to place characters at the start of a battle?

You have put so much work into this project Fox, it's awesome! My Ultima buddies are eagerly awaiting this editor. :)

Fox Cunning

Quote from: Ayavata on May 26, 2020, 03:45:51 PM
1. Is there any way to edit the ordering of magic spells? I saw where you noted the costs were hardcoded (and you had to change two places in order to drop MP consumption), but would there be any way to alter the order you "learn" them in? Switching "02 05 55 d5" etc seems to switch spells, but the costs are still the same. I.E., Missile can be switched with Light, but still costs 5 MP, even when its place is altered or the second byte is changed to 10 etc.

This could be achieved by completely re-writing the routine that displays the spells list so that it takes the MP cost from the table at $D460 and goes through each spell instead of stopping when the caster's MP is matched.
The current routine simply assumes that each spell costs 5 MP more than the previous one (4 in the hacked version).

That routine is in $D415, and calls a subroutine at $D441 to get the number of spells to display. Note that it only decides how many spells, not which ones: it will simply show spells 0 to that number.

The only easy modification I can think of would be setting a level limit rather than just an MP match.
Then check if the caster has enough MP for the chosen spell before casting.
If that doesn't break the game too much, I may include that "alternative magic system" in the editor, but no promises yet!

Quote from: Ayavata on May 26, 2020, 03:45:51 PM
2. Initial party placement in battles? So maybe more like Quest of the Avatar? Have you found how the game decides where to place characters at the start of a battle?

Yes, those tables are in bank 4: $B000 to $B0BF.
That's three 64-byte tables containing OAM data: one for land battles and two for naval battles. In each entry, byte 0 is Y and byte 3 is X.
One more table could be added in theory, as there are exactly 64 bytes free after the third one.

Quote from: Ayavata on May 26, 2020, 03:45:51 PM
You have put so much work into this project Fox, it's awesome! My Ultima buddies are eagerly awaiting this editor. :)

I can't wait to finish and see what people can create with it ;D

Googie


Fox Cunning

Hello! Busy times, but I'm still working on this pretty much every day.
Currently implementing the "party editor" portion:


:beer:

Googie


cospefogo

"Replicants are like any other machine - they're either a benefit or a hazard.
If they're a benefit, it's not my problem."

Fox Cunning

Another little preview of a new feature: https://youtu.be/w5pKgTM_irQ

This took way longer than expected, as I managed to introduce 3 bugs with the same code - which I have finally managed to fix. Phew!

Fox Cunning

After plenty of debugging, I finally got the Profession Editor sub-module to work without making the game crash :laugh:

Here's a quick video of it in action: https://youtu.be/fbLZaGfvHl0

damiankevin

Excellent, I enjoyed very much the progress shown in the youtube videos on your channel. What would be the next steps to tackle?

Fox Cunning

Quote from: damiankevin on August 24, 2020, 07:11:20 AM
Excellent, I enjoyed very much the progress shown in the youtube videos on your channel. What would be the next steps to tackle?

Thanks mate, it's always encouraging to see that there is interest in a project :beer:

I am now working on the sub-modules that allow editing weapons and magic.
After that I'll tackle customisation of the pre-made characters, and then the final step will be editing sound and music.

That last part might prove challenging because I had not touched the sound engine in the game and thus will need to first reverse-engineer it, but we shall see.
If that doesn't take too long, then I will have time to also add a nametable editor; that would allow easily changing the title screen, the intro "cutscene" and a few other things.

Fox Cunning

Sorry about the late update. I suffered a little setback my main drive failed.
Luckily I had an external backup, but still I was set back a few weeks, plus I took that occasion to completely rebuild my main PC (this time with a RAID 1).

I am almost to the point where I was before the incident, minus one feature that I have to re-implement.

In the meanwhile, also as an extra form of external backup, I have put the current (if extremely messy) code on GitHub.

Ok Impala!

As a child I dreamed of having an editor for this great game. I even wrote a letter to the publisher asking about it. (never got a reply  :( ). Amazing to see that after all those years that dream is coming out!  :)