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

Author Topic: The Legend of Zelda Editor - Sword I  (Read 22673 times)

Trax

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
    • Trax ROM Hacking
The Legend of Zelda Editor - Sword I
« on: December 23, 2014, 09:28:33 pm »
I got Sword I out of the shelf and decided to continue working on it, as I think it has potential. A lot of things are known of this game, and this means many things can be integrated in an editor, to help hackers in the design of the Overworld and the Dungeons. Most of the things here are not new, as I talked about them breifly in other generic threads. This is a specific thread where you can ask questions and suggest ideas...

I know there are other Zelda editors out there, including Zelda Tech, which seems to be quite exhaustive and well done. My intention is not to compete in any way with other editors, although it's still the only editor for Zelda 1 on the Mac, as far as I know. On the contrary, I hope my implementation of the editor can be seen as a source of inspiration...

This is the Overworld Editor, with as many control as possible on screen layout, enemies, colors, caves and secrets...

To move around the map, you can use the arrow buttons at the bottom left. The "active" screen is frames in black. This is the screen that, when clicked, will have its columns set to the brush selected on the right. You can also move around by entering any screen number, from 00 to 7F, in the "Current Screen" field. Some fields have little arrows next to them. It means you can use a secondary selector instead of entering the numbers by hand. Screen ID can be selected from a Screen Selector, with small thumbnails of all the screen types you can use in the Overworld. This window is yet to be done. A miniature of each screen needs to be kept in memory, and any change to the map has to be reflected in the selector. Another thing that needs to be done is a column editor. Each Overworld screen is made of 16 perset columns of 11 tiles high. Sometimes, a specific column may not exist for your needs, so the idea of editing existing columns, and making new ones, is essential if we want to create a truly original map layout...

