Language…
18 users online:  Anorakun, Aouzy, Azula16, Banjo de Nos, BearAndBoarFan, Boosius, brickblock369, Children's Digest 1950-2009, Mane Bros., MarioSonic4life, mmmdoggy, Shuttles, Sokobansolver, Space_Pig, TCgamerboy2002, VitorSMHack, YouFailMe, Zavok - Guests: 88 - Bots: 230
Users: 55,613 (2,426 active)
Latest user: 5ive

VWF Dialogues Patch v1.2

I see.

Well, my edits didn't work. I had this in message 0054 to test it:

Code
.body
db "To do a spin jump, press the A Button."
db $EB : dl .Skip : db $FA,$ED
db "A Super Mario spin jump can break some of the blocks and "
db "defeat some of the tougher enemies."
db $FA,$FF
.Skip
db "But you know all this already.",$FA,$FF


As I had expected, the combination of waiting for the Y button (or Start, or whatever button I need) and changing the text pointer made it impossible to do it the way I tried to do it. Maybe you should include that character in the next version. In fact, what about using $EB for that and some other characters (either $E8-$EA or $E0-$EA) for user-specified special characters?

Also...
Originally posted by RPG Hacker
Also to anyone with ASM experience: I know the cmp is not neccessary, but I don't really like confusing code, even at the cost of worse performance.

What's so confusing about
Code
LDA $16
BPL .NotPressed

? I highly doubt anyone without any ASM experience will need to look much at the code in the patch anyway.

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

I'm working on a hack! Check it out here.
I simply don't like to write code that goes against my regular thinking. In my brain, button checks go like this: "Do this if button A is pressed". Not like this: "Do this, if button A is not pressed". "Confusing" may be the wrong word here, but I don't know how else to explain that.

Also I'll probably include that character in the next version.
Feel free to visit my website/blog - it's updated rarely, but it looks pretty cool!
Originally posted by RPG Hacker
I simply don't like to write code that goes against my regular thinking. In my brain, button checks go like this: "Do this if button A is pressed". Not like this: "Do this, if button A is not pressed". "Confusing" may be the wrong word here, but I don't know how else to explain that.

Well, "BMI .Pressed" would be essentially the same thing, although you'd probably have to add a BRA in there.

Originally posted by RPG Hacker
Also I'll probably include that character in the next version.

What plans do you have for the next version?

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

I'm working on a hack! Check it out here.
*BUMPTY-BUMP*

I know there is a caveat against using this in Layer 3 levels, but I went ahead and did so anyway. Using it in a Layer 3 Tide level makes the water stop scrolling after it reappears when the message closes. It behaves otherwise the same in all ways.

I have a general question -- is the intention of this to only hijack the Message 1 or Message 2 of a given level? I guess my question is, is there a way to have more than two different dialogue texts spawned in a single level? Maybe I've just not understood something.

Has anyone reconfigured which button is used by default to advance text?

@RPG Hacker -- Great work on this! I've been hoping for something like this since I first started hacking. It is even cooler than I expected. It allows so much more versatility than just the default Message Boxes from SMW. Great great work!

[?] Miscellaneous Helpful Hints
If I moderated your hack, there was apparently a 90 percent chance it was rejected.
Making it hijack message boxes is actually optional, and can be disabled easily by changing the 1 in !hijackbox = 1 to 0.

If I recall correctly, the "regular" way to display a message is:
Code
!VWFState = $702000	;    VWF State register address

REP #$20
LDA #$0000		;    message number to use (16bit) - change to anything you want
STA.l !VWFState+1
SEP #$20
LDA.l !VWFState	
BNE Return
LDA #$01
STA.l !VWFState

That allows for all messages to be displayed in the same level, technically. Just put that code in a block/sprite/whatever you feel like doing.

No clue about the button reconfiguration and the layer 3 water bug though.


 
Originally posted by WhiteYoshiEgg
Making it hijack message boxes is actually optional, and can be disabled easily by changing the 1 in !hijackbox = 1 to 0.

Thanks for the response WYE.

I'm just thinking there has to be a good way of making NPC sprites capable of loading many of these dialogues within one level (other than having 30 different sprites). What about a sprite that loads different messages based on what screen number it is on, or its x position on a screen? Any other ideas?

[?] Miscellaneous Helpful Hints
If I moderated your hack, there was apparently a 90 percent chance it was rejected.
Originally posted by andy_k_250
What about a sprite that loads different messages based on what screen number it is on, or its x position on a screen?


