• 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?".
  • Forum moderator applications are now open! Click here for details.
  • 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.

Development: Transparent Textboxes

Danny0317

Fluorite's back, brah
1,067
Posts
10
Years
  • Age 24
  • Seen Nov 19, 2023
This is amazing, but it takes up so much room to use in EVERY script.

So what everyone should do is make that a separate script, and then at the beginning of every script, call it, so this way you can save lots of room.

Example:

Script to be called:
Spoiler:


Then if a script wants to use transparent text boxes, it would just call that one, and then it will automatically return to the script afterward due to the return command.

Spoiler:


Space saving ftw! I know this isn't a complex technique in anyway; I was just over explaning for newer hackers out there. :)

Instead of doing that, how about putting that (by "that" I mean what he said about @call) in a level script so every script in the map has it and you don't have to add it to NPCs? I haven't tested it, and won't since I don't hack FR or Ruby, but would that work?
 
27
Posts
9
Years
Instead of doing that, how about putting that (by "that" I mean what he said about @call) in a level script so every script in the map has it and you don't have to add it to NPCs? I haven't tested it, and won't since I don't hack FR or Ruby, but would that work?

Thank you now i can rom hacking with transparent textboxs :D
 
Last edited:

Derlo

Tired....
135
Posts
16
Years
Works great to me, but I have a little problem.

After call all "writebytetooffset" to bring the textbox to normal, if I start a script with YES/NO textbox, the game crashes....

Someone knows how to fix that?

Edit:
Forget it!
The problem was in another routine that was using along with the transparency!
HUil68.png
 
Last edited:

Bonnox

Time (wasting) Lord
47
Posts
8
Years
Hi everybody!

I'm sorry for posting after this huge amount of time, but I think to have found a lighter way (it needs fewer bytes) for ruby.

these are the needed bytes:
4000040 00FF // defining windows - to edge: 03ED
4000042 FFFF
4000044 70C0 // to edge: 739D
4000046 00FF
4000048 3F3F
400004A 001F
4000050 00FE // start blending

202F0AC 6B5A // I change the text color to be more pleasant (just personal feeling)
202F0BC 0000

"to edge" means that you have to use that value if you don't want the effect to "go past" the textbox.

just a remainder: you have to set the transparent higlight (simply put "\c\h02\h00" at the beginning of an XSE text), and DESTROY with zeros 0x1BF bytes with an hex editor at 08EA0108, in order the textbox to be gone (actually, trasparent, but who cares) {XD} (at the time I came up with this I didn't know ASM yet, so couldn't directly stop the routine that prints the box)

with the halfword at 04000054 you can change the intensity of the effect ^^
by default, this produces a "darken" effect. if you want a "lighter" effect, just substitute this in above:
4000050 00BE

after closing the message, terminate the effects with:
4000050 1E40 (this value is used by gamefreak, therefore *should* be correct)

(and sorry for the too much brackets :v )
 
Last edited:
Back
Top