Pots destroyed by L2-L4 Sword

Page 1 of 2 1, 2  Next

Go down

20140318

Post 

Pots destroyed by L2-L4 Sword Empty Pots destroyed by L2-L4 Sword






Information: destroys pots with Sword level 2, 3 or 4
Rom: ALTTP (US), without header
Screenshots:

Pots destroyed by L2-L4 Sword Alttp_10

Ips Patch: http://bszelda.zeldalegends.net/stuff/Con/pott_l2sword.zip

Code Addresses:
$0x77B70 - 0x77B9B: code to implement feature
$0x77f00- 0x77f18: bugfix to not ram posts into ground with sword
Update: The old hack let you ram posts into the ground with the sword (posts on the overworld and these little "face"-tiles in dungeons). So here is a bugfix version that does another test for the hammer when the games checks for these tiles.

ASM

Code:

; This is for destroying pots with L2 -L4 sword.
;WRITTEN:    by Conn and XaserLE
;THANKS TO: -MathOnNapkins' Zelda Doc's
;        -wiiqwertyuiop for his Zelda Disassembly

;header
lorom

ORG $01DABD      ; go to the code that handles hammer-destroyable objects
JMP.l $0EFB70  ; insert a jump to unused space

org $0EFB70      ; go to unused space
LDA $0301      ; load the slot that tells us if link has something in his hand poised to strike (boomerang, rods, powder....)
AND #$0002      ; check if it was the hammer
BEQ $04        ; if not (AND was zero), go to next test (sword)
JMP.l $01DAC5  ; otherwise jump to the code that handles destroying the object
LDA $0354      ; load animation state of link (0x27 means sword strike)
AND #$0027      ; check if sword was used
BNE $04        ; if it was the sword (AND was not zero), go for testing the sword level
JMP.l $01DAB6  ; otherwise leave this whole routine (leads to a reset of cpu flags and a RTL)
LDA $7EF359      ; load sword level
AND #$00FF      ; isolate last 8 bits
CMP #$0001      ; check sword level ($00 = No Sword ; $01 = L1-Sword ; $02 = Master Sword ; $03 = Tempered Master Sword ; $04 = Magic Master Sword)
BNE $04        ; if CMP is not zero, our sword level is higher than 1, so do the code that handles destroying the object
JMP.l $01DAB6  ; otherwise leave this whole routine (leads to a reset of cpu flags and a RTL)
JMP.l $01DAC5  ; this leads to the code for object destroying

; The following will hinder to ram posts into the ground with the sword (side-effect of the above code, cause hammer can do this).

ORG $01DAFC      ; go to the code that checks for the hammer-destroyable "face"-tiles (we jump to a CMP instruction)
JMP.l $0EFf00  ; insert a jump to unused space
nop

ORG $0EFf00      ; go to unused space
CMP #$4040      ; check accumulator for "face"-tile
BEQ $04        ; if "face"-tile (CMP was zero), go for "hammer was used" test
JMP.l $01DB16  ; else jump to next tile test
LDA $0301      ; load the slot that tells us if link has something in his hand poised to strike (boomerang, rods, powder....)
AND #$0002      ; check if it was the hammer
BNE $04        ; if it was the hammer (AND was not zero), go back to normal code and keep ramming the post into the ground
JMP.l $01DAB6  ; otherwise leave this whole routine (leads to a reset of cpu flags and a RTL)
JMP.l $01DB01  ; go back to normal code


Conn
Conn

Pots destroyed by L2-L4 Sword Image212

Since : 2013-06-30

Back to top Go down

Share this post on: reddit

Pots destroyed by L2-L4 Sword :: Comments

qwertymodo

Post Sun 16 Nov 2014 - 22:27 by qwertymodo

I found a bug, but I need to find another location with this particular situation to confirm.  If there is a pot covering a floor switch that reveals a treasure chest (plays the "ding" sfx instead of "crunch"), if you run into the pot with the pegasus boots, it will trigger the switch, but the sprite isn't updated, so it looks like the pot is still there, but you can't pick it up and you can walk on it.  The one I had this happen on was in the basement of the Dark Palace.  Due to the hitbox of the floor switch, you may have to run downwards from above to trigger this, but like I said, I need to find another switch like this to test further.

Back to top Go down

Conn

Post Mon 17 Nov 2014 - 3:16 by Conn

I tried on this location:
Pots destroyed by L2-L4 Sword All-in10

(eastern palace, need to cheat for boots 7ef379-ff - code enables run, boots won't show up in menu but it's enough to test).

You are right, strangely it only happens when running from above into it. Will check

