• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[ASM]Transparent Textboxes

ep!c

Banned
124
Posts
11
Years
  • Seen Jan 4, 2015


Transparent Textboxes

Introduction

Hello everybody! Yes you read correctly: Today I'm gonna show you how to insert
half-transparent textboxes.. without bugs! You can even use a complete costum textbox
for intro, menu etc. without messing them up. This tutorial just requires basic knowledge of
scripting and hex-editing: maybe also palette understanding.

Let's get started

For this tutorial we need a few tools:

  • VisualBoyAdvance
  • Hex-Editor (I use HxD)
  • NamelessSpriteEditor
  • XSE
  • AdvanceMap
You will also need two Assembler-Snippets..
I always provide a compiled and uncompiled version.


Pro arguements for compiled:

  • No need to compile yourself
  • Easy if you don't have ASM skills
Pro arguements for uncompiled:

  • Use your own offsets (dont need to always follow the tut)
  • Try it out completely on yourself

In this tutorial we will use the compiled ASM snippets, meaning you must follow the offsets etc.
However, here are the files:

(Right click -> Save File as; dropbox links could bug a bit, so do this^^)


Inserting the ASM codes into your ROM

Open your activate.bin, your deactivate.bin and your ROM-file into a hex-editor (I use HxD)
Mark the whole activate.bin and paste it into your ROM at position 0x750020.

Spoiler:


Do the same with deactivate.bin but insert it to 0x750134 this time.

Spoiler:


Now you can save your file but do not close your hex-editor, we will need it later!

Creating a NPC in AdvanceMap + Script


Open AdvanceMap and go to your room. Create a NPC there.

Spoiler:


Now we will write a Script in XSE. It should be the following:

Spoiler:


Spoiler:


After you have compiled it, copy the offset and insert it at your NPC.

Spoiler:


Are you ready for a test in Visual Boy Advance or No$GBA?
Open your ROM in it and speak to the NPC..
Damn, that looks crappy, doesn't it?

Spoiler:


The text doesn't even display.. ffs..

Final Step: Inserting the correct palette

Our game previously crashed, because my ASM code reads a palette, that
should be written to 0x750000. But there are only 0xFF bytes for us..
So we're gonna change that! :)
Firstly, open your hex-editor if you closed it before.
Just open your ROM-file.
At 0x750000, insert those bytes:

Spoiler:

Smart guys will see, that this is a palette-structure.
Just mark 32 bytes (2 lines) and copy/paste these bytes in the spoiler above.

Spoiler:


Save your ROM and open your VBA, testing another time.
(Now i would recommend you to place the NPC OUTSIDE.
In the room there is a black outline-tile, which overlaps with the box.)

Spoiler:


Yeah, this **** finally worked!!

I hope you liked this tutorial and successfully inserted this hack.
It's really easy for everyone, just a bit hex-editing, but that's it.

If you use this hack in any way, give me credits.
When you don't do this, this will result in me deleting the tutorial, which would be bad for all.

~ep!c

 
3,830
Posts
14
Years
  • Age 27
  • OH
  • Seen Feb 26, 2024
This is quite nice and all, but do you think it would be possible to see some source code?

Otherwise, great.
 
5
Posts
10
Years
  • Age 28
  • Seen Dec 4, 2013
After I enter the code with HxD, I can't open any maps in the ROM, it just crashes every time I try. Any ideas?
 
215
Posts
11
Years
  • Seen Jul 14, 2020
This is perfect! I have yet to try it out but I will definitly be adding this to my game! Question though, does this cause any side effects?

EDIT: I tried it out and it works great! Only one problem though, the moment you finish the text and try to end it, the original coloured textbox pops up for like a frame or two. Anyway of fixing that? Or did I do something wrong?

EDIT AGAIN: So I have been playing around with it, and it seems to work fine. However two problems have been occuring.
1) I don't know why you added this 'callstd 2' to your script. It kinda just repeated the script twice. I took it out and it seems to be working fine.
2) At random times, at the end of the message box, it will return to its original colour for like a frame or two, so I don't know what's up with that. :S
 
