Romhacking.net

Romhacking => Personal Projects => Topic started by: Fox Cunning on May 14, 2020, 11:25:34 am

Title: Ultima: Exodus (NES) *Editor*
Post by: Fox Cunning on May 14, 2020, 11:25:34 am
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 (https://youtu.be/lHADv7QjV_A) for the curious.
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: 8.bit.fan on May 14, 2020, 02:09:07 pm
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
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: 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.
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Fox Cunning on May 17, 2020, 11:34:39 am

@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


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 (https://drive.google.com/drive/folders/1PWPjlMQsOR5Jr6F-EASeoIEzwoTVy9-m?usp=sharing). 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 ;)
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: cospefogo on May 18, 2020, 12:51:33 pm
OH YES.

I am here too, following closely all your posts, Fox!
Thanks for everything so far!
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Fox Cunning on May 26, 2020, 09:26:50 am
 :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.
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: iridium_ionizer on May 26, 2020, 11:59:09 am
Your YouTube videos definitely demonstrate a very impressive and feature-rich editor. Does the map editing currently include the overworld?
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Fox Cunning on May 26, 2020, 12:24:29 pm
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.
(https://i.imgur.com/XLy1BxA.png)  (https://i.imgur.com/JSBDNDa.png)

Ideally, the editor should allow making an entirely new game using the same base engine.
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Ayavata on May 26, 2020, 03:45:51 pm
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. :)
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Fox Cunning on May 27, 2020, 02:25:54 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!

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.

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
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Googie on May 27, 2020, 06:47:52 pm
Can wait to try this baby out! :D :thumbsup:
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Fox Cunning on June 15, 2020, 08:59:07 am
Hello! Busy times, but I'm still working on this pretty much every day.
Currently implementing the "party editor" portion:
(https://i.imgur.com/Hp6udDz.png)

 :beer:
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Googie on June 20, 2020, 08:12:29 pm
This is coming along nicely. :D

(https://i.imgur.com/zUPdaWk.gif)
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: cospefogo on June 21, 2020, 07:55:23 am
Super AWESOME!  :beer: :beer: :beer:
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Fox Cunning on August 01, 2020, 08:42:03 am
Another little preview of a new feature: https://youtu.be/w5pKgTM_irQ (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!
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Fox Cunning on August 23, 2020, 09:51:38 am
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 (https://youtu.be/fbLZaGfvHl0)
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: 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?
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Fox Cunning on August 24, 2020, 03:19:15 pm
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.
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Fox Cunning on October 05, 2020, 06:00:47 am
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 (https://github.com/FoxCunning/UE_Editor).
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Ok Impala! on October 05, 2020, 06:27:21 am
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!  :)
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Fox Cunning on October 19, 2020, 04:20:37 am
Here's a little update!

The "Special Abilities" module is all done:
(https://i.imgur.com/LGAgsaY.png)

And the "Professions" module has been expanded to give control over casting abilities of each class:
(https://i.imgur.com/oEPbj4f.png)



Amazing to see that after all those years that dream is coming out!  :)

I'll try my best not to disappoint, but can't guarantee ;D

It's already looking quite complex, and that's by design since I want it to be able to edit every possible aspect of the game.
Maybe I will have to do a series of tutorials on how to use the editor once it's ready.
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Ok Impala! on October 21, 2020, 02:26:29 am
Looking good! Will this editor be compatible with Ultima Exodus Remastered? (https://www.romhacking.net/hacks/4949/)
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: cospefogo on October 21, 2020, 05:59:57 am
I believe yes, since we have the same author for both projects — the legendary Fox Cunning!
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Fox Cunning on October 21, 2020, 06:44:20 am
Indeed the focus is on Remastered hack support, but the editor will attempt to detect which ROM is loaded:

(https://i.imgur.com/3vsEwy5.png)(https://i.imgur.com/kDfZRsl.png)
(https://i.imgur.com/sNshsnW.png)(https://i.imgur.com/WKlzZxm.png)

As you can see, some fields are disabled in the original ROM (i.e. primary attributes and second colour for character sprites).
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Ok Impala! on October 26, 2020, 10:57:38 am
Amazing! I hope to find time soon to play Remastered, as it feels like the perfect opportunity to explore Exodus once again!  :)
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Fox Cunning on November 18, 2020, 12:26:23 pm
And the spell editor module is now about ready: https://youtu.be/8PZtkaMwx4o
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Fox Cunning on January 15, 2021, 05:31:54 pm
Hello!

I've been busy, so here are a few progress screenshots:

(https://i.imgur.com/eabytns.jpg)(https://i.imgur.com/HmWypMr.jpg)
(https://i.imgur.com/vECoNLx.jpg)(https://i.imgur.com/jpaXPBz.png)
(https://i.imgur.com/MFocoJ2.jpg)(https://i.imgur.com/8uVAbya.jpg)
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: cospefogo on January 15, 2021, 05:43:45 pm
Sire,

This is MAGIC!
Pure, shiny, astonishing MAGIC!

Regards!
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Ok Impala! on January 17, 2021, 07:21:18 am
I totally agree! When this editor is finished, this might as well become my next project after Zelda II - Amida!  :)
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: cospefogo on January 17, 2021, 07:23:23 am
And for me, I only dream someone could create a editor (or find a way through rom hacking) to replace the overall music on Ultima IV with the great tunes from Ultima III Exodus.

Music on Exodus is so pleasant.

Music on Quest of Avatar is sooo boring, most of the time.

 :-\
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Fox Cunning on January 17, 2021, 02:45:06 pm
Speaking of music, I'll start working on that after I've completed the Battlefield Map Editor.
Here's a preview of the current state:
(https://i.imgur.com/ZM6spTL.gif)

January 22, 2021, 06:28:21 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
And finally an early screenshot of the Instrument Editor module :)
(https://i.imgur.com/L6TAM3e.png)
Title: Re: Ultima: Исход (РЭШ)
Post by: RobustGoingMeat on February 10, 2021, 10:16:40 am
how to use this program?How do I open it?Maybe you need some program to run?Help!!
Title: Re: Ultima: Исход (РЭШ)
Post by: Fox Cunning on February 11, 2021, 12:45:17 pm
how to use this program?How do I open it?Maybe you need some program to run?Help!!

Hey! Thanks for checking this out.
Once I have implemented all basic features, I plan to make a nice executable packages for Windows, Linux and Mac OS.

For now you will need to use a Python interpreter.
Assuming you are using Windows, this is the one you need: https://www.python.org/downloads/release/python-387/

Once installed, you will need to run some commands to add a couple of necessary libraries:
python -m pip install -U Pillow
python -m pip install -U pyo

Now download the source code if you haven't already: https://github.com/FoxCunning/UE_Editor/archive/master.zip
Then on the command prompt go to the folder containing editor.py and run: python editor.py



If that's a lot of trouble don't worry: I shouldn't be too far from an alpha release.
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: RobustGoingMeat on February 11, 2021, 02:43:04 pm
Yes, I will deal with it tomorrow and I will definitely write whether it worked or not. Thanks again you did a great job and I appreciate it
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Fox Cunning on February 16, 2021, 10:53:20 am
I've added some "translator's tools". These are meant to allow the creation of custom mappings to expand the alphabet:

(https://i.imgur.com/IOwox55.png)


Also made an alpha release package for Windows: https://github.com/FoxCunning/UE_Editor/releases/
It may be buggy and there are still a few features left to implement, but it's becoming usable.

I understand it will be a complex tool to use, and I don't have the equipment or the voice to make video tutorials :( so you'll have to wait until I have time to write down a little manual.
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Ok Impala! on February 16, 2021, 11:12:50 am
This looks mighty impressive in all it's complex glory!  :)
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Kronoan on March 01, 2021, 05:27:29 pm
I'm excited for this Editor! I'd love one for Ultima IV for the Sega Master System! :)
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Fox Cunning on March 03, 2021, 09:55:56 am
I've just published another Alpha release: https://github.com/FoxCunning/UE_Editor/releases
Mac OS and Linux packages will follow soon as I move to Beta.

All the editing features are there, some UI elements still need implementing or adjusting.

As I mentioned it's quite a complex piece of software, and I'd like to create a tutorial or two.
What would people prefer, video tutorials or hypertext with screenshots?


I'm excited for this Editor! I'd love one for Ultima IV for the Sega Master System! :)
The SMS version of Ultima IV was great and very close to the computer releases.
Hopefully someday I will have time to look into it too, or even better maybe someone with more experience on the platform will beat me to it ;)
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: iridium_ionizer on March 11, 2021, 12:08:08 am
It includes a built-in sound/music editor! Color me impressed.
Title: Re: Ultima: Exodus (NES) *Editor*
Post by: Fox Cunning on March 11, 2021, 07:46:03 am
The beta version is available https://www.romhacking.net/utilities/1588/
And pre-compiled packages are on my GitHub: https://github.com/FoxCunning/UE_Editor/releases

Being a very "hacky" tool, it's not the easiest to use ::) I should make tutorials for it.

It includes a built-in sound/music editor! Color me impressed.
I tried to make it as complete as I could ;D Instruments and music can be modified without external tools, although for creating music from scratch I'd suggest FamiStudio (my editor can import from that with just a few caveats).