Edit: It doesn't appear always. It seems like you are too fast so that the tile replacement isn't executed, and won't happen anymore after you hit the Switch. This could get much complicated to fix (and is Little bug most People won't run into). I'll see whether I can do anything about.

Back to top Go down

Conn

Post Mon 17 Nov 2014 - 9:05 by Conn

ok, I figured that the pot destroy is dependant on your x-coordinate. I also noticed when placing you always 2 Pixels to the left, the pot will be smashed and stays it.

Carefully! check this hack
http://bszelda.zeldalegends.net/stuff/Con/l2pot_v2.ips

I will not guarantee anything, neither I can exclude side effects.

Back to top Go down

qwertymodo

Post Mon 17 Nov 2014 - 11:44 by qwertymodo

Can you describe what this fix does so I have a better idea what to pay attention for?

Back to top Go down

Conn

Post Mon 17 Nov 2014 - 14:19 by Conn

well, it should fix the pot being (not) destroyed... it doesn't work?

What it does: when running from up->down it seems that the pot destroy only works when Standing correct on the x-axis. I did some testings and noticed that, when placing Link 2 Pixels further left, the pot gets always destroyed.

So I made first a check whether you're running, then if you're running down. If you then hit a pot, move Link 2 Pixels left.

Back to top Go down

qwertymodo

Post Mon 17 Nov 2014 - 14:49 by qwertymodo

I haven't gotten a chance to check it yet. Just, knowing that there are only a few places with switches like this, I was curious to know how you'd fixed the issue, so I knew what to try out. Knowing what's supposed to happen helps determine what edge cases to test for.

Back to top Go down

Conn

Post Mon 17 Nov 2014 - 15:39 by Conn

mh, take the v3 for testing, made another security check (check whether it is really a pot):
http://bszelda.zeldalegends.net/stuff/Con/l2pot_v3.ips

Back to top Go down

qwertymodo

Post Mon 17 Nov 2014 - 23:23 by qwertymodo

Looks good.  Found another switch in the Ice Palace that I was able to trigger the original issue and compare it to the v3 fix, and v3 works perfectly.  You mentioned the possibility of side effects, so I'll be on the lookout for those (proving the absence of something is far more difficult than proving the existence of something Wink )

Back to top Go down

Conn

Post Tue 18 Nov 2014 - 5:12 by Conn

Nice to hear. I updated the zip Archive, so if you redownload the
Ips Patch: http://bszelda.zeldalegends.net/stuff/Con/pott_l2sword.zip
you find the updated file.
So anybody please reapply (also PU), but this fix is also very Little.

I was wrong, $20 is the y-coordinate not x, as I thought previously.
I made three checks to provide Minimum of possible bug side-effects:
- check if you are running against a pot (e.g. hammer jambs also Trigger the execute code)
- check if you are running with boots
- check if your direction is up-> down

If all this is true, move Link 2 Pixels upward - then the pot stays smashed. So the only place where bugs can occur with this new code is when running from up->down smashing pots, through the movement of Link's sprite. The running is so fast and the movement is only 2 Pixels that this is not recognizeable.

Edit:
mmh, I corrected my code to v4 (redownload the zip from the original Archive in the main post). The reason is that the y coordinate is a 2 Byte (word) read and I substract 02.
One Byte read:
Eg. $20: 08 05 - 00 02 = 08 03 (correct). But if you come below the first Byte,
eg. $20: 08 01 - 00 02 = 08 FF - this would store you 5-10 cm below your current Location. This Happening would be rare but possible (Chance 128:1).
Therefore I made a 2 Byte substract in Version 4 so that now it will be
$20: 08 01 - 00 02 = 07 FF (which then is correct)

Back to top Go down

avatar

Post Tue 18 Nov 2014 - 11:38 by Founder

Anyhow, could you send it by email to me and add the lvl 1 baseball bat also so that it makes more sense?

I wouldnt mind destroying them with fists also!! So yeah please enable lvl 0 aswell.

Back to top Go down

Conn

Post Tue 18 Nov 2014 - 17:22 by Conn

I sent you the patch, and merged all latest bug-fixes
- pegasus run fix on staircases
- grab-item fix to not take harm from e.g. bubble
- pot destroy fix when running up->down

I was also able to make pots destroy with L1 sword, L0 (fist) isn't possible since the routine isn't executed without sword Sad

For anybody else who likes to tinker this:
L1-L4 sword, just make
07/7b92: D0 -> 80

L2-L4 sword: default

L3-L4 sword make
07/7b90: 01 00 d0 -> 03 00 b0

L4 Sword only
07/7b90: 01 00 d0 -> 04 00 F0

Back to top Go down

avatar

Post Wed 19 Nov 2014 - 16:08 by Founder

