Banner
Views: 926,257,523
Time:
17 users online:  Anorakun, Barrels O' Fun,  BeeKaay, buggy789, chickaDEE Magazine, CHIHI, Daizo Dee Von, Dark Prince,  Deeke, edgar, Enan63,  Fernap, musicalman, RollingRigatonis, Shmooples, TheJank, underway - Guests: 117 - Bots: 70 Users: 51,773 (2,052 active)
Latest: ByLHacks
Tip: If you're patching a BPS/IPS file to a ROM, make sure that your ROM is clean (unmodified) before you patch it. If it's not clean, use ROMclean to fix it.
Not logged in.
b4vwf - message boxes on BG4
Forum Index - SMW Hacking - Resource & Tool Releases - b4vwf - message boxes on BG4
Pages: « 1 2 3 » Link
I've only played around with this patch for a little bit, but it's really cool. Great work #tb{^V^}

I have two questions about it:

1. This question is more for anyone: Does anyone else think the KT Gothic font is just a little bit too hard to read? I'm viewing it from a PC monitor, but I imagine it'd be harder to read on a TV while sitting on the couch, where you're going to be a little further away from the screen. I think it's a combination of the font being skinny and its small size. The default SMW message box font is a bit easier to read. Maybe I just need glasses lol

2. I noticed that the text appears faster when you hold down the A button. Is there a way to make it so that the text will always appear at a fast speed? It could be annoying if a player accidentally hits a long message box and then they have wait for the long message to draw out. I only found an option to make the black box appear faster.

Originally posted by IronFoxGaming
Tried out patching the 3 patches on a fresh SA-1 rom, starting with the DMA patch, and it seems the message boxes are all still invisible. Not sure what the problem could be. I'm using the most recent version of SA-1, 1.40, if that helps any.

Ah wait, the status bar was made back in 2017. That could be a big issue.

For what it's worth, I was able to get SA-1 1.40, b4vwf, NSMBWii Sprite Status Bar 1.8 (a harder to find version), and the 32x32 player patch all working on the same ROM. Haven't tried the Mario 8x8 DMA patch yet. I didn't have to do anything special to get the patches working. Not sure if there are any glitches.
oh god I meant to look into IronFox's issue weeks ago but some serious stuff came up and I had to put it off. In fact I will probably not be able to get back to it for a while yet. Big apologies.

Originally posted by UTF
2. I noticed that the text appears faster when you hold down the A button. Is there a way to make it so that the text will always appear at a fast speed? It could be annoying if a player accidentally hits a long message box and then they have wait for the long message to draw out. I only found an option to make the black box appear faster.


As a quick hack you can delete lines 258-263 of b4vwf/code/draw-lvl.asm, which implement the slowdown applied to text when you aren't holding anything. I might add this as an option in a future version, or maybe it should just be the default. I mainly put this in because it makes me nervous when I can't do anything in a video game, even if I know for sure that the thing I can do is a total placebo.


I would also be interested in hearing if anybody has readability issues wrt KT Gothic. I made it skinny so more text could fit on a line, but making the strokes 1px wide instead of 2px wide like SMW's is a bit risky. I usually play on a pretty big monitor with bsnes set to 5x scale (since that's the highest it goes) so I'm not necessarily the best person to judge this.
Originally posted by Katrina
oh god I meant to look into IronFox's issue weeks ago

In response to this: I sent IronFox a PM with a link to another version of the NSMBWii Sprite Status Bar (v1.8), and apparently that version works fine with your b4vwf patch. I guess the 1.7 version of the NSMBWii patch still does not work with b4vwf though.

Originally posted by Katrina
As a quick hack you can delete lines 258-263 of b4vwf/code/draw-lvl.asm, which implement the slowdown applied to text when you aren't holding anything. I might add this as an option in a future version, or maybe it should just be the default. I mainly put this in because it makes me nervous when I can't do anything in a video game, even if I know for sure that the thing I can do is a total placebo.

Sounds good to have it as an option.

