Jump to content

CloudMax's z64editor


CloudMax
 Share

Recommended Posts

OH! Why not make it so the panels can be edited? I don't know how familiar you are with textures, but it would be fun to change that panel that shows the six medallions.

 

I'm loving this, it has smex appeal~

Well, I've made it so that that editor supports choosing the texture path for each panel background so that if you were to change the texture, you could use it within the editor for positioning, but the editor does not actually import these textures to the game, it's just a visual helper, you'd have to replace the actual textures someplace else. Main reason is because I know pretty much nothing about textures, it'd probably be a lot of work, and there is already methods out there to achieve this goal (I assume).

 

Anyhow, I just finalized the new UI design (at least for now)

editorb21objlistfinalizedv2.png

The two sides now have tabs for objects/cursors. The Cursor tabs will obviously not be available when editing OoT.

I added some spacing inbetween the side & center panels to prevent the tab bars from merging wih each other.

 

Edit:

It was brought to my attention that the editor was broken in Firefox. (Thanks Airikita!)

The reason for this was because when the browser auto-saved the last loaded/saved file to the browser, a specific property was removed from the object for whatever reason. It was the property containing the file length to be exact. This caused the editor to load 0 bytes of the file when you reloaded the page, resulting in the editor not knowing which game it is supposed to load, which in turn caused the editors code to crash.

I've written a function that re-calculates the length when the file is loaded now, so this crash will no longer occur.

When I were in the process of looking into this issue I also noticed that the drag & drop file load feature is broken in firefox. I'll look into this issue and I'll try to resolve it as fast as possible.

 

Edit2:

The menu textures are now stored after their tint color has been generated so that each color only has to be loaded once, this reduces the loading time significantly. Changing menu could take 3-6seconds in IE and Firefox because it had to generated the gradient background 15 times every time you changed tab, now it takes about half a second.

 

