Link's Awakening style key blocks

View previous topic View next topic Go down

20130905

Post 

Link's Awakening style key blocks




This is for making small key blocks like they appear in Link's Awakening.

I will overwrite the prison door for that (like that one where zelda is behind).

You only need to change the prison door graphic to a key block.

The patch is "in place" so it doesn't overwrite other data or patches you added.

The blocks can be opened from up- or downside only, left and right will not work (will try to fix this in the future).

Code:
;Link's Awakening style key blocks
;WRITTEN: by XaserLE
;THANKS TO: -PuzzleDude for finding a drawing bug and get rid of it
; -MathOnNapkins' Zelda Doc's
; -wiiqwertyuiop for his Zelda Disassembly


;header
lorom

ORG $01EB8C ; go to the code that loads the big key holding variable
LDA $7EF36F ; load the small key counter
AND #$00FF ; check if we have at least one small key (AND will not be zero)
BEQ $4C ; if not (AND is zero), don't do anything and especially don't give this "Eh? It's locked..." - message
 ; otherwise we will decrement the small key counter and branch to the code that opens the prison door
LDA $7EF36F ; reload small key counter
DEC A ; remove one key
STA $7EF36F ; save the new value at small key counter position
BRA $05 ; branch to the code that opens the prison door


; now correct a drawing bug in the original game that causes the floor tile under the door drawed odd
ORG $01EBC8
LDA.w $9B5A,y
ORG $01EBD1
LDA.w $9B54,y
ORG $01EBDA
LDA.w $9B5C,y


; if you are interested in what the values for drawing stand for:
; 50- /
; 52- normal
; 54- x mirror
; 56- normal
; 58- x mirror
; 5A- y mirror
; 5C- xy mirror
; 5E- y mirror


; PuzzleDudes Note:
; The key block must always be placed on EVEN x and y.
; The even x or y is: 00, 02, 04, 06, 08, 0A, 0C, 0E, 10, 12 etc.
; HM x and y value of the position of the key block must end with: 0, 2, 4, 6, 8, A, C, E.

Asm File: https://www.dropbox.com/s/j5ev7ev29ouax95/SmallKeyBlocks.asm

XaserLE



Since : 2013-01-22

Back to top Go down

Share this post on: Excite BookmarksDiggRedditDel.icio.usGoogleLiveSlashdotNetscapeTechnoratiStumbleUponNewsvineFurlYahooSmarking

Link's Awakening style key blocks :: Comments

avatar

Post on Thu 5 Sep 2013 - 9:06 by Puzzledude

This is great. Regarding this line:
"You only need to change the prison door graphic to a key block."
 
It is not that easy actually. The prison lock is on special gfx value, which makes it incompatible to most blocksets and therefore makes the keyblock appear false in most dungeons. The other problem is that the prison lock uses 2 small blocks, the normal pushable block uses 4 by default. So we need it to be on neutral gfx (on the primary indoor gfx tileset= the same one as the big chest). Luckily there's enough room there, to fit an entire block (4 small squares) on a previously unused "shadow?" part. I've tested this and it doesn't seem to be anywhere in Alttp.
 
Once this is done, we need to manipulate the F98 object in HM, which is the prison lock= key block. When pressing edit, we will fill this object with gfx small block 298, 299, 314, 315 (neutral gfx). Before it was 418, 419 (+both mirrored)= non neutral gfx.
 
So now we have a key block object (which reacts on small key) and is compatible to all indoor gfx values and palettes. This is how I made it in GoT for the 3rd big-key-block.

Back to top Go down

Post on Thu 5 Sep 2013 - 14:39 by XaserLE

Wow, i didn't know that it is this hard. I didn't want to suggest this with the word "only". I saw your key block in GoT, looks amazing! That reminds me playing Link's Awakening on the GameBoy when i was a child :-)

Back to top Go down

avatar

Post on Thu 5 Sep 2013 - 14:43 by moegami

This is great! Really nice job XaserLe, I'm gonna try this out as soon as I get home.

@Puzzledude: Would you be able to share the graphics you used for the key blocks?

Back to top Go down

avatar

