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

Author Topic: The Legend of Zelda changing text  (Read 6820 times)

Mayorofunkytown

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
The Legend of Zelda changing text
« on: January 25, 2014, 02:30:28 pm »
So I'm working on a Zelda rom hack the editors available here are pretty cool. I got all the dungeons designed and I'm gonna start working on the overworld soon. Anyway I would like to change the text that the NPCs say. Is this even possible? I mean I imagine it is but how would I go about that?

RedScorpion

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
    • Snes-Projects
Re: The Legend of Zelda changing text
« Reply #1 on: January 25, 2014, 05:11:54 pm »
yes it is

use this tool

Quote
I want offer my dialog tool for Zelda ALTTP.

It is designed to create, change and delete existing dialogs in Zelda ALTTP.

You can it use for your own projects.

To prevent overwriting issues, it has a limited area to save the text.

https://dl.dropbox.com/u/19735616/Kruptar_Zelda.rar


tryphon

  • Hero Member
  • *****
  • Posts: 722
    • View Profile
Re: The Legend of Zelda changing text
« Reply #2 on: January 25, 2014, 05:24:37 pm »
I'm not sure he was talking about ALTTP.

RedScorpion

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
    • Snes-Projects
Re: The Legend of Zelda changing text
« Reply #3 on: January 25, 2014, 06:21:17 pm »
Ohh ;)


snarfblam

  • Submission Reviewer
  • Hero Member
  • *****
  • Posts: 588
  • CANT HACK METROID
    • View Profile
    • snarfblam
Re: The Legend of Zelda changing text
« Reply #4 on: January 25, 2014, 06:30:07 pm »
If you're familiar with hex editors, it should be pretty reasonable. I can't personally recommend a hex editor for text editing, but I asked on IRC and someone recommended WindHex.

The text format for this game is documented on Data Crystal. It's pretty straightforward except for some control codes (namely the special values that cause text to wrap to the next line). You can make the text shorter, or keep it the same length. If you want to make text longer, you're going to need to find some free space in the ROM and do some repointing.

Drakon

  • Sr. Member
  • ****
  • Posts: 277
    • View Profile
    • 16 Bit Gamer
Re: The Legend of Zelda changing text
« Reply #5 on: January 25, 2014, 09:21:22 pm »
I use windhex for all text editing.  Just take the time to make a table.

M-Tee

  • Hero Member
  • *****
  • Posts: 595
  • One pixel at a time…
    • View Profile
    • M-Tee Retro Graphics
Re: The Legend of Zelda changing text
« Reply #6 on: January 25, 2014, 11:45:19 pm »
Is there a reason people don't just edit text straight through FCEUX's hex editor? I like to be able to reload the pages and preview them before saving.

Mayorofunkytown

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: The Legend of Zelda changing text
« Reply #7 on: January 25, 2014, 11:58:53 pm »
Thank you thank you. I have a little understanding of hex but the editor looks like a bunch of random characters. I was hoping it'd be easier than that or maybe it is and I just don't get it. If someone could explain it some more that'd be much appreciated, but I'll see what I can figure out and do in the meantime.