Apologies, but I probably should have been a bit clearer in my first post. I'm looking for a way to make the text box characters draw faster than they do now. Faster than they do when holding down a button. Maybe have 5 characters appear every frame, or have the message appear line-by-line, with each line appearing every frame. I am not sure if that is technically possible with the b4vwf patch though.

Alternatively, an option to instantly close the message box before all the text shows with the Start button would be a good option. I am not sure how that feature would interact with the $0C command though.
It would be better if the VWF text could only be used in overworld level names or only in some level messages or some messages.
Originally posted by UTF
In response to this: I sent IronFox a PM with a link to another version of the NSMBWii Sprite Status Bar (v1.8), and apparently that version works fine with your b4vwf patch. I guess the 1.7 version of the NSMBWii patch still does not work with b4vwf though.

I normally consider it my responsibility to deal with stuff like that, so thanks for taking the time to help someone else with my patch. It's a relief to hear that it worked out.


Quote
Apologies, but I probably should have been a bit clearer in my first post. I'm looking for a way to make the text box characters draw faster than they do now. Faster than they do when holding down a button. Maybe have 5 characters appear every frame, or have the message appear line-by-line, with each line appearing every frame. I am not sure if that is technically possible with the b4vwf patch though.

Multiple characters per frame should be possible in principle but I haven't tried it to see how many you can do. Just running the existing code like 5 times a frame should work but wouldn't be very efficient. I think an efficient version would need a lot of code changes, so I'd rather wait until the current version goes through moderation before attempting it.

A line each frame is going to be way too much without the SA-1; I timed overworld loading once and it takes like 4 frames to render the first level name (2 lines, not as wide as in levels), so it would probably take 2 or 3 frames per in-level line. But, displaying the message line by line instead of letter by letter would probably make layout a lot easier even if the work gets split up over a few frames. And then I'd be able to add other features more easily. So that will go in my idea pile.


Quote
Alternatively, an option to instantly close the message box before all the text shows with the Start button would be a good option. I am not sure how that feature would interact with the $0C command though.

This is a great idea and it should be really easy to implement. I could make it skip to the next $0c when you press start, but that would be a bit more code and I think if someone skips the current box they are likely to skip the next one too.


Originally posted by Hayashi Neru
It would be better if the VWF text could only be used in overworld level names or only in some level messages or some messages.

I can definitely make an overworld-only option. I mainly left it out because I didn't think anyone would want it.

However, it would be difficult to make the VWF text appear in some levels but not others. The code for displaying messages in levels overwrites parts of the original game's code for message boxes, so the new code can't just switch back to the old code.


Start-to-skip and overworld-only should be fairly small code changes so I will try to submit them as an update to the patch sometime this week.
I'm getting a bug where the level background looks glitched because Layer 3 tile FC is getting overwritten. This is what the graphics look like after closing out the message box:

Off-by-one error, perhaps? Notably, the level doesn't have a Layer 3 image normally.
Is that "l," from the end of a long block of text? If so, I don't think that's a bug. The patch is set up so that the default message box takes up exactly $800 bytes of VRAM if you fill it completely so it can potentially kill tiles $fd, $fe and $ff too. It looks like you're using 4 lines of text, so if you change !LVL_WIDTH to 216 that will make it smaller by 4 tiles and it should leave tile $fc alone no matter what. You would probably have to redo your newlines though.

If that "l," is nonsense glitch text, or you already made the lines narrower, then it's a bug and I'll look into it.
Huh, it doesn't restore tiles FC-FF automatically? Wouldn't that mess up most Layer 3 backgrounds anyway?

Changing the line width does seem to fix it, though.
It doesn't restore any tiles, for various reasons.

The default configuration starts using VRAM at address $9000 (BG3 tile $100 / LG3) specifically because page 0 has a bunch of global tiles. The main concern was the vanilla status bar, but the fill tiles are hardly any less important, I suppose. I can definitely understand why you would move it, though.

Maybe I should add a bit to the readme about moving the VRAM target or something. I'm guessing a lot of layer 3 BGs use LG3, and there's probably a lot of overlap between people using custom layer 3 BGs and using custom status bars, and so a decent number of people who would want to move the messages to page 0. It would be a bit silly to expect all of them to calculate the number of bytes each line takes up and all that.

