News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

[SM] Fixing Side Effects of making Bomb Torizo Dodge Missiles?

Started by nodever2, December 05, 2017, 09:15:13 PM

Previous topic - Next topic

nodever2

Sorry for starting yet another new Bomb Torizo thread - I know there's a good amount here, so first things first, if you mods feel the need to merge this into another thread I'd recommend this one
(the reason I didn't reply there in the first place is because I didn't want to necropost so I figured this would work)

Anyway, I had a question about Bomb Torizo. I saw this thread (same one linked above) and tried the hex tweak there to make him dodge missles like GT does - however, I noticed that this causes some weird AI thing that makes him do some GT attacks as well (but only after you interrupt normal BT AI by making him dodge a missile. if you never shoot a missile at him, he'll act like normal BT)

Basically, shooting a missile can cause him to do GT attacks, which isn't normally a problen. However, there is one attack that is a problem: the orbs he shoots out of his chest, which break open and bugs come out and attack you. They don't appear to load correctly, and look unprofessional and buggy (no pun intended).

See for yourself:


Any ideas on how to fix this? Disabling the attack altogether, or maybe making those graphics load properly somehow maybe?

The closest I got was a .rtf document linked in this post which has some info on Torizo animations in it, or so it appears. Maybe that'd help...

(edit: This may also come in handy...)
Need help? Just ask.
My Hacks | My Resources

Smiley

Try giving him the same gfx pointer and size as GT. That should fix the graphics.

nodever2

They seem to have the same GFX pointer..

Vanilla ROM:
[spoiler=Troizo Enemy Editor window]





[/spoiler]
Need help? Just ask.
My Hacks | My Resources

Jordan5

That attack is only triggered once the Torizo gets below a certain HP value. If you could find this value in its AI and change it to something it would never have (i.e. 1HP because the smallest damage you can do to it is 20 I believe) then it wouldn't do the attack and would no longer be an issue.

PHOSPHOTiDYL

#4
That hex tweak is just making bomb torizo's shot AI jump to gold torizo's shot AI.
They're very similar routines, gold torizo's gets projectile type, stores to a ram value I don't think bomb torizo uses, & branches to a routine if missile or super missile.


PHOSPHOTiDYL

LoROM

ORG $AAC97C : LDA $079F : BEQ $00 : JMP DodgeTorizo

ORG $AAF800
DodgeTorizo:
LDX $0E54 : LDA $0F9C,x : ORA $7E7808,x : BNE EndTorizo
LDA $18A6 : ASL A : TAY : LDA $0C18,y : AND #$0F00 : STA $7E780A,x : CMP #$0100 : BEQ NewTorizo
NextTorizo:
JSL $A0A6A7 : LDX $0E54 : LDA $0F8C,x : BNE EndTorizo
LDA #$B1C8 : STA $0F92,x : LDA #$0001 : STA $0F94,x
LDA $0FB6,x : ORA #$C000 : STA $0FB6,x : LDA $0F86,x : ORA #$0400 : STA $0F86,x
EndTorizo:
RTL
NewTorizo:
LDA $0C04,y : AND #$FFEF : STA $0C04,y : LDA #$C6AB : STA $0FB0,x
LDA #$0001 : STA $0F94,x : BIT $0FB4,x : BMI $06 : LDA #$D1F1 : STA $0F92,x : RTL


Bomb torizo will one hit you with those belly orbs, if you replace #$D1F1 with #$D2AD.

nodever2

So, I applied the above code to my ROM, with no other edits. I recorded a video with the results, in case you're interested.

https://youtu.be/T1WPSgy2dMk (first few seconds of video are black, don't panic)

tl;dr this looks closer, but he still does the buggy orb attack it seems. Also it's possible to get BT stuck now, particularly if you shoot a missile at him during his jump animation.
Need help? Just ask.
My Hacks | My Resources

PHOSPHOTiDYL

D2AD?? I'll keep disassembling.
Do you even want the orb attack or just the missile dodge??

I need the torizo source again so this is actually helping me.

nodever2

Quote from: PHOSPHOTiDYL on December 06, 2017, 11:35:07 PM
D2AD?? I'll keep disassembling.
Do you even want the orb attack or just the missile dodge??

I need the torizo source again so this is actually helping me.
I also tested replacing $D1F1 with $D2AD and it appeared to have all of these problems as well.

I don't care if the attack where he shoots eggs or whatever is in the game. I didn't particularly want it, but I'm okay of we get the graphics working or if we just remove it altogether, I'm good either way
Need help? Just ask.
My Hacks | My Resources

PHOSPHOTiDYL

I'll try to finish it today.
Bomb torizo dodges missiles facing left, but when facing right, either walks faster or freezes in position??
No belly orbs, no gold torizo AI, just some missing disassembly...

PHOSPHOTiDYL

#10
No dodge, no damage, no glitches.
I mean it's a quick fix for now.

LoROM

ORG $AAC97C : LDA $079F : BEQ $00 : JMP DodgeTorizo

ORG $AAF800 ;//($0055 bytes)
DodgeTorizo:
LDX $0E54 : LDA $0F9C,x : ORA $7E7808,x : BMI EndTorizo
LDA $18A6 : ASL A : TAY : LDA $0C18,y : AND #$0F00 : STA $7E780A,x
CMP #$0100 : BEQ NewTorizo ;//missile check
NextTorizo:
JSL $A0A6A7 : LDX $0E54 : LDA $0F8C,x : BNE EndTorizo ;//
LDA #$B1C8 : STA $0F92,x : LDA #$0001 : STA $0F94,x ;//#$B1C8 kill it
LDA $0FB6,x : ORA #$C000 : STA $0FB6,x
LDA $0F86,x : ORA #$0400 : STA $0F86,x
EndTorizo:
RTL
NewTorizo:
LDA $0C04,y : AND #$FFEF : STA $0C04,y : RTL ;//nullify missile


You can do the same for super missiles if you add CMP #$0200 : BEQ NewTorizo.

nodever2

Quote from: PHOSPHOTiDYL on December 07, 2017, 10:12:46 AM
No dodge, no damage, no glitches.
I mean it's a quick fix for now.

You can do the same for super missiles if you add CMP #$0200 : BEQ NewTorizo.
Tested this out, it does indeed work! Thank you!
Need help? Just ask.
My Hacks | My Resources