Jump to content

CloudMax's z64editor


CloudMax
 Share

Recommended Posts

Okay, I am now officially back to coding the editor after a break from it to play and search for glitches in A Link Between Worlds.

Now, I were extremelly dumb and didn't write down what I were currently coding and such, so I no idea what I were in the middle off. All I remember is that the moment I received the game, I saved the files and closed down Notepad++, not to open it again until now. So I still have a general idea of where I was since it saved the scrollbar position in all files, lol.

 

Anyway, I want to keep the "promise" I made of releasing the next build this year. I realise that it will be much more difficult at this point, I did not expect to take such a long break, but it is still doable.

 

So the next thing I'll be doing is trying out the editor myself quite a bit, to see if there's anything that doesn't function properly as a result of me just leaving things as is. After that I'll be finishing up the generated text document to include textures that've been changed. I'll remove redundant files (some files that are required turned out to be unnecessary). After that I need to fix saving/loading of File Select Data, it currently uses preset values in the editor, and doesn't save to the files.

After that, the build should be stable. I can't think of anything else that is in the editor that doesn't function properly.

 

However, I will most likely not release the build at that point, as I still want to add a few features that I promised a while back, such as L/Z & R Button coordinates in the pause menus. Things like that will most likely be the most timeconsuming, as I still haven't looked up several addresses, and many things will require some minor ASM changes.

 

Edit:

Turns out that I hadn't properly ported over the menu background tile system to work with the textures directly from the files. It only took me several hours to rewrite the code to work with the new texture system, so that's done now.

I am also looking into browser compatibility at the moment. IE11 does not seem to work. I am trying to resolve it, but the browser just refuses. Basically it's the autload feature which is causing this problem. I convert things back and forth to base64 strings, and <IE10 does not have a native function for that, unlike all other browsers. However, for some reason it doesn't even work on IE10 & IE11. For some reason the native function just disappear...

 

Edit2:

It appears that I had a shim (https://github.com/MrSwitch/dropfile) that interfered with other scripts applied. It was used to add backwards compatibility for file dropping for <IE10 browsers.

Simply removing it solved the problem. I am no longer supporting <IE10 browsers anyway. Supporting IE8 caused me a lot of trouble and headache, and I had to write a lot of exclusive IE code, and it just wasn't worth it in the end.

If someone wants to use the editor, they should at least have the courtesy to download a modern browser that support it. IE8 would probably have terrible performance issues anyway.

 

Edit3:

The changelog that is generated when saving now list all the textures that've been replaced as well. (Even if you replace the texture with one that is identical!)

Here's what the generated file looks like at the moment:

 

 

All the files that have been edited has been saved and downloaded to the files folder.
Files were generated 12/10/2013 4:09:10 PM using CloudMaxs z64editor Beta 3.0.0
******************************************************************************************
** Files that were modified                                                             **
******************************************************************************************
File                                    Offset  Length
ovl_kaleido_scope.zdata                 BE2730  01E980  
icon_item_static.zdata                  74C000  089CA0  
******************************************************************************************
                                                                                          
******************************************************************************************
** Changes that were made                                                               **
******************************************************************************************
ovl_kaleido_scope.zdata
        Offset    Type      Object                   Data                Old Val   New Val   
        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       -49       
        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       -49       
        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       -49       
        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       -49       
icon_item_static.zdata
        Offset    Format    Size      Texture                                                
        0x000000  rgba32    32x32     Item 0
        0x05A000  ia4       48x48     Heart Piece 1/4
        0x05A900  ia4       48x48     Heart Piece 2/4
        0x05B200  ia4       48x48     Heart Piece 3/4
******************************************************************************************

 

As you can see, it displays the changes differently for textures. It wouldn't exactly be a good idea to display every pixel that was changed for all textures, so instead it displays which texture you changed, and what format & size it has.

 

Edit4:

As previously requested, the editor will now ask you if you want to leave the page to prevent you from leaving by mistake. (by navigating to a new page, refreshing, closing tab, etc.)

 

confirmation_dialog_on_close.png

 

 

However, I am a person who have always been against ads, alerts, etc., so this feature is disabled by default so that people who simply just want to leave the page won't get a bad experience by having alerts pop up when they try to leave.

As you can see in the picture, there is now a checkbox which says "Confirm when closing Editor" next to it. The confirmation alert will only appear when that box has been checked.

This should make everyone happy.

 

I added this feature right after I closed the editor by mistake by dragging a picture onto a zone that wasn't attached to file loading, which loaded the picture over the tab. I don't want to experience that again. I had spent a lot of time replacing a bunch of textures. I also improved the dropzone so that this issue shouldn't even happen in the first place from now on.

 

Edit5:

I've looked into the performance of the editor. And it is all over the place.

Chrome and Opera has the best FPS by far when no tab is open for the right panel (object list or texture list that is), and my computer isn't running lots of other resource-heavy programs.

Internet Explorer 11 and Firefox on the other hand seems to perform differently. They have a much lower FPS than Chrome & Opera, but it doesn't seem to be affected by me having photoshop and other applications running in the background, having a tab opened in the right panel doesn't seem to make much of a difference either.

So if you don't have a tab open, and not many applications running, Chrome and Opera perform great. If you on the other hand do have many applications running, and a tab open, IE11 and Firefox won't be affected, so the lower FPS that they have by default will be higher than that of Chrome and Opera.

Because of the huge performance impact that is caused by having a tab open in chrome and opera, I've added a Close button so that you can close the currently opened tab on both side panels, so that if you just want to work with the workspace you can do so at a good FPS.

Here's a picture of the new Close Buttons:

 

close_panel_tab.png

 

Edited by CloudMax
  • Like 2
Link to comment
Share on other sites

  • 3 weeks later...

I will not be able to finish up 3.0 of my editor this year, so I'm currently aiming to make a release preview of it by the end of the year.

A few features will be temporarily cut from it as they aren't done, but all features that are functional will be preset, even if they aren't complete.

At the moment I believe the only feature that will be cut is the File Select. Reason is because I haven't located all the textures for it yet (haven't had the time), and I haven't added saving/loading for it yet (I have written down most of the addresses in the RAM, haven't had the time to convert them to ROM, etc.)

