Posts for Bobo_the_King

Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
FatRatKnight wrote:
I've seen a monster cause blindness in World IV, but that's not exactly a nice location to get them. I picked up a list of monsters from a FAQ on GameFAQs, let's see what ctrl+F finds me...
As I see it, the real question is whether it affects your Agl. in all algorithms or just in hit percentage. Hmmm, come to think of it, it probably changes it for all algorithms since the SABER seems to do 1.5 times your Agl. worth of damage. From the way this game is programmed, I'm guessing they liked working with integers a lot more than fractions. That's just a guess, though. Aaaaaaanyway, it ought to save us some luck manipulation with the SAW, so I think I'll go for it.
FatRatKnight wrote:
Even a single ELIXIR should be good enough for us. Those things got 3 uses, so that equates to 15 P-BLASTs, 15 GAZEs, and 15 TELEPORs just for picking up one ELIXIR. This should be plenty, should we find the initial 5 uses for each ability too ineffective.
[whine]Yeah, but they're sooooo out of the way![/whine] I'll see what I can do.
FatRatKnight wrote:
By the way, the RNG values for abilities I was picking out were for a 3-mutant party and seeking out TELEPOR. I was picking only the optimal ones in this case. However, since you clearly have different plans, I'll pull some other RNG values you might want to consider:
Wow! This is the most encouraging post since you showed me your movie synced on my computer! First of all, I didn't even notice that the number you were listing in front of the ability was the slot it goes into. Second, I figured that you had just picked up the P-BLAST that was 7 spots away-- I didn't realize I could get it sooner than you did. I was seriously considering taking a break from this game because I thought I'd have to GAZE everything. With P-BLAST in slot 2, however, I have three RNG values that will replenish it. Speaking of GAZE, can you say a little more about how it works? In particular, you've implied that it doesn't work on undead creatures-- I'd like to know if that's true. I was under the impression that to consistently kill large groups of creatures with GAZE, you need a lot of Mana. Once you reach World 3 or so, enemies have a comparable Mana stat to yours, so the probability of wiping out a large group decreases significantly. I think P-BLAST is the way to go, but I'm interested in how GAZE might be used.
FatRatKnight wrote:
In the meantime, I created a function that tells you what direction an NPC is headed.
Best. TASing. Partner. Ever! I'm consistently blown away by how you find this stuff.
FatRatKnight wrote:
They seem biased towards going northwest...
Now I want to run this game at 1000% speed overnight so I can wake up and see all the villagers huddled in the northwest corner! :D I'm sick of being upstaged by you. You always get the cool RAM discoveries. So I've found my most useful memory address so far: the RNG that determines if you can run or not. It's 0xC323. Here's the associated table and Lua script (copied from you, of course):
local y,n= "Y","N"

local canrun={[0]= n,
--0 1 2 3 4 5 6 7 8 9 A B C D E F
    y,y,y,n,y,n,y,n,y,y,n,y,n,y,y, --0x
  y,y,n,n,n,y,y,n,y,y,y,y,n,n,y,n, --1x
  y,y,y,y,y,y,n,y,y,y,n,n,n,n,n,y, --2x
  y,y,y,n,y,y,n,n,n,y,y,y,n,n,y,y, --3x
  n,y,n,y,n,y,y,y,n,y,y,y,y,n,y,n, --4x
  n,y,y,n,n,n,y,n,n,y,n,n,y,y,n,y, --5x
  n,y,y,y,n,n,n,y,y,y,n,y,n,y,n,n, --6x
  y,y,n,n,y,n,y,n,y,n,y,n,n,y,y,y, --7x
  y,n,n,n,y,n,y,n,y,n,n,y,n,y,n,n, --8x
  n,n,y,y,y,n,n,y,n,n,n,n,y,y,n,y, --9x
  n,n,n,n,n,n,y,n,n,n,y,y,y,y,y,n, --Ax
  n,n,n,y,n,n,y,y,y,n,n,n,y,y,y,n, --Bx
  y,n,y,n,y,n,n,n,y,n,n,n,n,y,n,y, --Cx
  y,n,n,y,y,y,n,y,y,n,y,y,n,n,y,n, --Dx
  y,n,n,n,y,y,y,n,n,n,y,n,y,n,y,y, --Ex
  n,n,y,y,n,y,n,y,n,y,n,y,y,n,n,n  --Fx
--0 1 2 3 4 5 6 7 8 9 A B C D E F
}

--*****************************************************************************
local function showrun()
--*****************************************************************************
    local runRNG= memory.readbyte(0xC323)
    gui.text(63,135,canrun[runRNG])
end

while true do
	showrun()
	emu.frameadvance()
end
Do you seriously make these by hand, or is the process automated somehow? Long streaks of runnable battles (hexadecimal values): 6 in a row-- 20 5 in a row-- AA (and 21) 4 in a row-- 0E, 18, 2F, 7D, and 94 (and 22 and AB) (When I originally searched for streaks of 4 escapable battles, it omitted instances that spanned a line break. It wasn't really a mistake on my part-- I concatenated all the lines and did a search and it still passed right over them. Anyway, I've updated the above list to include all the streaks.) By seeking these values out, we can go long stretches without fighting battles. Chances are very good that running from 6 battles in a row is faster than running from 5 in a row, but if the battles happen to be bunched up near the start of C33B, then it might be faster to run from 5. Given the sparseness of the battles, I doubt it. It appears C323 is always either 3 or 4 greater than C30B, usually 3. I wonder why it's not consistent. Finally, it almost goes without saying that for bosses and inescapable battles, the RNG remains frozen until the battle ends. It isn't rolled or reset or anything funny like that.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
FatRatKnight wrote:
We should be doing over 200 at 99 Mana with a P-BLAST. This is enough to one-shot most World III monsters, if not all of them.
That's odd. Was it your monster's Mana I was looking at? I guess if P-BLAST does 200 damage, that's all that matters.
FatRatKnight wrote:
Mutants can't naturally learn FLARE. Take a look at a previous list or the growth.lua if you wish, it's not even there, let alone any possible RNG values for it.
Stupid me. I saw it discussed in one of the gamefaqs topics and assumed mutants could learn it. Looks like we'll be sticking with P-BLAST. I just did a quick test on the ability shuffling values. The results are interesting and perhaps even a bit disappointing:
C30B|Ab1|Ab2|Ab3|Ab4
----+---+---+---+---
 86 | - | + | + | -
 93 | - | + | - | +
 166| - | /2| + | /2
 243| - | + | - | +