I've fixed an issue that caused the editor to stop working in Internet Explorer 9 & 10 on initialization if didn't run the browser as admin, or protected mode was enabled. The editor would stop working because of an access issue when attempting to use the localstorage (it's what is used to auto load the .zdata). Now it will skip the auto-load entirely if it doesn't have access permission.

 

I've added multi-selection. I'm still working out all the kinks though. (especially for the Majora's Mask section which also has cursor objects)

editorb21dragselect.png

At the moment the selected object with the lowest ID is the one that's displayed in the Selected Object tab.

When you change the position of this object (by dragging, changing it manaully in the selected object tab, or by using hotkeys), it will move all the other selected objects the same distance. so if X is increased by 5 for the first object, all others will also be increased by 5. So everything selected will move as a group.

You can multi-select by dragging (holding shift allows you to add new objects to the current selection), you can shift+leftclick to add a specific object to the group. Drag selecting or leftclicking without shift will remove the previous selection.

Pressing Esc or left-clicking at an empty location will clear your selection.

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

After almost a months break from the editor, I've decided to give it another go.
The main features of the Quest Status Menu is pretty much already done for both OoT and MM, so it's time to start moving over to the global features, and a new menu.
I implemented several features on a yet-to-be-released build before I took a pause, such as the ability to choose the heart piece fading colors, cursor colors & ocarina note colors.
Features I plan to add before the next release:

  • Name Panel Y Position (Name panel is the panel that is displayed at the bottom, containing the name of the currently selected object) This feature may be delayed for various reasons that I can't bother to explain right now.
  • Name Panel Background Color (This will require an ASM hack, as it shares color with the L/Z button)
  • Name Panel Text Colors? (I actually have no idea, at all, if this is set ingame or not. I believe it is set ingame, if this is the case, it should obviously be possible to change it) This feature has a very low priority right now.
  • L/Z Button Color (Requires an ASM hack, see Name Panel Background Color)
  • R Button Color (Is already individual will be easy to add in)
  • L & R Button Y Position (They will most likely be set to share values. It would be possible to make an ASM hack to set them individually, but I do not see a reason to have them on different heights)

So those are the global features I want to add in, which affect the entire pause menu, and not one specific menu.

So my question to everyone is, what do you want to be able to change in the Equipment Screen? Several things you should first know about the equipment menu:

It uses a grid system for object positions. 4 rows, 4 columns. Positions are not set individually for each object.

The object IDs in the equipment screen are
0 1 2 3
4 5 6 7
8 9 A B
C D E F
There is a table set up in the game which incidates the start index for each equipable item type.
Swords start at ID 1, shield 5, boots 9, tunics D.
These offsets are what decides where the white borders appear when equipping something.

There is a table which indicates the start item ID of each equipment upgrade, so it is possible to quite easily change the start offset for each upgrade. However, you can't individually set each capacity level of each upgrade. If the first capacity level item ID of the bomb bag is 2, the next has to be 3, etc. This works differently in Majora's Mask, where you set every single upgrade capacity level item individually.
This table only seem to affect the icons however. There is a separate table for the names.

There is also a table that sets the name for each equipable item, however, it uses item id 0x3B (kokiri sword) as start offset, so you can't set it to an item with an ID lower than 0x3B. That is, without changing the start offset, and modify the table accordingly.
And again, this table is only for the names, it does not change the icons.
There is a similar table for the upgrades, except they use 0x47 (Bullet Bag (Holds 30)) as the start offset.

So, at this point I have the documentation neccesary to change icons & names of upgrades, and the names of the equipment. However, I honestly do not see the point in adding any of this as features to the editor. The reason for this is because you can do these changes with texture swaps instead. No need to mess with the IDs.

So now the only thing I can think of that would be worth adding is the ability to change the column/row X&Y positions, and the ability to move/hide Link on the screen.

Any suggestions?

Link to comment
Share on other sites

Changing the X/Y Positions of the equipment on the equipment screen, and even Link's position, or Hiding/Showing him would be really neat to see. Though I wanted to ask about a possible ASM hack that could potentially make it possible to add more equipment to choose from?

The reason I can't add more options is simply because I don't know how to add new menu objects. I only edit the pre-existing ones.

Having said that, I guess it would be possible to "add" equipment by removing the upgrade column. But that's not really a good solution at all.

Another possible solution could be to remove 1 equipment type to add in an additional 1 to the 3 others.

For example: Remove the boots slots by having the boots as regular items instead (or removing them altogether), and add 1 sword slot, 1 shield slot & 1 tunic slot.

This should be do-able for me, but it will obviously be time-consuming, and doesn't really feel like something that I'd be able to implement directly into the editor as a feature. It is something that probably should be done for a specific mod and not something generic.

 

As for the Map Screen, I've wanted to get to that one for a while. Because it has a few things that shouldn't be to hard to add in to the editor. Such as changing the Map, Compass & Boss Key positions. Changing the Dungeon Map Location Title shouldn't be hard either, I remember doing that in MM a while back.

Also found out how to modify the Link Head and Boss Symbol height offset in MM, not sure if I still have that documented though.

So yeah, being able to move around at least things like that for the Map screen is something I want to do. Editable World Map is lower priority, but I'll look into it at some point.

Link to comment
Share on other sites

Have you found out anything about the general overworld map compared to the dungeon map screen?

Well, I did find a minimal amount of things waaay back when I first started out, and that was in Majora's Mask. I don't have any documentation of it.

Main reason why I didn't look further into it was because the world map is corrupt on the decompressed Majora's Mask ROM.

 

I'll look into it in OoT at some point, as it actually will be useful since it isn't corrupt.

 

And here's something totally unrelated just for the sake of it:

MMStyleUIinOoT.png

I've finished making all menues except for the Map Menu in Majora's Mask style for OoT. Also replaced the interface textures with the ones from Majora's Mask, and changed the colors to match those from MM. I personally think it looks much better than the original OoT Interface/Pause Menu.

  • Like 2
Link to comment
Share on other sites

Main reason why I didn't look further into it was because the world map is corrupt on the decompressed Majora's Mask ROM.

For some reason zdec doesn't fix the DMA offsets for the file that contains the overworld map textures and Fierce Deity's object file.

 

Replace the 8 bytes at 0x1A5A8 with 009F5000 00000000 and 0x1CDD8 with 0114D000 00000000 to fix it.

Link to comment
Share on other sites

Another update:

earlyfileselectwip.png

Now, the File Select itself will just be a minor feature in the Editor. It will most likely only contain Coloring options, and perhaps positioning for the Title and A-Decide*B-Cancel text.

My real goal with this is adding decent support for features that aren't part of the games Pause Menu. The editor was previously hardcoded to only support a specific structure for each panel, and that structure was built for the pause menu, only allowing editable objects and cursors, and required a 3x5 background grid, etc.

That isn't the case anymore, I've spent the past few days removing many of these restrictions it had to allow me to easily add in features to the editor that aren't the pause menu, so after I'm doine with this, it should be much easier for the to add in other features.

And for those using the editor offline, things like the File Select will be completely optional and can be removed altogether to reduce size, or just keeping the editor clean. Everything related to the File Select feature is put in a single javascript file.

Link to comment
Share on other sites

Well, I did find a minimal amount of things waaay back when I first started out, and that was in Majora's Mask. I don't have any documentation of it.

Main reason why I didn't look further into it was because the world map is corrupt on the decompressed Majora's Mask ROM.

 

I'll look into it in OoT at some point, as it actually will be useful since it isn't corrupt.

 

And here's something totally unrelated just for the sake of it:

MMStyleUIinOoT.png

I've finished making all menues except for the Map Menu in Majora's Mask style for OoT. Also replaced the interface textures with the ones from Majora's Mask, and changed the colors to match those from MM. I personally think it looks much better than the original OoT Interface/Pause Menu.

Whoa! This is sweet as hell! In fact it looks better than MM in my opinion! I might try this out too for my hack.

 

Unrelated: How did you manage to get MM style buttons and heartpieces into OoT that way? I've been trying forever how to figure it out X_X

Link to comment
Share on other sites

Whoa! This is sweet as hell! In fact it looks better than MM in my opinion! I might try this out too for my hack.

 

Unrelated: How did you manage to get MM style buttons and heartpieces into OoT that way? I've been trying forever how to figure it out X_X

The Textures were just a video plugin texture pack I made.

 

And here's some goodies for the File Select while everyone's waiting for the next release (which will allow you to change all of these things)

These are all ROM addresses.

 

0x00BE039C Background & Menu Button Blue (ASM ADDIU command, change last byte of the word/4bytes to the color you want)

0x00BE039C Cursor Green & Blue (ASM ADDIU command, change last byte of the word/4bytes to the color you want)

Note how they share the same value across these 3 colors.

 

0x00BE05D4 Cursor Red (ASM ADDIU command, change last byte of the word/4bytes to the color you want)

 

0x00BE0700 Background & Button Red (ASM ADDIU command, change last byte of the word/4bytes to the color you want)

0x00BE0704 Background & Button Green (ASM ADDIU command, change last byte of the word/4bytes to the color you want)

 

0x00BE168C File Panel Red (halfword/2bytes, change the last byte to the color you want)

0x00BE168E File Panel Green (halfword/2bytes, change the last byte to the color you want)

0x00BE1690 File Panel Blue (halfword/2bytes, change the last byte to the color you want)

 

0x00BDA3F4 A-Decide*B-Cancel Alpha Fade (ASM command used to fade in the text, NOP it to prevent it from fading in)

0x00BDA430 A-Decide*B-Cancel Alpha Final (ASM command used to set the final Alpha after the fading is done, NOP this and the Fade to prevent the text from being displayed)

0x00BE0098 A-Decide*B-Cancel Red and Green Color (ASM LUI Command, change the last 2 bytes in the word)

0x00BE00AC A-Decide*B-Cancel Blue Color (ASM ORI Command, change the 2nd last byte in the word)

 

In the editor I'll most likely apply a minor ASM hack that allows you to set up the RRGGBB for the Background separately, and all Buttons (including file buttons) will share RRGGBB color. The Cursor should also have it's own RRGGBB color.

 

Please tell me if any of these addresses causes you any issues, as I myself never test the addresses I look up in ROM hacks, only in the RAM (I only test the ROM addresses after the features have been implemented into the editor)

  • Like 2
Link to comment
Share on other sites

While playing around with the editor, I do have a suggestion which might come in handy for clumsy people like me. If you try to close your tab or browser, you get a popup window that asks if you're sure you want to leave the page.

 

Also, it seems for some odd reason when I'm young Link, after I try the experimentation mode that most items can no longer be equipped with young Link. Even his exclusive items cannot be selected. Not sure what is going on there. I'll test again though just to be sure I didn't do something wrong.

Link to comment
Share on other sites

While playing around with the editor, I do have a suggestion which might come in handy for clumsy people like me. If you try to close your tab or browser, you get a popup window that asks if you're sure you want to leave the page.

 

Also, it seems for some odd reason when I'm young Link, after I try the experimentation mode that most items can no longer be equipped with young Link. Even his exclusive items cannot be selected. Not sure what is going on there. I'll test again though just to be sure I didn't do something wrong.

Yeah, that sounds like a good idea.

And yeah, I never really looked further into the Pause Menu hack I wrote. It worked when I applied it during runtime, but it seems like there's some issue with it when it's a ROM hack because some values seem to get messed up if the hack is applied when the pause screen is first being loaded.

I'll try to get it to work properly for the next release, but I can't promise anything, it is an experimental feature after all, and I'd like to focus on other things at the moment.

 

Also, here's another editor update:

fileselectwip2.png

So, changing A*B Help Text Color was easy to add in because it already had it's own RRGGBB values.

The same goes for File Name Text color.

I wrote a minor ASM Hack to allow changing all the Title Text Colors, you could only set the value of Blue initially.

I haven't written the ASM hack for setting Background & Button colors separately yet, so I can't promise that the actual result will look like this later on. But the current goal is to make it so that you can set the background, button and cursor RRGGBB values individually.

I also decided to allow changing the Skybox that's used for the File Select, and I took a picture of each one so that you can preview the result. The downside of being able to display the skybox is that it takes ~500kb to store the 8 skyboxes I have :P

 

And does anyone know why I can't seem to dump the File 1, File 2, Copy and Erase button textures? Looks bad with multiple File 3 and Options... Managed to dump it using another OoT version.

 

Note: The editor still doesn't save/load data from the ROM, I haven't worked out how I want the file system to work now that the editor will require multiple files.

  • Like 2
Link to comment
Share on other sites

So will your editor also be able to edit the "Title Screen" title textures too?

I'm asking because every modder know how much of a pain it is to inject their mod title in to the game.

If I actually knew how to do it myself, and were able to create a converter from png to the format used ingame, I could implement that and have the editor split the logo and all that automatically.

Sadly I don't have the required expertise.

It would be sweet to be able to convert and replace textures directly within the editor though.

 

And while I'm at it, a minor update:

I added an FPS display to the editor and noticed the horrible FPS it was running at.

~12fps on quest status screen, no objects selected.

~8fps on quest status screen, all objects selected.

~24fps on save screen.

~30fps on file select screen.

I've started optimizing stuff, and added a mode that will stop performance heavy features from updating in real-time.

This mode will only affect those who edit the $editor variable manually, and only for a few specific things, so I don't think anyone will notice a difference.

What it does is it only update the visuals of performance heavy features when the values are being set, instead of checking if it is supposed to update every frame. Which is why it will affect those who edit the variable manually, they'll have to perform function calls to update the visuals. This mode will be enabled by default and can only be disabled through the $editor variable manually, since that's the only reason for disabling it anyway.

I've managed to achieve these values with the current optimization:

~25fps on quest status screen, no objects selected.

~15fps on quest status screen, all objects selected.

~40fps on save screen.

~42fps on file select screen.

 

So it's a significant improvement, pretty much twice the FPS on the quest status screen, and is especially noticeable when drag-selecting and moving elements. (It actually feels smooth now)

Link to comment
Share on other sites

The Textures were just a video plugin texture pack I made.

 

And here's some goodies for the File Select while everyone's waiting for the next release (which will allow you to change all of these things)

These are all ROM addresses.

 

0x00BE039C Background & Menu Button Blue (ASM ADDIU command, change last byte of the word/4bytes to the color you want)

0x00BE039C Cursor Green & Blue (ASM ADDIU command, change last byte of the word/4bytes to the color you want)

Note how they share the same value across these 3 colors.

 

0x00BE05D4 Cursor Red (ASM ADDIU command, change last byte of the word/4bytes to the color you want)

 

0x00BE0700 Background & Button Red (ASM ADDIU command, change last byte of the word/4bytes to the color you want)

0x00BE0704 Background & Button Green (ASM ADDIU command, change last byte of the word/4bytes to the color you want)

 

0x00BE168C File Panel Red (halfword/2bytes, change the last byte to the color you want)

0x00BE168E File Panel Green (halfword/2bytes, change the last byte to the color you want)

0x00BE1690 File Panel Blue (halfword/2bytes, change the last byte to the color you want)

 

0x00BDA3F4 A-Decide*B-Cancel Alpha Fade (ASM command used to fade in the text, NOP it to prevent it from fading in)

0x00BDA430 A-Decide*B-Cancel Alpha Final (ASM command used to set the final Alpha after the fading is done, NOP this and the Fade to prevent the text from being displayed)

0x00BE0098 A-Decide*B-Cancel Red and Green Color (ASM LUI Command, change the last 2 bytes in the word)

0x00BE00AC A-Decide*B-Cancel Blue Color (ASM ORI Command, change the 2nd last byte in the word)

 

In the editor I'll most likely apply a minor ASM hack that allows you to set up the RRGGBB for the Background separately, and all Buttons (including file buttons) will share RRGGBB color. The Cursor should also have it's own RRGGBB color.

 

Please tell me if any of these addresses causes you any issues, as I myself never test the addresses I look up in ROM hacks, only in the RAM (I only test the ROM addresses after the features have been implemented into the editor)

Awesome CloudMax, can you post the ROM Addresses for the Title color? ("Select a file.")

I want to change and test that... xP

Link to comment
Share on other sites

Awesome CloudMax, can you post the ROM Addresses for the Title color? ("Select a file.")

I want to change and test that... xP

Changing the Title Color requires an ASM Hack to allow chaning all 3 colors, which is why I didn't put up the addresses. It normally set Red and Green to 0xFF, and let you choose the blue color.

And I also haven't looked up the ROM addresses yet, I only have them in the RAM at the moment.

 

 

Edit: Okay, this time around I'm actually awake. (Writing that post was the first thing I did this morning)

So, I looked up the ROM addresses for stuff, and since I'm in such a good mood, I'm even going to explain what this (extremely simple) ASM hack does, and why it is needed.

To start of, here's the original ASM (using ROM addresses):

 

.org 0x00BDD050
LH    T8, 0x4A6E(V1)     #This command loads the Alpha of the Title as a halfword.
ADDIU AT, R0, 0xFF00     #This is the key command we're looking for, since AT is the RRGGBB00 color of the title. This command will set AT to 0xFFFFFF00.
LUI   A0, 0x8040         #This command is not related to the title, ignore it.
ANDI  T9, T8, 0x00FF     #This command will make sure that the alpha doesn't exceed 0xFF.
OR    T6, T9, AT         #This command combines the RRGGBB00 color with the Alpha color.
SW    T6, 0x0004(A2)     #This command applies the RRGGBBAA color to the Title Object.
So, as you can see, a single command is used to set the Title Color, and the result is that you're only able to change the Blue color.

We start by changing the "ADDIU AT, R0, 0xFF00" command to "LUI AT, 0xXXYY". So now instead of only being able to set the Blue color, we set the Red and Green.

However, now we won't be able to change the blue color. Lucky for us, there's room for optimization right here.

Notice how the Alpha is first loaded as a halfword, then uses and ANDI command.

This basically just turn the halfword into an unsigned byte. Which means that we can change the load halfword command into a load byte unsigned command by simply changing register to T9 and increasing the offset by 0x1, rendering the ANDI command useless.

Now we're able to add in a new command, which is the one we'll use for applying the Blue color.

So we'll just put a "ORI AT, AT, 0xZZ00" command where the "ANDI T9, T8, 0x00FF" command was. The AT register will have all the RRGGBB00 values set separately, and the T8 register will be an unsigned byte value, just like before.

This is the result:

.org 0x00BDD050
LBU   T9, 0x4A6F(V1)     #LH changed to LBU, register changed to T9, and offset increased by 0x1.
LUI   AT, 0xXXYY         #ADDIU changed to LUI, allowing you to set Red and Green instead of Blue. (XX = Red, YY = Green)
LUI   A0, 0x8040         #This command is not related to the title, ignore it.
ORI   AT, AT, 0xZZ00     #Since T8 now is an unsigned byte, the ANDI command isn't necessary. Command changed to set the Blue color instead. (ZZ = Blue)
OR    T6, T9, AT         #This command combines the RRGGBB00 color with the Alpha color.
SW    T6, 0x0004(A2)     #This command applies the RRGGBBAA color to the Title Object.
Now there's only 1 thing left. The Name Select Screen and Options Screen have their own Title Colors. But we're in luck. The code that applies the Title Color is built in exactly the same manner, it just use different registers, so we just need to do the same thing again. (And there's really no point in explaining the same thing again)

 

So, to finish this of, here's how you set the RRGGBB of the Titles:

Default Title:

0x00BDD050 = 90794A6F

0x00BDD054 = 3C01XXYY

0x00BDD05C = 3421ZZ00

New File Title:

0x00BD61FC = 90F94A6F

0x00BD6200 = 3C01XXYY

0x00BD6208 = 3421ZZ00

Options Titles:

0x00BD8E68 = 93EE4A6F

0x00BD8E6C = 3C01XXYY

0x00BD8E74 = 3421ZZ00

XX = Red

YY = Green

ZZ = Blue

 

 

Man, who would've thought that it would take like 20-30 minutes to explain something that only took me a few minutes to do.

  • Like 4
Link to comment
Share on other sites

I noticed that I haven't really talked about it in the thread, so it's time for another update.

I've decided to include the ability to replace textures in the editor. The idea is to keep things relatively simple and quick to use.

In the next release, importing a menu background texture in the texture tab should actually replace the texture in the ROM itself, you'll no longer need to use other software to achieve this.

I am still working out the details for how various things will be handled, especially texture loading. I will try to make it so that the editor can read the textures from the files you provide directly. It shouldn't be to hard, but I can't say for sure since I haven't generated brand new images through javascript before. This will also require me to reverse the image conversions (shouldn't be difficult at all).

At the moment I've written functions to convert images you import to the editor to I4, I8, IA4, IA8, RGB5A3 & RGBA32. RGB565 will be supported as well.

 

I also plan to release a "bonus" tool. It'll basically allow you to just drag and drop textures and convert them to whatever format you want and output it as hex. This is so that you can convert textures which aren't used by the editor.

 

Here's a few textures I looked up:

Title Screen (all title screen addresses except copyright text is from SoDs OoT thread)
017F7000	160x160 rgba32		main logo
01810A00	160x16 ia4		Title Screen Copyright Text
01817000	192x192 i4		logo mask; a 3x3 grid of 64x64 tiles   
01817000	64x64 i4		top-left of logo mask   
01817800	64x64 i4		top of logo mask   
01818000	64x64 i4		top-right of logo mask   
01818800	64x64 i4		left of logo mask  
01819000	64x64 i4		center of logo mask   
01819800	64x64 i4		right of logo mask   
0181A000	64x64 i4		bottom-left of logo mask   
0181A800	64x64 i4		bottom of logo mask   
0181B000	64x64 i4		bottom-right of logo mask
0181BC00	72x8 i8			"the legend of"
0181BE40	96x8 i8			"ocarina of time"

File Select
01AC1480	128x16 ia4		File Select "No file to copy."
01AC1C80	128x16 ia4		File Select "No file to erase."
01AC2C80	128x16 ia4		File Select "This is an empty file."
01AC3480	128x16 ia4		File Select "This file is in use."
01AC8C80	128x16 ia4		File Select "Copy which file?"
01AC9480	128x16 ia4		File Select "Copy to which file?"
01AC9C80	128x16 ia4		File Select "Are you sure?"
01ACEC80	128x16 ia4		File Select "Please select a file."
01ACF480	128x16 ia4		File Select "Open this file?"
01AD1C80	128x16 ia4		File Select "Erase which file?"
01AD6480	128x16 ia4		File Select "Options"
01AD7480	56x16 ia4		File Select "Name?"
01AD7F00	144x16 ia4		File Select "A-Decide*B-Cancel"
01AE4200	48x16 ia4		File Select "Surround"
01AE4500	48x16 ia4		File Select "Headset"
01AE4E00	48x16 ia4		File Select "Mono"
01AE5900	48x16 ia4		File Select "Stereo"
01AE5F00	64x16 ia4		File Select "L TARGETING"
01AE7000	48x16 ia4		File Select "Switch"
01AE7B00	48x16 ia4		File Select "Hold"
01AE8600	128x16 ia4		File Select "CHECK BRIGHTNESS"
01AA4180	16x16 ia4		File Select Forest Medallion
01AA4280	16x16 ia4		File Select Fire Medallion
01AA4380	16x16 ia4		File Select Water Medallion
01AA4480	16x16 ia4		File Select Spirit Medallion
01AA4580	16x16 ia4		File Select Shadow Medallion
01AA4680	16x16 ia4		File Select Light Medallion

Interface
01AECA00	32x32 ia4		Action Button (A, B, C, Start)
01AEC000	16x16 ia4		0/4 Heart
01AEC100	16x16 ia4		1/4 Heart
01AEC200	16x16 ia4		2/4 Heart
01AEC300	16x16 ia4		3/4 Heart
01AEC400	16x16 ia4		4/4 Heart
01AEDE00	16x16 ia4		Key
01AEDF00	16x16 ia4		Rupee
01AEE580	8x8 rgb5a3		Chest
01AEF940	24x16 ia4		Magic Meter Middle
01AEF8C0	8x16 ia4		Magic Meter Edge
Note how all textures I've looked up except one are ia4. This is because ia4 & rgba32 was the first formats I added to my editor. And one is rgb5a3 because I used that texture to compare the result of my conversion to make sure that everything worked properly. I can't promise that the next release will be able to change all of these textures though, since I haven't added Interface or Title Screen support yet.
  • Like 3
Link to comment
Share on other sites

Sorry for making this double post. But I really want some community feedback on the texture replacement feature I'm going to be working on, as it will be one of the key features of the editor, and hopefully something that'll make it usable for more people.

So, I've already talked about the basic concept behind it all, you'll be able to drag and drop images to the editor, and it will do the rest for you. everything from converting the image, to placing it inside the game.

However, I want this feature to work as good as possible, and it is hard for me as the developer to not have biased opinions about things.

I've already worked out the converting process, that'll all be automated and nothing anyone has to worry about.

I'm still making mockups of the layout and design that will be used for the texture part of the editor.

This is the latest version:

textureeditormockup2.png

 

The Textures panel at the bottom is no longer used for changing the background textures. It can only be used to move the pieces around. However, with the addition of the ability to replace the actual texture, this feature may no longer be necessary, so I may very well just remove it altogether.

 

The new Texture Section is located on the right panel, sharing the same space as the objects/cursors object lists. Having a vertical scroll for the texture list will make navigating easier, and you get much more space to work with, which was needed to add in a Selected Texture box.

It displays the format used by the texture, and explain what type of color it uses for those who aren't familiar with the various formats, so they know how to set up their own textures.

It also tell you the proper size to use for the texture, as well as its location in the ROM, if you want to know what section of the ROM you're currently editing.

It'll display a preview of the texture. I'll most likely limit the preview size to 128x128, and if a image is wider it'll just scale down. You'll be able to import a texture by using either the choose file button or by dropping the texture on top of the preview.

 

The texture list will be displayed below it. The list items will display the same information as the selected texture box but in a more optimized way, and the preview will be limited to 64x64.

The textures will be split into multiple groups to keep things organized.

For example, textures that make up for the pause menu background such as the L and R Button, Title Panel and Background may be placed in one group.

Object textures such as meddalions, spiritual stones, skulltula token, etc. will most likely have their own group as well.

And so on.

At the moment I plan to set it up so that all textures used by the various pause menues share the same textures tab, meaning that all the pause menu panels will display the same texture lists. You won't have to choose the Quest Status Panel to access it's background textures for example.

 

However, changing to the File Select Panel will hide all the Pause Menu texture groups and instead display ones related to the File Select. One of the reasons for this is because the File Select portion of the editor is an "addon", it can be removed from the editor entirely. And it'll require additional files to be loaded before you can access it. It also runs the editor in a separate state. Textures, objects, etc. is handled very different for the File Select. Basically I wrote a new "core" for handling the elements on the workspace, but the Pause Menu panels still run on the old one. This will also be the case with the Interface portion of the editor, when it is added.

 

I am also looking into removing all the textures from the editor, and instead force the users to provide the texture files from the ROM and have the editor load everything from it. This'll increase the initial load time by quite a bit, but it will also reduce the editors size by a lot, and the editor will recognize textures that've already been replaced in the ROM.

However, I can't do that before I have documented every texture I'm using, as well as adding support for every texture format.

 

So yeah, if you have any concerns, suggestions, questions, etc., go ahead and tell me.

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

Okey, so I've began rewriting how the editor handles files, and it now uses the entire ROM file. As a result I now use the dma table to get the proper offsets for all the files, meaning that the editor also will work for modified ROM files.

One thing that I should note is that in reality you do not actually need to load an entire ROM file. What it does is when you load the file if extract the files required by the editor with help from the dma table. So it is technically possible to just import the required files one by one until you've provided all of them, but it is also possible to simply provide an entire ROM file.

At the moment the editor uses dmadata.zdata, ovl_kaleido_scope.zdata, and various texture files (I've not yet finished the code, so I myself am not sure exactly which ones), this is without including the file select addon.

I am going to set up the editor so that when you save, it will generate a zip file containing all the files that were edited (meaning that if you do not edit a specific file in the editor, it won't be downloaded), as well as a text document listing the changes that were done to each file (Still working out the display format for this).

 

I am also currently working on a new autoload feature that will be available for those who download the editor.

It works so that after you've provided all the required files in the editor, you can choose to generate an autoload folder.

What this does is it take each file required by the editor, convert each individual file to a hex string, convert the hex string into a base64 string, add a prefix and suffix to this string so that it becomes a variable (ex. '$autoload.ovl_kaleido_scope="...base64 string here...";'), create a javascript file for each file, put them in a folder called autoload, put that folder in a zip document, and then download that zip document.

Then all you need to do is extract the autoload folder in the root directory of the editor and the next time you open it it will load all the javascript files that've been generated in the autoload folder, convert them back to the proper format, and run.

 

This is the only solution I've come up with since offline websites can't access local files automatically.

 

So now that I've worked out how I will handle the files as well as autoloading, I can soon begin working on the saving process. After that is done, I can begin working on loading textures and such directly from the ROM, which was my initial goal.

 

Edit:

File loading is done! https://dl.dropboxusercontent.com/u/6440063/cmz64e/fileload.png

You can provide an entire ROM file and it extracts the required files from it, or you can provide each file that's required manaully. I added a list that will display each required file, and mark it when the file has been loaded.

Autoloading is also done, in fact, the dmadata.zdata file was autoloaded when I took the screenshot, which also means that it is indeed possible to choose to only autoload specific files.

 

Edit2:

Here's the current layout for the text document that is generated when you save (and in other news, saving is now done):

 

 

All the files that have been edited has been saved and downloaded to the files folder.
--------------------------------------------------------------------------------------
Files that were modified--------------------------------------------------------------
--------------------------------------------------------------------------------------
File                                    Offset  Length
ovl_kaleido_scope.zdata                 BE2730  01E980  
--------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------
Changes that were made----------------------------------------------------------------
--------------------------------------------------------------------------------------
ovl_kaleido_scope.zdata
        0x017948 int16 was changed from -54 to -29
        0x0179A8 int16 was changed from 58 to 85
        0x0179AA int16 was changed from -52 to -62
        0x0179AC int16 was changed from -52 to -56
        0x0179AE int16 was changed from -52 to -49
        0x0179B0 int16 was changed from -52 to -46
        0x0179B2 int16 was changed from -52 to -41
        0x0179B4 int16 was changed from -52 to -62
        0x0179B6 int16 was changed from -52 to -56
        0x0179B8 int16 was changed from -52 to -49
        0x0179BA int16 was changed from -52 to -62
        0x0179BC int16 was changed from -52 to -56
        0x0179BE int16 was changed from -52 to -49
        0x0179C0 int16 was changed from -52 to -46
        0x0179C2 int16 was changed from -52 to -41
        0x0179C4 int16 was changed from -52 to -62
        0x0179C6 int16 was changed from -52 to -56
        0x0179C8 int16 was changed from -52 to -49
--------------------------------------------------------------------------------------
 

 

 

It was just a quick test that I put together to see if it would be feasible to implement a changelog for files that're downloaded. Turns out that it was simple.

I just had to add a very small code to the function I use to write all the changes when saving so that it store a list of all values that were altered during the proccess.

Note how a bunch of -52 values were changed. This is because -52 is the default Y position of all the Ocarina Notes in the quest status screen (these values are unused).

The other 2 values were me moving the heart piece to make sure that things worked properly.

 

Edit3:

I updated the format for the changelog that is generated. It will now display the object that is being edited, and what data of that object it is that's being changed.

Instead of displaying the data as a message it's displayed as a table. I will most likely change the format in the Old/New Val columns to hex later.

 

 

All the files that have been edited has been saved and downloaded to the files folder.
Files were generated 11/19/2013 10:40:52 PM using CloudMax's z64editor Beta 3.0.0
******************************************************************************************
** Files that were modified                                                             **
******************************************************************************************
File                                    Offset  Length
ovl_kaleido_scope.zdata                 BE2730  01E980  
******************************************************************************************

******************************************************************************************
** Changes that were made                                                               **
******************************************************************************************
ovl_kaleido_scope.zdata
        Offset    Type      Object                   Data                Old Val   New Val
        0x0004F6  int16     Note 2                   Y Position          -49       -31       
        0x000832  int16     Replay Note 2            Y Position          -49       -31       
        0x017920  int16     Shadow Medallion         X Position          18        9         
        0x017922  int16     Light Medallion          X Position          46        49        
        0x01793A  int16     Song of Storms           X Position          -18       -7        
        0x017946  int16     Gold Skulltula           X Position          -110      -117      
        0x017948  int16     Piece of Heart           X Position          -54       -39       
        0x017958  int16     Ocarina Note #8          X Position          -14       2         
        0x017968  int16     Ocarina Replay Note #8   X Position          -14       2         
        0x017980  int16     Shadow Medallion         Y Position          38        48        
        0x017982  int16     Light Medallion          Y Position          56        75        
        0x01799A  int16     Song of Storms           Y Position          2         14        
        0x0179A8  int16     Piece of Heart           Y Position          58        67        
        0x0179AA  int16     Ocarina Note #1          Y Position          -52       -62       
        0x0179AC  int16     Ocarina Note #2          Y Position          -52       -56       
        0x0179AE  int16     Ocarina Note #3          Y Position          -52       -31       
        0x0179B0  int16     Ocarina Note #4          Y Position          -52       -46       
        0x0179B2  int16     Ocarina Note #5          Y Position          -52       -41       
        0x0179B4  int16     Ocarina Note #6          Y Position          -52       -62       
        0x0179B6  int16     Ocarina Note #7          Y Position          -52       -56       
        0x0179B8  int16     Ocarina Note #8          Y Position          -52       -31       
        0x0179BA  int16     Ocarina Replay Note #1   Y Position          -52       -62       
        0x0179BC  int16     Ocarina Replay Note #2   Y Position          -52       -56       
        0x0179BE  int16     Ocarina Replay Note #3   Y Position          -52       -31       
        0x0179C0  int16     Ocarina Replay Note #4   Y Position          -52       -46       
        0x0179C2  int16     Ocarina Replay Note #5   Y Position          -52       -41       
        0x0179C4  int16     Ocarina Replay Note #6   Y Position          -52       -62       
        0x0179C6  int16     Ocarina Replay Note #7   Y Position          -52       -56       
        0x0179C8  int16     Ocarina Replay Note #8   Y Position          -52       -31       
******************************************************************************************

 

 

Edit4:

The editor is now capable of loading textures directly from the files. (It is still limited to ia4 textures though)

Here is an example: https://dl.dropboxusercontent.com/u/6440063/cmz64e/pause_screen_texture_layout.png

That's a 80x2208 ia4 texture generated at offset 0x5C3C0 in file icon_item_static. (in reality it is 69 80x32 textures)

And another example: https://dl.dropboxusercontent.com/u/6440063/cmz64e/icon_item_dungeon_static_ia4_24x314.png

I generated a 24x314 ia4 texture out of the icon_item_dungeon_static file.

 

Edit5:

Completely forgot about cross-browser support..

I did a quick test in IE11, Firefox, Opera and Chrome.

The results were not what I had expected.

Chrome: Everything works perfectly and the framerate is good.

Internet Explorer 11: Site does not work, at all. There must be some code that isn't supported which breaks the global loop, or maybe even the initialization.

Opera: framerate is good, there is a slight slowdown when generating the download files when saving, but otherwise everything works perfectly.

Firefox: Bad framerate. It is about half of what chrome & opera has. The framerate also affect the menu tabs response time and such, so it is clearly noticable. Slight slowdown when generating the download files.

I expected Opera to do worse than Firefox, since that's usually the case. I did not expect IE11 to be broken yet again. so many errors that needs to be caught...

I'm not sure what to do about the framerate issue in Firefox.

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

If there is one way to make a game seem fresh and new it is presentation! You sir are another story in the long legacy of Zelda 64 hacking, and by the time you are finished with this project you will be a large part of it. With the ability to switch the way subscreens (maps?) and the UI (which can be sort of done already, but not easily) looks and feels it can add that feeling of uniqueness to hacks which can separate them from the base game. Incredible work so far! Also I am surprised at the quality of pictures, even after being forced into 4 colors by the editor. I guess it goes to show that both you and Nintendo know how to keep quality.

 

I was using Chrome and as you mentioned everything worked perfectly! (It's still unable to save, right?)

Link to comment
Share on other sites

If there is one way to make a game seem fresh and new it is presentation! You sir are another story in the long legacy of Zelda 64 hacking, and by the time you are finished with this project you will be a large part of it. With the ability to switch the way subscreens (maps?) and the UI (which can be sort of done already, but not easily) looks and feels it can add that feeling of uniqueness to hacks which can separate them from the base game. Incredible work so far! Also I am surprised at the quality of pictures, even after being forced into 4 colors by the editor. I guess it goes to show that both you and Nintendo know how to keep quality.

 

I was using Chrome and as you mentioned everything worked perfectly! (It's still unable to save, right?)

Thanks! I personally have always had a thing for User Interface programming, it's always been the favorite part to me.

The interface is what that users will see regularly and improves the overall experience.

And the released version should be able to save the .zdata file and be added back in a ROM properly. Unless there's some error preventing you from saving that I'm not aware of.

 

I should note that the saving functionality of the current release isn't exactly great, it just output a new ovl_kaleido_scope file.

The system has been completely rewritten now as the next release will use multiple files. The new one will instead generate a zip file containing a txt document containing all the changes that were made, offsets of the files and changes, etc. to make it easier for the user to add the files back into a ROM.

 

I realised that I haven't really posted any updates on my progress around here, only in the shoutbox and speedrunslive #zeldahacking irc channel.

So basically the editor now load all the textures from the provided files instead of being part of the editor itself. It is also possible to replace the textures.

Here's a preview of the texture viewer/replacer:

replacingtextures.png

As you can see, you're able to view the textures of the various files that you've loaded into the editor.

The way you import textures is very simple. All you have to do is drag and drop an image onto the texture that you want to replace.

The only requirement is that the image has proper dimensions. You do not need to make the texture greyscale and convert them to the proper format, the editor will convert the image to the proper format for you.

As seen in the picture above, I imported a 32x32 hylian shield over the Fishing Rod and a 48x48 hylian shield over the Heart Piece 3/4 texture. However, both were fully colored when imported, but the editor made the second one into an ia4 texture automatically.

All objects in the editor that used the texture were updated to use the newly imported texture.

 

And here's my first texture replacement test result ingame (textures were all replaced using the editor. Took me about 1 minute to replace, save, and add back to a ROM)

texture_import_test_albw.png

 

I will most likely be a little less active in the coming days because of A Link Between Worlds, but I should get back to the editor and make some real progress soon enough.

At first I doubted that I'd be able to make another release in 2013, but now I'm almost certain that I will be able to pull it off.

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.