The texture importer is not done either, but it is one of the key features of 3.0, and I really want it to be present, so I'll be working on it in the next few days in order to finish it up before next year.

 

Also, this:

I still want to add a few features that I promised a while back, such as L/Z & R Button coordinates in the pause menus. Things like that will most likely be the most timeconsuming, as I still haven't looked up several addresses, and many things will require some minor ASM changes.

These features should be present in 3.0, but I haven't had the time to look into the ASM at all, so I won't be able to add it in the release preview.

 

But do not worry, I will do my best to release the full 3.0 sometime in January. keep in mind that Majora's Mask support still is going to be a 3.1 feature.

This delay does not mean that I will push any additional features for 3.0, unless it is any bugfixes and such which I have yet to find.

 

Edit:

I may include the File Select Feature with the release preview, but in a disabled state (You won't be able to save/load changes to/from the ROM itself). Which means that all the code will be present, but you'll have to enable it yourself in a downloaded copy by changing a line of code. This is so that those who are interested can take a look at it and get a good picture of what they can expect from it.

I haven't fully decided if I will do this though, since the File Select feature takes up about half the size of the editor since the textures, as well as skybox previews are included with it.

I may even release those file as a separate download, so that you can put them in the editor folder to enable the file select.

Time will tell.

Edited by CloudMax
  • Like 1
Link to comment
Share on other sites

Are you interested in checking for hardware compatibility? I wouldn't mind testing a few roms for ya

Sounds like a plan.

I'll put together a ROM that uses pretty much every feature that the editor has to offer sometime this weekend, if it doesn't work for you, I'll put together a few individual ROMs that uses different features.

I assume I just have to give you the Debug ROM as is, and not compress it or anything? Because I have no experiece with such things.

hardware compatibility is one of the main goals of my editor. Which is why I am also considering adding support for NTSC-U 1.0 at some point, since that may be the prefered version for some people who make mods for console.

  • Like 2
Link to comment
Share on other sites

Been working on the editor for about 6 hours today and found a lot of bugs everywhere, and a lot of leftover text which was no longer true for 3.0, but I've corrected all of it now.

And I finally managed to fix the massive FPS issue caused by the Texture Lists.

Basically the editor has a function in the global loop to determine which elements should be visible depending on an attribute.

Like this: "data-req='settings,texturefile/icon_item_static'", this means that for the element to be visible, $editor.settings.texturefile must be equal to "icon_item_static".

It would cause a lot of lag if I were to put this on every single texture available in the editor, it would have to loop thru hundreds of textures every frame.. So what I were supposed to do was to simply place the textures of each file within a container, and just put the data-req on the container..

And here's the stupid part.. I forgot to generate these containers outside of the loop that creates the texture list entries, so every single texture had a container.

So yeah, I just had to move a single line of code 2 rows up and the FPS was increased from 12fps to 26fps.

 

There were also a lot of bugs in the loading feature, if you loaded files in specific orders the editor would crash (you had to provide the dmatable file first), and at some point I even broke the ability to load the entire ROM file. The only way to use the editor was to either provide all files one by one starting with the dmatable file, or use the autoload feature.

This is now fixed. You can provide an entire ROM file, or provide the files separately (in whatever order you want), or use the autoload feature.

 

Some things didn't have a description applied to them, so the changes weren't visible in the the generated text file when saving. There were also some minor padding issues that could cause things to not align properly in the text file.

And now the "Include files that haven't been edited" option actually work. For some reason I added the option like two months ago, but it didn't do anything.

 

Made a few changes to the Selected Texture box. Now you can drop an image anywhere in this box to import a texture, and not just on the texture preview itself.

When importing a texture, it is now properly updated in both the texture list, and in the selected texture box, instead of only the one you used to actually import the texture.

 

I've temporarily removed the File Select Menu. And just like I had hoped, I only had to comment out "fileselectInit();" and everything related to the File Select goes away.

 

The Save Panel was not saved. Ironic, huh? It only saved changes done to the first 4 panels (remaining code from when the editor only had 4 panels for both MM and OoT), so the background color was never saved for it.

 

I had removed an ASM hack which was required in order for the editor to be able to change the Quest Status R Button Direction ID by mistake and it has now been added back.

 

The Note Button colors for the Quest Status menu had to be set at 3 locations, not one. One for when the notes are displayed normally, and one for when you're listening to the song. And one for when you've played a note.

I wiil make it so that the color you set in the editor is applied to all of them. (I have not looked up the 3rd location yet) I may change this for the 3.0 release, We'll see.

 

The editor will be released either tommorow or on new years eve.

 

HeavyZ, I'll send you a test ROM very soon. The CRC has not been updated, so hopefully you have a tool for that. I've replaced various Interface textures, and the textures for all menus except the Map, I've changed the A button color for the songs in the quest status menu, Some objects has been moved a pixel or two, the default cursor position has been changed for when you move from the Z and R buttons in the quest status menu, and you can go Down/Up from the Light/Water Medallions.

These changes should cover moving objects, all the available ASM hacks, changing all kind of colors, and replacing textures. So if the ROM I provide you works (with a fixed CRC), then the editor should be compatible with hardware.

  • Like 1
Link to comment
Share on other sites

The first test is a success! The custom menu works perfectly on hardware, and also the current changes made didn't effect the CRC

 

Edit:

I'll barrow my dads phone soon and post up pics ^ ^

 

Edit 2:

It seems there is one glitch there is nothing but black behind Link in the menu, but this is still pretty awesome considering it's the first run, and heck, I'd still use it as is.

 

Also there's a crack on the lense of the cam you'll notice on the bottom right of each photo

 

Pics!

 

20tmbtj.jpg

 

 

 

f53dq8.jpg

 

  • Like 3
Link to comment
Share on other sites

Yeah, the thing about it being black behind link is something I found out about after I created the menu texture.

Apparantly the generated image doesn't have alpha, it's black. The original menu fades into the black background to make it look good, which is what I probably should do for my menu, when I get around to finishing it. (I believe I lose the photoshop file though...)

 

So it seems like everything is working properly, which is great! :)