-: Subtracts initial number of uses (bottoms out at 0).
+: Adds initial number of uses.
/2: Divides number of uses by 2, rounding down (adds 1 use if no uses left).
=: Restores number of uses to initial value (not used).
As usual, these results occur immediately following a reset. If, say, I were to reset and the RNG lands on 85, I don't know what would happen to the abilities after winning two battles. The bad news here, if it isn't evident, is that we can't do anything to restore the number of uses to the first ability. It doesn't even divide by 2 so we can turn zero uses into one. But the really bad news is that unless I'm mistaken, both P-BLAST and TELEPOR naturally show up in the first slot. So we would either have to manipulate them out of those slots (I noticed you pointed out a route to learning TELEPOR that takes 15 battles) or manipulate the ability shuffling by fighting more battles. (Only C30B = 86 has a viable bonus immediately preceding it. C30B = 166 has a new ability bonus in front of it, so depending on what slot it displaces, it might also work. The other two values require at least two additional battles to manipulate them.) Our alternative, of course, would be to accept that we can't manipulate the ability in the first slot in any useful way and we really have just five charges of P-BLAST between inns. Hmph. (By the way, Alex Jackson on gamefaqs indicates there is an inconsistency in the initial number of uses, so there's a small chance that the above chart is wrong. I wouldn't count on it, though.) I'm wondering about the ELIXIRs that are strewn about near the end of the game. ELIXIRs would be the only other way to restore abilities, with the obvious bonus of restoring health. It beats going to an inn, but I think most of them are out of the way. It may be faster just to buy them or fastest to skip them entirely. Finally, do you know any monsters that cause blindness? Does blindness carry over after the battle? According to gamefaqs, your Agl. is halved if you don't have blindness. If it persists after battle, it could be worthwhile to blind ourselves. I think we can catch it from ANTLIONs and CRABs in the third section of the tower, so it may not make a difference since we'll already have the SAW by then. Edit: Just tested C30B=85. It produced the same results as C30B=86. Looks like the ability shuffler is on its own RNG and therefore can't be manipulated. Edit 2: Picked up GAZE from C30B=81 and decided to fight a few more battles to see if the abilities shuffled differently. This time they did. Fighting six battles resulted in the pattern - | - | + | +. This indicates the RNG can be manipulated, but I'm not sure it will be worth the trouble. I just ran a quick test again for C30B=165, which puts FLAME in slot 4 (fine by me). Fighting two battles produces /2 | - | /2 | +, so we can use that to get an extra charge in the first slot in case of an emergency. It also seems to indicate that ability learning and ability shuffling use the same RNG. Furthermore, it appears that the RNG is rolled for the slots in reverse order since each time they've shifted to the right. I can't quite make sense of it, but a basic understanding is all we really need.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Yeah, I'm having troubles of my own. BYAK-KO has two main attacks: SWORD and ICE. SWORD does 150-something damage unless I quickly use ARMOR, in which case it still does about 45 damage. ICE is far worse, scoring over 100 HP worth of damage no matter what I do. I tried running around and fighting random battles to screw with the battle RNG, but I can't seem to manipulate BYAK-KO into using SPHERE for three turns-- my only chance of survival. My Mana stands at a paltry 30, so I might be able to win by boosting it. If I boost my Mana, I can survive either SWORD or ICE for one round, but not two. Boosting my HP is another option. With 100 HP and 99 Mana, I could probably win easily. The bottom line, however, is that I'm ill-equipped for this battle and it may be best to call it quits for this run. For the record, I reached BYAK-KO around frame 95,000. I think World 3 is my best performance so far. Your plan looks pretty good, though I'm still not sure about including a monster. It looks like he saves you the most time on P-FROG (which can be OHKO'd with sufficient luck manipulation), SEI-RYU, which only takes two or three turns anyway, and BYAK-KO, for whom it might actually be helpful to bring a monster. Outside of those battles, he's pretty much dead weight, costing perhaps a second or so per battle. I think my biggest discovery so far is that there's a tradeoff between TELEPOR and P-BLAST. You basically need one or the other, but not both. I'm leaning toward a solo mutant run with the following strategy: •Pump Agl. to 48-ish before P-FROG. •Learn P-BLAST on the way to KINGSWD, pump Mana a few more times (up to 30 or so). •Continue pumping Agl. on the way to GEN-BU. •As long as you can OHKO anything, pump both Agl. and Mana throughout World 2 (emphasis should be put on Agl. when possible). When convenient, pump HP. Shuffle abilities periodically to continuously replenish P-BLAST. •Wing it from there. Defense is all but worthless since you only gain 3 per battle and it's very hard to manipulate (I'm not sure, but there should only be two or three RNG values that give you 3 Def.). Advantages over my current strategy: •More Mana makes you more versatile and durable against magic attacks. •Far less luck manipulation. I was hoping that luck manipulation could be done quickly and efficiently. It's not so bad, but it's definitely taking longer than I had intended in some parts. It may be faster to kill a group of enemies than to reset and avoid them. The fastest strategy remains running, however. •P-BLAST can help a lot. This is related to luck manipulation, but it bears special mention. For a prime example, my battle against the steward's cronies took four rounds-- one round to use ARMOR, three more to kill them. Any forced multiple encounters will go much faster and I don't have to luck manipulate out of unforced ones if I don't want to. Disadvantages: •No TELEPOR. That's a biggie. It will cost me the most time in World 1 as I have to trek back from KINGSWD and fight GEN-BU. •More battles. More battles means a more powerful mutant, but it also means more time spent fighting. You're welcome to try any strategy you wish, but I suggest picking a strategy that will contrast with mine. In particular, I'm wondering if TELEPOR saves much time and if BYAK-KO can be efficiently killed without SAW. I've found manipulating NPCs to be very confusing and finicky. I've done it successfully before, but sometimes their motions seem deterministic and sometimes I can just rewind, change my input slightly, and get completely different results. It's worth looking into, but don't drive yourself crazy. As far as I know, that one room in the Underwater Castle and the Floating Castle are the only places where it will make a major difference. We may be able to get it done without explicitly tracking the RNG. I briefly tried the decompiler feature but it made my head spin. I'm a little jealous of people who know how to read something like that. I just checked your run again and discovered you did about 70 damage to SEI-RYU with P-BLAST while your Mana was 48. If I'm not mistaken, that means with 99 Mana, P-BLAST will max out at about 150 damage. If that's the case, I'm wondering if it's really worth it. In particular, IMPs have about 200 HP according to towerreversed, so it will take two P-BLASTS to kill them. I'm going to need to think about this for a little while. On a related note, do you know anything about FLARE? Is it readily available for any RNG values? Does it do more or less damage than P-BLAST? What's so frustrating about this game is that there's no single, clear strategy for speedrunning it! What do we know for sure so far? That we need at least one mutant?
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
You're now over 10,000 frames ahead of me: http://dehacked.2y.net/microstorage.php/info/1193489442/testrun.vbm Plenty of mistakes in this portion of the run. I guessed that it might be possible to manipulate the Old Man into asking for a NEEDLE, so I bought that instead of the BATTLE SWORD. When I got to his island, I found I couldn't change his mind, so I had to go back and pick up the sword anyway. Also, I found I had to fight an ATOMCRAB to throw off the battle RNG. Without doing that, SEI-RYU kills me in the second round with THUNDER. The spell just barely kills me (54 damage out of 51 hit points on my Mutant), so I could compensate for that by devoting just one battle to pumping either HP or Mana; I'm not at all sure which one would help the most in the long run. Killing the ATOMCRAB throws off the queue for my bonuses (the SEI-RYU battle gets me nothing), but it was virtually unavoidable in the game's state as I played it. Finally, I somehow flubbed a reset when I was getting impatient toward the end of the world, so I ended up pumping HP for one battle instead of Agl. It's no big deal, but it strikes me as an exceptionally stupid mistake. I was hoping that I still beat your time from the bottom of the tower to killing SEI-RYU. Nope. You do it in 22,630 frames, I do it in 24,950 frames. I'm a little puzzled by this. Here are the major differences in our runs over that timespan, if I'm not mistaken: •You backtrack to kill a SLIME. •I get the NEEDLE, which is closer than the BATTLE SWORD. •You have better luck manipulating a particular monster to move away from a doorway, allowing you to slip by (I'm interested in how you did that). Aside from those three things (which shouldn't account for 2,000 frames), there are three ongoing, minor differences: your menu manipulation remains crisper than mine, I have lots of idle frames while I manipulate luck, and I think your luck manipulation is better for this section. In regards to luck manipulation, you'll see that I continue to manipulate luck so that the Agl. bonus is next in the queue. That's pointless because I end up running or luck manipulating out of almost every battle. Better luck manipulation (and I wonder if you did this) would be to maximize the number of steps until the next unskippable battle. All the extra battles I fought could add up to 2,000 frames. In any case, I know what I would do differently the next time I attempt it. I may run our movies side by side to see where the time is lost. As you discovered, random encounters occur when C33B hits certain values. I wonder how many different encounter rates are in this game. I thought I saw it listed somewhere, but I could be mistaken. Regardless, once we determine what values trigger an encounter, I can update my Lua script so that we can manipulate luck to minimize the number of encounters. I'm not sure how useful that will actually be, since we really want to minimize the number of encounters we can't run from, which is a nontrivial endeavor. Of course, I'll also update it to list the best frames for boosting other stats. In fact, I have a lot of good ideas for scripting. Well, World 1 was disappointing and World 2 was a series of substantial mistakes. I'm hoping World 3 treats me better. Edit: As you go through World 3, you may be tempted to skip finding Jeanne and go straight to rescuing Milielle. Doesn't work. The WHITEKEY is in the room where Byak-Ko briefs you and if you don't find Jeanne, he's still there. He says, "Don't double-cross me," or something, in case you were curious. Additionally, I've maxed out my Agl., so I found the values of C30B that give the biggest boost to Mana. To boost your Mana by 5 points, C30B should be 23, 137, or 203. To boost it by 4 points, possible values include 6, 28, 31, 43, 61, 88, 100, 138, 142, and 162. I'm going to try not boosting Mana for as long as possible so I can find out if I need to do any grinding at all. One strategy I'm interested in trying is boosting Agl. to 40-50 in World 1, then learning P-BLAST, then boosting Mana to 40 or so, then boosting either of them as convenient. It would require less luck manipulation, less running from battles, and would build a more powerful character sooner. This is once again assuming that TELEPOR doesn't save too much time (with the glider in World 3, I don't expect more than a few seconds to be saved). Edit 2: I've been lazy about checking if it syncs because it takes nearly three minutes to reach the end of the video even at turbo speed. (I think it goes faster with sound disabled, but for whatever reason, I can't turn off the sound!) So wouldn't you know it? It desynced right before I rescued Jeanne, setting me back about 8,000 frames! I've been redoing that portion of the run, but I've picked up a minor tip: you don't need to talk to Jeanne after saving her. Just leave the room and go back to the floating castle. Edit 3: I may have just written myself into a corner. Currently, I'm breaking out of jail. At the end of the prison is the Jail Key. It's guarded by 4 IMPs, and as far as I know, they can't be luck manipulated into 3 IMPs. The problem is that I only have three uses left on my SABER (and as you know, I've been fairly judicious about using it up to this point). To make matters worse, the IMPs start off the battle with a FIRE spell, dealing 54 damage to my 51 HP mutant. To make matters yet worse, I have just barely enough money to buy the coveted L-SABER, so I can't easily backtrack and buy it (I would fall short a few battles' worth of money). What's so tantalizing is that if I could just beat these IMPs (say, with a P-BLAST), then I'd have the Jail Key and I could backtrack to get an L-SABER for free. Unfortunately, the L-SABER shows up too soon to be affordable and too late to justify picking it up over the CATCRAW, which is an easy steal in Akiba. So I'll probably have to backtrack several minutes and pick up an inferior weapon. That's a lot of strikethrough! Where there's a will, there's a way! It turns out you can TELEPOR out of jail, jog over to town, talk to a guard in the pub, pick up your glider, and resume the game. The time saved is probably only marginal, but I can at least buy a new weapon and avoid fighting those IMPs. This means that as long as I get TELEPOR, I probably don't need P-BLAST or Mana grinding (at least up to this point). Amusingly, that leaves your two cellmates trapped. I'll be executing this strategy tomorrow.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
A couple of brief questions before I dive into World 2. What was the deal with that TELEPOR on floor 4 of the tower? Looks like you wanted to go back and kill the slime for some reason. How did you know the old man would ask for the BATTLE SWORD? According to the FAQ I'm using, he could ask for the BATTLE SWORD, NEEDLE, or ROCK. Did you just manipulate luck somewhere down the line? Is it possible to obtain either of the other two items more quickly? (I noticed the item shop is closer, and it should hold a NEEDLE.)
FatRatKnight wrote:
The other benefit to that battle was to get me closer to the coveted TELEPOR. I could pick at the fact that you went through many battles without a single stat gain, but I know you were going for TELEPOR as well. The 1 Mana was mostly unavoidable, but then again, I could have picked a better RNG on the path to TELEPOR.
Oops, didn't notice that. Okay, all is forgiven.
FatRatKnight wrote:
If you've been collecting data on the stat gains, I'd like to know what you've got so far. Aside from that, I've only made a basic attempt at manipulating luck, and indeed, many improvements could be made. Yet in spite of that, I tightly navigate the menus.
Yeah, I've got character stats in my RAM Watch window. My mutant has 53 Agl. Her Str. is 10, Def. is 2, and Mana is 11. Pitiful, really. For my little demonstration run, my strategy will be to continue pumping my mutant's Agl. as long as I can OHKO battles. After I max it out, I'll run or luck manipulate out of any further random encounters. I'm hoping that any fixed encounters against multiple enemies (a few caught my eye) can be weathered using ARMOR. You've probably already come across it, but this FAQ indicates that a solo mutant can reach the end of the game with minimal Str.: http://www.gamefaqs.com/gameboy/563273-the-final-fantasy-legend/faqs/20518 As long as I can spam SAW, I'm only worried about Mana being a factor. I'm keeping my eye on how much time TELEPOR saves us. It looks like it's saved you about 40 seconds of trekking and one Gen-Bu battle. That's substantial, but if we scale back the number of party members, it may be of questionable worth. For a solo run, it's almost out of the question, since it took more time for me to grind than it's saved so far (and probably ever will).
FatRatKnight wrote:
I feel like we're in a little competition, even though we are working together. Probably what pushed me into clearing out World II.
Hey, I like a good competition! Hopefully, I'll catch up with you (both in distance and time) by the end of the day! Oh yeah, one thing I noticed. If your monster happens to be in the worm class and it eats something from the behemoth class, you transform into the soaring birds class. The REDBULL is in the behemoth class, so I guess REDBULL gives you...
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
I'm getting that syncing feeling! Sick of desyncing, I forced it to sync in the most tedious way possible: every time I reset, I replayed the whole movie to manually check that the RNG was in the right place. It takes forever, but hey, it gets the job done. I really miss Gens and its "Seek to frame" function. (Come to think of it, I could write a minuscule Lua script that would seek to a specified frame pretty efficiently. Think I'll do that...) Just my luck, I carefully replayed my movie about a dozen times and it didn't desync even once! It's as if it knows I'm watching it! The culmination of my work (as yet) is this: http://dehacked.2y.net/microstorage.php/info/1287124710/testrun.vbm Please, please, please tell me it syncs on your computer! I made a few outright mistakes in this little run. First, I started walking to Town of Hero before restarting to manipulate luck. That was a bad idea because I ended up having to pace beside Town of Hero to get a battle and earn some gold. Second, I fought an extra battle so I could buy the BOW, then I bought it. I seriously didn't expect to beat P-FROG without it, so that strategy could change. Third, I screwed up in guessing the number of battles I'd have to fight on my way to King Sword. I thought I could put myself one fight away from learning TELEPOR by leaving the forest beside Town of Hero when I did, but I fell one battle short. I wasn't sure whether I should fight an extra battle outside or duke it out with the two LIZARDs inside, so I ended up guessing that the LIZARDs were faster. So, let's compare our runs. What I like about your run: •Excellent route planning. I probably wouldn't have come up with the Gen-Bu skip myself, so you safely docked about 20 seconds from the final runtime with that trick alone. •Fine-tuned menu management. •You're better prepared than I am to take on any enemy in the game. My memory of this game isn't that good, so we'll have to see if that pays off. What I don't like about your run: •Chiefly, your battles are very inefficient. I think this is because of your minimal luck manipulation and use of four characters. From a purely stylistic standpoint, I'd rather watch a TAS that OHKOs as many enemies as possible, rather than spending a full round or so on each battle. It'll probably improve as your run progresses. •Less luck manipulation. If you're only getting 1 or 2 Agl. (or whatever other stat) per battle, then there's hardly any point to fighting them. It's just wasted time. For example, on your way back from King Armor, you fight a Goblin and it gives just a 1 Mana bonus to the mutant in the 4th slot. As far as I can tell, there was no other benefit to that battle. I don't like or dislike it, but your monster is a bit of a wild card at this point. He could make your run really easy or just weigh you down. I'm interested, though. What I like about my run: •Short battles. I think only one battle isn't a OHKO (except for battles against multiple monsters, of course). •Loaded with luck manipulation. 5 Agl. per battle gets me 43 Agl. after P-Frog. That's going to serve me well. What I don't like about my run: •Grinding. I thought I could avoid it, but there's actually a fair amount of it to get TELEPOR. Looking back now, I realize that my original run (that desynced) was faster than this one, despite not learning TELEPOR. Now I see why. Hopefully, I'll earn that time back. •Sloppy. You'll see I have a tendency to just hold A during battles. I don't really see the point of getting the input exact to the frame at this stage in development. I also made a few larger mistakes, noted above. •I could easily hit a wall. I'm counting on a lot of things at this point: all fixed encounters from World 2 onward should be one-on-one, weapons should be available to continue my OHKO streak, and I'm going to need the first strike on everything. Having ARMOR at my disposal is handy, but if anything has the Agl. to sneak in the first strike against me, I'm screwed. I can think of about half a dozen ways this can go bad, but I have no choice but to press on and meet the challenges as they come. I'm about 95 seconds behind your run, so I'm doubtful I'll catch up. Nevertheless, with all the mistakes I've made, I'm happy to be this close. Combining the strategies of our two runs: The jury's still out on how many characters we should have, but I'm banking on two mutants. One mutant may suffice if we skip TELEPOR, but I have a feeling that will cost too much time. The potential advantage of forgoing TELEPOR would be more opportunities to pump up the solo mutant, probably attaining 99 Agl. by the end of World 1. On the other hand, two mutants would learn TELEPOR with little or no grinding, plus we could kill one off to save time later. In order of most to least likely to be optimal, I'm guessing two, three, one, and four mutant parties respectively. With two or more mutants, we could switch party members (as you've been doing) to soak up more high-yield bonuses. We'll have to weigh the time cost of switching party members versus manipulating luck more. The role of the second (or third) mutant would be almost completely up in the air. Should he be strength-focused to complement our agile mutant? Should he have useful abilities for specific points in the game? Should he just be a tool for luck manipulation? Should he be killed off as quickly as possible? My luck manipulation so far has been a little inefficient. You'll see I pause, save, wait to manipulate luck, then reset. What I should do is walk a few steps, then pause, save, wait just a handful of frames to manipulate luck, then reset. In other words, I should manipulate luck as I walk. That's due entirely to my laziness. In the final version, we should manipulate luck more carefully. I think that just about does it for this post. I'm glad to have finally contributed something concrete. On to World 2!
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Any thoughts? Anyone? Hello? Well, I've done a little bit of debugging on my own. I wrote up the following Lua script:
local state1 = savestate.create()
local state2 = savestate.create()

savestate.save(state1)

for i = 1, 300 do
	emu.frameadvance()
	savestate.save(state2)

	for k = 1, 8 do
		joypad.set(1, {A = 1, B = 1, select = 1, start = 1})
		emu.frameadvance()
	end

	savestate.load(state2)
end

savestate.load(state1)

emu.pause()
As you can see, this script is essentially a stripped-down version of the script in my previous post. I ran two versions of this script. In the first version, I commented out the restart sequence (the "joypad.set..." line). I made a 25,000 frame movie with it and it didn't desync. In the second version, the restart sequence was included. The movie I created to test that script desynced about 7,000 frames in. So in summary, it appears that the restart sequence is causing it. I don't have a clue why, but it is. Hopefully some more experienced runners can provide their insights. My next steps will be to fiddle with parameters like the duration of each loop and what buttons are pressed (is it the restart sequence specifically, or will pressing any buttons cause a desync?). Edit: Just ran another test with the restart sequence line included. It remained synced through 17,000 frames. Grrrr...
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Another day, another desync. Fortunately, my last attempt had some terrible luck (battles too sparse, had to wait too long to manipulate luck) so I wasn't sorry to see it fail. On the upside, I'm attempting to debug my problem from the ground up. I wrote up this Lua script:
local state1 = savestate.create()
local state2 = savestate.create()

savestate.save(state1)

for i = 1, 300 do
	emu.frameadvance()
	savestate.save(state2)

	for k = 1, 8 do
		joypad.set(1, {A = 1, B = 1, select = 1, start = 1})
		emu.frameadvance()
	end

	savestate.load(state2)
end

savestate.load(state1)

emu.pause()
You can see that it's the bare bones of my old Lua script. No checking RNG values, no GUI, no frametables. Just saving and frame advancing. I ran back and forth between the tower and Town of Hero while using this script essentially as I would use my original Lua script (except with very sloppy inputs). I saved the game, ran the script, waited a few dozen frames, then reset the game. The first time I ran it, I omitted the line with the restart sequence ("joypad.set..."). That ran for 10,000 frames without desyncing. The second time, however, I included the line and it only ran for about 7,000 frames before it desynced. I'm going to run a more extensive test with the restart sequence omitted again-- say through 20,000 frames. If that doesn't desync, I have a good indication that it's (of all things...) the joypad.set command that's causing this. I also ran some much more bare-bones tests: simply advancing 10,000 frames in Lua and returning control to the user, saving and loading hundreds of times, and a combination of saving and loading. None of them desynced, although I didn't test them so extensively. Damn it! I wanna run this game! Edit: Ran it again for about 25,000 frames without the restart sequence. No desync. Looks like joypad.set is causing it. Edit 2: Ran it again with the restart sequence. Remained synced through 17,000 frames. Just when I think I've got it pinned down...
Post subject: Desync in v22 (Final Fantasy Legend)
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
I have tried four or five times to start a demonstration run of Final Fantasy Legend, but it desyncs every time, usually about 4000 frames in. My partner in crime, FatRatKnight, has had no trouble whatsoever, although he's using a very different strategy. I suspect it has something to do with my Lua script, which I'll post here:
movie.rerecordcounting(false)

local state1 = savestate.create()
local state2 = savestate.create()

local H,S,D,A,M,X,Y= "hp","st","df","ag","mn","AB","!!"
local _ = "__"

local Growth={[0]=H,
    _,_,D,X,_,M,_,A,_,_,X,_,X,_,_,
  _,_,X,M,A,_,_,M,_,_,_,_,M,X,_,M,
  _,_,_,_,_,_,A,_,_,_,X,M,X,H,X,_,
  _,_,_,X,_,_,H,X,A,_,_,S,A,M,S,S,
  H,_,X,_,A,_,_,_,X,_,_,_,_,A,_,M,
  X,_,D,H,X,S,_,H,M,_,H,H,_,Y,H,_,
  S,_,_,_,M,M,X,_,_,_,S,_,S,_,M,X,
  _,S,H,A,_,H,_,S,_,S,_,X,X,_,_,_,
  _,A,A,A,_,X,_,A,_,M,M,_,H,_,M,H,
  A,M,_,_,D,X,X,_,H,H,M,H,_,_,H,_,
  X,H,M,H,H,X,Y,H,H,X,_,_,_,_,_,A,
  M,X,M,_,H,H,_,_,D,X,A,S,_,_,S,S,
  _,X,_,X,_,M,H,X,_,H,H,M,H,D,X,_,
  _,H,S,_,_,S,A,_,_,M,_,_,H,A,_,H,
  S,M,H,M,_,_,_,M,M,A,D,X,S,M,_,_,
  _,S,_,Y,M,_,M,D,X,D,X,_,_,H,X,X
}

local FrameTable={}
local FTI = 1

savestate.save(state1)

for i = 1, 300 do
	emu.frameadvance()
	savestate.save(state2)

	frame = emu.framecount()

	for k = 1, 8 do
		joypad.set(1, {A = 1, B = 1, select = 1, start = 1})
		emu.frameadvance()
	end

	local rng = memory.readbyte(0xC30B)
	-- Uncomment for Agl. boost +5
	--if rng == 130 or rng == 56 or rng == 221 then
	-- Uncomment for TELEPOR
	if rng == 235 then
		FrameTable[FTI]=frame
		FTI = FTI+1
	end
	savestate.load(state2)
end

savestate.load(state1)
for i = 1, #FrameTable do
	gui.text(100, 9*i - 8 ,FrameTable[i])
end
emu.pause()
The part I'm most concerned about is that loop near the bottom, the one that says "for i = 1, 300 do". In that loop, you can see that it saves and loads the game 300 times in an effort to divine when I should restart the game (the game's RNG can be manipulated by restarting at different frames, but that's not too important to know). Basically, I'm asking the emulator for accuracy that's exact to the frame while loading and saving 300 times. You can see why this might cause a desync. But I'm not absolutely certain. I thought it might have something to do with the rewind feature, but I just tried a run and it desynced with rewind disabled. I suppose it could also be my run-of-the-mill savestates, but it would be very discouraging if I couldn't even count on those. I'm getting sick of failed runs of this game, so I'm counting on some advice from more experienced players. Can I modify my program to at least cut down on desyncs? Is there some option I can toggle that will help? What exactly might be causing these desyncs? (I read the article on Desync Help, but I need some contextual help at the moment.) Basically, what would you guys do if you were in my shoes? Thanks!
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
FatRatKnight wrote:
Went through World I in just over 9 minutes Stats:
name  mHP St Df Ag Mn    Transition to World II

mkay  103 17  7 11 13  My monster, WEREWOLF
Run    20  9 14  7 11  Has an ICE spell. Useful-ish.
Test   55 12 16  3  9  Has POWER (dead weight) and TELEPOR (awesome)
TAS    55  6 11 13 27  P-BLAST of doom!!
I'm probably going to manipulate more agility and mana for little miss TAS at this point. Poor GEN-BU can just fight himself, I'm too busy to fight some "required" boss battle. I'm not using your script, I just have it set up so if I hold a button then frame-advance, the script blindly goes through a sequence of input. I'm still manually looking at the list of gains that show up and manually checking battles, looking for the right meat for my monster. It's possible your script itself is causing a desync. But I'm not actually sure. Some further checking may be needed. My vba.ini is almost a brand-new one, considering how recently I got VBA. Try deleting it or moving it to another folder so VBA doesn't detect it, and start fresh to see what happens. Probably wouldn't help, but aside from deleting it, wouldn't hurt to try.
My god! What did you do to the bandit??? LOL! Pretty funny since both of the times I've fought him I was extremely lucky and he decided for several turns he would instead "wait for attack". What was the deal with that equipment shuffling immediately after acquiring the rest of your party? Were you throwing it out so that they wouldn't take turns in battle? Well, I am very impressed with this little run. I see now that I really shouldn't have let TELEPOR pass me by. Your strategy also seems more "honest" in the sense that it doesn't involve nearly as much luck manipulation. Unfortunately, I still think a solo run is theoretically faster. Not that I can prove it... grumble... If a solo run is faster but desyncs, that doesn't count for jack squat, so you're in the lead. In case you missed the second edit to my last post, I'm still having desync issues, so I'm going to attempt to code a fake autosave function in Lua. I think my problems may stem from the fact that autosave continues to operate while my script is running. Anyway, I'm in a weird position. I'm hoping I can trounce your run by getting through World 1 in 8 minutes, but since I'm having technical difficulties, I'll instead play cheerleader. Keep up the good work!
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
FatRatKnight wrote:
Around 2 minutes in. I got myself BARRIER and POWER, and well on my way to getting P-BLAST and change my monster to O-BAKE. The POWER will help in killing a random ZOMBIE and KINGSWRD each in two rounds, as well as give GEN-BU a good smack. Just ask, and I'll upload my current run, on the spot, wherever I might be. On a side note, I programmed in a cheap macro through lua. From the field, it goes into the menu, saves the game, then resets. So I got around the difficulty of pressing four or five buttons at once. As for your desync issue, the timing difference you read about is mainly saying that movies from v19 will likely not sync at all on v20 or later, and vice versa. This shouldn't affect sync-stability for playing back movies made using the same version. I haven't run into problems myself, yet. I'm not sure what further help I can be, though.
As long as you're not desyncing, it gives me hope that there's some simple fix to the problem on my end. Are you using my Lua script, by any chance? I fear that saving and loading 50 times might be causing the desync problem. I'm going to do a quick test to see if not using savestates at all desyncs (probably not). If I can't pin down the problem from my end, could you send me your vba.ini file? I'd like to see if it syncs properly using your settings. Thanks. Edit: Conducted a few tests and they didn't desync. Then I started checking for the best Agl. bonuses. For future reference, you gain 5 Agl. if C30B lands on 56, 130, or 221 upon reset. You also gain 4 Agl. if it lands on 8 or 233, but I don't see much reason to use those values when you can wait a short time and a 5 Agl. bonus should come up. I was recording this process and it synced through the first twelve or so numbers, after which I saved and went back to check my work. I paused the movie at the second to last frame and resumed recording to check the rest of the numbers. When I went back to check the whole movie, it desynced with the second batch of numbers (after I had resumed recording). This is very frustrating! I think I'm slowly establishing what I can and cannot do to record a movie, though. I hope to start a new run sometime soon, perhaps later tonight. Edit 2: Tried another test run through Bandit Cave (thank god it wasn't all the way through World 1 again). Desynced before the end of the first battle. I think the rewind key caused it this time. Too bad, too, since I had just beaten the bandit and already had 33 Agl. I was getting ready to learn TELEPOR. Oh well... here we go again...
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
FatRatKnight wrote:
I'm thinking I should try to make another run alongside yours, except I use 3 mutants and a monster and see how little I can get away with. Knowing myself, I always want to keep optimal in my own ways, so I may end up making progress slowly. Comparing times shouldn't be too difficult, and having two separate runs may show techniques that either player missed the first time around. So you're comfortable using a controller. I'm fine with the keyboard myself. And I'm not familiar with GlovePIE, but I do have a Wii Classic Controller.
If you have a bluetooth adapter, you can use GlovePIE to interface your Classic Controller with your computer. I suggest at least looking into it briefly, since I found resetting to be a real pain when I used the keyboard. But as long as you're okay using a keyboard, that's what's important. I agree that parallel runs could be extremely helpful. I'm going to pump my agility and use whips extensively, since they stun enemies. I was also thinking of trying to reset while the game is saving. I don't know how long it takes to save, but it may be possible to corrupt the data in a useful way. Just a thought. Edit: Just spent a few hours making a 14 minute run of World 1. It desyncs a little over a minute in. Blech. I'm not sure, but I wonder if it has anything to do with the rewind feature, which I used extensively. In any case, I found that pumping up a solo mutant was quite easy. I was able to get her up to 99 Agl. near the end of World 1. I could probably do it much faster if I seek out only those times when I get 5 Agl. per battle. I also neglected to pick up TELEPOR until the end of World 1, so I think if I attempt a new run, I'll shoot for just enough Agl. bonuses to OHKO all enemies, then focus on TELEPOR, which is too useful to pass up. And hey, while I'm going for it, I get the ARMOR ability as a bonus! I may also modify my program to tell me what frames I can restart at to get other bonuses. I'm thinking that Mana and abilities will be the most useful. I'm going to perform a quick test to see if it is in fact the rewind function that's causing this desync, then I'll probably go to bed. Since World 1 took only about 15 minutes, I'm hoping that the whole game takes about an hour. With proper use of TELEPOR, we might be able to shave that down to 40 minutes, but that's just an estimate. If you've started your run, I hope it's gone better than mine! Keep me updated on your progress! Edit 2: Nope, not the rewind function. It just desyncs on its own (about 8000 frames in, as far as I can tell). This is not good. For the moment, I'm counting on your movie syncing correctly or I am at an impasse. I have no experience attempting to make movies sync up, and given what I've read, I have little interest in traveling down that very frustrating road. The only thing I might do is switch to VBA version 19. In the Desync Help article it says something about the timing of versions 19 and 20 being different.
Post subject: Can't record movies
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Edit: Solved it! I had set it up so that joypadDefault=2. Apparently that confuses it. I transferred my favorite control scheme to controller 1 and it fixed it right up. For other people who have the same problem that I did, use controller 1. For the development team, please change it so that any controller's inputs are accepted, unless there's a good reason not to have it that way. ------------------------------------------------ I'm in the planning stages of a Final Fantasy Legend TAS with FatRatKnight. I have version 22 of VBA with re-recording. When I try to record a new movie, the frame counter stays at zero, although VBA "thinks" it's recording. I can then stop the recording and load it. VBA then informs me that my movie has a length of no minutes, no seconds, no frames, no re-records, no nothing. It does successfully stamp the date and time and include the ROM information. I tried it out again with a Tetris ROM I had, but no such luck. Therefore, I'm led to believe it's a problem with the emulator and not the ROM. FatRatKnight sent me a short VBM file to test and it worked fine, so I can read files but I can't write them. So what's wrong here? This was so much easier in Gens! Edit: I replaced my vba.ini file with an old version and it's working. Nevertheless, I would like to keep the settings I carefully created, so I'm forced to examine vba.ini's contents item by item to find the problem. Help would still be greatly appreciated, but I'm slowly zeroing in on the problem on my own.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
And here's my new, improved program:
local state1 = savestate.create()
local state2 = savestate.create()

local H,S,D,A,M,X,Y= "hp","st","df","ag","mn","AB","!!"
local _ = "__"

local Growth={[0]=H,
    _,_,D,X,_,M,_,A,_,_,X,_,X,_,_,
  _,_,X,M,A,_,_,M,_,_,_,_,M,X,_,M,
  _,_,_,_,_,_,A,_,_,_,X,M,X,H,X,_,
  _,_,_,X,_,_,H,X,A,_,_,S,A,M,S,S,
  H,_,X,_,A,_,_,_,X,_,_,_,_,A,_,M,
  X,_,D,H,X,S,_,H,M,_,H,H,_,Y,H,_,
  S,_,_,_,M,M,X,_,_,_,S,_,S,_,M,X,
  _,S,H,A,_,H,_,S,_,S,_,X,X,_,_,_,
  _,A,A,A,_,X,_,A,_,M,M,_,H,_,M,H,
  A,M,_,_,D,X,X,_,H,H,M,H,_,_,H,_,
  X,H,M,H,H,X,Y,H,H,X,_,_,_,_,_,A,
  M,X,M,_,H,H,_,_,D,X,A,S,_,_,S,S,
  _,X,_,X,_,M,H,X,_,H,H,M,H,D,X,_,
  _,H,S,_,_,S,A,_,_,M,_,_,H,A,_,H,
  S,M,H,M,_,_,_,M,M,A,D,X,S,M,_,_,
  _,S,_,Y,M,_,M,D,X,D,X,_,_,H,X,X
}

local FrameTable={}
local FTI = 1

for i = 1, 16 do
	FrameTable[i] = 0
end

savestate.save(state1)

for i = 1, 50 do
	emu.frameadvance()
	savestate.save(state2)

	frame = emu.framecount()

	for k = 1, 8 do
		joypad.set(1, {A = 1, B = 1, select = 1, start = 1})
		emu.frameadvance()
	end

	local rng = memory.readbyte(0xC30B)
	if Growth[rng] == "ag" then
		FrameTable[FTI]=frame
		FTI = FTI+1
	end
	savestate.load(state2)
end

savestate.load(state1)
for i = 1, 16 do
	gui.text(100, 9*i - 8 ,FrameTable[i])
end
emu.pause()
You'll see I picked up a few pointers from your script. As far as I can tell, it works like a charm. Just wait until the specified frame to restart and the next battle should give you an Agility bonus. Edit: Are you familiar with GlovePIE? Do you have a Wii Classic Controller? I found that using a Classic Controller helped a lot when making my Skitchin' run. VBA doesn't accept joystick buttons for menu commands, so I had to work around it in GlovePIE. I've come up with the following program:
ppjoy1.Digital0=wiimote.Classic.a
ppjoy1.Digital1=wiimote.Classic.b

keyboard.Escape=wiimote.Classic.x

ppjoy1.Digital4=wiimote.Classic.Minus
ppjoy1.Digital5=wiimote.Classic.Plus

ppjoy1.Digital7=wiimote.Classic.LFull
keyboard.Backslash=wiimote.Classic.RFull
ppjoy1.Digital8=wiimote.Classic.ZL
ppjoy1.Digital9=wiimote.Classic.ZR

ppjoy1.Digital0=wiimote.Classic.Home
ppjoy1.Digital1=wiimote.Classic.Home
ppjoy1.Digital4=wiimote.Classic.Home
ppjoy1.Digital5=wiimote.Classic.Home

ppjoy1.Digital16=wiimote.Classic.Up
ppjoy1.Digital17=wiimote.Classic.Down
ppjoy1.Digital18=wiimote.Classic.Left
ppjoy1.Digital19=wiimote.Classic.Right

if Classic.LFull
   mouse.x = 0.69
   mouse.y = 0.29
   mouse.LeftButton = true
   wait 10 ms
   mouse.LeftButton = false
   mouse.x = .55
   mouse.y = .29
   wait 10 ms
   mouse.LeftButton = true
   wait 10 ms
   mouse.LeftButton = false
   mouse.x = .65
   mouse.y = .48
   mouse.LeftButton = true
   wait 10 ms
   mouse.LeftButton = false
   wait 200 ms
   keyboard.G = true
   wait 10 ms
   keyboard.G = false
   keyboard.R = true
   wait 10 ms
   keyboard.R = false
   keyboard.O = true
   wait 10 ms
   keyboard.O = false
   keyboard.W = true
   wait 10 ms
   keyboard.W = false
   keyboard.T = true
   wait 10 ms
   keyboard.T = false
   keyboard.H = true
   wait 10 ms
   keyboard.H = false
   keyboard.Enter = true
   wait 10 ms
   keyboard.Enter = false
   mouse.x = 0.74
   mouse.y = 0.29
   mouse.LeftButton = true
   wait 10 ms
   mouse.LeftButton = false
   mouse.x = 0.35
   mouse.y = 0.2
   wait 100 ms
   mouse.LeftButton = true
   wait 10 ms
   mouse.LeftButton = false
endif

if Classic.y
   mouse.x = 0.69
   mouse.y = 0.29
   mouse.LeftButton = true
   wait 10 ms
   mouse.LeftButton = false
   mouse.x = .55
   mouse.y = .29
   wait 10 ms
   mouse.LeftButton = true
   wait 10 ms
   mouse.LeftButton = false
   mouse.x = .65
   mouse.y = .48
   mouse.LeftButton = true
   wait 10 ms
   mouse.LeftButton = false
   wait 200 ms
   keyboard.R = true
   wait 10 ms
   keyboard.R = false
   keyboard.E = true
   wait 10 ms
   keyboard.E = false
   keyboard.S = true
   wait 10 ms
   keyboard.S = false
   keyboard.T = true
   wait 10 ms
   keyboard.T = false
   keyboard.A = true
   wait 10 ms
   keyboard.A = false
   keyboard.R = true
   wait 10 ms
   keyboard.R = false
   keyboard.T = true
   wait 10 ms
   keyboard.T = false
   keyboard.NUMPAD2 = true
   wait 10 ms
   keyboard.NUMPAD2 = false
   keyboard.Enter = true
   wait 10 ms
   keyboard.Enter = false
   mouse.x = 0.74
   mouse.y = 0.29
   mouse.LeftButton = true
   wait 10 ms
   mouse.LeftButton = false
   mouse.x = 0.35
   mouse.y = 0.2
   wait 100 ms
   mouse.LeftButton = true
   wait 10 ms
   mouse.LeftButton = false
endif

debug = [mouse.x, mouse.y]

ppjoy1.Analog0=wiimote.Classic.Joy1X
ppjoy1.Analog1=wiimote.Classic.Joy1Y
ppjoy1.Analog2=wiimote.Classic.Joy2X
ppjoy1.Analog3=wiimote.Classic.Joy2Y
Okay, some explanations are warranted... The Classic Controller's A and B buttons are mapped to the Game Boy's A and B buttons respectively through VBA. The minus and plus buttons are mapped to select and start, also through VBA. Of course, the d-pad is mapped to the Game Boy's d-pad, also through VBA. The X button is mapped to the keyboard's escape key so that I can run the emulator at full speed. I don't think I'll be using that one much. The right shoulder button is mapped to the backslash key, advancing emulation one frame. The Home button is mapped to the same joystick buttons that cover A, B, select, and start, so pressing Home allows me to restart the game. Before I started toying with GlovePIE, I had to change control configurations just to restart. The left shoulder button clicks "Stop" to stop any currently running Lua scripts, then clicks "Browse..." to open a new Lua script. It then types "growth" to load your Lua script (which I've titled "growth.lua"), presses enter to run it, and clicks on the main VBA window. Note that this entirely dependent on where I put the VBA window, so it probably won't work for your computer without tweaking it significantly. The Y button is just like the left shoulder button, except it types "restart2" to run my script. If I set the emulation speed to 1000% in advance, my script executes in a few seconds. This leaves the ZL and ZR buttons, as well as the two analog sticks. I don't know what to do with them just yet, but I was thinking of making a script that automatically saves and resets the game. I'm hoping there's a consistent frame rule and it always takes, say, 60 frames to save the game. We'll see. So with all of these tools, I have most of what I need to start a demonstration run of the game. I'll probably be pretty lazy with my inputs, especially in battle. No reason at this point to get everything perfect to the exact frame.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
FractalFusion wrote:
Bobo the King, are you planning to redo, or do you want to leave this submission as it is? Or both?
Both. I'm a little taken aback by all the mistakes that have been uncovered, but the core route remains the same and I don't think the entertainment value suffers with the current run. If, say, I had missed an early nitro or a warp, then I'd cancel this submission without hesitation. Even so, this is going to nag at me if I don't go back and fix it. Hey, that's why we have the submission process. If the powers that be decide that there is simply too much time to be saved (about 30 seconds, ideally) by making the changes outlined above, then I will accept their decision without question. Anyway, I'm currently in the planning stages of a Final Fantasy Legend run with FatRatKnight, so any Skitchin' redo will be on the back burner for a while-- at least a month or two. In that time, if anyone wishes to take up Skitchin', I'd be happy to cede it to them or co-author a run if I have the time.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Here's the program I've come up with (a minor variation on the one I already posted):
state = savestate.create()
newrng = memory.readbyte(0xC30B)

local function Disp(rng)
	message = string.format("0xC30B: %d", rng)
	gui.text(10,10,message, "green", "black")
end

while true do
	emu.frameadvance()
	savestate.save(state)
	emu.frameadvance()
	i = 1
	while i<9 do
		joypad.set(1, {A = 1, B = 1, select = 1, start = 1})
		emu.frameadvance()
		i = i+1
		
		gui.register(Disp(newrng))
	end
	newrng = memory.readbyte(0xC30B)
	savestate.load(state)
end
There's probably a better way to code the same thing, but that's what I came up with. Basically, it resets the game every frame, emulates 8 frames, checks 0xC30B, and returns it to the user. This tells us what we can expect the RNG to be if we were to soft reset on the subsequent frame. The program would run a hell of a lot nicer if VBA had the emulateframeinvisible function I'm used to, but it'll have to do for the moment. I think the most useful information it offers is that you can see 0xC30B increments by roughly 20 each frame (with an enormous standard deviation...). Perhaps we can use that to deconstruct what's going on. If we can predict future values without the need to reset, then this run should be a cakewalk. I was thinking that if I do a demonstration run, it should be solo. The reason for this is because we can probably use it to predict the amount of time a two-player run would take, subtracting frames when two characters would defeat a monster in fewer turns, and adding frames when only one player would have time to get an attack off. It wouldn't be perfect, but it should give us an idea of how much of a difference we can expect. Since Agility is used to determine who strikes first, my hope is that a solo mutant would always get the first strike and be powerful enough to kill any enemies in one hit. With two mutants, it would take longer to reach the same point, although we could always pump one up first, then the other (in which case we should probably conscript the second one later). According to this http://towerreversed.org/fflsaga/numbers.html an Agl. of 99 should suffice, although we can completely skip battles after leveling up completely. We basically only need enough Agl. to defeat any bosses along the way. I'm going to attempt to modify my program so that it tells me the next frame I should reset such that the following battle will give me an Agl. boost. It should be more efficient than my current program, since I can manually fast-forward through its execution and have it pause afterward. Incidentally, the name of the game is technically "The Final Fantasy Legend", though I don't know anyone who calls it that. It's worth remembering for any submission titles, since I know they're pretty picky about getting the title just right.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
klmz wrote:
Have you tested suicide with Up + C? Lower damage but rapider execution.
You mean Up+B+C jumping in place? I just tried it in Miami Bonus and I didn't fall down. However, I was hit by a car, which knocked me into that first pole, allowing me to finish the level two seconds earlier. Go figure. Here's a thought: Buy economy wheels early in the game (around Denver or Seattle). If all goes well, they'll give out right at the start of Miami Bonus, saving upwards of 20 seconds. No suiciding necessary! If I run this game again, I think I'll try to do that.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Sounds like you're warming up to a four mutant party while I'm warming up to a one mutant party! I thought that filling the game with soft resets would be annoying, and to some extent I still think so. However, once I tested it out, I saw that soft resets only take a few seconds and can be done anywhere. Furthermore, you're absolutely right about the time it would save in battle, so I think one mutant may be optimal. I noticed that at 0x81 in your first table is the sequence "Ag Ag Ag". The value the RNG resets to changes every frame, so if we can manipulate byte 0xC30B to always be 81, then we can boost a solo mutant's agility to 99 with just a handful of battles. Our other option would be to find any single Ag, manipulate 0xC30B to that, and make sure the number of steps to the next battle is minimized. It's the difference between one Agility boost over one quick battle versus three Agility boosts over an extended length of time. It's worth thinking about and we should probably test it. The same strategy might still work with two or three mutants, but almost certainly not four. Even though I'm fairly inexperienced, I'm already starting to see how Lua is implemented differently for different emulators. For my Skitchin' TAS, gens had a great function in Lua called gens.emulateframeinvisible. This allowed me to easily project into the future without messing with the sound or image. From what I can tell, the only frame advancing in VBA's Lua scripting is vba.frameadvance, which emulates one frame at normal speed. I also found no way to adjust the emulation speed from Lua, so I can't even improvise a solution. Anyway, I've been trying to make a script that will save the state, soft reset, read 0xC30B, then load the original state while outputting 0cC30B to the user. Here's what I came up with:
state = savestate.create()

while true do
	emu.frameadvance()
	savestate.save(state)
	emu.frameadvance()
	i = 1
	while i<10 do
		joypad.set(1, {A = 1, B = 1, select = 1, start = 1})
		emu.frameadvance()
		i = i+1
	end
	newrng = memory.readbyte(0xC30B)
	savestate.load(state)

	message = string.format("0xC30B: %d", newrng)
	gui.text(10,10,message, "green", "black")
end
That script does not return any error messages, but it the game doesn't seem to accept my joypad inputs, so it never resets. If I can get that script to work, I would like to use it to pump a solo mutant up to 99 Agility in the first world, then run through the rest of the game as a demonstration run. I'll hold off on emailing towerreversed until we get our bearings. It looks like other people have done a lot of work on this game, but their information is scattered to the far corners of the internet. Your movie fares better than mine, but still doesn't work. VBA is able to detect that it has 405 frames and 101 re-records (uh... why so many re-records?) and it shows that our ROMs are identical, but when I play it, it just sits at the title screen while the frame count displays "0/405". I'm going to look through the VBA forum here and start a new topic if it hasn't been addressed. In the meantime, however, what version of VBA do you have? Mine says v23-interim svn202. My rule on character names and other minor things is that the total time sacrificed shouldn't exceed the largest "mistake" in your run. I'm going to assume it takes one frame to render each letter and guess that there will be 50 battles with 2.5 executed commands per battle. That amounts to 500 frames or about 10 seconds lost compared to giving everyone 0-letter names. I rather doubt we can get this TAS to within 10 seconds of perfection, so I say we pick whatever names suit us. (We'll want to verify these numbers. When I make that demonstration run, we should check the text speed as well as the number of battles fought.) I'm a little embarrassed to say I don't know what TELEPOR does and I can't find it in any FAQs. Doesn't it warp you to the town at the current level of the tower? I would like to contribute more concrete information. Can you give me a brief overview on how you deduced the purpose of 0xC30B and its associated table? If all the information in this game is stored in tables, then I think we can probably deduce how much each stat will be boosted at the next level. Edit: Switched to version 22 and all is well. I can now watch your movie and write my own! And my Lua script works!
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
FractalFusion wrote:
In my opinion, this is a cool run. However I have questions. In Miami Bonus, you kill yourself off in the most unceremonious way. How much slower would it be just to complete it? Wouldn't it be better to complete it? You suicided in Miami Bonus, but why not the other bonus levels?
Great question! If I were to use the nitro I have, it would take 37 seconds to complete Miami's bonus level-- the same time it took me to complete Toronto's. If I use three nitros in Miami Bonus (as opposed to the two used in Toronto Bonus), Matlab predicts just 35 frames saved, so it just isn't worth it. Killing myself in Vancouver Bonus is out of the question because I pick up three nitros from there. Without those nitros, the starts to Denver and San Diego suffer dramatically and nitros have to be reapportioned all the way to Washington. Three nitros at a cost of 13 seconds (43 seconds to complete Vancouver Bonus minus 30 seconds to suicide out of it) is just too good a trade to pass up. Killing myself in Toronto Bonus is more interesting, however. The first reason I don't do that is because my safety gear is in better shape at that point. I just tested it out and it takes me one additional second (by the game's timer) to kill myself in Toronto Bonus. The second reason is that it slows down the start of Detroit. If I only have one nitro on hand, it takes me 24 seconds to reach the first nitro in Detroit, compared with 22 seconds in my submitted run and 19 seconds if I were smart enough to use my nitros immediately instead of getting up to full speed under leg power alone. Note that's just the time it takes to reach the first nitro-- the whole remainder of the level slows down slightly because I have to reapportion the rest of the nitros throughout. But upon further thought, you may have a valid point. One of the reasons I was going to cite is that it tears up my skates to suicide out of Toronto Bonus, forcing me to buy new skates and costing about a second. Then I realized I wouldn't actually need to buy new skates until I suicide in Miami Bonus. Because the skates would already be damaged by then (to 140 units, assuming all else equal), I would only need to run into the pole seven times instead of eight. At that point, my skates would give out instead of my health (or perhaps both, since my pads would be more worn from Toronto Bonus). This would save three or four seconds. Where were you when I was planning this run??? Well, the bottom line is that it's inconclusive and stands to save only a handful of seconds: 7 seconds saved in Toronto Bonus + 3 seconds saved in Miami Bonus - 6 seconds lost in Detroit - 1 second lost buying new skates = 3 seconds saved But that analysis isn't perfect-- I would need to test how much time is really lost in Detroit. It's five seconds at minimum, and I project about ten seconds would be reasonable if I want to save two nitros by the end of the level. The best I can do for now is use my Matlab program to estimate the time saved. According to Matlab, Detroit should take 3,680 frames to complete if I use four nitros. Using three nitros, Detroit takes 4,077 frames to complete. This is a loss of about 400 frames or 6.6 seconds. You may be onto something. Well, I'm sticking with my submitted run for the time being. I don't think three or four seconds is enough to warrant redoing half the run, but I may return to it at a later date. I only hope this doesn't reflect too negatively on my run.
mklip2001 wrote:
This gets a mild Yes vote.
Mukki wrote:
I was able to watch it, but I still found it too repetitive.
Xkeeper wrote:
Eh, voting yes.
This is roughly the reception I was expecting and about the best I could hope for. I know the game isn't the greatest to run, but I think it's just barely good enough. Thanks for the yes votes, everyone! Half a thanks to Mukki for half a yes vote! ;P Edits: I suck at math, apparently. Edit 2: I re-checked the time it takes to buy wheels, since I had a feeling that my estimate of one second was a little low. It actually takes three seconds (184 frames by my count). This only complicates things. Here's my official stance on the matter: suiciding out of Toronto Bonus saves no more than one second, perhaps even costing time. Since suicides are not fun to watch in this game and one of my goals is to add variety, I will concede that one second as a "speed for entertainment tradeoff".
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Nice Lua script! I have verified that the RNG is only rolled once per mutant (not per party member). This means if we want to grow as quickly as possible without resetting, we should have a party of four mutants, allowing us to boost one mutant's stats in almost every battle. I noticed that in your first table, there are only a few places where four consecutive slots are empty, so we would just need to reorganize the party between battles. I also like the idea of just one party member, but I'm not sure it would work well. This game is apparently pretty difficult to do a solo run of, so it may necessitate too much grinding. Also, we would be completely at the whim of the RNG, unless we were to use soft resets all the time. It's worth looking into, though. One viable strategy would be to have a party of three mutants with the last slot open, allowing us to draft a monster late in the game, just before a major boss battle. We then have that monster eat the meat of the boss, giving us an instant contributor. That would be the only way to get a party member that doesn't need leveling. The other strategy that crossed my mind was using four mutants, but killing some of them off. I don't think that would be such a good strategy because of the hearts system. We would have to revive any downed party members twice before the slot opens up again for a new member. That would be expensive and time-consuming. So basically, I have nothing conclusive to contribute at this point: parties with one, two, three, or four mutants could all be viable options. We could also include a human or a monster in there if they would contribute substantially and we can get enough money to pump a human up. I have a few questions on my mind: •Do you know if we can manipulate the RNG on a soft reset? Is its new value based on an internal timer, or is it a deterministic pseudo-random number generator we have no control over? (Actually, I just checked it out. It's non-deterministic, probably dependent on a timer or something. This is important because it means we can manipulate mutant growth almost however we wish, provided we fill the game with soft resets.) •Can you find the number of steps to the next battle? I briefly searched for a counter that decreases with every step, but it came up dry. •Can you update the Lua script to include the amount of growth in each variable? No big deal if you can't, since we can always manually test the growth amount, then reload a state. •How much, if anything, do you know about how battles work? It will be crucial that we can at least manipulate who gets hit and who doesn't. It would also be nice to manipulate other variables like how hard each attack is and the likelihood of attacks connecting. This website is devoted to deconstructing the battle system: http://towerreversed.org/ Maybe we should contact them to see what they know. I would be happy to do a quick playthrough of this game so that we both get an idea of how to proceed. I was going to make a quick movie to test for desyncing, but both of my attempts failed. When I try to replay my own movie, it just sits at the title screen doing nothing. Any idea what I'm doing wrong? If you would upload a brief movie of your own, I could test that for desyncing-- it'd at least be a start.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Hey FatRatKnight, great to see a new post on this topic! I was recently thinking about bumping it, but decided I didn't have enough to add. In any case, I think this game definitely needs to be TASed! I noticed that GameFAQs topic as well, and I encourage any prospective runners of this game to study it closely. I sheepishly thought about giving a TAS of this game a shot, but found it too impenetrable. I couldn't find the RNG in the RAM and I couldn't even find some of the most basic stats like GP. Perhaps it's because I'm somewhat of a novice and don't really know where or how to look. I totally agree that mutants are probably the way to go. The only other possibility in my mind is a team with three mutants and one human. The mutants carry the burden for the first 3/4ths of the game, then the human is pumped up to pick up the last bit. My biggest discovery is that with a party of four mutants, the order matters as far as stat boosting. For example, if the third mutant gets a bonus of +5 HP after a battle, then reloading a saved state and switching the first and third mutants will give the first (now third) mutant the same +5 HP boost. The implication is that one mutant can be pumped way up while avoiding the possibility that they forget a valuable ability. Your post seems to indicate that this wouldn't work in, say, a party of one mutant and three humans, but I'd like to check it out just to be sure. Also, from what I remember and what I've read, monsters (as party members) are all but useless. Your tables will be invaluable to producing a run of this game. My only concern is that resetting could completely interfere with the rhythm of this game. I imagine it would get pretty boring watching the same battles over and over. That's a stylistic choice that will have to be addressed once a run is being put together. I don't know enough about this game and I don't have the technical prowess to do a well-polished TAS, but I'd be happy to co-author something if anyone is interested. It could be a valuable learning experience for me. I have beaten this game, although it was just once and it was about seven years ago, so I would need to re-familiarize myself with it. My biggest reservation (aside from an overall contempt for RPG TASes) is that this game is notoriously poorly programmed, which means there are likely to be scores of glitches that are hard to find. My fear is that I could complete a 90-minute run of this game, only to discover some game breaking glitch, a la Pokemon, reducing the runtime to five minutes. Anyway, you seem to have more technical know-how than I do, so if you're interested in planning a run, I'd be happy to sign on to do what I can.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
I browsed the streaming video provided but I found that a whole lot of this TAS features one game wrapped up in dialogue while the other goes on its merry way-- not especially entertaining. Could someone point out some highlights where both games are being actively played?
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
Lack of familiarity with this game could easily kill this submission, so please look at this video to see what a typical playthrough looks like: http://www.youtube.com/watch?v=8uqeXUHH_hc Be gentle, it's my first time.
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
DONE!!! My completed speedrun can be found here: http://dehacked.2y.net/microstorage.php/info/1187674621/speedrun5.gmv Not that anyone's holding my feet to the fire, but sorry for dropping out for a couple of months. Miami was pretty intimidating and a few things have popped up in my life, so I put the TAS on the back burner. My trepidation over Miami was justified. After some testing, I decided it would be fastest to get only the second pair of nitros near the end because they are closer together. I found that I couldn't pick up either of the first two nitros, use one of them, and get over to the left fast enough to get the second pair. I played through Miami up to the end, only to find that although the second pair of nitros are closer together, the second nitro lies uphill, so I wasn't able to jump back onto the road. This meant I had to wait a while longer until a gap opened up in the barriers. I lost enough speed that I started to question my strategy, so I made a copy of my speedrun and re-recorded a healthy chunk of the level, picking up the first pair of nitros instead. It was 200 frames slower. I'm just happy to be done with that stupid level. I finished the three speed bonus levels in three very different ways. I won't say how I finished Miami's bonus-- you'll have to see it for yourself. New York was a little "bland" since it had eight nitros (I picked up seven), but was pretty fun. I ditched my Matlab program and instead used whatever nitros I picked up almost as soon as possible. My reasoning was that with eight nitros to use in the level, I might as well use them sooner rather than later (and find myself with too many on hand). I think you'll see that the result is quite good, as it's probably the fastest level (in terms of average speed) in the bunch. I wish I had more to say, but the last two levels were mostly "by the books". I'll be submitting my TAS within the day, hopefully in just a few hours. Wish me luck!
Experienced Forum User, Published Author, Player (79)
Joined: 8/5/2007
Posts: 865
As an April Fools' joke, I was going to declare that I nearly finished the run, but forgot to buy wheels and instead wiped out just a mile from the finish line, requiring me to go back and redo three levels. Since the site had its own somewhat "serious" April Fools' Day joke and it's been taken down now, I'll spare you the fooling. Nevertheless, I have noticed my first outright mistake. At the start of Detroit, I get up to full speed on leg power, then use two nitros. This is somewhat wasteful, as two nitros alone can get you up to top speed much faster. I don't think it costs me more than, say, 30 frames, but it's certainly embarrassing and I wish I could go back and change it. I don't think it's worth it to replay Detroit because I had some rather good luck in the middle of the level getting between a truck and some pylons and going "through" a barrier and quite frankly, I really don't want to go back and redo a level. Since my speedrun isn't perfect anyway, I'm leaving it as-is so other runners can improve upon it. With that said, I made up for it by rocketing through Chicago. I hit just about every jump I could and even worked in a funny glitch. You'll see when I upload the video-- hopefully, by then the TAS will be done. I'm currently halfway through Miami, trying to think of my next move. There are four nitros off in the grass near the end of the level. I could pick up none of them, two of them, all four of them, or maybe even one or three of them. Each possibility has its potential benefits and drawbacks. I'm going to "simulate" the time it takes to pick up a nitro or two by jumping into the grass and standing there for the appropriate distance. In short, progress is coming along well, but I'm at a minor roadblock. Fortunately, New York should be a walk in the park, so to speak. On the "theoretical" side of things, I've made some neat discoveries: As you hit a jump, you can hold C to reduce your horizontal speed. For example, if my horizontal velocity is 3 just before I hit a speed limit ramp, I can hold C for a few frames to bring my horizontal velocity down to zero. This can be particularly useful for hitting speed limit ramps as the track either bends to the right or stays straight-- I can approach the ramp by holding right, then reduce or negate that velocity by holding C, minimizing the amount of time I need to spend in the grass. I've already used this trick a handful of times and I wish I discovered it sooner. I did some research and determined how long it takes to perform a trick: A: 18 frames B: 22 C: 28 U: 27 D: 27 L: 26 R: 27 U-L: 30 U-R: 30 D-L: 29 D-R: 29 What this means is that if I press A at, say, frame 43428, I can perform another trick (press any of those buttons) at frame 43446 and no sooner. These numbers seem to be consistent, though I'll want to keep playing with them to make sure that's the case. I think it's very interesting that L and R tricks take different times to complete and that there is a lot of variety in these numbers. Finally, trick bonus cash is stored in 2 bytes at FF005C. This generally isn't too useful, but it could be vital for a cash-maximizing run. Only about two levels left!