Friday, March 15, 2013

Zelda Starring Zelda: The Story


Earlier this week, I read about that awesome dad who edited Donkey Kong to let his daughter play as the Princess. I wished I had someone who could have done that for me. Then I remembered. I'm an adult now. If he could work it out, I could too.


I'm hobbyist animator and my boyfriend is a professional video game programmer. I sent him the article and I asked, "How do I do this?"

"I think he's just using an existing rom editor, so he just went in and changed the sprites."

"I want to switch around Link and Zelda."

That got his attention. We'd been talking about a Zelda-centric game ever since the first Tropes vs Women in Games video was released. He's a huge fan of the series and really wants to see a game completely based around Zelda. The series could use a shake-up like that.

For me, I played my first Zelda game when I was pretty young, and at the time, I thought the game did star Princess Zelda. I figured I'd get to play as a magical battle princess that saved her kingdom. The game was fun, but I was bummed out that I never got to play as Zelda. But like I said, I'm an adult now. There's no one to stop me from eating candy before bed and there's nothing standing in the way of me creating the games I want to play.

We started to dig around the internet for the tools to edit the files. Let me tell you, there are dozens of tools out there to help you, no matter what game you're trying to mess around with. The nice thing about the programs is that you don't have to be a programmer to use them. (Yay!)  Some of the tools were even specific to "The Legend of Zelda", but almost all of the Zelda-specific tools were just level editors, so I didn't end up using any of those. The sprite editor was easiest to find. I talked a little about "Tile Layer Pro" already, but it's worth mentioning again, because it's really the coolest little program.

Tiles are the blocks of pixels that make up each sprite. Animation happens when the tiles are swapped for other tiles. So, to create new animation, you just have to edit the appropriate tile.

Some tips! Make sure that tile goes back in the same place where you found it, or you might end up with random legs and arms sticking out of scenery. When you open up your ROM in Tile Layer Pro, you'll see a grid with all of the ROM information displayed as pixels. It shows *all* of the rom information, so you're going to see a flaming hot mess -- at first. Keep scrolling down until you find something vaguely sprite-shaped and use the "+" and "-" keys on the keyboard to align them. But beware -- the tiles will go back to their starting alignment when you scroll and not all parts of the code use the same alignment. We spent hours hunting down the princess tiles because we didn't realize that the alignment changed from section to section.

Everything else, I learned in this fabulous (and delightfully short!) tutorial

Take care to REALLY make sure you've really hunted down every instance of the tiles you want to edit. Link's "Large-Shield walk cycle" appears in two completely different parts of the code and Zelda's "Standing" and "arms raised" animations are on two different lines.

The best part? When you're done editing your sprites, just click save! That's it. You've edited your file.



Unfortunately, that program can't edit colors so Zelda was still in a green dress. But I was happy with my Zelda and I was busily hacking away at monsters when suddenly Simon sends me a file.

It was the code for the opening and closing scrolls, as well as the code for the colors of the "Tunic", nestled in a bit of Python script that would do a search and replace on my newly edited rom. I could rewrite the scrolls and change her dress to anything I liked. Best. Boyfriend. Ever. :D

While I had been animating, Simon had done some code googling and found a Legend of Zelda ROM Map, which was the hard work of some brilliant Zelda enthusiasts. Line by line, the map explains what each piece of code does. Without that wiki or the Computer Archeology website, we would still be hunting down code and play testing until our brains had melted. Play testing is exciting at first, but as soon as you stop seeing results, it becomes the worst thing in the world.

(Side note: I did ask Simon if I could publish the code here, but he's a perfectionist and the code isn't as slick as he'd like. I have a screen shot on my other post though. Update! We published the code! Thanks Simon!)

Now I had complete control of all of the elements of the game that I needed to make this Zelda's story. I just needed to come up with new opening text. But after playing as Zelda: Warrior Princess, I honestly couldn't figure out how to put Link back into the story. In cannon, Link is the one with the sword. When you take away the sword, who is he? Just some guy that can't get out of a room? Do I make him Prince Link? Is he a knight to Zelda? (Simon's idea :)) In the end, I decided he's still Link. Even though he's seemingly powerless to leave a simple room.

When I got to the end of the game, I took a screen capture and sent it to Simon. He was strangely quiet. "My first thought" he told me later, "was 'Link, why are you standing there? Just jump over the flames.' But I guess that's the point isn't it? The gender in games thing."