Edit: whoops I completely overlooked a feature of the zeldatech editor. :-[ Thanks for the help though!
« Last Edit: January 26, 2014, 03:55:25 am by Mayorofunkytown »

Drakon

  • Sr. Member
  • ****
  • Posts: 277
    • View Profile
    • 16 Bit Gamer
Re: The Legend of Zelda changing text
« Reply #8 on: January 26, 2014, 07:34:15 am »
Is there a reason people don't just edit text straight through FCEUX's hex editor? I like to be able to reload the pages and preview them before saving.

I completely forgot it has one.

snarfblam

  • Submission Reviewer
  • Hero Member
  • *****
  • Posts: 588
  • CANT HACK METROID
    • View Profile
    • snarfblam
Re: The Legend of Zelda changing text
« Reply #9 on: January 26, 2014, 09:39:38 am »
Edit: whoops I completely overlooked a feature of the zeldatech editor. :-[ Thanks for the help though!

I would advise against using that. It doesn't deal with newlines 100% correctly. I though I had removed that from the most recent version, but I guess I just meant to.

Or... if you do end up using it, be sure to test every string you edit.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6744
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: The Legend of Zelda changing text
« Reply #10 on: January 26, 2014, 06:30:05 pm »
As I recall, Zelda's text format used the high two bits as control codes.

So like 0-3F is normal text, 40-7F (letter + 0x40) is letter + new line, 80-FF (letter + 0x80) is letter + end string. Something like that.
"My watch says 30 chickens" Google, 2018

Mayorofunkytown

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: The Legend of Zelda changing text
« Reply #11 on: January 26, 2014, 07:56:09 pm »
I would advise against using that. It doesn't deal with newlines 100% correctly. I though I had removed that from the most recent version, but I guess I just meant to.

Or... if you do end up using it, be sure to test every string you edit.

I tried it and it worked on the first guy well enough however I could actually use help with the hex editing cause I want to change the opening story text I assume that I could do that with the hex. So if someone could help me understand it better or if this is the wrong place to ask direct me to where I can.

wyndcrosser

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: The Legend of Zelda changing text
« Reply #12 on: January 26, 2014, 08:10:24 pm »
I tried it and it worked on the first guy well enough however I could actually use help with the hex editing cause I want to change the opening story text I assume that I could do that with the hex. So if someone could help me understand it better or if this is the wrong place to ask direct me to where I can.

This is for the NES version?

http://appdb.winehq.org/objectManager.php?sClass=application&iId=13018 Windhex

Text for Story starts at 0001A4A3 *NOTE: you may need to enter separate details as 24=a black space etc. into the table you built above. Beware of how the colors of the text are etc.

Text for NPC's etc. start at 0000405E

Save the below information into a notepad document and save it as ZELDA.TBL. Load it into Windhex after loading the rom.

Spoiler:
00=0
01=1
02=2
03=3
04=4
05=5
06=6
07=7
08=8
09=9
0A=A
0B=B
0C=C
0D=D
0E=E
0F=F
10=G
11=H
12=I
13=J
14=K
15=L
16=M
17=N
18=O
19=P
1A=Q
1B=R
1C=S
1D=T
1E=U
1F=V
20=W
21=X
22=Y
23=Z
24=
25=
26=
27=
28=,
29=!
2A='
2B=&
2C=.
2D="
2E=?
2F=-
« Last Edit: January 26, 2014, 08:17:38 pm by wyndcrosser »

GHANMI

  • Hero Member
  • *****
  • Posts: 703
    • View Profile
Re: The Legend of Zelda changing text
« Reply #13 on: January 26, 2014, 08:27:41 pm »
Some kind souls gathered all of the needed info here:
http://datacrystal.romhacking.net/wiki/The_Legend_of_Zelda
Oh, and keep in mind that the last character in each line doesn't have its normal value but a modified one, specifics in the link. Same goes for Kid Icarus 1.

Trax

  • Sr. Member
  • ****
  • Posts: 489
    • View Profile
    • Trax ROM Hacking
Re: The Legend of Zelda changing text
« Reply #14 on: January 30, 2014, 12:53:00 pm »
The change of lines is based on the bitfields of the last character of the line. If a character has bit 7 set, the next one will be on the second line. If a character has bit 6 set, the next one will be on the third line. If it has both bits 6 and 7 set, this announces the end of the message...
..xx xxxx   Character Code
.x.. ....   Start third line of text
x... ....   Start second line of text
xx.. ....   End of text
Another important detail. If you want any line of text to start further from the left of the screen, you have to pad the first characters with the value 0x25, which I call a Leading Space. This way, the text engine doesn't spend time to draw an empty tile (like it would with 0x24) and make a typing sound, it just skips until it reads a character that is not 0x25...

Jeville

  • Sr. Member
  • ****
  • Posts: 345
    • View Profile
Re: The Legend of Zelda changing text
« Reply #15 on: February 05, 2014, 06:09:37 pm »
Editing the storyboard was a headache for me to complete.

Mayorofunkytown

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: The Legend of Zelda changing text
« Reply #16 on: February 06, 2014, 03:05:29 pm »
So obviously I've never used windhex but I've figured it out a bit. Thanks you guys! Editing the text seems a little needlessly complicated. I don't know if there's another button I can use to just insert spaces. Makes me tab back to the hex section press "24" and then I have to tab back to the character section to continue.

TheFireRed

  • Restricted Access
  • Jr. Member
  • *
  • Posts: 43
  • Fall of Fall
    • View Profile
Re: The Legend of Zelda changing text
« Reply #17 on: February 14, 2014, 04:16:25 pm »
I'm currently working on a translation and I'd like to ask some questions.  ;)

The purpose of my work is to convey a Spanish translation using Nintendo's GC and GBA re-release translation. I'm using an (E) PRG1 ROM. There are some little issues which I'd like to fix (and I hope you could help me because I'm yet a noobie).


The GBA re-release features a new copyright line. A small leaf from the wreath is placed elsewhere.


That leaf is covering a 9. How could I place it right in front of the –?




The intro screen is looking good! I managed to change the colour codes of the texts with the aid of this guide.



...But I couldn't find where to change those colour codes in that wreath.


I'm having some troubles trying to use more characters in screen, so I think I may need to repoint the string lines.


May I have a helping hand?  :happy:

Dr. Floppy

  • Restricted Access
  • Hero Member
  • *
  • Posts: 972
  • Make America GREAT Again!
    • View Profile
    • BaddestHacks.net
Re: The Legend of Zelda changing text
« Reply #18 on: February 14, 2014, 11:35:19 pm »
I've been working on a Zelda 1 hack for the past six years. I probably know more about the inner guts of this game than anyone on the planet, save perhaps the original programmers.

The game handles all in-game text messages (e.g., not menu stuff, title/opening narration, end credits, etc.) in Bank 1: $[4010-800F]. The very first five lines are an array of 16-bit pointers to various text messages throughout the game. (The indexes for these are found elsewhere.)

mrrichard999

  • Hero Member
  • *****
  • Posts: 686
  • So Goooood! :D
    • View Profile
    • GameFAQS Profile
Re: The Legend of Zelda changing text
« Reply #19 on: February 15, 2014, 12:54:42 am »
I've been working on a Zelda 1 hack for the past six years. I probably know more about the inner guts of this game than anyone on the planet, save perhaps the original programmers.

The game handles all in-game text messages (e.g., not menu stuff, title/opening narration, end credits, etc.) in Bank 1: $[4010-800F]. The very first five lines are an array of 16-bit pointers to various text messages throughout the game. (The indexes for these are found elsewhere.)

Any photos you could share on progress? :)