Alright thanks!

I haven't applied the sword grabbing patch yet so is it okay if I just apply the fix?

Back to top Go down

Conn

Post Wed 19 Nov 2014 - 17:23 by Conn

Yes, it will also enable it (even when not having pre-applied it)

Back to top Go down

avatar

Post Wed 19 Nov 2014 - 22:13 by Founder

Alright thanks!

Back to top Go down

Conn

Post Thu 20 Nov 2014 - 8:48 by Conn

Don't Forget to send me a fresh Version... if my Version is too old I can accidently overwrite code.

Back to top Go down

qwertymodo

Post Sun 30 Nov 2014 - 19:15 by qwertymodo

Here's an idea for another improvement on this.  In the GBA version, you can also break pots with the bow and arrow, and the silver arrows actually continue through a pot, hitting whatever is behind it, so you can break a whole row of pots with a single shot.  Any chance you might be interested in adding that here?

Back to top Go down

Conn

Post Sun 30 Nov 2014 - 19:51 by Conn

No I am not Smile
This is quite difficult and no "real benefit" out of it. Furthermore, bugs from all previous patches were really eating me (remember the 2 weeks msu? I had the same shit with the feather and other patches), so I'm not really interested in developing new things right now - then there's upcoming stuff to do with PU (Special msu adjustements) and bszelda1 (spc&msu).

Back to top Go down

qwertymodo

Post Mon 1 Dec 2014 - 13:40 by qwertymodo

That's totally fine, I just thought I'd bring it up.  There's actually a handful of item hit adjustments like that in the GBA version, like the fire rod burning bushes, or the L2 boomerang cutting grass and bushes, but if those don't interest you, I understand.  They also have the lantern doing damage like you do, but I intentionally left that one out of DX because it would allow sequence breaking by beating the Ice Palace without having the fire rod... although, on second thought I may go ahead and add it in for just that reason.  You can already do a fair bit of sequence breaking, might be fun to add that option.

Back to top Go down

Conn

Post Mon 1 Dec 2014 - 15:20 by Conn

you see, I'd only add new Features when having a benefit. Cutting grass with a boomerang has None. Smashing pots through arrows would have one if you e.g. can add a Crystal Switch behind and a gap between you and this. But this also can be activated by cane somaria. All in all those patches would attract bugs like a rotten corpse and I avoid Walking down that road as best as I can Wink

I think your dx hack is perfect as it is. You'd Need to apply the complete items hack which will overwrite your msu hack to have the super lantern; furthermore you Need to store a second lamp somewhere to upgrade it, and remove the 5 rupees alternative lantern chests on the way to Zelda. Best is you leave your Version as it is and make a complete new hack with custom dungeons if you use my hacks.

Back to top Go down

qwertymodo

Post Mon 1 Dec 2014 - 15:48 by qwertymodo

I didn't realize your super lantern was an upgrade, so yeah, I won't be adding that.

Back to top Go down

avatar

Post Sun 1 Feb 2015 - 14:53 by stgiga

Would you please restore the "item dash" glitch, from the Japanese version 1.0 copy of the game, into the all-in hack. It works by pressing the "Y" button, at the same time as holding the "A" button, which replaces the sword with whatever item you were using. I would like to have a patch made to re-implement the glitch.
Thank you for helping.

Last edited by stgiga on Sun 1 Feb 2015 - 15:03; edited 1 time in total (Reason for editing : I am revising what I said.)

Back to top Go down

Conn

Post Sun 8 Feb 2015 - 12:31 by Conn

I tried, you see Y-pressed is stored to $F4. The read is disabled if a value is written to $5d (#$11 for dash). If I'd disable this this affects the whole Rom as the hookshot also writes to $5d (#$13) to not use other items while the Routine is executed..

This will render the complete Rom unplayable so I have to decline "this request".

Back to top Go down

avatar

Post Sun 8 Feb 2015 - 14:16 by stgiga

Ok.

Back to top Go down

qwertymodo

Post Thu 21 Apr 2016 - 23:21 by qwertymodo

I've noticed there's some weirdness with the hitbox of this patch.  It doesn't seem to quite line up with the sword hitbox on the L2+ swords.  Specifically, at the extreme range of the hitbox sword, you can hit the pot without it breaking.  I originally thought that maybe it was still using the original hammer hitbox, but I tested that and that doesn't seem to be the case either (see the second pot in the video).  So the pot breaking hitbox has a longer range than the hammer, but a shorter range than the sword.  It's not a huge issue, but I do quite often find myself thinking "I'm sure I hit that, why didn't it break?"

Back to top Go down

Page 1 of 2 1, 2  Next

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum