Editor, Skilled player (1198)
Joined: 9/27/2008
Posts: 1085
I've been working on a script to do cute things like calculate number of hits for each enemy for you. Been practicing the debugger a bit, but as fancy as such cute things may look, it's little more than convenience. Still, decided to check a few addresses relevant to finding out exits to each room. Results so far: 0561 appears to specify which room you're in 6A00[63 bytes] and 6A3F[63 bytes] holds list of world map destinations. (expecting 63 rooms) 6AFC[252? bytes] and later holds the list of room destinations. The upper six bits of each byte in 6AFC determines destination room; If this is 63, it is presumably an exit to world map. The lower two bits look like from what direction to enter the destination. The meaning of these lower two bits change if the destination is the world map. Obviously, there are more than 63 rooms in the entire game. Whatever these segments may be, part of loading these segments include storing the list of destinations here. I recall discussion about this sort of thing in the heavily glitched runs, though I'm not sure where precisely to look to get at the information. For now, I should sleep. I've been picking at the disassembly of this game for a bit while working on scripts. I've not seen anything exciting in terms of fairy glitching in palaces, at least, what few rooms I looked at. A small script, for some start into checking out the exits
Joined: 9/12/2012
Posts: 17
P5 has the block room, I'm not sure you could use it for anything
This will take you back to the entrance of P1. I doubt it would save time, but you could possibly backtrack to here and go to P1 after beating the boss and getting the whistle. I'm not sure how the crystal placement will interact with that though. Something to consider in P4 as a possible alternate route. Go to maze island and go straight to the palace. Get the boots first and then go back to the pit and fall down. Instead of going left, go right. You can use the bubble there to get above the wall on the right side with help from the Jump spell. Walking off the screen there dumps you back on the world map on the palace like you left it normally. You'd also be able to get a key and you can pick up the kid on the way off maze island. Again, no idea if it would be faster to do that than get the boots after Carock and up+a.
Arc
Editor, Experienced player (814)
Joined: 3/8/2004
Posts: 534
Location: Arizona
Inzult wrote:
I'm pretty sure all towns in east hyrule lead to the ocean. It's been a long, long time since I looked at the East, though.
I checked to be sure, and I got the same result. So the warps that work are: -Rauru warps to King's Tomb. -Mido warps to Bagu. -Saria warps to South Saria. So, nothing useful except Rauru.
Inzult wrote:
P4 looks interesting. It looks like you can get on some ceiling and take some non-exits where I can't guess where they might go.
solairflaire wrote:
Something to consider in P4 as a possible alternate route. ... Walking off the screen there dumps you back on the world map on the palace like you left it normally.
The P4 exit is a clever idea, but it would take about 4000 frames. I think that the only benefit would be no wait at the crystal, and we might need the experience from the crystal anyway. I tried the same idea in the identical type of room above the crystal, hoping it would drop me right on the crystal so we could skip Carock/Reflect. But that screen also takes you out of the palace. So, P4 disappointed. Whatever you do in P4, the game is just like, "heheh, nice try but nope."
solairflaire wrote:
I doubt it would save time, but you could possibly backtrack to here [P5 blocks] and go to P1 after beating the boss and getting the whistle.
Warping from P2 to P1 looks like it would take too long, and P5 to P1 wouldn't be beneficial. Unfortunate, because it would be cool to show that warp off.
Inzult wrote:
P3 has the block room, which should take you back to the entrance, and the elevator room, with the stalfos knight, which should basically just be able to skip the elevator.
The P3 elevator skip should be useful. It changes the keys, but it still works out. However, I would have to get a magic jar instead of a p-bag at the red ironknuckle. Unless we somehow have Magic-5 already at this point, which would change things. But we need Magic-5 in P4 for sure, and losing out on that p-bag could be a problem for that objective.
Inzult wrote:
P6 Maybe you can skip a couple of rooms, but certainly the ra/block room, after the fall if your magic is high enough
This one looks pretty sweet, but I'm not sure which way is better. I could fairy through the first door, die, skip both rooms, and die again. Or I could fairy through the first door, skip the block room, and die. (Edited)
Inzult wrote:
I was referring to the T-Bird skip, you need to cast Jump, then fairy twice with perhaps only an opportunity for a blue jar. I tend to look at the end state and work backwards. A good finish needs ?-6-1.
You're right, we need to end with Magic-6. I still think 5 magic containers can work. A hidden benefit is that we would have faster crystal refills. I think that I'm ready to create a screen-by-screen travel plan, and then I can try to figure out how to make the experience math add up.
FatRatKnight wrote:
A small script, for some start into checking out the exits
I'll take any advantage I can get.
Editor, Skilled player (1198)
Joined: 9/27/2008
Posts: 1085
I've taken a slightly closer look at the exits. I've got this much to say: Function at 07:CCB3 is what throws you at the "proper" coordinates in the world map. It uses a value at address 0748 to pick an overworld coordinates. 0748 appears to be set up when entering a town, palace, cave, or other such side-scrolling place. Whatever that value, exits can add as much as +3 to that, so there are up to four possible coordinates to choose from. It's a matter of finding an unintended exit. 6A00 (63 bytes) stores the Y coordinates, and 6A3F (63 bytes) has the X coordinates. Actually, there's a small amount of bit-packed information, and the coordinates take the lower 7 bits (Y) or lower 6 bits (X) of the bytes they occupy. So the actual ranges are 0-127 and 0-63. EDIT: Mind, I do see some special casing code for when one coordinate is 0. Actually, I probably should put together a bunch of notes rather than just looking at this and giving my general impressions of these exits. There are three worlds: The main zone you start in, the zone where the raft takes you, and then the combined zones of Death Mountain and the Maze. All transitions of these zones take place in the overworld, to my knowledge. All exits from side scrolling areas will never lead to a different zone, so to bypass the raft, you must get to Death Mountain then glitch an exit that leads to the Maze. Which world you're in is at address 0706. Currently trying to make scripts to help determine these exits at a glance rather than having to take them yourself. Problem is that the overworld coordinates aren't loaded at 6A00 until after you take an exit (of a palace or town, that is. The caves keep the overworld coordinates loaded). Anyway, it seems I'm getting pretty close to having something that should help speed up routing. I'll hand the script over once its ready. I probably should also hand over my WIP Zelda II HUD script, too. It's a mess, but it's my mess. EDIT2: I shall leave you with this. Assuming it's possible to abuse new exits, this should give you the information very quickly if the room, or even the area, is worth glitching. There's still some more things to dig up, but any progress might help, I should hope.
Arc
Editor, Experienced player (814)
Joined: 3/8/2004
Posts: 534
Location: Arizona
FatRatKnight wrote:
EDIT2: I shall leave you with this. Assuming it's possible to abuse new exits, this should give you the information very quickly if the room, or even the area, is worth glitching. There's still some more things to dig up, but any progress might help, I should hope.
I checked it out, it's pretty cool. I tried out a few more exit ideas, but I didn't find anything new. I'll continue to look. I've been planning the experience route, and here's the outline of what I've come up with: -I'm doing it with only 5 Magic Containers (picking up the one on Maze Island). -I looked into going extremely Magic heavy when leveling, but there's no need. We already get Magic-5 before P4. All we need is Magic-5 before P4 and Magic-6 before the end. -I can still get Attack-2 and Magic-2 in DM. -P1 & P2 don't change. -Edit: Actually I'm going to have to change things here. Come out of DM with 1-3-1 and then get the Attack-2 in P1. Then P2 is the same; come out with Attack-3 and Magic-4. -P3 is the area that took all of the studying because of the elevator skip possibilities. Unfortunately, the math works out that no elevator skip method is worthwhile in the long run. We know that the red ironknuckle in P4 is a huge bottleneck point in the current run; it's essential to get a red jar drop there. Well, the red ironknuckle in P3 is also a huge bottleneck point. He has to drop a p-bag so that we have enough XP to get to Magic-5. If I used an elevator skip, I would need him to drop a red jar instead, and we'd be stuck on Magic-4. So we end P3 with Attack-3 and Magic-5 again. -However, the second half changes. The absence of some enemies and Thunderbird means that Attack barely matters now. The only fights of significance are Gooma, Rebonack II, and Volvagia (and possibly two red ironknuckles). Therefore, I have the radical idea of finishing with Attack-3 and Magic-6. The initial math looks better than either Attack-4 or Attack-5, unless Gooma and/or Volvagia take much longer than expected. If so, I can go back and get Attack-4. But the new leveling plan should be: P4 Crystal - Attack 4 Cancel (1000) Restart (0) P5 Crystal - Attack 4 Cancel (1000) (XP will be at 850 after killing Gooma.) P6 Crystal - Magic 6 (2200) Killing Reb & Volv will take me to 2001 XP, but I don't need to kill any other enemies, except the skeleton for a jar drop. So there shouldn't be an extra Attack Cancel (29 frames). -I'll skip either one or two screens in P6 with the fairy glitch. I'll figure that out when I get there. Edit: Skipping both screens looks better right now. -I think I'll wait to get Jump until the last restart since the only use for it is at the very end. -Edit: The only places in the run where I need to kill small enemies are Death Mountain (experience), Island Palace (experience), and the Great Palace (jar drop). I'm ready to start playing. This run should take much less time to finish than the warpless one.
Active player (434)
Joined: 9/27/2004
Posts: 650
Location: Canada
notes: jump saves time for getting downstab. it is, of course, possible to beat the game without downstab. i've never timed it because i'm not a Crazy Person, but yeah. jump after hammer. based on quickmath, level 3 sword should save ~70 frames over level 4 sword. Subtracting one accept and adding two cancels saves 120, adds 8 hits to gooma and 16 to barba. unless my brain is forgetting how much health bosses have.
Kung_Knut
He/Him
Joined: 8/10/2016
Posts: 85
Location: Sweden
So I know this wont be a popular opinion, but I thought I'd at least state it for you magic people (TASers) to consider: I know the "no warps" branch already exists (and is frankly fucking awesome), but with the new "warps" branch being created (and depending on its actual outcome), I think that some "legacy rules" of the "no warps" branch for a hypothetical FUTURE improvement MIGHT be worth considering in order to differentiate the runs more from one another, even if it means that an improvement is slower. Here is an incomplete list, not necessarily reflecting my own opinions: 1) Disallow using the roof for "visual" wrong warps (palace 4 and the "dead end" room of the 7th palace). 2) Disallow using map enemies to skip mandatory encounter tiles. 3) Disallow using fairy to skip doors. 4) Disallow using Up+A warps. My opinion is that my opinion does not matter, but that yours (actual TASers) do. EDIT: Clarified branch names as per Samsara's comment below.
Samsara
She/They
Senior Judge, Site Admin, Expert player (2108)
Joined: 11/13/2006
Posts: 2821
Location: Northern California
Published run is supposed to be "warpless". This is any%. Despite helping to narrow down the categories to something easy to understand, I wasn't consulted at all about the branch name when publication happened, and the branch was left off despite the fact that it was specifically submitted as warpless.
TASvideos Admin and acting Senior Judge 💙 Currently unable to dedicate a lot of time to the site, taking care of family. Now infrequently posting on Bluesky
warmCabin wrote:
You shouldn't need a degree in computer science to get into this hobby.
Arc
Editor, Experienced player (814)
Joined: 3/8/2004
Posts: 534
Location: Arizona
Inzult wrote:
notes: jump saves time for getting downstab. it is, of course, possible to beat the game without downstab. i've never timed it because i'm not a Crazy Person, but yeah. jump after hammer. based on quickmath, level 3 sword should save ~70 frames over level 4 sword.
Ohhhhh, right, forgot about the backtracking. How do you get through the end of P3 without downstab? My quickmath also came up with about 70 frames.
Kung Knut wrote:
improvement is slower.
Sorry, no. Why would you want to arbitrarily take out the interesting time-saving tricks that require strategic planning in favor of more walking? Less entertaining, less technical skill. It goes against the nature of TASing. If you want a longer movie, a 100% run is the proper way to accomplish it (as a 4th branch). I support the Samsara classification system. -Warpless = 45 min -Any% = 35? min -Warp glitch = 5 min But ultimately I don't care what you call them, as long as there are 3 branches.
Kung_Knut
He/Him
Joined: 8/10/2016
Posts: 85
Location: Sweden
Arc wrote:
Why would you want to arbitrarily take out the interesting time-saving tricks that require strategic planning in favor of more walking? Less entertaining, less technical skill. It goes against the nature of TASing.
Two reasons: 1) As I stated, to make the branches more different. 2) Because the "no warps" branch has at least 4 types of warps in it (listed in my post above). What you refer to as "interesting time-saving tricks" should not be defended against arbitrarily being taken OUT, they should instead be motivated (legacy reasons aside) for currently being arbitrarily taken IN. I just want to question this in order to see good motivation for keeping them, precisely because they may be considered to be "WARP glitches" in a "NO WARPS" run. Also, a longer run showing more of the game is not necessarily less entertaining. (And no, my personal opinion is not to disallow any of them, but for the wrong reason (them being cool).)
Active player (434)
Joined: 9/27/2004
Posts: 650
Location: Canada
Arc wrote:
How do you get through the end of P3 without downstab?
From below, you can beak a block above/in front of you with a jumping standing stab since the sword's hitbox is slightly too high.
Arc
Editor, Experienced player (814)
Joined: 3/8/2004
Posts: 534
Location: Arizona
Kung Knut wrote:
I just want to question this in order to see good motivation for keeping them, precisely because they may be considered to be "WARP glitches" in a "NO WARPS" run.
A "warp" or "wrong warp" in Zelda II is when an exit takes Link somewhere other than where that exit is supposed exit into. The three warp glitches in the new run all follow the same rule. -With the healer glitch, Link is supposed to exit outside the healer's house, but instead he exits into Glitch Town. -With the encounter glitch, Link is supposed to exit to the tile from which he entered, but instead he exits on the opposite side. -With the fairy glitch, Link is supposed to exit to the room above, but instead he exits to the room below or to the right (or elsewhere). The four things you mentioned are not warps. -When we walk on the ceiling, we exit to the right like normal, just from a higher Y-axis position. The game correctly exits into the screen that is to the right. -The random battle occurs before reaching the encounter tile. After reaching the exit of the random battle, the game correctly exits into the next tile onto which Link was stepping. There's no warp; we just don't trigger the encounter tile entry. -Fairying through a door is a basic feature of the game and doesn't warp anywhere. -Up+A restarts the game and zeroes the counts. It has nothing to do with unintended exits. The new movie will be plenty different.
Inzult wrote:
From below, you can beak a block above/in front of you with a jumping standing stab since the sword's hitbox is slightly too high.
Downstabless is an interesting challenge, like the Zelda swordless challenge. I am fairly sure it's not faster, though. You start off about 1450 frames ahead, but after fighting 36 large enemies and 6 bosses without downstab, you're probably way behind.
Editor, Skilled player (1198)
Joined: 9/27/2008
Posts: 1085
I'm now poking at the RNG. So far, it looks like two things affect it: Frames passed, and the moment you enter a side-scrolling screen (world -> side or side -> side both trigger it). RNG is a standard shift RNG. It takes an XOR of bit #$02 in addresses $051A and $051B, and the result is shifted into $051A. The RNG is then extended to take up 9 bytes (051A - 0522), with each bit shifted out of the previous address going into the next. This happens once per frame in most cases. The nine bytes are for separate enemies and overworld monster pathing. The other time the RNG is affected is when entering any side scrolling screen. Theoretically, this means you can affect the RNG by adjusting which frame you enter the last side scrolling area. You can, of course, delay your exit to the world map, but you can also delay the moment you've last entered the side scrolling screen. Or last two times, as the effects of that time should still be present in $051B when overwriting $051A with #$A5. Basically any combination of screen delays might help. RNG is not adjusted when enemies "think", which is another usual thing games tend to do (no breakpoint trigger). So at least I won't have to worry about that if generating a predicting script. I've taken a look at the enemy spawn algorithm. If no one minds me dumping 77 lines of assembly, I'll post it here (ROM address 0002B3, including the .nes header). Two timers are used, each independently triggering a spawn. One is based on a global timer at $0500, and ticks down $0516 every time it hits zero. Once $0516 is zero, it will remain there until you're over spawning terrain, at which point stuff spawns and $0516 resets based on the terrain. The other timer is at $0026, which will always increment. When it overflows and returns to zero, a spawn may trigger. If you're not over terrain where a spawn will occur, $0026 just keeps running without triggering anything. What spawns and where they spawn is RNG based, of course. There are four possible groups, and four possible directions to omit an encounter. I can probably generate a predicting script, given some time, though it'll have to predict something about 671 RNG rolls away at times. The "what" depends on $051B and the terrain you're on, and the "where" depends on $051C and whether the 8 encounter slots are getting full. The global timer means that you essentially have a frame rule when leaving a side scrolling area to the world map, RNG-wise. Each frame you wait is a frame that global timer is passing anyway, and will trigger the spawn at exactly the same time, and thus the same RNG. The effect on the RNG when entering a side-scrolling area, however, should adjust the RNG differently when you exit to the world map out the other side. Seems you might have needed this info while on your prior run. Still, now we have some RNG info. If this has been looked into before, I must admit I'm not good at tracking down info over the internet.
Arc
Editor, Experienced player (814)
Joined: 3/8/2004
Posts: 534
Location: Arizona
There is a lot of overworld manipulation in the warpless run, and that's the primary reason that it was so time-consuming and technically challenging. What was particularly challenging was the Reflect Trek, because it has around 15 consecutive screens that change based on the timing of the preceding screens. And at the same time, I had a central goal of trying to spawn fairies at the traps. So if you could predict 'if your timing is X on this screen and Y on this screen and so on, you will get perfect fairy spawns at 3 of the 4 traps,' then you would be a demigod. http://tasvideos.org/userfiles/info/34043331593918099 Here is the first WIP of the warps movie. Compared to the warpless movie, even though they are not competing, this run gets to the hammer about 3:04 earlier. And I will save an additional 0:48 since I'm skipping the Death Mountain magic container. I believe that I have found the optimal way to perform the encounter glitch. If you're wondering why I did it only on the first bridge screen, the reason is that it's not possible to do it on the second bridge. The right exit of the second bridge doesn't lead to an overworld exit; the bridge is two connected sidescrolling screens. The glitch works only on a side with an overworld exit. Also, I needed the experience from the small enemy on the bridge anyway. Edit: I forgot to mention that there's a fairly easy way for real-time speedrunners to do the encounter glitch. Not the way I do it here, but by switching from holding right to holding left on the correct frame. Is it possible to kill the second octorok without slowing down? I didn't find a way. I improved the daira fights by a few frames. In the warpless movie, it didn't matter though, because the death cycle would negate those gains. So I didn't lose any frames in warpless. But in this movie, it needs to be perfect. I realized that I had a choice between leveling to 2-2-1 or 1-3-1, because I can get to 2-3-1 in the Water of Life cave and then go to P2 instead of P1. The routes seem to yield almost identical timing over the long-term. I'm going to go with the 2-2-1 method. I suspect it may be slightly faster. It also creates more differences between the warpless and warps movies. It gives me the freedom to delay P1 until any time before the last restart, and we may find a use for that option later. And it is easier for me to do, because I will go through P1 at 3-5-1 instead of 1-3-1. Edit: Disregard. 1-3-1 is faster.
Editor, Skilled player (1198)
Joined: 9/27/2008
Posts: 1085
Welcome the next script version. Snap, it just occurred to me... There are effectively 128 possibilities with the RNG every time it resets. And it resets every time you get into a side scrolling screen. The interaction with the global timer messes things up, however, bringing the total possibilities to 2688 upon screen entry. Still, that's a small enough number to be very encouraging. Seems important enough for the script to track this. For anything independent of the global timer, you have just the 128 possibilities. The more important spawning, on the other hand, does depend on the global timer, so that gets us stuck with the 2688. Still, I have an idea on the spawning. After the spawn, we still need to figure out the path our fairies will take. Wouldn't help one bit if, after spawning, they immediately leave the area and far away from the trap. There are six possible terrain types where things can spawn. There's a table for the chances of which group to spawn:
00 60 B0 D0  37.5% 31.3% 12.5% 18.8%  Grass
00 60 D0 F0  37.5% 43.8% 12.5%  6.3%  Desert
00 60 C0 E0  37.5% 37.5% 12.5% 12.5%  Forest
00 50 BB F0  31.3% 41.8% 20.7%  6.5%  Swamp
00 57 D7 F8  34.0% 50.0% 12.9%  3.1%  Grave
00 57 D7 FF  34.0% 50.0% 15.6%  0.4%  Lava
The group that contains fairies is the last group. I suspect the lava terrain has the 0.4% up there. A fairy spawn would be really interesting there, assuming there isn't something coded I didn't trip over. I also analyzed the group pathing. The overview is: * Only make new decision if Area Timer ($0012) is multiple of #$10 (16) * If it's a fairy, pick random direction * If the Area Timer is less than #$40 (00 10 20 30), pick random direction * If aligned "close enough" vertically or horizontally with player, approach * Otherwise, pick random direction The definition of "approach" seems to mess up when the group is just north or just south of Link, as being that close means they'll preferentially move west or east before moving north or south. The Area Timer resets when you enter a side-scrolling screen. Much earlier than when the first byte of RNG is reset, something like 37 frames, but in any case, that's when the timer resets. Since it is reset to a constant relative to when the RNG resets, it doesn't expand the 2688 possibilities. Whew, close one! Anyway, it is clear that not only do you need a fairy spawn, but it needs to fly in directions that will ultimately get it to the trap you want to skip at the right time. They fly randomly without respect of Link's position, unlike the other encounters, which makes them more difficult to time appropriately. It looks like I have all the information needed to make the prediction. Coming from the maze to get that Reflect spell looks plain chaotic with all the encounters popping up, but you only need one encounter coming back out from the town to the next trap. Only 2688 possibilities to test. One last thing. Generating encounters with the global timer while over grass resets the timer to 32. Generating while over forest or deserts reset the timer to 24. It's one more form of adjusting encounters in that long trip to Reflect.
Joined: 9/12/2012
Posts: 17
Is it possible to kill the second octorok without slowing down? I didn't find a way.
Doesn't the sword beam have a higher hitbox than the sword? Could you miss the octorok below it and hit it with the sword beam? What happens if you do the encounter glitch in glitch town since it has exits on both sides?
Editor, Skilled player (1198)
Joined: 9/27/2008
Posts: 1085
f072846 RNG Reset: r[2]=  0 gTimer=13
f074905 RNG Reset: r[2]= 98 gTimer= 0   1966
f076947 RNG Reset: r[2]=107 gTimer= 2   1930
Frame 72846, you're fresh from a game restart, which seems to force a static RNG (R[2] == 0) and global timer. At this point you'll only visit two screens and this limits your degrees of freedom. Number of RNG calls are 1966 to first transition and 1930 more to the second. Frame 78640, your trek past the bridge gives lots of spawns. Spawns made: * f78796 - Global timer. 1746 calls * f78904 - Step timer. 1849 calls (1f delay) * f79162 - Step timer. 2107 calls (2f delay) * f79305 - Global timer. 2250 calls You end up using a spawn from the step timer, but it looks like it could just as easily been from the global timer. The step timer gives more freedom, since you basically choose the frame to spawn it rather than the 21-frame global timer. Now, the requirements for a trap fairy skip are as follows: * Fairy must be generated * Formation must not exclude west group (south looks good, except the only formation with fairies have them east and west) * Random pathing must be appropriate to land where you need it when it is needed I will assume the enemies you kill in the various screens must be killed and can't be killed any faster. Global timer is 7 at the last screen transition. So of the 147 - 167 range, you're at 154 frames to first spawn. Area timer begins at 0x5C. Fairy spawns at the step timer can happen with minor variance, but I have detected a problem with where the step timer zeroes out in your run. A fairy has to travel 10 steps west, but the longest string of repeated steps my script was able to calculate was only 8. It's not just unfeasable to expect a fairy to travel there from the forest where the step spawn takes place, but likely completely impossible from RNG limitations (allowing for, say, one or two steps south in between all the west steps). So, the only spawn important, then, would be the global timer spawn. This happens on the desert, where spawns appear further away, but with a lower chance of a fairy. You can also wait several frames to spawn in a forest, but the increased distance to the trap makes things less likely than they already are, so I'll go for the desert spawn. We do have one problem with predicting movement: It's not the RNG alone that determines it, but also what slot the important fairy is generated in. There are eight slots, and the bottom slots are filled first. Regardless of which direction is omitted, the west position occupies the third available slot from the bottom. The groups that go off-screen before the next spawns will affect which slots are available when the fairy spawns, and therefore the directions it will go. Prediction of that will be more difficult. So, we have two screen transitions where the r[1] is reset. With well-defined constraints, I wrote up a script to give us likely candidates within 30 frames. What follows is my script output. t1 = Frames to delay on entering that cave t2 = Frames to delay on falling into that child rescue zone
t1 t2
00 12 r[2]= 57 gTimer=11 |^^^>^v<^v . ^>>>v>>vv . >^^^>^v<^|
00 19 r[2]=127 gTimer= 4 |^v<<^><<v . ^<>v><^vv . <^v<<^><<|
00 22 r[2]= 79 gTimer= 1 |>v>>^>^v> . v<v>v^<>< . v>v>>^>^v|
01 03 r[2]=105 gTimer=19 |><^>^<vvv . <^><<^>>< . v><^>^<vv|
02 02 r[2]= 64 gTimer=19 |>><v><<v^ . <vv><^vvv . v>><v><<v|
02 25 r[2]= 76 gTimer=17 |^<<><^>v> . <<<^<^<v> . >^<<><^>v|
03 13 r[2]= 79 gTimer= 7 |v>>^>^v>< . <v>v^<><> . >v>>^>^v>|
03 14 r[2]= 39 gTimer= 6 |><v<>><>v . ><<vv<<>v . ^><v<>><>|
03 15 r[2]= 19 gTimer= 5 |<><<>v<v< . v<v^vv>>^ . ^<><<>v<v|
04 23 r[2]=101 gTimer=17 |^>^vv^^v< . <>^v<^^>^ . >^>^vv^^v|
05 14 r[2]= 68 gTimer= 4 |>v>vv><>v . v<^>><><> . <>v>vv><>|
06 03 r[2]= 43 gTimer=14 |<<>>v<<^v . ^vvvvv<v< . ><<>>v<<^|
06 19 r[2]=  2 gTimer=19 |>>^v^vv<v . <v>^vv>^< . ^>>^v^vv<|
07 13 r[2]= 58 gTimer= 3 |>v^v><<^< . ^^^^v>v^v . ^>v^v><<^|
07 22 r[2]=109 gTimer=15 |<>v<v^<<v . ^^v>>^vv< . <<>v<v^<<|
08 05 r[2]= 99 gTimer=10 |^^><<>^>v . >>>vv>^<> . v^^><<>^>|
08 06 r[2]= 49 gTimer= 9 |v>^^vvv^v . >>><<>v^v . vv>^^vvv^|
11 16 r[2]= 72 gTimer=17 |v<vv^><<^ . ^<v>>>v>^ . >v<vv^><<|
11 19 r[2]=105 gTimer=14 |<^>^<vvvv . ^><<^>><v . ><^>^<vvv|
12 11 r[2]= 34 gTimer= 0 |<>>>><>>< . >><>v^v>^ . v<>>>><>>|
14 08 r[2]=112 gTimer= 1 |<<^^vvv<v . v><><>v<< . ><<^^vvv<|
16 08 r[2]=  2 gTimer=20 |>>^v^vv<v . <v>^vv>^< . ^>>^v^vv<|
16 10 r[2]= 64 gTimer=18 |>><v><<v^ . <vv><^vvv . v>><v><<v|
20 06 r[2]= 18 gTimer=18 |><v<vv^^> . ^vv>v>v^> . >><v<vv^^|
21 02 r[2]= 57 gTimer= 0 |>^^^>^v<^ . ^^>>>v>>v . <>^^^>^v<|
24 00 r[2]= 34 gTimer=20 |<>>>><>>< . >><>v^v>^ . v<>>>><>>|
28 02 r[2]= 47 gTimer=14 |<vvv<>v>v . ^<<^<<^<v . <<vvv<>v>|
29 00 r[2]= 39 gTimer=15 |><v<>><>v . ><<vv<<>v . ^><v<>><>|
r[2] and gTimer would be the RNG factors spit out by my current script when you enter the child rescue zone. The arrows are for whatever is put into slot 0, 1, or 2, which are the likeliest candidates for where our fairy is put into, and will tell us which directions that fairy will fly. We'll want something that largely stays put, except to go one or two steps south. I do have a more full table, where you intentionally delay in 21-frame chunks after the child rescue zone, and what the results of that are. The above table is for 0 to 30 frames of delay before the second transition without that 21-frame chunk delays after the second transition. I haven't checked out how good this table is right now, but I am optimistic, as the first entry in it checks out (but doesn't give a good flying path for our fairy).
Editor, Skilled player (1198)
Joined: 9/27/2008
Posts: 1085
I spawn a fairy. I've also broken some of my own expectations of what constitutes as "good enough amount of information," as I seem to have a slot 5 spawn when my table only accounts for slots 0, 1, and 2, and I waited longer in the overworld for the fairy to get into position. Considering what I've seen, RNG and timer-wise, the run might still sync following the reset after P4. I'm guessing you want to see if I can spawn fairies at will when the lava entry for fairy spawn is FF, giving a theoretical 1/256 chance. EDIT: My search for two consecutive fairies is indicating that it is virtually impossible. After several searches of all 2688 combinations with different allowed enemy step counts, there is exactly one possible 3x east for the west fairy, and this is after 42 frames of delay following the prior fairy encounter. I've tried higher step counts, out to 6, and none of them maintain 3x east. Delays are infeasible for step counts above 3, as without the wait, the north or south group moves randomly. Adding a delay means they make a beeline to Link. To get 3x east: r[2]= 27 gTimer= 8; 42 delay No other RNG/gTimer pair works, every one of the other 2687 possibilities fail, at least in short enough delays. Basically, this means eat the next trap with a normal encounter. Fairy manipulation for two traps in a row is impossible, unless you somehow pull together that exact RNG/gTimer pair while still getting a fairy prior to that miracle. I can make a search, I have one idea to try to see if this miracle is even possible, but I lack optimism, expecting more than 99% chance my search claims it really is impossible, that the RNG simply can't be twisted that far. Okay, with that loss in mind, what about our east fairy going west, on our return trip? Even worse. We'll just say you are not getting two fairies in a row on our way back from town. Well, at least I'm able to detect a decisive failure. The entire RNG/gTimer space is telling us some bad news, and we are not getting more than 2 fairies for our 4 traps. My search could be spotty, but from what I'm seeing, that second fairy in a row will remain nothing more than a dream. That still leaves the lava manipulation. My next investigation leads there to figure out the viability of fairy skips there. I'll see if I can spawn a fairy or if the 1/256 chance is an illusion.
Active player (434)
Joined: 9/27/2004
Posts: 650
Location: Canada
Neat! This is certainly more in-depth than I could or would get with the spawn RNG.
Editor, Skilled player (1198)
Joined: 9/27/2008
Posts: 1085
Didn't expect a post 14 minutes before my edit. We're not getting two fairies in a row during the Reflect Trek, as detailed in my edit, but at least we'll know further effort in looking isn't likely to help.
Arc
Editor, Experienced player (814)
Joined: 3/8/2004
Posts: 534
Location: Arizona
FatRatKnight wrote:
I spawn a fairy. Considering what I've seen, RNG and timer-wise, the run might still sync following the reset after P4. I'm guessing you want to see if I can spawn fairies at will when the lava entry for fairy spawn is FF, giving a theoretical 1/256 chance.
The work you're doing here is super impressive. I see your edit about a maximum of 2/4 fairies. Can you continue and verify that you can get a good second fairy on the way out of Darunia? A fairy at a Valley of Death trap would be a marvel. It sounds like getting two in a row is likely impossible, but the third Valley of Death trap is separated from the first two by the caves. So perhaps there is a minuscule possibility of getting fairies at either the first or second Valley of Death trap and then also at the third trap.
solairflaire wrote:
Doesn't the sword beam have a higher hitbox than the sword? Could you miss the octorok below it and hit it with the sword beam? What happens if you do the encounter glitch in glitch town since it has exits on both sides?
I can't get underneath the octorok. Trying to go low stabs it with the sword. And it doesn't jump high enough to swordbeam high. So the only option is the frontal attack, but there's not enough space to get in an attack without slowdown. The encounter glitch works only on an exit of a two-sided encounter tile. It doesn't do anything at towns, dungeons, or caves.
Editor, Skilled player (1198)
Joined: 9/27/2008
Posts: 1085
I spawn a second fairy in the Reflect Trek. I really should have looked if the rest of the trek goes fine, but I have other things I need to work on. So I manually tried the next few of my fairy spawn list for the first fairy on the way to town. Yes, much faster than my concept trial. I'll keep this, as delays appear particularly minimal. The entry I tried is the fifth one in the list, with 2 frames at cave and 2 frames at child. Well, 2 frames more delayed than your TAS, anyway. The next trap is dealt with by using a normal encounter. TAS-kill two enemies as well. The next step, then, is to figure out which RNGs and gTimers I can use that won't cause any delay to the next fairy spawn. At the point I leave town, I can spare 5 frames, with gTimer 15 down to gTimer 10. When I exit, if I leave later than gTimer 0, we're stuck waiting 21 frames for the next group. So, I constrain my search as such. I got this list:
gT=15 R[2]= 48
gT=15 R[2]= 50
gT=15 R[2]= 52
gT=15 R[2]= 54
gT=15 R[2]=113
gT=15 R[2]=115
gT=15 R[2]=117
gT=15 R[2]=119
gT=14 R[2]= 52
gT=14 R[2]= 53
gT=14 R[2]= 54
gT=14 R[2]= 55
gT=14 R[2]=112
gT=14 R[2]=113
gT=14 R[2]=114
gT=14 R[2]=115
gT=13 R[2]= 20
gT=13 R[2]= 21
gT=13 R[2]= 54
gT=13 R[2]= 55
gT=13 R[2]=114
gT=13 R[2]=115
gT=12 R[2]=  4
gT=12 R[2]= 21
gT=12 R[2]= 55
gT=12 R[2]= 65
gT=12 R[2]= 80
gT=12 R[2]= 99
gT=11 R[2]= 12
gT=11 R[2]= 38
gT=11 R[2]= 73
gT=11 R[2]= 99
gT=10 R[2]= 34
gT=10 R[2]= 55
gT=10 R[2]= 77
gT=10 R[2]= 88
All of these spawn an east fairy. I have not constrained for path, I will check those manually. Once I knew which numbers were available to me, I created a lua table to hold them, then tried some interesting scripting to find the possible frame delays. This is the script:
Language: lua

local PassTable={ [0]={[48]=true,[50]=true,[52]=true,[54]=true,[113]=true,[115]=true,[117]=true,[119]=true}, {[52]=true,[53]=true,[54]=true,[55]=true,[112]=true,[113]=true,[114]=true,[115]=true}, {[20]=true,[21]=true,[54]=true,[55]=true,[114]=true,[115]=true}, {[4]=true,[21]=true,[55]=true,[65]=true,[80]=true,[99]=true}, {[12]=true,[38]=true,[73]=true,[99]=true}, {[34]=true,[55]=true,[77]=true,[88]=true} } --***************************************************************************** local function RecursionOverhead(T,FrameLim,r2) --***************************************************************************** local RNG_main= {0xA5,r2*2} local Path= {} --************************************************************************* local function RecursiveScreenCheck(T,n,fl,r) --************************************************************************* --Yes, defining a function inside another. I say, lua is sure fun! if not T[n] then --This part is to terminate our recursive loop. local s= "" for i= 1, #Path do --Identify our frame delays. s= s .. " " .. Path[i] end local val= math.floor(r[2]/2) s= s .. " : " .. val if PassTable[FrameLim-fl][val] then s= s .. " PASS" end print(s) return end --Oh, we're not at the end. Calculate things, then. local RNG= {unpack(r)} --Preserve higher tier RNG RNG[1]= 0xA5 --Screen transitions reset R[1]. Roll(RNG,T[n]-1) --Pass however long it takes us to go. for i= 0, fl do Roll(RNG) --Every frame we delay, add a roll. Path[n]= i --Keep track of which screens have our delay RecursiveScreenCheck(T,n+1,fl-i,RNG) end end --Function RecursiveScreenCheck(T,1,FrameLim,RNG_main) end local Transitions= {453,705,705,367,370,1074,364} RecursionOverhead(Transitions,5,115)
Okay, complicated scripting aside, this thing's output? Well, all the passes are:
 2 0 0 0 0 1 0: 55
 0 0 0 1 1 0 1: 80
 0 0 1 0 1 0 1: 80
 0 1 0 0 3 0 0: 12
 0 2 1 0 1 0 0: 12
 0 0 1 0 0 1 2: 38
 2 0 0 0 0 0 2: 38
 0 0 1 1 0 1 1: 99
 1 2 0 0 0 0 2: 34
 0 0 1 0 1 1 2: 55
 0 1 1 0 2 1 0: 55
 2 1 0 0 0 2 0: 55
 0 1 0 2 0 0 2: 77
 0 1 1 0 2 0 1: 77
 0 2 0 1 0 0 2: 77
 0 4 0 0 0 0 1: 77
 0 1 0 0 0 2 2: 88
 2 0 0 0 1 2 0: 88
 2 0 1 2 0 0 0: 88
The single-digit numbers are the frame delays for each transition. The two-digit values on the right are R[2]. The script spat out all the fails, too, which I wanted to see in case there were mistakes. The passes look encouraging. Time to trim things down some more. There are multiple ways to get the same R[2] and gTimer pair, so it would be pointless to bother with these duplicates. My list is now this short:
gT=12 R[2]= 55
gT=12 R[2]= 80
gT=11 R[2]= 12
gT=11 R[2]= 38
gT=11 R[2]= 99
gT=10 R[2]= 34
gT=10 R[2]= 55
gT=10 R[2]= 77
gT=10 R[2]= 88
Small enough to manually check them all. I did a direct memory edit to skip some movie tweaking, then when I found one I liked, picked the set of delays that got me the RNG, and created the input file. I took 1 2 0 0 0 0 2, delaying town entry by 1 frame, its first screen exit by 2 frames, and delaying exiting the Reflect building by 2 frames. I was left with a gTimer of 10 and R[2] of 34. Sure enough, the run matched my memory edit, and I got a lovely fairy spawn. If the encounters after my movie don't behave, try delaying when you trigger the approaching encounter and see if that helps. You probably already know this at this point, but I figure it wouldn't hurt to have a reminder.
Arc
Editor, Experienced player (814)
Joined: 3/8/2004
Posts: 534
Location: Arizona
That's amazing. I used the new file with the 2 fairies and continued east to the Maze. I lost a few frames because of the changes in the enemy patterns, but I'm content with anything that works at all in that part. I edited all of the RNG parts without much difficulty. I got very easy spawns at the wizzrobes and Carock. As expected, after the restart at the Boots, everything syncs perfectly, including Dark Link. The 2 fairies saved a net of 256 frames / 4.2 seconds. (Increasing the total savings over the previous movie from 407 to 663 frames.) http://tasvideos.org/userfiles/info/34192786141103242 I haven't polished this file for aesthetic presentation, but the frame counts are right. Are you still going for Valley of Death fairies? If not, I'll clean this file up and submit, eventually. Might as well submit the warpless and warps movies at the same time. The warps movie isn't going to take long to make.
Editor, Skilled player (1198)
Joined: 9/27/2008
Posts: 1085
It's still my intent to look through the Valley of Death for whether fairies are viable. I recommend doing some aesthetic polish while waiting for me, starting from when the raft is first used. Good to know a restart really is a complete reset. Only things persistent are things directly related to Link's progress. Anything you fix aesthetically is unlikely to break any attempts I make on the Valley of Death. EDIT: Yes... It is viable. Now I just need to see if we can trigger the encounter on the "road" to Valley of Death on the perfect timing and RNG. Incidentally, there were 17 RNG/gTimer pairs that allowed for zero delay following the road encounter, spawns the first two encounters that omit the west group, and spawns a west fairy somewhere in the Step Timer. 13 of them failed to spawn because none of the 6 prior groups de-spawned off screen, and 2 just flew straight to somewhere unreachable. There may be more possibilities if we allow delays after the road encounter, in chunks of 21 frames.
Arc
Editor, Experienced player (814)
Joined: 3/8/2004
Posts: 534
Location: Arizona
Those are indeed the fairies that dreams are made of. As I recall when I played it, I had only 6 enemy groups to choose from that still gave me a good graveyard/desert encounter. But I didn't try 21 frame delays. If it doesn't work there, there may be greater hope at the third trap, with the 2 caves and 1 overworld screen preceding it. Update to the warps run: I learned that the wizard in Darunia will not teach the Reflect spell unless you have 6 Magic Containers. So, I had to make some revisions. I will grab the easy MC near the start, and then do palaces 1, 2, and 3 in order, like the warpless run. The debate about 2-2-1 vs 1-3-1 was based on having only 4 MCs, and so it was just a big waste of time. I will also have to grab the MC in the Maze before saving the child and going to Darunia. This route is still much faster than getting the MC in Death Mountain. I still cannot use the fairy glitch in P3, because I need Magic-5 in P4. The Maze has to be one of the biggest bottlenecks in gaming history. However, now that we have 6 MCs, we no longer need to level up to Magic-6, but M6 would negate the need to pick up a small jar. So let's see if we can improve the leveling after 3-5-1. The initial plan was (3 cancels, 1 accept): P4 Crystal - Attack 4 Cancel (1000) Restart (0) P5 - Life 2 Cancel (50) P5 Crystal - Attack 4 Cancel (1000) P6 Crystal - Magic 6 (2200) Attack-4 Accept after P4 would force another level later. But another possibility is (4 cancels, 1 accept): P4 Crystal - Attack 4 Cancel (1000) Restart (0) P5 - Life 2 Cancel (50) P5 Crystal - Attack 4 Accept (1000) P6 - Life 2 Cancel (50) P6 Crystal - Attack 5 Cancel (2000) Without Thunderbird, it should be possible to make it through the GP and get a small jar without reaching 2200 XP (M6). But, is it worthwhile? It's time saved on Reb II and Volvagia at Attack-4 instead of 3 (57? frames) vs. 29 frames for LC + 15 frames for jar drop + 3 frames lizardman's flying mace (47 frames). Although it may not be 57 frames, it probably is better to choose the estimate that offers the higher attack. I went back and forth multiple times on the 2-2-1 vs 1-3-1 decision partly because Horsehead took longer than expected at Attack-1. So I think I'll go with 4-5-1 over 3-6-1.