View Single Post
  #1    
Old November 16th, 2009 (01:05 PM). Edited April 15th, 2010 by hashtag.
Chicken Bones
Hacks 4 fun
 
Join Date: Nov 2009
Hi I only started hacking a few weeks ago but i have learnt quite a bit. I got a lot of help from you guys so I thought I should contribute with some of my knowledge.

1 thing I have noticed a lot is the fact that you can't create new multichoice boxes. So I was hexing around and I found out how to do it. AND BTW Image insertion wouldn't work so no images

You will need:
- A hex editor (that can search for hex), I use HxD free
- VBA
- Advancemap
- XSE or other scripting program
- A Rom (I'm using Emerald)
- Basic Knowlege of HEX

Decoding the Format

So first open up XSE and compile a script exactly like this this

Spoiler:

#dynamic 0x800000

#org @main
lock
multichoice 0xAD 0x03 0x0 0x0
release
end


assign it to a person or sign in advancemap.
open VBA you should get a box like this (if using emerald)

Spoiler:

____________
| PETALBURG |
| SLATEPORT |
| EXIT______|


assuming you are using my converter (attached at the bottom of this post)
in the text box type in PETALBURG\xSLATEPORT
copy the hex below it and search in your hexeditor

You should find it around about 5EAD37 for emerald
get the offset at the start of PETALBURG (5EAD37), reverse the bytes and add 08 so
37 AD 5E 08 now search this hex

you should get something like this
Spoiler:

00 00 00 00 00 00 00 00 37 AD 5E 08 00 00 00 00
41 AD 5E 08 00 00 00 00 EA B7 5E 08 00 00 00 00
67 AD 5E 08 00 00 00 00 6D AD 5E 08 00 00 00 00
.etc

each 8 bytes is a message pointer followed by 4 bytes of 00

get the offset after the 8bytes of zeros in my case 58ABD8 and reverse ad 08

D8 AB 58 08

search and you'll get something like this

Spoiler:

D8 AB 58 08 03 00 00 00 58 B7 58 08 01 00 00 00
F0 AB 58 08 03 00 00 00 08 AC 58 08 04 00 00 00
28 AC 58 08 06 00 00 00 78 AC 58 08 03 00 00 00


this is the list of message boxes in the format <pointer><number of options><filler>
so for the first message box it's <D8 AB 58 08 ><03><00 00 00 >
or pointer to the start of the 3 other pointers that say PETALBURG SLATEPORT and EXIT

then 3 options and fillers

finally get the offset at the start and reverse add 08
to get 60 B7 58 08

search and there sould be 2

get the first one or E1FB8 for emerald
and there in those 4 bytes is the pointer to all message boxes.

So now How do I make my own.

First find like 1000 bytes of free space (FF)

then change the 60 B7 58 08 offset to your new location or E40000 for me (00 00 E4 08)
then go to your list of offsets at 58B760 or whatever

Spoiler:

D8 AB 58 08 03 00 00 00 58 B7 58 08 01 00 00 00
F0 AB 58 08 03 00 00 00 08 AC 58 08 04 00 00 00
28 AC 58 08 06 00 00 00 78 AC 58 08 03 00 00 00


yu should notice that every 3rd and 10th byte is 58
copy down until the 3rd and 10th bytes aren't 58 or
Spoiler:

D8 AB 58 08 03 00 00 00 58 B7 58 08 01 00 00 00
F0 AB 58 08 03 00 00 00 08 AC 58 08 04 00 00 00
28 AC 58 08 06 00 00 00 78 AC 58 08 03 00 00 00
58 AC 58 08 04 00 00 00 90 AC 58 08 04 00 00 00
58 B7 58 08 01 00 00 00 58 B7 58 08 01 00 00 00
58 B7 58 08 01 00 00 00 E8 B4 58 08 04 00 00 00
B0 AC 58 08 02 00 00 00 C0 AC 58 08 06 00 00 00
F0 AC 58 08 02 00 00 00 58 B7 58 08 01 00 00 00
00 AD 58 08 02 00 00 00 80 B2 58 08 03 00 00 00
98 B2 58 08 05 00 00 00 58 B7 58 08 01 00 00 00
10 AD 58 08 03 00 00 00 58 B7 58 08 01 00 00 00
58 B7 58 08 01 00 00 00 28 AD 58 08 03 00 00 00
40 AD 58 08 03 00 00 00 58 AD 58 08 03 00 00 00
70 AD 58 08 03 00 00 00 88 AD 58 08 03 00 00 00
A0 AD 58 08 03 00 00 00 B8 AD 58 08 03 00 00 00
D0 AD 58 08 03 00 00 00 E8 AD 58 08 03 00 00 00
00 AE 58 08 03 00 00 00 18 AE 58 08 03 00 00 00
30 AE 58 08 03 00 00 00 48 AE 58 08 03 00 00 00
60 AE 58 08 03 00 00 00 78 AE 58 08 03 00 00 00
90 AE 58 08 03 00 00 00 A8 AE 58 08 03 00 00 00
58 B7 58 08 01 00 00 00 58 B7 58 08 01 00 00 00
C0 AE 58 08 04 00 00 00 E0 AE 58 08 04 00 00 00
00 AF 58 08 04 00 00 00 20 AF 58 08 02 00 00 00
30 AF 58 08 03 00 00 00 48 AF 58 08 08 00 00 00
88 AF 58 08 04 00 00 00 D8 AF 58 08 03 00 00 00
F0 AF 58 08 02 00 00 00 58 B7 58 08 01 00 00 00
00 B0 58 08 03 00 00 00 18 B0 58 08 03 00 00 00
30 B0 58 08 02 00 00 00 A8 AF 58 08 06 00 00 00
40 B0 58 08 02 00 00 00 50 B0 58 08 06 00 00 00
80 B0 58 08 02 00 00 00 90 B0 58 08 02 00 00 00
A0 B0 58 08 03 00 00 00 B8 B0 58 08 02 00 00 00
C8 B0 58 08 03 00 00 00 E0 B0 58 08 03 00 00 00
F8 B0 58 08 04 00 00 00 18 B1 58 08 02 00 00 00
28 B1 58 08 03 00 00 00 40 B1 58 08 03 00 00 00
58 B1 58 08 04 00 00 00 78 B1 58 08 03 00 00 00
90 B1 58 08 04 00 00 00 B0 B1 58 08 04 00 00 00
D0 B1 58 08 05 00 00 00 F8 B1 58 08 06 00 00 00
08 B3 58 08 03 00 00 00 08 B3 58 08 03 00 00 00
60 B2 58 08 04 00 00 00 60 B2 58 08 04 00 00 00
C0 B2 58 08 04 00 00 00 E0 B2 58 08 05 00 00 00
20 B3 58 08 03 00 00 00 38 B3 58 08 03 00 00 00
50 B3 58 08 05 00 00 00 78 B3 58 08 03 00 00 00
90 B3 58 08 04 00 00 00 B0 B3 58 08 03 00 00 00
C8 B3 58 08 08 00 00 00 08 B4 58 08 04 00 00 00
50 B2 58 08 02 00 00 00 28 B4 58 08 03 00 00 00
40 B4 58 08 03 00 00 00 58 B4 58 08 03 00 00 00
70 B4 58 08 04 00 00 00 90 B4 58 08 03 00 00 00
A8 B4 58 08 02 00 00 00 B8 B4 58 08 06 00 00 00
08 B5 58 08 05 00 00 00 30 B5 58 08 05 00 00 00
58 B5 58 08 04 00 00 00 78 B5 58 08 06 00 00 00
A8 B5 58 08 06 00 00 00 D8 B5 58 08 05 00 00 00
00 B6 58 08 04 00 00 00 20 B6 58 08 04 00 00 00
40 B6 58 08 03 00 00 00 58 B6 58 08 03 00 00 00
70 B6 58 08 02 00 00 00 28 B2 58 08 05 00 00 00
80 B6 58 08 02 00 00 00 90 B6 58 08 04 00 00 00
B0 B6 58 08 04 00 00 00 D0 B6 58 08 06 00 00 00
00 B7 58 08 06 00 00 00 30 B7 58 08 05 00 00 00

for emerald and paste a your new offset (E40000 for me)
then add 1 mor at the end like this <pointer for your options><amount of options><00 00 00>
so for me I'm using E40500 with 3 options now so <00 05 E4 08><03><00 00 00> or 00 05 E4 08 03 00 00 00

at E40500
or where ever put <pointer><00 00 00 00> or 00 05 E4 08 00 00 00 00 times by the amount of options so for me its

00 05 E4 08 00 00 00 00 00 05 E4 08 00 00 00 00
00 05 E4 08 00 00 00 00

now for the final part go into converter and type in the box below text <option 1><\x><option 2><\x><option 3><\x>

so I'll do one two YESS:
one\xtwo\xYESS\x

get the hex and paste it at E40550 or where ever.

E3E2D9FFE8EBE3FFD3BFCDCDFF

now finally change to then the offset after each FF


50 05 E4 08 00 00 00 00 54 05 E4 08 00 00 00 00

5C 05 E4 08 00 00 00 00



Done
your new box will be after all the others




I have have to get ready for school now but if there are any questions please post in thread.
Attached Files
File Type: xls Converter.xls‎ (154.0 KB, 196 views) (Save to Dropbox)
Reply With Quote