View Full Version : (repost) Statues fire on you even when in safe zone

12-01-2009, 08:40 AM
On the NES, LOZ statues have a "safe zone" from which they will not shoot you. This is interesting (and a MAJOR oversight) because:

1. ZC lacks any safe zone;
2. The 2 statues have different (asymmetrical) safe zones.

Here's a thumbnail:
http://img29.imageshack.us/img29/4840/legendofzelda1k.th.png (http://img29.imageshack.us/i/legendofzelda1k.png/)
and the full pic:

To interpret this picture, understand that the green and red boxes mark where Link's upper-left pixel would fall in order for him to be in the "safe zone."

EDIT: Anyone who cares to can easily confirm this on the NES. The pics I took were from a room in 2nd quest level 1, as that is an easy one to reach. I haven't verified if it is consistently offset when dealing with corner statues, as I only tested center statue rooms.

NOTE TO DEVS: This will probably be deferred to post-2.5 as that has been the policy in order to get a final 2.5 version out. This could probably easily be emulated by a script, although it really should be part of the default data for the Projectile Shooter (Fireball2) which is auto-spawned by the statues. Seeing as it does happen from a fixed distance around a certain point, I would recommend having 3 miscellaneous edits for the shooter: 1) The X coordinate within the combo which the projectile emanates from; 2) The Y coordinate that they emanate from; and 3) The half-side length of a safe zone around said point, which will cause it not to fire if Link's center point is inside that square (default 24). That way, one could still emulate current behavior with a 0 entry for the 3rd misc. that I have listed (and 1 and 2 are obviously already working at least as a hard-coded value, since left and right are different).

08-10-2011, 04:01 AM
Just finished an in-depth study of this. It turns out that my picture above is best interpreted by taking the center of Link's position, which would shift my squares down and right by 8 pixels each. From that, you can see that the safe zones are centered on the mouths of the statues (which are in different places for the two types) and extend 24 pixels in each direction, for a 48x48 (or 49x49, not certain there) pixel safe zone for each.

Just wanted to put it down for future reference.

EDIT: A related note: The NES aiming of the fireballs is not as accurate as ZC's, which means there are places you can stand (outside the safe zones) where a statue will fire at you all day and never hit you. Not sure on the algorithm yet.

EDIT 2: By making a visible shooter enemy, I have discovered that the spawned shooter enemies are not centered on the statues, but rather on the mouths of them. So, this becomes even easier to fix. As the Shooter enemy is offset from the statue, in the same way is the safe zone. If Link's sprite is anywhere within 16 pixels (one tile) of the shooter enemy, then it will not fire (on the NES).

IOW, if the center point of Link falls inside any of the 48x48 pixel zone which is centered on the shooter enemy, it won't fire. Think of it as a hitbox that is larger than the "monster", and causes no damage if touched.

11-05-2012, 12:31 AM
2.5 is soon to be final. I have a modified version of Saffith's homing fireball script that can mimic the exact behavior (including 16ths of a circle firing angle) of the NES version. Uses ghost.zh.

11-05-2012, 02:02 AM
This actually always bugged me a little so I might take a look at it.

11-06-2012, 08:07 PM
If you do, it's a fairly easy fix via script. I'm sure you've seen Saffith's homing fireball shooter enemy. I can show you my modifications to it if that helps (not that it's that complicated). In my "fix" I just replace the shooter with a scripted one and set the parameters accordingly (the original game can only fire in 1/16's of a revolution, for instance). I had fun playing with that one--1/3 of a revolution results in a funny looking firing arc. :)