News: 11 March 2016 - Forum Rules

Author Topic: [Zelda LttP] Link's Glove And Bunny Link Palettes? **SOLVED**  (Read 2623 times)

Josephine Lithius

  • Full Member
  • ***
  • Posts: 133
  • THE WORLD IS MINE!!
    • View Profile
    • Jo Li KMC @ Tumblr
Originally "[Hyrule Magic] Ellipses Not Auto-Formatting in Changed Text"

This feels like a really dumb problem to have, but I genuinely have no idea why this would be happening... so here I am.

I'm doing a bit of text editing to A Link to the Past with Hyrule Magic.  Everything seems to be working just fine, so far; I've been able to give one particular NPC far more dialogue than it ever had with no noticeable negative impact on the game. (I'm guessing Hyrule Magic does text shuffling in the code kind of like Temporal Flux?)  However, one thing I did notice is that if I have a group of three periods in a row in an altered text field, instead of display the ellipses character with its 1-pixel-wide dots (…), it instead displays the 2-pixel-wide dots individually (...).

In the grand scheme of things, this really isn't a huge issue... but for me, personally?  It's driving me absolutely batty... and there doesn't seem to be any good reason for it!  Even copying text from other strings causes dots to not merge together.  Am I doing something wrong, or is Hyrule Magic somehow missing that feature?

Cheers and thank you!

Edit 1 (1:25 AM EDT): Did a little poking around in Hexecute.  It would appear that Hyrule Magic does not automatically implement "dictionary" and special characters, but does interpret them and convert them to standard text during the editing process.  I mean... okay, fair enough, I guess?  But you'd think it would be able to go both ways...

Edit 2 (1:36 PM EDT): Nothing like spreading a little misinformation...  Yes, Hyrule Magic does implement dictionary characters.  However, it does not implement ellipses manually.  Why?  I have no idea.  Probably an oversight on Sephiroth3's part...?  There may also be other characters it doesn't implement automatically, but I don't feel like digging around the code.  Frankly, I'm just happy it scoots text pointers around like it does...  Full freedom to make all the text I want* is pretty awesome.
* "All the text I want" within the free space of the ROM.

In any case, it looks like I'll have to manually insert ellipses using Hexecute for now, but I'm open to suggestion -- unless the suggestion is to use the Zelda Script Editor.  It doesn't run on this computer since I'm missing some crucial DLLs.
« Last Edit: March 26, 2017, 07:20:33 pm by Joseph Lithius »

kerberos7

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Re: [Hyrule Magic] Ellipses Not Auto-Formatting in Changed Text
« Reply #1 on: March 23, 2017, 10:30:52 am »
I don't think this is going to work. The program seems to not understand the ellipses as one unit. This is also valid in books/text. Once dot equals to period and ellipses consists of 3 such dots. Original authors however were probably affraid this might waste too much space in the text box, so they apparently decided to make ellipses as one gfx object equaled to one letter.

Seems like the program can not understand that, since it is always giving the regular periods. I personally think converting to regular 3 dots as if they were periods is the way to go as the ellipses seems very squeezed in. And there is no space loss specially since the letters i and l use a lot less space as letter m. Which means the game already knows hor to handle space when loading gfx letters one by one. It does not load the same space with any letter (thus making it a courier new type= one equal space for one letter), it infact makes it correct by optimizing the space use (thus i takes less space and m more).

So I would go with regular periods as opposed to squeezed ellipses, which indeed needs a hex-edit.

Josephine Lithius

  • Full Member
  • ***
  • Posts: 133
  • THE WORLD IS MINE!!
    • View Profile
    • Jo Li KMC @ Tumblr
Re: [Zelda LttP] Link's Glove And Bunny Link Palettes?
« Reply #2 on: March 24, 2017, 06:38:09 pm »
Well, the solution I ended up going with was to replace all instances of ellipses (character $43) in any text I changed with half of Link's face (character $4A) from the "wanted" sign.  Since that character is only used one time in the entire game, it made hex editing a simple matter of pressing F3 and typing 4 and 3 in XVI32 a bunch of times (and then looking for "$43 4B" and changing it back to "$4A 4B" when I was done.  Whoops...)

Again... it's kind of a shame (and kind of odd) that Hyrule Magic reads ellipses as three dots instead of a single character (how hard would it have been to implement a special symbol for that?), but once I got a system down, it was pretty easy to work around.  But, on to other topics.
----------

I was wondering, where exactly are the glove colors for Link's hands stored?

For those who don't know what I'm talking about (which is probably most of you, since I didn't even notice this until just now), Palette Entry 13, Link's hands, change colors from the default (orangey-tan -- #E09050) twice over the course of gameplay -- the first time being when you get the Power Glove (silver -- #B0B8A0) and the second time being when you get the Titan's Mitts (bright green -- #B0D800).  I was curious as to where these particular color values are stored mostly because I think Link looks weird with green hands.  This is one of the few colors you apparently can't get to in Hyrule Magic, but I have no idea where it would be located in the code.

Once again, thanks in advance for any help.

Edit: Also, while I'm at it... where is Bunny Link's palette located?  That also seems to be one of those "few colors" (15, to be exact...) that can't be edited by Hyrule Magic.
« Last Edit: March 25, 2017, 04:12:13 am by Joseph Lithius »

kerberos7

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Re: [Zelda LttP] Link's Glove And Bunny Link Palettes?
« Reply #3 on: March 25, 2017, 12:10:37 pm »
I found this online:
If the rom has no header then go to:

Bunny pals are at
$0DD362, and are 1E long

Green tunic is at
$0DD308

Blue tunic at
$0DD329

Red tunic at
$0DD344

But there is a problem. When you press the overworld map, the bunny tunic gets canceled and the green tunic is loaded. So basically you want to copy paste section 0DD362, 1E long, into the section for green tunic, or vice versa to match the colours.

Or if you can trace this and tell the game to "not do that switch". Irronically this is a bug of the original game.


Colours for the hands... no idea where this gets loaded from, but this is bugged anyway since using the Ether medallion will reset the hands to normal until you enter a cave or in any way reload the screen.

I usually just turn this off, since imagine Link's face would be drawn with this skin-toned colour. Then the gree-golden colour would be loaded on his face.

This is how to turn off this loading of alienated colours onto the sprite/hands of Link:
$0DEE24: change byte F0 to 80.

Additional problem: the same thing is loaded onto the hands when on the select game slot menu. Again needs to be turned off:
$0DF061: F0 to 80.

Josephine Lithius

  • Full Member
  • ***
  • Posts: 133
  • THE WORLD IS MINE!!
    • View Profile
    • Jo Li KMC @ Tumblr
Re: [Zelda LttP] Link's Glove And Bunny Link Palettes?
« Reply #4 on: March 25, 2017, 05:22:42 pm »
kerberos7, you have been incredibly helpful.  Thank you.  If I ever decide to release this hack to the public, you are definitely getting a place in the documentation!
(Also, I ran a search for that Bunny Link palette address.  Puzzledude found it first, right?  He'll get a credit, too, but you get the credit first since you were the one who found it for me.  ;3)

Also... now presenting... a bunny! (Without a Moon Pearl and in the "Fake Dark World," no less.)
Spoiler:

Edit: Now, also, there is a video of this in action.
That image is probably a huge giveaway as to what sort of hack I'm working on~

As you can see, I decided to give Bunny "Link" a unique palette after all (which is actually Bunny Link's old fur color).  I may or may not pop the "world map color fix" hack later (I know I saw that floating around somewhere...), but with the way I redid the graphics, it's not really a huge concern anymore.

I'm not sure the glove thing bothers me enough to outright disable it, personally.  However, I did notice a couple of oddities while messing with the graphics:
  • Apparently, the "You are here" icon on the World Map is not the same icon located around graphic bank $863C0.  I've edited that particular graphic, but the icon still has a shaded hand.
    Wrong, sir, wrong!  You were using save states instead of loading fresh from a save game.  You butt.
    (The graphic starting at $863C0 is the one-and-only "You Are Here" graphic for the world map.  Derp.)
  • It would appear that neither the World Map nor Dungeon Map "You Are Here" icons are programmed to have recolored hands, regardless of glove status.  Neither were actually colored for it, but recoloring the hands to use color $13 still just shows the default color instead of silver or green.
    Well, shut my mouth wide open.  The "You Are Here" graphics just spontaneously started showing the glove color, too.  I could swear it wasn't doing it before... but again, maybe it was all because of save state shenanigans...  Weird.
There are also quite a few sprites in Link's sprite sheet that just don't even bother with color $13 for some reason.  For example, the upward-facing sprite as well as the "New item" pose both lack color $13 on the hands.  It's almost like the folks at Nintendo had the idea, then either forgot about it or abandoned it half-way...  All the more case against keeping that feature implemented, I suppose!  Though, if there's a way to implement it on the map screens...  They probably just forgot to edit/change those sprites after the idea was implemented.  I guess.
« Last Edit: March 26, 2017, 02:02:03 am by Joseph Lithius »

assassin

  • Full Member
  • ***
  • Posts: 154
    • View Profile
    • My Barren Webpage
Re: [Zelda LttP] Link's Glove And Bunny Link Palettes?
« Reply #5 on: March 25, 2017, 10:11:54 pm »
kerberos7, you have been incredibly helpful.  Thank you.  If I ever decide to release this hack to the public, you are definitely getting a place in the documentation!
(Also, I ran a search for that Bunny Link palette address.  Puzzledude found it first, right?  He'll get a credit, too, but you get the credit first since you were the one who found it for me.  ;3)

when listing kerberos7, be sure to have him immediately above Puzzledude in the credits.  also, optionally put an "(R.I.P.)" after "Puzzledude".

kerberos7

  • Jr. Member
  • **
  • Posts: 14
    • View Profile
Re: [Zelda LttP] Link's Glove And Bunny Link Palettes?
« Reply #6 on: March 26, 2017, 11:19:14 am »
I think this is off topic. For such a minor thing, which you could just also find yourself, there is no need for any crediting if you ask me. When you make a complete hack, then you need credits and even those are still less importaint for the players. For a small hack and specially Master quests keeping the "Nintendo presents" is in order, since master quests are almost 95 percent identical to the original.

Quote
I could swear it wasn't doing it before... but again, maybe it was all because of save state shenanigans...  Weird.
Not weird at all. When you edit the Rom, always start the game from a saved game slot and never with a load state from a previously made save state, because it contains the code from the old ROM, which was loaded into RAM and this was saved in a saved state.

Josephine Lithius

  • Full Member
  • ***
  • Posts: 133
  • THE WORLD IS MINE!!
    • View Profile
    • Jo Li KMC @ Tumblr
Re: [Zelda LttP] Link's Glove And Bunny Link Palettes? **SOLVED**
« Reply #7 on: March 26, 2017, 07:19:57 pm »
Ya know... when you're right, you're right.  I was able to finally find the glove palettes.  The funny thing, though?  I ended up finding the glove palettes completely by accident.

See, the glove palettes are at address $DEDF5 - $DEDF8 -- two bytes for each glove set.  The bytes in the locations are $F6 52 and $76 03.
Now, I changed a couple of palette entries in Hyrule Magic for Link's Green Tunic to match the colors of the Power Gloves and Titan's Mitts.  The numbers I got for each individual entry were $52 76 and $03 9E.  That being said, when I ran a search for the first set of bytes, I found the glove palettes straight away.  However, when I couldn't find a pair of bytes matching $03 9E that actually did anything, I got a little confused.  That's when I started messing with each byte of the ones I'd found individually.

To cut to the chase, I eventually found out that I was off by one byte.  Twice.  On top of being one byte too far ahead in the glove palette, I'd also grabbed the wrong values from my tunic editing -- which were one byte backward (so I got $52 76 03 9E instead of the proper, matching $F6 52 76 03).  Derp.

In any case, I now have full access to all the palettes I want to edit, thanks in no small part to you, kerberos7 (and Puzzledude, of course).  Thumbs up, man!  Thank you!  Hopefully, this thread will also help any other people looking for these palettes in the future, as well.

ThegreatBen

  • Hero Member
  • *****
  • Posts: 806
    • View Profile
Re: [Zelda LttP] Link's Glove And Bunny Link Palettes? **SOLVED**
« Reply #8 on: March 30, 2017, 05:54:38 pm »
Thanks, I've been wanting those glove palettes for a long time but no one knew where they were.