Last edited:

Renegade

Time for real life...
995
Posts
12
Years
EDIT AGAIN: So I have been playing around with it, and it seems to work fine. However two problems have been occuring.
1) I don't know why you added this 'callstd 2' to your script. It kinda just repeated the script twice. I took it out and it seems to be working fine.
2) At random times, at the end of the message box, it will return to its original colour for like a frame or two, so I don't know what's up with that. :S

I am having this same problem. When I finish talking to the NPC, the box disappears but then the original box (non-transparent) comes up for like .10101010 seconds then disappears.
 
215
Posts
11
Years
  • Seen Jul 14, 2020
I am having this same problem. When I finish talking to the NPC, the box disappears but then the original box (non-transparent) comes up for like .10101010 seconds then disappears.

Hopefully Ep!c can figure it out, I am trying everything I can overhere and still nothing! Other than that though, it looks great!
 

ep!c

Banned
124
Posts
11
Years
  • Seen Jan 4, 2015
agentgeo said:
This is quite nice and all, but do you think it would be possible to see some source code?

Otherwise, great.

Just download the .asm file which is provided at the beginning. You can open it
with notepad. ;)

kearnseyboy said:
After I enter the code with HxD, I can't open any maps in the ROM, it just crashes every time I try. Any ideas?

I bet you just inserted the code?
Well, you must MARK 110 bytes in your ROM and then paste it, otherwise you
change the file-size of your ROM which messes all the pointers up!
(to say it easy, you must REPLACE not INSERT bytes ^^)

awipe1 said:
Question though, does this cause any side effects?

No, it doesnt =) The whole palette is replaced with a custom for the ASM
code, so nothing is messed up fortunatly!

--------------------------------------------------------------------------

Hey guys, I tried playing my ROM at a better computer and you seem to be right, awipe.. The original textbox appears to come back :(
However, this is caused by my ASM snipped beeing faster than the closing routine of the textbox (thats what I guess for now)

FOR ALL XSE 1.1.1 USERS:
Write "msgbox @text 0x2" instead of "msgbox @text, callstd 0x2"!

I hope I can bring some update out thar in the evening =)


______________________________________________________________________________________________


Hey guys.
I have finally fixed this little issue that awipe1 found.
Links to the new deactivate.bin have been updated (or downlod it here now)

The new deactivation routine has the same bytes as the old, so just replace the old with the new, there shouldn't be any issues!
 
Last edited:
215
Posts
11
Years
  • Seen Jul 14, 2020
Just download the .asm file which is provided at the beginning. You can open it
with notepad. ;)



I bet you just inserted the code?
Well, you must MARK 110 bytes in your ROM and then paste it, otherwise you
change the file-size of your ROM which messes all the pointers up!
(to say it easy, you must REPLACE not INSERT bytes ^^)



No, it doesnt =) The whole palette is replaced with a custom for the ASM
code, so nothing is messed up fortunatly!

--------------------------------------------------------------------------

Hey guys, I tried playing my ROM at a better computer and you seem to be right, awipe.. The original textbox appears to come back :(
However, this is caused by my ASM snipped beeing faster than the closing routine of the textbox (thats what I guess for now)

FOR ALL XSE 1.1.1 USERS:
Write "msgbox @text 0x2" instead of "msgbox @text, callstd 0x2"!

I hope I can bring some update out thar in the evening =)


______________________________________________________________________________________________


Hey guys.
I have finally fixed this little issue that awipe1 found.
Links to the new deactivate.bin have been updated (or downlod it here now)

The new deactivation routine has the same bytes as the old, so just replace the old with the new, there shouldn't be any issues!

Hey man, thanks a lot for taking our problems into consideration! That really makes me happy that you would go through that much trouble to help us!

One more request though? I did import the activate and deactivate by using ASM, I entered them using hex. So for example, in the activate part, I looked at the picture and started entering the numbers (1F B5 80 ...) At offset 750020.