My friends have all had very strong emotions to the switch of Zelda and Link -- all positive so far. A male friend of mine said he teared up when he saw Zelda holding the sword over her head. (he's a sweetie) A friend posted a link to my blog with a "Because if Miyamoto won't, we will." Another friend told me she couldn't wait for her baby daughter to be old enough to play as Zelda. Many friends told me that it made them excited and happy. Not in the cute-ironic way, but really happy.



It makes me happy too. It feels really good to play as Zelda. I feel like I connect with her character better and it makes me feel like a big damn hero. It's so nice to be swinging around a sword as Zelda. I can't describe it. You really should try it for yourself. :D

I'm sure people will think I'm trying to make some kind of anti-Link statement, but I like this franchise a lot. And if it really bothers you, just think of it as overly complicated fan fiction. :P

All said and done, the project took only about 3 days to complete, including the play-through. Not too shabby. Basic sprite editing is very simple and requires no programming skill, but if you do happen to have a programmer handy you'll be able to gain almost complete control over these old classics.

I've put together a video of some of my play testing, including video from a complete play-through with all of the cheats on (which are REALLY hard to turn off, btw) and I added some of the Orchestrated Zelda theme music because I really love that theme. Zelda defeats Gannon at 2:02

 



Yes, just a patch. Unfortunately, I can't just hand you my edited ROM. It's a copyright thing. So instead you'll need to:

1) Find your own unedited Legend of Zelda NES ROM
2) Download my patch
3) Download an NES emulator (I like Nestopia)
4) Place the patch and the ROM in the same folder
5) "Open" the PATCH in Nestopia
6) Follow the Nestopia prompts and select the unedited ROM

MAC USERS!
Nestopia is pretty bare bones for Mac, so the Mac version can't patch for you. You'll have to use a patching program instead. MultiPatch seems to work pretty well.

Important note: Some ROMs have a hard time with the patch. If you're experiencing any glitches, try a different ROM. Happy gaming! :)