I'll try to get the Preview build out tomorrow (Especially since I most likely won't have any time to work on it on new years eve), I just need to make sure that everything saves & loads properly, and fix the button color stuff for the Song Notes. At least I think that's everything.

 

Edit: Okay, looked up the 3rd location for the song note button colors and it now set all 3 properly.

I believe that everything saves properly as well, and I fixed a rounding issue which caused the editor to say that all alpha colors were changed every time you saved in the editor.

I am currently removing old files and such which is no longer used by the editor.

The code is a bit of a mess, it has a lot of old leftover code that is either just ignored (Majora's Mask), or commented out, etc.

But this is just a preview build after all. I'll most likely clean it up a bit for the actual release.

 

Here's a quick look at the current size of the editor:

450kb for scripts. (140kb of it being the stuff that I've written by hand, the rest is 3rd party stuff like jquery, less, etc.)

95kb for stylesheets. (the less sheet is included in addition to the css file, which is about 44kb)

22kb for the html document.

 

Beta 2.2.0 was about 970kb.

 

So all in all, the size has been reduced by about 400kb, this is excluding the File Select stuff ofc. (the skybox previews for it take up ~450kb)

 

I'll do a bunch of testing the next few hours. If everything goes well, the editor will be released today.

 

Edit 2:

Beta 3.0.0 Preview has been released, you can try it out here, or download it here

Edited by CloudMax
  • Like 3
Link to comment
Share on other sites

 Share

×
×
  • Create New...

Important Information

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