Post on Thu 5 Sep 2013 - 15:00 by Puzzledude

Sure. Nothing new really. I've just copy pasted the regular block and give it a lock in the middle. Of course once edited, you need to manipulate the F98 object in HM and "fill" it with those 4 new gfx pieces. I was actually looking at the Link's awakening to see how this lock looks like.
 

Back to top Go down

Post on Thu 5 Sep 2013 - 16:17 by XaserLE

Thanks, enjoy the patch :-). Hopefully i will get this work from left and right side, this is the only problem left.

Back to top Go down

avatar

Post on Fri 6 Sep 2013 - 20:49 by moegami

Puzzledude wrote:Sure. Nothing new really. I've just copy pasted the regular block and give it a lock in the middle. Of course once edited, you need to manipulate the F98 object in HM and "fill" it with those 4 new gfx pieces. I was actually looking at the Link's awakening to see how this lock looks like.
 
So I did it like you did in the picture and I think I figured out what the shadows are for


Is there some way to change the shadows graphics maybe?

Back to top Go down

avatar

Post on Sat 7 Sep 2013 - 6:10 by Puzzledude

So the shadows are used. Nice for you to find this. This basically means, we can not use this place for the key block (since the space is not empty).
 
Here's the alternative:
Uses the 2 blocks of the unused jar in the lower neutral gfx and the 2 under the big chest. I didn't see those anywhere in the game, but maybe you could test this some more.
 
 

Back to top Go down

Post on Sat 7 Sep 2013 - 10:35 by Spane

Of course can we change the shadow graphics :-P In the dungeon piece editor :-)

Back to top Go down

avatar

Post on Sat 7 Sep 2013 - 10:59 by Puzzledude

Changing the shadow (visible area or the light) is also a possible solution. It is however a question if this visible area can be achieved with just 6 small squares, since the original is using 10. (Can also be a compromise to use 8, and 2 for key block, the other 2 for key block then go to lower gfx next to spike).

Back to top Go down

avatar

Post on Thu 24 Jul 2014 - 17:51 by moegami

Okay so I finally got back to fixing this and I think I'm having a problem.

I placed the block clearly (with the new fixed graphics)


but in the game it's not actually showing up.


So I'm not sure what the issue is. Also, what block types should the key block be?

Back to top Go down

Post on Fri 25 Jul 2014 - 2:56 by XaserLE

Hmm, this is odd. I can't really answer on this, but i am sure puzzledude will. I don't had this problem while testing it.

Back to top Go down

avatar

Post on Fri 25 Jul 2014 - 6:34 by Puzzledude

Can't tell from the image alone. Possibilities. Your bg2 is normal, which means you need to put the block to bg2 and define the bg2 on that area usign the 0c3 element (pit).

So you might have it on bg1 or you have it on bg2, but the area is not defined with 0c3 element.

Or you used a save state or old srm save. You must start a new game in any case.

Back to top Go down

avatar

Post on Fri 25 Jul 2014 - 12:51 by moegami

It ended up being the old srm save that was causing the issue. Didn't realize that could be a problem, but now it works perfectly and activates with the small keys Very Happy

Back to top Go down

avatar

Post on Sun 19 Apr 2015 - 11:53 by SePH

Hello XaserLE, I get a key in a room that contains a keyblock, it won't open until I leave the room and come back.

Is it possible to make those locks be openable at all times, just like the key doors?

Back to top Go down

Post on Sun 19 Apr 2015 - 13:38 by XaserLE

Huh, this is odd, should work as you want it and as far as i remember it did work this way in my test. Could you please send me a ROM, SRM and turn-by-turn directions to test this?

Back to top Go down

avatar

Post on Sun 19 Apr 2015 - 14:04 by SePH

Sure thing, I'll do this when I get home later tonight if I have time or tommorow morning at best.

I remember it was also reported in the beta test by Tompala if I recall right.

Sometimes it works, sometimes it doesnt which is just odd.

Thanks in advance!

Back to top Go down

Post on Sun 19 Apr 2015 - 14:08 by XaserLE

Ok, waiting for your mail Smile

Back to top Go down

View previous topic View next topic Back to top


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