41 comments:

  1. This is awesome, how do you know if you have the red/blue ring though?

    ReplyDelete
    Replies
    1. The blue and red rings still change her dress to the same awful "Periwinkle" and darker "Red" dresses. There's a few brief moments in the video where she's fighting with the Periwinkle dress on, but I hated it and reverted the state. lol

      We're still hunting for the code that will let us reliably change the dresses and one day I hope to release a version with Red, Purple, and Green dresses. :)

      Delete
    2. This comment has been removed by a blog administrator.

      Delete
  2. This is perfect for many reasons, but "have fun storming the castle" sealed the deal for me.

    ReplyDelete
  3. Excellent! I'm really glad that this particular piece of work, together with your well-documented approach to it, is now part of the mod ecosystem. Well done!

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. "A male friend of mine said he teared up when he saw Zelda holding the sword over her head. (he's a sweetie) A female friend posted a link to my blog with a "Because if Miyamoto won't, we will." Another female friend told me she couldn't wait for her baby daughter to be old enough to play as Zelda. Many friends told me that it made them excited and happy. Not in the cute-ironic way, but really happy. "

    I think you have overreacted a little bit.

    ReplyDelete
  6. This is fantastic! Well done :)

    ReplyDelete
  7. Fantastic work. Written up over on my blog and shared with everyone I know (though the Kotaku writeup will obviously have a bigger impact on your traffic). ;) http://j.mp/Wtp3vQ

    Thanks for doing this. It's a long overdue idea.

    ReplyDelete
  8. Thank you so much for doing this. You literally "changed the game" for those of us who've wanted to become Zelda the warrior princess, over all these years.

    ReplyDelete
  9. Hey, this is great!! I dunno how buff you or your boyfriend's programming skills are, but it would be cool if the Zelda Sprite patch could be activated or turned off in the game itself. Like, in the normal game, if the player inputs ZELDA as their name, the new game kicks into the 2nd quest. Any way to get ZELDA as the name input to activate the Zelda Sprite patch? Then it's like Zelda gets her own adventure separate from Link's!! Anyway, just a thought.

    ReplyDelete
  10. My daughter is 6 weeks old now, but this will be her first Zelda experience! :D -gamer dad.

    ReplyDelete
  11. I think these projects are super cool. I was inspired by the work you and the Donkey Kong guy were doing so I whipped up a similar hack putting Daisy in Super Mario World. I may have gone a little too silly with changing the text, but I couldn't resist using puns like "koopatriarchy". Anyways, if you want a copy I'd be happy to share it.

    ReplyDelete
    Replies
    1. That's excellent! Do you have a blog? I'd be happy to link to it.

      Delete
    2. Release it! Release it! The rest of us want to see your work as well!! :)

      Delete
  12. This was already made like 20 years ago. In "Zelda: The Wand of Gamelon" you get to play Zelda and save Link.

    ReplyDelete
    Replies
    1. That was on the CD-i, was a Castlevania-esque sidescroller, and was completely terrible. Not exactly comparable to an 8-bit classic beloved by an entire generation of players. Saying this has "already been made" is pretty unfair, I think.

      Kenna: I was really psyched to see this and I'm amazed that the two of you pulled it off in just a few days! Adding this blog to my feed-reader. Hope that the positive reactions inspire you to keep working on an updated patch that touches up the minor details (like the different colored sprites that you talked about above). That would rule.

      Delete
    2. don't you have anything good to say? you don't event know what you're talking about. I find this project innovative and encouraging.

      Delete
  13. Good idea. Good idea.
    Well done.

    ReplyDelete
  14. Did you change the intro screen to say "Legend of Link"?

    ReplyDelete
  15. Nice. Can you get to work on Ocarina of Time?

    ReplyDelete
  16. Just going to add my voice to how awesome this is =)

    ReplyDelete
  17. This is so awesome! I started playing The Legend of Zelda at a very young age and have continued to play the series for the last oh... 20+ years. Easily my favorite video game. I've always wanted to play as Zelda. Thank you so much! I'm pretty emotional over this. Thank you!!! :)

    ReplyDelete
  18. You have done an awesome thing here. I hope this story and the DK story open up a tidal wave of interest. Now I have games that my twin daughters can play and it not be barbie or some silly shopping game!

    ReplyDelete
  19. I can't access this and I'm receiving a message that says it's in your trash.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. There should be a "Download" button under the text "No Preview Available". Can you see it or is it missing?

      Delete
  20. Thank you so much for making this. :-) It was incredibly moving to play through it yesterday. I wrote about my experience on my blog:

    http://www.lifeinneon.com/2013/03/19/i-am-zelda-and-ill-be-fighting-for-my-own-kingdom/

    I think what strikes me most is that such a simple change on a technical level yields what is in all ways a better story.

    ReplyDelete
    Replies
    1. Thank you so much for the wonderful write-up! your interpretation of the story is awesome. I've been waiting on pins and needles to hear back from people that have completed the game for themselves. :D Did the game work out for you, technically speaking? I'm trying to decide if I need to update anything.

      Delete
    2. Yeah, the game worked just fine using the emulator recommended. However, I can't seem to get the Second Quest to run, either in my second playthrough or using the name code.

      Delete
    3. The second quest code is "KENNA" now. :P That was something else my boyfriend put into the python code. Party, it's so I have my name on the mod, but it's also to let people name their character "ZELDA" without being locked into the harder levels.

      I'll look into the "second playthrough" issue though. I wonder if that's a problem with the patch.

      Delete
    4. Sorry for the slow reply. It looks like I got the second playthrough working. I just had a conflict between the save and which save state I loaded.

      Delete
  21. Awesome - well done!

    Is your boyfriend interested in publishing his Python script somewhere so that others can make their own changes?

    ReplyDelete
    Replies
    1. Yes, I'm thinking of publishing a version of it in a follow-up post. I'll also outline a little of how to go about color correcting the opening and closing. :)

      Delete
    2. Just so you know, the python code is up on my google drive. :)

      Delete
  22. I've always wanted a Zelda game called something like "The Missing Link" where Link is captured and you play as Zelda. Bravo!

    ReplyDelete
  23. Kenna, thanks for sharing this.

    ReplyDelete
  24. Please upload this to Romhacking.net. The Donkey Kong patch (and a play-as-Peach-in-Super-Mario-Bros. patch) are there.

    ReplyDelete
    Replies
    1. Oof. I'm trying. lol Romhacking.net is a bit fickle. It doesn't like my google drive link and it doesn't accept uploads. I've gotta think of other ways to share the file with them. :)

      Delete