I thought that way was easier because I know 0 knowledge on ASM. Do you think you can upload the hex values for the new deactivate bin (like you did for the palette). It would really help amature hackers like me out a lot! Thanks for your time man! Keep up the great work! I will for sure credit you when I use this in my ROM!
 

ep!c

Banned
124
Posts
11
Years
  • Seen Jan 4, 2015
You must just drag&drop or open your .bin in the hex-editor and copy the bytes of it^^
But hey, here are the values:

Activate:
Spoiler:
Deactivate:
Spoiler:
 

Renegade

Time for real life...
995
Posts
12
Years
Oh boy... I'm still having trouble with the original textbox coming up. The new deactivation ASM didn't work. Any ideas?
 

Tide

Nocturnal ROM Hacker
59
Posts
12
Years
Thanks for the tutorial, I found it to be extremely helpful in making the hack more graphically appealing - and I had little to no trouble with the process.

However, the black textbox overlapping indoors is a bit undesirable. So, I am wondering, how would I go about making the actual color of the transparent textbox different, like an "aquatic blue", rather than black?
 
215
Posts
11
Years
  • Seen Jul 14, 2020
Oh boy... I'm still having trouble with the original textbox coming up. The new deactivation ASM didn't work. Any ideas?

Yes I am sorry Ep!c but I am having the same problem as well! I have been testing it out and it seems completely random. However I see it mostly when I speed up the text.
 

ep!c

Banned
124
Posts
11
Years
  • Seen Jan 4, 2015
Fuu.. then it's really my PC thats so ass-lame xD (but i run VBA at 99 %..)
An "ugly" solution would be setting a "pause 0x3/0x4/0x5" after the msgbox and before the deactivation routine..

However, the black textbox overlapping indoors is a bit undesirable. So, I am wondering, how would I go about making the actual color of the transparent textbox different, like an "aquatic blue", rather than black?

You can change the colors of our inserted palette at 0x750000 to dark-blue rather than black. Shouldn't be hard ;)
 
215
Posts
11
Years
  • Seen Jul 14, 2020
Fuu.. then it's really my PC thats so ass-lame xD (but i run VBA at 99 %..)
An "ugly" solution would be setting a "pause 0x3/0x4/0x5" after the msgbox and before the deactivation routine..

Well that's a nice little solution for now, but do you know of any other solutions? I don't want to slow down my game just for transparent text boxes :( There has to be something that can prevent this. I might try out the pause 0x1 thing, but we will see.
 

ep!c

Banned
124
Posts
11
Years
  • Seen Jan 4, 2015
Well I actually dont want to set pause 0xY too :D
I will definitly give an update on this, probably today if I find time.
 
215
Posts
11
Years
  • Seen Jul 14, 2020
Well I actually dont want to set pause 0xY too :D
I will definitly give an update on this, probably today if I find time.

Alright thanks a lot! :) I'm looking forward to seeing the results!
 

ep!c

Banned
124
Posts
11
Years
  • Seen Jan 4, 2015
YAY ITS FINALLY FIXED!! :D

SOURCE: here.
BIN:
Spoiler:


This time the deactivation routine is 100 bytes long. Replace it with the old!
GLHF!
 
215
Posts
11
Years
  • Seen Jul 14, 2020
YAY ITS FINALLY FIXED!! :D

SOURCE: here.
BIN:
Spoiler:


This time the deactivation routine is 100 bytes long. Replace it with the old!
GLHF!

PERFECT!! I can't wait to try this out! Don't forget to change it in the actual tutorial as well! :)

I am not at home currently but I will try it when I get home!
 

Renegade

Time for real life...
995
Posts
12
Years
YAY ITS FINALLY FIXED!! :D

SOURCE: here.
BIN:
Spoiler:


This time the deactivation routine is 100 bytes long. Replace it with the old!
GLHF!

Finally, thank you. It works perfectly ;)
 
Back
Top