I might also reduce the default line width to 216, which makes moving to page 0 easier and would also let me say the patch works with all the vanilla BGs with no caveat about the tides.


Really wish SMW could have just arranged the BG3 graphics in a slightly more orderly fashion. I can hardly even imagine how the person putting together the title screen got their job done.
Originally posted by Katrina
It doesn't restore any tiles, for various reasons.

I suppose even if it did, the background would still be glitched while the message was displaying.

Originally posted by Katrina
The default configuration starts using VRAM at address $9000 (BG3 tile $100 / LG3) specifically because page 0 has a bunch of global tiles. The main concern was the vanilla status bar, but the fill tiles are hardly any less important, I suppose. I can definitely understand why you would move it, though.

Does it all have to be on one page, or can it cross the boundary between pages 0 and 1?

Originally posted by Katrina
Maybe I should add a bit to the readme about moving the VRAM target or something. I'm guessing a lot of layer 3 BGs use LG3, and there's probably a lot of overlap between people using custom layer 3 BGs and using custom status bars, and so a decent number of people who would want to move the messages to page 0. It would be a bit silly to expect all of them to calculate the number of bytes each line takes up and all that.

Personally, when using Layer 3 backgrounds I pretty much always start at the end and move up from there. I've long since dropped the idea of ever using the vanilla status bar in hacks; it has way more drawbacks than benefits, and quite often, I don't use a status bar at all, certainly not a Layer 3 one.

Originally posted by Katrina
I might also reduce the default line width to 216, which makes moving to page 0 easier and would also let me say the patch works with all the vanilla BGs with no caveat about the tides.

Yeah, that should be the default line width. If the default setting has a high chance of glitching up the background, it shouldn't be the default setting (and I'm surprised that I didn't notice a problem with that until now).

Originally posted by Katrina
Really wish SMW could have just arranged the BG3 graphics in a slightly more orderly fashion. I can hardly even imagine how the person putting together the title screen got their job done.

SMW? Organizing things sensibly? Perish the thought. The chaos is how you know the game is good.
If I put more than 9 font files in this patch, I get the following error:

error message:
Code
/b4vwf/font.asm:311: error: (E5032): A bank border was crossed, SNES address $5010800. [incbin "gfx/Uni4100.bin"]



If using Japanese, Chinese, or Korean fonts, there are need to use a lot of glyphs. Of course, Japanese can only use hiragana and katakana, but Chinese and Korean do not.

How can I solve this problem?
You're inserting too many fonts. Asar throws a warning when you cross bank borders and doesn't insert. I had the same issue with uberASM but managed to fix it by inserting the rest manually to another location.
Maybe there's another fix to that...

Anyway, I have a concern with %exitlevel() macro.
According to the readme the macro will only trigger the switch blocks or do nothing.
You should add %endlevel() as a macro as well that will trigger the level's events and allows the player go further (example: ending cutscene, castle sequence, etc.)

EDIT:
Solved the issue by replacing:
Code
jsl !FR|$05b160
on line 329 in draw-lvl.asm with a proper level end routine. It's not optimal but does its job since side exit is only used once and the level doesn't trigger any events itself.
Originally posted by Ice Man
You're inserting too many fonts. Asar throws a warning when you cross bank borders and doesn't insert. I had the same issue with uberASM but managed to fix it by inserting the rest manually to another location.
Maybe there's another fix to that...
(skip)


Then, if I make a Korean hack, I have to put only the characters that are used without considering Unicode. (In this case, it have to do it differently from the Unicode mapping. Actually, not all 11172 Korean characters are used.)
If only 8 font files can be included, the number of usable characters is 2048, and KS X 1001 uses 2350 Hangul characters.

If it's a Japanese hack, It can replace kanji with hiragana.

Japanese and Chinese also do not use all Kanji/Hanzi.

I thought again, if want to use Korean, Japanese and Chinese, I think RPG Hacker's VWF would be more appropriate. It is 16×16 and can insert more than 9 bin files. (one bin file uses 256 characters) However, this is difficult to use simultaneously with the layer 3 background, and cannot be used in Mode 0, Mode 2.
I never said 8 font files is the maximum, but you will most likely find a work around.