You can also choose the enemy type(s) that will appear in the Active Screen, either by entering a code in the field, or using the secondary selector, by clicking the little arrow. A window will appear, that lets you choose the enemy you want. You can either have a single type of enemy, or mixed types. Either way, you have to choose between 4 different quantities (that's how the game mechanics works). When you have mixed type enemies, the enemy code used determines an index in a list of enemies, and you get the enemy types starting from that index, up to the quantity selected. Again, it's how the game works. Doing this by hand can be tedious, but the editor makes it easy with visuals. You can't choose freely what kind of enemy you want in a given screen, although you can edit the list of enemies that is used to determine the enemy array. It's a little hard to explain, but I think the picture explain it better...



Dungeons have a different way of dealing with Single/Mixed enemy codes. Single enemy mode works the same, but mixed enemy mode is also used to create bosses or talking old men...

On the Overworld, any screen can be associated with a cave type, either accessible in plain sight, or a hidden secret, like a bombable wall, a burnable tree, etc. There's the Cave selector, where you can decide what's in any of the caves available. You can change the ID of the text to be displayed, the type of character and the items that are given or sold. From that place, you can use a secondary selector to choose from all the available items in the game. You can change item types and prices...

Then, there's the text editor. It lets you edit all the 38 dialogs in the game. The intro and ending text are not there, and will be added eventually. You can type anything you want, using up to 3 lines. You see the result just like you will see it in the game, using the ROM's graphics. The editor has an arbitrary set of characters that it can convert, based on the original game. Any character that is not recognized will output a zero. If you decide to edit the graphics and have your own set of tiles, then you'll have to do it by hand. A nice addition would be to have the option of loading a convertion table, like a .tbl file, for example...

The last addition I made to the Overworld editor is the ability to change other Special Locations on the Overworld, that is, the Starting Location, the 4 Shortcuts, the 8 Whistle Warp Locations and the 11 Whistle Secrets. I assigned a color to each type of Special Location, to highlight their corresponding screen and better visualize where they are. In the screenshot below, you can see the Starting Location in red, Shortcuts in green, Whistle Warps in purple and Whistle Secrets in blue. Note that the blue tint looks purple because of the mix of the colors. The purple looks more like pink...

You can use a small secondary window to select and edit these locations, any way you want. You have to first select the location you want to move. When you do that, the outline of the location becomes a dashed line. Then, the next mouse click effectively moves the location...

That's for the Overworld. I'll talk about the Dungeons editor in details another time. Feel free to ask any questions...

Dr. Floppy

  • Restricted Access
  • Hero Member
  • *
  • Posts: 972
  • Make America GREAT Again!
    • View Profile
    • BaddestHacks.net
Re: The Legend of Zelda Editor - Sword I
« Reply #1 on: January 03, 2015, 10:30:41 pm »
I *really* need to release that Zelda: Jailbreak! hack sometime this decade...

90s Retro Gamer

  • Full Member
  • ***
  • Posts: 149
    • View Profile
Re: The Legend of Zelda Editor - Sword I
« Reply #2 on: January 15, 2015, 05:37:08 pm »
Add a sprite-editor to your suite so that users can change the sprites of enemies and items.

Grimlock

  • Sr. Member
  • ****
  • Posts: 361
  • Graphics Artist, Level Designer
    • View Profile
Re: The Legend of Zelda Editor - Sword I
« Reply #3 on: January 16, 2015, 01:44:47 am »
Add a sprite-editor to your suite so that users can change the sprites of enemies and items.

Tile Layer Pro as well as several other graphics editing applications are already available to modify the graphics.  I think time spent on other features would be better spent.  Expanding the ROM and allowing for additional world tiles would be great.  Music editing would be another.  Something similar to the Metroid Tuner app, text based would be sufficient.

Trax

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
    • Trax ROM Hacking
Re: The Legend of Zelda Editor - Sword I
« Reply #4 on: January 17, 2015, 01:38:00 pm »
I agree with Grimlock, here. Zelda 1 doesn't have anything special about its graphics. Sure, it's not CHR ROM banks, but otherwise it's standard. When graphics are loaded into the PPU, there is always the 0x70 basic sprites loaded at 0x0000, and then the remaining for sprites specific to the world you're in, either Overworld or any of the two sprite sets for the Dungeons. Dungeon 9 also has unique sprite graphics. The background tiles are either Overworld or Dungeon, same for all dungeons...

If there's a special treatment needed for a game's graphics, then an integrated editor makes sense. I'm working on such an editor for Contra, because the graphics data are compressed and there are other quirks happening during the PPU loading process...

As for new tiles, it's still possible, as long as you have the graphics that go with them. There may be a few tables to expand and move around the ROM. The major design limitation of the game is that you have to shuffle columns around. You can change the tiles that compose each column ID, and this can be expanded. Or, you go all the way like Infidelity did and you rehaul the entire tiles system, like he did in his hack Legend of Link. He got rid of the columns system and each tile can be placed freely. He did not use any compression, so the entire tiles layout data used a massive amount of space. The palettes were also freed from the original engine's limitations, and were only limited by how the system's PPU attributes colors to tiles...

vince94

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: The Legend of Zelda Editor - Sword I
« Reply #5 on: January 23, 2015, 09:42:21 pm »
Does the text editor re-point the text so people don't have to worry about overwriting other strings? If so, schweeeet!

johnny

  • Full Member
  • ***
  • Posts: 171
    • View Profile
Re: The Legend of Zelda Editor - Sword I
« Reply #6 on: January 24, 2015, 01:37:26 pm »
Tile Layer Pro as well as several other graphics editing applications are already available to modify the graphics.  I think time spent on other features would be better spent.  Expanding the ROM and allowing for additional world tiles would be great.  Music editing would be another.  Something similar to the Metroid Tuner app, text based would be sufficient.

You speak as if they are very easy to use. I think many beginners would prefer to edit an entire sprite rather then a Link head on one portion of the screen, with the middle of a sword underneath, and a random piece of the triforce next to that. Which is what Tile Layer Pro does.

Trax

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
    • Trax ROM Hacking
Re: The Legend of Zelda Editor - Sword I
« Reply #7 on: January 25, 2015, 12:40:28 pm »
Quote from: vince94
Does the text editor re-point the text so people don't have to worry about overwriting other strings? If so, schweeeet!

Yes, the editor rewrites the pointer table when you save the ROM. If there's not enough space for all string data in the original space, the remaining is copied elsewhere in the same bank, specified by the user in the preferences. The unused space in Bank 1 on the original ROM goes like this:

4CAE: Unused Space (52 bytes)
5ED4: Unused Space (12C bytes)
6423: Unused Space (DD bytes)
6DFA: Unused Space (A bytes)
7751: Unused Space (7FF bytes)
7FC0: Unused Space (3A bytes)

Total Unused Space : A9E bytes (2718 decimal)

Quote from: johnny
You speak as if they are very easy to use. I think many beginners would prefer to edit an entire sprite rather then a Link head on one portion of the screen, with the middle of a sword underneath, and a random piece of the triforce next to that. Which is what Tile Layer Pro does.

I'm not very familiar with NES graphics editors, but isn't there at least one editor that lets you layout tiles freely in a kind of "sandbox" matrix and edit them there? That would make editing of any kind of sprite arrangement very easy...

M-Tee

  • Hero Member
  • *****
  • Posts: 595
  • One pixel at a timeā€¦
    • View Profile
    • M-Tee Retro Graphics
Re: The Legend of Zelda Editor - Sword I
« Reply #8 on: January 25, 2015, 09:19:59 pm »
You speak as if they are very easy to use. I think many beginners would prefer to edit an entire sprite rather then a Link head on one portion of the screen, with the middle of a sword underneath, and a random piece of the triforce next to that. Which is what Tile Layer Pro does.

Actually, Zelda uses 8x16 tiles which does make the graphics very easy to use and almost entirely arranged correctly. YY-chr has an option that arranges 8x16 tiles correctly. I'm on my phone, so I cab't dig through my post history, but I posted a screenshot, probably in the other active Zelda thread, a few weeks back showing just that. To make a game-specific graphics editor for a game with such straight-forward graphics would be time best spent elsewhere.

EDIT: Found it anyway. I usually do all of my graphics externally and import them through yy-chr. But, it's not really necessary.

If someone needs something simpler than this, then I don't know what to say. Perhaps they're in the wrong hobby.  ;D

« Last Edit: January 26, 2015, 10:20:37 am by M-Tee »

vince94

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: The Legend of Zelda Editor - Sword I
« Reply #9 on: January 26, 2015, 08:27:55 am »
I just realized - there's no download link.  :o
It looks so promising, though, I'm excited!
« Last Edit: January 26, 2015, 08:51:44 am by vince94 »

Mayorofunkytown

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: The Legend of Zelda Editor - Sword I
« Reply #10 on: February 06, 2015, 03:01:22 pm »
Real nice work there Trax! :thumbsup: Hope you can finish and release this project soon.

Trax

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
    • Trax ROM Hacking
Re: The Legend of Zelda Editor - Sword I
« Reply #11 on: March 01, 2015, 04:33:12 pm »
Thanks for the feedback, people. Now for the second part of the editor, also very important because it's about dungeons...

Like the Overworld, the Dungeons rooms are made of 2 different 16x8 matrixes. The editor doesn't let you change which dungeon goes in which 16x8 matrix, but it's a simple question of pointers in a table, so the implementation is trivial. For now, the editor just assumes the 6 first dungeons are in the first matrix, and dungeons 7-8-9 are in the second matrix...

Some of the controls at the bottom of the window are similar to the ones in the Overworld editor. You can change you current location by either clicking on a room (other than the one already selected), by entering a location (in hex) in the Current Location field or using the arrows on the left. You can change any room to any code from 00 to 7F. Note that codes 3E and 3F are explicitly reserved for underground passages. The screenshot below shows what the Dungeon editor looks like, with the option Mask Other Dungeons activated... (note that this screenshot is slightly outdated, you can ignore the SBT matrix)

The item number sets the item that is in the room or appears when certain conditions are met. Some of the checkboxes are conditions. Usually, an item appears when all enemies are cleared. Items can appear in 4 different positions, taken from a table of various data, one for each dungeon. And like the Overworld, the enemy code, as well as the quantity, and whether the enemy is single type or mixed. The dungeons have some special Mixed Type enemy codes that generate Old Men with Messages, bosses and other special events. There's also 3 types of special rooms: Starting Room, Boss Room and Triforce Room, in red, blue and yellow shades, respectively. These rooms can be moved around...

Another window lets you edit both kinds of maps. The one that you see at the top-left of the screen when you find the Map Item, and the one that Link draws along when he visits new rooms. Both must be set explicitly, or else you get weird results during the game. It's simple point and click. You also have to set the entrance point for each type of map...

Now, the latest feature I added to Sword I is what I call Wall Highlights...

Being pixel perfect is fun, but it's also important to make tools that address the question of design itself. I think this feature can help in the design of the dungeons. With a glance of the eye, you can see where the walls and boundaries are, better visualize how crooked your labyrinth is, and make sure all the rooms are accessible...

On the screenshot above, you can see the Boss Room, shaded in blue, and the Triforce Room, shaded in yellow...
« Last Edit: March 01, 2015, 06:26:40 pm by Trax »

Dr. Floppy

  • Restricted Access
  • Hero Member
  • *
  • Posts: 972
  • Make America GREAT Again!
    • View Profile
    • BaddestHacks.net
Re: The Legend of Zelda Editor - Sword I
« Reply #12 on: March 01, 2015, 05:38:18 pm »
Note that codes 7E and 7F are explicitly reserved for underground passages.

I thought it was 3E & 3F? Does this utility provide Dungeon Roomtype expansion?!?  :D

Trax

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
    • Trax ROM Hacking
Re: The Legend of Zelda Editor - Sword I
« Reply #13 on: March 01, 2015, 06:26:08 pm »
Ah, my mistake. That's right, the codes are 3E and 3F. Sorry for the false hope!

(previous post corrected)

Dr. Floppy

  • Restricted Access
  • Hero Member
  • *
  • Posts: 972
  • Make America GREAT Again!
    • View Profile
    • BaddestHacks.net
Re: The Legend of Zelda Editor - Sword I
« Reply #14 on: March 02, 2015, 10:03:57 am »
I really gotta commit to that Zelda: Jailbreak project. Perhaps February 21, 2016 would be an appropriate release date?

Trax

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
    • Trax ROM Hacking
Re: The Legend of Zelda Editor - Sword I
« Reply #15 on: March 04, 2015, 06:37:22 pm »
I don't really believe in release dates, especially with that much advance. If you happen to come too close from the date, you run the risk of butching the final parts. I prefer something that is carefully crafted and over-tested...

Dr. Floppy

  • Restricted Access
  • Hero Member
  • *
  • Posts: 972
  • Make America GREAT Again!
    • View Profile
    • BaddestHacks.net
Re: The Legend of Zelda Editor - Sword I
« Reply #16 on: March 04, 2015, 07:00:21 pm »
February 21, 2016...

Spoiler:
00110000

vince94

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Re: The Legend of Zelda Editor - Sword I
« Reply #17 on: March 06, 2015, 12:02:00 pm »
I agree with you on the release date thing. Take as much time as you need, the program'll be complete and polished in the end.

Trax

  • Hero Member
  • *****
  • Posts: 517
    • View Profile
    • Trax ROM Hacking
Re: The Legend of Zelda Editor - Sword I
« Reply #18 on: March 08, 2015, 08:07:15 pm »
Although a bit cluttered, I think there's something about this screenshot:

snarfblam

  • Submission Reviewer
  • Hero Member
  • *****
  • Posts: 590
  • CANT HACK METROID
    • View Profile
    • snarfblam
Re: The Legend of Zelda Editor - Sword I
« Reply #19 on: March 08, 2015, 08:56:11 pm »
The only thing I don't like about your editors is the way they put mine to shame.