Actually, the NPC 3.0 loads a different message by X position. You only need up to four sprites (If you use all configuration combinations: moves with one message, moves with two, Still with one, still with two) and it loads a different message judged by its X position, unfourtunately, it uses a palette to determine which message to use (don't ask me why, I didn't code it. it was probally so you don't have to edit the ASM...). The only downside is that it uses up the message block messages. However if you know how to get it to use the cutscene patch, or are only using NPCs instead of message boxes, this also isn't a problem.
Eh, sure. Why not? Kaizo hacking doesn't seem too ha-aaaaaaand I broke the ROM.
The problem is, I'm not at all sure that the palette thing actually works on a real SNES; I don't think you can read from CGRAM outside of a blank. But once the new Sprite Tool is out, I plan to make an NPC that uses the extra bytes to determine exactly which message to display.

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

I'm working on a hack! Check it out here.
Originally posted by imamelia
I don't think you can read from CGRAM outside of a blank.

Correct. If you try doing that, you'll read the color value of the current pixel being drawn on the screen, not what you asked for.
<blm> zsnes users are the flatearthers of emulation
Well, I've made myself some custom NPCs where the message displayed depends on both the initial screen number and the Extra Property Byte 1. If anyone is seriously interested in these, I suppose I could release them after a bit of tweaking...

(They'll quickly eat up sprite slots though, since every level basically requires a new CFG file.)


 
What using the palette to determine stuff? Who's bright idea was that?
Your layout has been removed.
Originally posted by KilloZapit
What using the palette to determine stuff? Who's bright idea was that?

I think this guy is guilty and that the idea spread from there.
Originally posted by PalASM readme
(special thanks to SiWu for coming up with the crazy idea of using the
palette as a data storage area...pure genius)


Edit: I just realized I used PalASM for something serious. BLASPHEMY
<blm> zsnes users are the flatearthers of emulation
It's still possible to use the palette like that, just use $0703 instead of CGRAM, it should just be a little update to the sprite's code.
Originally posted by Alcaro
Originally posted by KilloZapit
What using the palette to determine stuff? Who's bright idea was that?

I think this guy is guilty and that the idea spread from there.
Originally posted by PalASM readme
(special thanks to SiWu for coming up with the crazy idea of using the
palette as a data storage area...pure genius)


Edit: I just realized I used PalASM for something serious. BLASPHEMY


Yeah but the guy who wrote it quickly realized it was a stupid idea and made levelasm instead.
Your layout has been removed.
Originally posted by imamelia
The problem is, I'm not at all sure that the palette thing actually works on a real SNES; I don't think you can read from CGRAM outside of a blank. But once the new Sprite Tool is out, I plan to make an NPC that uses the extra bytes to determine exactly which message to display.


Well, I don't know about a real SNES, but it works fine for me in BSNES. I fail to see how palettes could crash a SNES though...

Originally posted by KilloZapit
Yeah but the guy who wrote it quickly realized it was a stupid idea and made levelasm instead.


Could be worse, it could read from the same palete that the sprites use...although...its is possible to change the palette it reads from...I should do that just for kicks sometime...
Eh, sure. Why not? Kaizo hacking doesn't seem too ha-aaaaaaand I broke the ROM.
Originally posted by DarkBones
it works fine for me in BSNES

Try the accuracy profile. The compatibility and performance profiles doesn't emulate that quirk properly.
<blm> zsnes users are the flatearthers of emulation
The $0703 thing is a good idea. But would that still work with ExAnimated palettes?

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

I'm working on a hack! Check it out here.
Doubt it. In that case, you could just wait for the next h-blank before reading the CGram. Will obviously eat a big chunk of time in the worst case scenario, but unlikely to cause slowdown.
Originally posted by WhiteYoshiEgg
Well, I've made myself some custom NPCs where the message displayed depends on both the initial screen number and the Extra Property Byte 1. If anyone is seriously interested in these, I suppose I could release them after a bit of tweaking...

(They'll quickly eat up sprite slots though, since every level basically requires a new CFG file.)


That's the real drawback, isn't it? There has to be some sort of solution to this that allows for some flexibility (in terms of loading messages) but without too much sacrifice (i.e. wasting more than a handful of sprite slots for NPCs).

So, the way the dialogues patch works (now that I've looked closer) is that vwfmessages1.asm contains messages 0000-00FF (I assume there's no real reason there can't be more, right?).

Messages 0000-00BF handle the game's original message box slots (two for each level for overworld-accessible levels 00-24 and 101-13B). That leaves several slots (00C0-00FF) free to use however.

Are there any RAM addresses that get cleared between sub-levels? I'm thinking, why not make some simple LevelASM for sub-levels that loads an arbitrary value into some empty address, and if that value is anything different from the entry level from the overworld, have the NPC sprite (or message displaying sprite, or whatever) read instead from the message number being referenced by the RAM (+1 for a second message for each sub-level).

Something like that I don't think would be TOO difficult to code (though maybe a bit above me; I'd have to try it out) but I think it would offer lots of functionality (up to two messages per sublevel) without abandoning much practicality (you would still need only arond four NPC/message-display sprites). What do you guys think?

Originally posted by KilloZapit
What using the palette to determine stuff? Who's bright idea was that?

It was a pretty original solution the problem as it was presented at the time (about three years ago now).

[?] Miscellaneous Helpful Hints
If I moderated your hack, there was apparently a 90 percent chance it was rejected.