Maybe try to put "check bankcross off" in fonts.asm at the very top without eh quotes.
Originally posted by Ice Man
I never said 8 font files is the maximum, but you will most likely find a work around.

Maybe try to put "check bankcross off" in fonts.asm at the very top without eh quotes.


Code
 No freespace found in the mapped banks. (Requested size: 69632) [freedata align]


As a result of adding that phrase to the top of font.asm, this error pops up. This error also occurs when inserting the 9th bin file. (If there are less than 8, there is no problem.
and this rom is clean(and 8MiB)
(Font file's size is 4kiB)
I haven't really looked at the patch's code, so I don't know how fonts are implemented in there, though what I do know is that banks are exactly 32 KB in size in ROMs using LoROM mapping (which, I assume, also applies to SA-1 enabled ROMs). This means it makes perfect sense that exactly 8 fonts of 4 KB fit into there before Asar complains.

I think if you want to make a ninth font fit, you have to move it into a new bank (using another "freedata align" right after the eigth font). Though again, I haven't looked at the patch's code, so I don't know if it can even support more than eight fonts in general. I know my own patch can, because it just uses 24-bit addressing for almost everything and has tables for the fonts, but if Katrina's patch doesn't do the same thing, support for more than 8 fonts might be impossible right now.

--------------------
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
Originally posted by RPG Hacker
which, I assume, also applies to SA-1 enabled ROMs

Almost. :) SA-1 features both types of bank types: LoROM (lower 4 KiB only) and HiROM (whole ROM) and the latter can prove to be useful. That being said, I'm not quite sure how to access the HiROM area on Asar besides entering the addresses directly or do some weird maths.

--------------------
Rest in peace, Near.
I probably should have explained all this properly in the readme or something instead of relying on clunky examples in the ASM file...


With the default setup, at the top of the file you have:

Code
prot ktgLatin ; , myNewFontGfx, myNewFont2Latin, ...


and at the bottom you have:
Code
	freedata align
	ktgLatin:
		incbin "gfx/kt-gothic-latin.bin"
	; etc ...


The intent was that if you run out of space, you should be able to change that to something like:
Code
prot ktgLatin, myNewFontGfx


Code
	freedata align
	ktgLatin:
		incbin "gfx/kt-gothic-latin.bin"

	freedata align
	myNewFontGfx:
		incbin "gfx/my-new-font.bin"


You only need the freedata align statement to separate 32KB blocks; adding more will make Asar run out of aligned slots earlier. For a Korean font, most files will be 4KB so as a rule of thumb you can put one in after every eight graphics files (or you can add files one at a time and put it in whenever Asar starts giving you errors). And you only need to add a file to the prot if it comes right after a freedata.



Very sorry I didn't get around to answering this in a timely fashion; I haven't been on SMWC very much in the past few weeks and didn't realize people were having difficulties. I still need to get around to that minor update I promised, too...

If any of the above stuff is confusing or breaks don't hesitate to ask. I don't know any Korean but I did want it to at least kind of work, in the sense that if you manage to squeeze precomposed Hangul into an 8x8 font you should actually be able to use that font.
Late but thanks for the reply. I already found a freely available Hangul font, and converted it to a BIN file. And I also found the 8x8 kanji font.
I've been wondering. Is there a way to implement part this patch:
https://www.smwcentral.net/?p=section&a=details&id=26720

by MFG to backup the current GFX file(s) tilemap before a message box is triggered and restore it afterwards?

The reason I'm asking is the following:
When I have BG4 Offset set to LG1 at $8000 the messages work as intended and my layer 3 backgrounds never gets touched.
However, since it doesn't restore, the Course Clear text is messed up.
Theoretically I could remap it and move the tiles somewhere else but I don't always have space in the same positions...

Having the BG4 Offset at $9000 saves the trouble of Course Clear but Layer 3 backgrounds will mess up if the text is too long. :(

Any work around to this?
Pages: « 1 2 3 » Link
Forum Index - SMW Hacking - Resource & Tool Releases - b4vwf - message boxes on BG4

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2021 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy
  • sm64romhacks