1 2 3
7 8
Post subject: Chapter 4: Now with encode!
Active player (279)
Joined: 4/30/2009
Posts: 791
New WIP: http://dehacked.2y.net/microstorage.php/info/1003670491/FE6%20TAS%20Ch1-4%20WIP.vbm Encode: http://www.youtube.com/watch?v=oJyBSZV1fcI Progress has been made. This is more or less the exact strategy from Vykan's test run, with the addition of Thany being used to enter the shop, and pick up the Angelic Robe to sell at a later date (Killer Lances are a while away, and are not cheap). Marcus gets his first level up (HP, Str, Spd, Def) here, and I had an unpleasant set of RNs meaning I had to take Alan's level up as HP, Str, Spd as well - would have been way too much manipulation to get Skill on either of these. Silver Lance is now almost used up, but with the bulk those Cavs had, we needed it. Marcus will get a second level up in Ch5, and he'll have the offence with Hand Axe to do some damage finally. I bought 8 javelins, and 6 hand axes here. If I need more, I can hex them in later.
Active player (279)
Joined: 4/30/2009
Posts: 791
Chapter 5 done: http://dehacked.2y.net/microstorage.php/info/816364679/FE6%20TAS%20Ch1-5%20WIP.vbm First thing I do is start to distribute the 1-2 range weapons - its a lot faster to do on the map than it is on battle preparations screen. Merlinus pulls out 2 javelins and 3 hand axes, and hands some weapons off to Lance so he can give some to Marcus, and take the Rapier off his hands. Inventory management is a necessary evil, especially since units have such a limited capacity of items to carry. I'll deploy Thany next chapter in order to make sure Marcus has enough inventory space in Chapter 7 to have a Door Key for Ch7, and the Chest Key on hand for Chapter 8 (so Alan can get the Knight Crest and promote). The rest of turn one is just movement of Alan, Thany and Marcus, with the RNG manipulated so Marcus does not miss on the enemy phase (average accuracy with hand axe is 70%, with a much lower hit rate on the mercenary). Turn 2: I kill the Mage so Marcus has a clear run to the boss. Manipulating this low accuracy crit + level up was crazy, so I had to again compromise with the Skill growth (20%). Roy is dropped to seize, and Thany has to move her entire distance so she does not lure the Nomad. Turn 3: Alan finished the Nomad so Roy has the room to seize. I now have precisely 1 use of Silver Lance left, so I might just pass that off to Thany in Chapter 6, to avoid the weapon broke message. I want to ensure Thany has the inventory space to play with: Start Chapter 6: Thany inventory 3x Javelin Vulnerary Angelic Robe Swap Marcus Silver Lance for Javelin (turn 1) Give 2x Javelin to Lance, take Vulnerary (turn 1) Start Chapter 7: Thany inventory Silver Lance Vulnerary x2 Angelic Robe Sell Vulnerary x2, Silver Lance, Angelic Robe Buy 4x Door Key, Chest Key Give 1 Door Key to Marcus (for low use Hand Axe) (turn 3) Start Chapter 8 Thany inventory Hand Axe 3x Door Key Chest Key Give Chest Key to Alan (mid turns near chests, or early turns) Give Door Key to Marcus (mid turns near chests) This seems to be the best approach for Thany's inventory management. I need to ensure Lance and Marcus start in a place where Thany can stand next to both of them at the start of Chapter 6, so Thany can use her turn to swap with Marcus, and Lance can use his turn to swap items and then canto away. This leaves Alan on ferry duty (for turn 1 at least). EDIT: Success! I have Lance able to take Thany's Javelins, and rescue Roy and still canto away. Marcus crits the mage he can reach. Now I have to manipulate an enemy turn where Marcus crits those two armors at the start of the turn. I might test whether giving Alan some exp (and a level up) on turn 1 is feasible here. This one will be a bit of a doozy. If it works out well, I can end turn 1 with Alan/Roy/Lance getting support points, which will add to crit rate later.
Active player (279)
Joined: 4/30/2009
Posts: 791
Chapter 6 complete: http://dehacked.2y.net/microstorage.php/info/1435042595/FE6%20TAS%20Ch1-6%20WIP.vbm More item management here. I clear some of Thany's inventory, since she will want to be disarmed of usable weapons for Chapter 7, and have the space for the keys. Merlinus gives the two items he still has to Roy for later. I didn't pull out more weapons yet, I can do that later and save time by not having to enter storage a third time. I had to accept a 91% miss with Marcus on turn 1 here, but everything else went perfectly. First of all, I allow Marcus to use up a Hand Axe, but he gains D Axes here so it's all good, he won't need to worry for Chapter 8 now, so may as well get the switch to Javelins for the Lance rank, which he is also about to increase. Turn 2 and I bring in Lance to clear out the soldier that Marcus missed, Alan gives Marcus the space to move up to the boss area, and I manipulate a lot of misses for Roy. Turn 3, and I need Lance to clear the way for Alan, so Alan can clear the way for Roy to seize.
Post subject: Chapter 7: Now with encode!
Active player (279)
Joined: 4/30/2009
Posts: 791
Chapter 7 compete: http://dehacked.2y.net/microstorage.php/info/716431221/FE6%20TAS%20Ch1-7%20WIP.vbm Encode: http://www.youtube.com/watch?v=NPxZjx94SQI I wanted the Physic users to get as little involvement here as possible, since healing is a huge time waster. Unfortunately, I couldn't avoid it completely, but I did my best to minimise their involvement. I had to worry about several factors in the enemy phases which complicated matters, mostly involving keeping Thany alive by dodging attacks. Thankfully her high base Speed does give her a decent Avoid, but it still needed careful management along with the other factors here. Turn 1: I send Lance to get the Killing Edge. Wade gives his Hammer to Marcus, and Alan takes a trip forward carrying Roy. Thany manipulates a critical for Marcus on the enemy phase, since killing enemies here is a huge time saver in the long run, and reduces the number of attacks I need to dodge. No Physic use this turn. Turn 2: Marcus rids the map of a pesky archer, and Alan hands off Roy and clears an armour unit. Thany sells her inventory and buys 4 door keys and a chest key. Unfortunately with the need for Alan to crit the mercenary and Thany to dodge 2 attacks, I had to allow Zealot to hit his attacker and cause one of the Physic users to heal. Still, one is better than two. Turn 3: Alan kills off a cavalier (HP, Str, Skl, Spd level up), and Thany gives Marcus a door key which saves having to go around the long way to the boss. Manipulation here is for Zealot to miss the mercenary (which stops the Physic user from healing), and Thany to survive. I couldn't get all that and make Noah miss on the soldier, which makes the next turn a bit slower with the healing. I also made sure Zealot killed the archer which saved some time. Turn 4: Alan finishes off the other cavalier. Marcus and Roy position themselves right in front of the boss here; this allows Marcus to get the boss kill and gives Roy a clear run to seize. Thany moves away so she doesn't have to dodge 2 wyverns, and manipulates so she and Roy survive this turn. Noah sucks so much he died on the enemy phase, this saved a bit of time on the other phase. Turn 5: I couldn't manipulate Marcus to get a crit + good level up, so I had to compromise. Taking the double attack wastes less time than manipulating a crit, and again he misses out on Skill growth. But with 44 hit, I didn't have much option.
Active player (279)
Joined: 4/30/2009
Posts: 791
I don't want to redo Chapter 7, but I have a good point I need to address. Rolanmen1 pointed out that avoiding the Other Phase will save time, and it will. It can even be done with only one of the three horsemen recruited (Zealot), since Zealot can rescue Treck and hide away, and Noah can be rescued by Lance. This creates an entirely new problem however - the key shopping. If Thany is left on her own on turn 1, while everyone else is off to the right (both Marcus and Alan will be over here along with Roy), the wyvern that normally attacks blocks the shop square itself (in the current version, Marcus's turn 1 position causes the wyvern to move further right). Marcus and Alan also have to deal with more combat on the right, and there's the possibility that, in keeping Thany alive, I will cause the Physic users to activate on the enemies surrounding Zealot/Treck, more so than in the current version. Then there's the problem of getting Marcus/Roy to the boss. With Thany needing to take an extra turn to reach the shop, it means Marcus opens the door a turn later too, even though he can just reach the door in turn 3. Lance also suffers at least one combat turn while rescuing Noah. Moving Zealot off into a neutral position is an obvious time waste over moving less units too. So as I see it, the pros and cons of recruiting/rescuing the horsemen are: Pros: Time saved due to no Other Phase Cons: Thany suffers more dodges on enemy phase, and also has to take more time (at least 1 extra turn) to reach the shop, delaying Marcus's arrival to the boss area. More enemy phase combat with Alan/Marcus 6 turn strategy as opposed to 5 turn currently used More movement of long distance characters (Zealot/Lance), and likely having to move on every player phase to avoid the enemies chasing them Risk of more Physic healing I'm not going to stop the current progress to test this option. But I am aware of the possibility it might be faster, I argue that it probably isn't due to all the negative effects of recruiting Zealot, especially on the left side of the map. EDIT: Turns out I can be wrong sometimes: http://www.youtube.com/watch?v=r6S-B9yJIS8 340 frame improvement ahoy (370 on the map, -30 in battle preparations). I manage to remove all Other Phases and Physic healing, but it doesn't add a lot of improvement in the long run. In fact, since the enemies that normally pursue Zealot/Treck are free to roam, they pursue Marcus across the map, costing time here. But overall, it's an improvement, so I have to take it. I could save even more time here by not taking the Alan level up in Turn 4, but I'd still need to get to L10 in Chapter 8 to promote, so I may as well start as I mean to go on.
Post subject: Chapter 8: Now with encode!
Active player (279)
Joined: 4/30/2009
Posts: 791
Chapter 8 complete: http://dehacked.2y.net/microstorage.php/info/328209605/FE6%20TAS%20Ch1-8%20WIP.vbm View it here: http://www.youtube.com/watch?v=d3ybEd7Jg5E A long chapter this one, it feels more like an FE4 map. Turn 1: Zealot hands the Killing Edge to Alan, and sits idle for the rest of the chapter. It saves time doing it now rather than later. Lots of crit manipulation, and I have Thany manipulate a level up for Alan (HP, Str, Skl, Spe) off the archer Turn 2: Marcus, Alan and Thany start their trek across this spiral map. Marcus takes out one of the soldiers, and Alan takes out a mage on enemy phase. I need Alan to get only a few kills on this map, to ensure he reaches L10 by the time he gets the Knight Crest and promote. Turn 3: Alan takes out the armour, giving Marcus the distance to reach the next armour holding a Horseslayer. Thany follows behind and gives Marcus another crit. Turn 4: Marcus takes out the archer, gaining S-rank in Lances, and Thany hands Alan both Roy and the Chest Key. Thany's role is almost complete this chapter. Turn 5: Thany takes the Hand Axe (2 uses) and Rapier from Marcus, giving him 2 of the Door Keys in exchange. Marcus enjoys two crits on the nearby enemies, and Alan follows behind, gaining support turns all the time. Turn 6: Big enemy phase here, since I needed to ensure Marcus got at least 1 enemy phase critical (since the Javelin just runs out here) and a level up (Str, Spd, Luk). Alan moves in, ready to mop up what is left. Turn 7: Alan manipulates his own level up, and hands Roy to Marcus, who shoots off allowing Alan to reach L10 (minimum level for promotion). It's amazing I get a critical on the armour, a good level up (Str, Skl, Spd, Luk, Def), and have gained just enough kills for him to promote (exp at the end is 10.06) Turn 8: Marcus opens the next door and moves closer to the boss area, and Alan moves towards the Knight Crest chest, 1 space short. Turn 9: Alan opens the chest, and drops the now useless Chest Key back in Merlinus' hands. Marcus takes out an armour with the Hammer in a single hit. Turn 10: Woot promotion time! 10/1 Alan never looked so good. Marcus swings around the corner and takes a Javelin from Roy. Cath rears her head. Turn 11: Marcus crits one mage, and Alan manipulates a second critical for Marcus while he takes out Cath. Turn 12: Marcus can't crit or double the boss, so the next best option is an enemy phase attack followed by a player phase one (to avoid the throne healing). Hammer re-equipped, Roy dropped, and manipulates another low accuracy hit. Turn 13: Marcus takes a very sweet level up (Str, Skl, Spd, Luk, Res) and Roy seizes. EDIT: Make a new version with very little changes, but I managed to save 188 frames, mainly due to having Marcus use the Hand Axe on his turn 1 attack (so he doesn't run out of Javelin uses on turn 6), and by only moving Thany on 4 turns and not 5. I'll not put it up, since the changes are minor (none of the RNs used are changed), but you can view the changes when I finish Ch9.
Post subject: Chapter 9: Now with encode!
Active player (279)
Joined: 4/30/2009
Posts: 791
Chapter 9 complete: http://dehacked.2y.net/microstorage.php/info/184638144/FE6%20TAS%20Ch1-9%20WIP.vbm Watch it here: http://www.youtube.com/watch?v=VGL5OBQ4fEY Turn 1: Alan equips a new Javelin from Roy, and is picked up by Thany. Roy moves out of range of the bandit that will appear next turn. Turn 2: Alan gets dropped, and I manipulate him to hit and kill all enemies. I even manage a crit on one of them. Thany gets ready to rescue Roy. Turn 3: Thany picks up Roy, and Alan equips Iron Sword and manipulates a crit on the Steel Axe fighter. Turn 4: I manipulate Fir so she doesn't crit, and position myself so the mage can't reach Roy on the next turn. Turn 5: I was forced to accept a sub-optimal turn 5 due to a huge limitation. I would have needed Alan to avoid being critted (37 hit, 58% crit chance), crit himself (57 hit, 2% crit) and get a reasonable level up, as well as having Roy avoid a 74 hit attack from the mercenary who doubles him. If I'd got a single Speed level up earlier, he wouldn't have doubled. But you live and learn. So with that in mind, I had to accept Alan doubling with Iron Blade and 3HKOing Scott. This made the level up easier to achieve, and all I then had to do was avoid a single attack at 74 hit. I use Thany to manipulate Alan's level up, since she actually has the move to play with (both Alan and Roy are enclosed by enemies on both sides so it would take ages to manipulate), and Alan gets HP, Str, Skl, Spd, Luk.
GoddessMaria
She/Her
Reviewer, Experienced player (867)
Joined: 5/29/2009
Posts: 518
Location: Hell...
Nice WIPs you have here, though I expected no less! FE6 seems more confusing than FE8 in terms of Luck Manipulation...
Current projects: failing at life
Post subject: Preliminary FE Script
Skilled player (1652)
Joined: 11/15/2004
Posts: 2202
Location: Killjoy
Alright, its debug time, then I can start adding features. Right now, it just lists results, on a black screen. I'll draw the map soon. You need a directory "C:\FE\" to store the snap shots. Run at the start of the Enemy Phase, the rest is handled by the script. Increase BattleCheck (2nd line of the code) to run more tests. Also, remember to start fast forward, or you will go insane. I'm 90% sure the memory addresses are wrong, because enemies are appearing as characters. [code = FE_EnemyPhase.lua] require "gd" BattleCheck =100; CharacterStore = 0x0202BCE8; EnemyStore = CharacterStore + 0x3E * 0x48; Phase = 0x0202AA57; key1 ={}; key1['A']=true; StartF = movie.framecount(); StatM = {'HpC','Lvl','EXP','Hp','Str','Skl','Spd','Def','Res','Lck','Con'}; OffstC = {0x11, 0x8, 0x9,0x10, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18}; EnemyM = {'Alive','HpC','X','Y'}; OffstM = {0x00,0x11,0x0E, 0x0F}; Matcher = {}; newcount = 0; for checks = 0,0x3D,1 do Matcher[checks] = {}; for i = 1,11,1 do Matcher[checks] = memory.readbyte(CharacterStore+OffstC+checks*0x48); end; end; for checks = 0,49,1 do Matcher[checks+0x3E] = {}; if memory.readbyte(EnemyStore +0x11+checks*0x48) > 0 then Matcher[checks+0x3E][1] = true; for i = 2,4,1 do Matcher[checks+0x3E] = memory.readbyte(EnemyStore+OffstM+checks*0x48); end; else Matcher[checks+0x3E][1] = false; end; end; function nextrng(r1, r2, r3) return AND(XOR(SHIFT(r3, 5), SHIFT(r2, -11), SHIFT(r1, -1), SHIFT(r2, 15)),0xFFFF) end rngbase=0x03000000; RNGCheck = savestate.create(); savestate.save(RNGCheck); Unique = 0; FClist = {}; outsl = {}; RNGList = {}; TempC = {}; TempE = {} for curord = 0,BattleCheck-1,1 do savestate.load(RNGCheck); --RNGLOOP for n = 1,curord,1 do Rtemp = nextrng(memory.readword(rngbase+4), memory.readword(rngbase+2), memory.readword(rngbase+0)); memory.writeword(rngbase+4, memory.readword(rngbase+2)); memory.writeword(rngbase+2, memory.readword(rngbase+0)); memory.writeword(rngbase+0, Rtemp); end; R = {}; for Rl = 0,4,2 do R[Rl/2] = memory.readword(rngbase+Rl); end; --PhaseLoop while memory.readbyte(Phase) == 128 do joypad.set(1,key1); emu.frameadvance(); gui.text(10,10, string.format('%d of %d done.', curord+1, BattleCheck)); end; outs = ""; for checks = 0,0x3D,1 do for i = 1,11,1 do TempC = memory.readbyte(CharacterStore+OffstC+checks*0x48); end; if Matcher[checks][1] ~= TempC[1] then outs = outs .. string.format(' %d %dHP', checks, TempC[1] - Matcher[checks][1]); if TempC[1] == 0 then outs = outs .. '-Dead'; end; end; if Matcher[checks][3] ~= TempC[3] then outs = outs .. string.format(' %d %dXP', checks, TempC[3] - Matcher[checks][3]); end; if Matcher[checks][2] ~= TempC[2] then outs = outs .. string.format(' %d +%dLvl', checks, TempC[2] - Matcher[checks][2]); for j = 4,11,1 do outs = outs .. string.format(' %d %d%s', checks, TempC[j] - Matcher[checks][j],StatM[j]); end; end; end; for checks = 0,49,1 do end; FC = movie.framecount() - StartF; IsUnique = true; for n = 1,Unique,1 do if FClist[n] == FC and outsl[n] == outs then IsUnique = false; end; end; if IsUnique then Unique = Unique + 1; FClist[Unique] = FC; outsl[Unique] = outs; for i = 1,25,1 do gui.drawbox(0,0,320,240,'black','black'); gui.text(1,1,"Frames:" .. FC); gui.text(1,10,outs); emu.frameadvance(); end; print(outs); gdstr = gui.gdscreenshot(); SS = string.format('C:\\FE\\RNG%d.png',curord); gd.createFromGdStr(gdstr):png(SS); for i = 1,25,1 do gui.drawbox(0,0,320,240,'black','black'); gui.text(1,1,"Frames:" .. FC); gui.text(1,10,outs); emu.frameadvance(); end; end; end; [/code]
Sage advice from a friend of Jim: So put your tinfoil hat back in the closet, open your eyes to the truth, and realize that the government is in fact causing austismal cancer with it's 9/11 fluoride vaccinations of your water supply.
Post subject: initial testing is good
Active player (279)
Joined: 4/30/2009
Posts: 791
EDIT: thanks to Marzojr, I got the relevant dll files and it tried to work. One thing to note is that holding A does speed up the enemy phase, but it should also be possible to press Start to skip any important character's speeches upon entering combat and dying. As a temporary measure, having Autofire Start active while the script is running will work, until a way to get the script to pick the right spot to press Start and skip the character portrait and text can be found. Other than that, it appeared to work when I tried it. TEST: Tested at Ch2 Turn 3 (when Dieck faces a single soldier on enemy phase). The soldier (22 HP) cannot crit, and does 6 damage when it hits Dieck (26 HP) does 17 damage, has a 5% crit chance, and double attacks with his counter. When I ran the script it gave me 4 outcomes: Dieck counters and hits with both attacks and kills the soldier Dieck counters and hits with 1 attack, dealing 17 damage (soldier survives) Dieck does a critical hit on the second counter, killing the soldier Dieck does a critical hit on the first counter, killing the unit What it didn't tell me is how many RNs from the starting RNG values I would need to move to reach the outcomes listed, which is important to know so I can move to the right RNs before starting enemy phase. It also did not define how much HP the defending unit takes in damage. While this info can be added later, the script as it stands appears to work, at least from an initial test. Recommended information to add later: - HP taken by defending units in each iteration - number of RNG steps between starting RNG values and each iteration - script recognises when to press start to avoid any text from combat situations (boss encountered for first time, boss dying speech, ally unit dying speech) or from enemy/other phase recruitment scenarios
Skilled player (1652)
Joined: 11/15/2004
Posts: 2202
Location: Killjoy
Alright, script is almost final. Map Screen done. Very pretty results, if you ask me: Download FE_EPhase.lua
Language: lua

require "gd" BattleCheck =100; -- emu.speedmode('turbo'); CharacterStore = 0x0202AB78; --CharacterStore = 0x0202BCE8; EnemyStore = CharacterStore + 0x3E * 0x48; Phase = 0x0202AA57; key1 ={}; key1['A']=true; key1['start'] = false; StartF = movie.framecount(); StatM = {'HpC','Lvl','EXP','Hp','Str','Skl','Spd','Def','Res','Lck','Con', 'X', 'Y'}; OffstC = {0x11, 0x8, 0x9,0x10, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x0E, 0x0F}; EnemyM = {'Alive','HpC','X','Y'}; OffstM = {0x00,0x11,0x0E, 0x0F}; Matcher = {}; newcount = 0; for checks = 0,0x3D,1 do Matcher[checks] = {}; for i = 1,13,1 do Matcher[checks][i] = memory.readbyte(CharacterStore+OffstC[i]+checks*0x48); end; end; Estats = {}; for checks = 0,49,1 do Matcher[checks+0x3E] = {}; if memory.readbyte(EnemyStore +0x11+checks*0x48) > 0 then Estats[checks] = {}; Estats[checks][1] = false; Estats[checks][2] = false; Matcher[checks+0x3E][1] = true; for i = 2,4,1 do Matcher[checks+0x3E][i] = memory.readbyte(EnemyStore+OffstM[i]+checks*0x48); end; else Matcher[checks+0x3E][1] = false; end; end; function nextrng(r1, r2, r3) return AND(XOR(SHIFT(r3, 5), SHIFT(r2, -11), SHIFT(r1, -1), SHIFT(r2, 15)),0xFFFF) end rngbase=0x03000000; RNGCheck = savestate.create(); savestate.save(RNGCheck); Unique = 0; FClist = {}; outsl = {}; RNGList = {}; TempC = {}; TempE = {}; Pstat = {}; outs2l = {}; OfX = 6; OfY = 42; SX = 5; SY = 5; for curord = 0,BattleCheck-1,1 do savestate.load(RNGCheck); --RNGLOOP for n = 1,curord,1 do Rtemp = nextrng(memory.readword(rngbase+4), memory.readword(rngbase+2), memory.readword(rngbase+0)); memory.writeword(rngbase+4, memory.readword(rngbase+2)); memory.writeword(rngbase+2, memory.readword(rngbase+0)); memory.writeword(rngbase+0, Rtemp); end; R = {}; for Rl = 0,4,2 do R[Rl/2] = memory.readword(rngbase+Rl); end; --PhaseLoop while memory.readbyte(Phase) == 128 do joypad.set(1,key1); key1['start'] = not key1['start']; emu.frameadvance(); gui.text(10,10, string.format('%d of %d done.', curord+1, BattleCheck)); end; outs = ""; for checks = 0,0x3D,1 do Pstat[checks] = false; for i = 1,11,1 do TempC[i] = memory.readbyte(CharacterStore+OffstC[i]+checks*0x48); end; if Matcher[checks][1] ~= TempC[1] then outs = outs .. string.format(' %d %dHP', checks, TempC[1] - Matcher[checks][1]); if TempC[1] == 0 then Pstat[checks] = true; outs = outs .. '-Dead'; end; end; if Matcher[checks][3] ~= TempC[3] then outs = outs .. string.format(' %d %dXP', checks, TempC[3] - Matcher[checks][3]); end; if Matcher[checks][2] ~= TempC[2] then outs = outs .. string.format(' %d +%dLvl', checks, TempC[2] - Matcher[checks][2]); for j = 4,11,1 do outs = outs .. string.format(' %d %d%s', checks, TempC[j] - Matcher[checks][j],StatM[j]); end; end; end; outs2 = ""; for checks = 0,49,1 do for i = 2,4,1 do TempC[i] = memory.readbyte(CharacterStore+OffstM[i]+(checks+0x3E)*0x48); end; if Matcher[checks+0x3E][1] then Estats[checks][1] = false; Estats[checks][2] = false; if Matcher[checks+0x3E][2] ~= TempC[2] then outs2 = outs2 .. string.format(' E%d %dHP', checks, TempC[2] - Matcher[checks+0x3E][2]); if TempC[2] == 0 then Estats[checks][1] = true; outs2 = outs2 .. '-Dead'; end; end; if (Matcher[checks+0x3E][3] ~= TempC[3]) or (Matcher[checks+0x3E][4] ~= TempC[4]) then Estats[checks][2] = true; Estats[checks][3] = Matcher[checks+0x3E][3]; Estats[checks][4] = Matcher[checks+0x3E][4]; Estats[checks][5] = TempC[3]; Estats[checks][6] = TempC[4]; end; end; end; FC = movie.framecount() - StartF; IsUnique = true; for n = 1,Unique,1 do if FClist[n] == FC and outsl[n] == outs and outs2l[n] == outs2 then IsUnique = false; end; end; if IsUnique then -- emu.speedmode('normal'); Unique = Unique + 1; FClist[Unique] = FC; outsl[Unique] = outs; outs2l[Unique] = outs2; for i = 1,25,1 do gui.drawbox(0,0,320,240,'black','black'); gui.text(1,1,"Frames:" .. FC .. " RNG Distance: " .. curord); gui.text(1,10,string.format("RNGx00 = %d RNGx02 = %d RNGx04 = %d", R[0],R[1],R[2])); gui.text(1,20,outs); gui.text(1,30,outs2); gui.drawbox(3,40,238,160, 'black','white'); for checks = 0,0x3D,1 do if Matcher[checks][1] > 0 then if Pstat[checks] then X = Matcher[checks][12]; Y = Matcher[checks][13]; gui.drawbox(OfX+SX*X,SY*Y+OfY,OfX+SX*X+3,SY*Y+3+OfY,'Green','Blue'); else X = Matcher[checks][12]; Y = Matcher[checks][13]; gui.drawbox(OfX+SX*X,SY*Y+OfY,OfX+SX*X+3,SY*Y+3+OfY,'Green','Green'); end; end; end; for checks = 0,49,1 do if Matcher[checks+0x3E][1] then if Estats[checks][2] then X1 = OfX+SX*Estats[checks][3]+2; Y1 = OfY+SY*Estats[checks][4]+2; X2 = OfX+SX*Estats[checks][5]+2; Y2 = OfY+SY*Estats[checks][6]+2; gui.drawline(X1,Y1,X2,Y1,'blue'); gui.drawline(X2,Y1,X2,Y2,'blue'); if Estats[checks][1] then X = Estats[checks][5]; Y = Estats[checks][6]; gui.drawbox(OfX+SX*X,SY*Y+OfY,OfX+SX*X+3,SY*Y+3+OfY,'Red','Blue'); else X = Estats[checks][5]; Y = Estats[checks][6]; gui.drawbox(OfX+SX*X,SY*Y+OfY,OfX+SX*X+3,SY*Y+3+OfY,'Red','Red'); end; else if Estats[checks][1] then X = Matcher[checks+0x3E][3]; Y = Matcher[checks+0x3E][4]; gui.drawbox(OfX+SX*X,SY*Y+OfY,OfX+SX*X+3,SY*Y+3+OfY,'Red','Blue'); else X = Matcher[checks+0x3E][3]; Y = Matcher[checks+0x3E][4]; gui.drawbox(OfX+SX*X,SY*Y+OfY,OfX+SX*X+3,SY*Y+3+OfY,'Red','Red'); end; end; end; end; emu.frameadvance(); end; print("#".. Unique .. " unique - Distance: " .. curord); gdstr = gui.gdscreenshot(); SS = string.format('C:\\FE\\RNG%d.png',curord); gd.createFromGdStr(gdstr):png(SS); for i = 1,25,1 do gui.drawbox(0,0,320,240,'black','black'); gui.text(1,1,"Frames:" .. FC); gui.text(1,10,outs); emu.frameadvance(); end; -- emu.speedmode('maximum'); end; end;
Sage advice from a friend of Jim: So put your tinfoil hat back in the closet, open your eyes to the truth, and realize that the government is in fact causing austismal cancer with it's 9/11 fluoride vaccinations of your water supply.
Active player (279)
Joined: 4/30/2009
Posts: 791
For some strange reason, the script holds both A and Start instead of autofiring Start (pressing it every alternate frame). Any idea why this might be? EDIT: Also, is it possible to add a condition that, when an ally unit hits 0 HP, it skips over that RNG iteration and goes straight to the next (memory location is 0x0203CE05)? EDIT: It turns out the line
key1['start'] = not key1['start']; 
should read
key1.start = (not key1.start) or nil;
and the line
key1['start'] = false;
can be removed. Thanks Ilari
Post subject: Chapter 10A: Now with encode!
Active player (279)
Joined: 4/30/2009
Posts: 791
Chapter 10A complete!: http://dehacked.2y.net/microstorage.php/info/1855536957/FE6%20TAS%20Ch1-10%20WIP.vbm Encode:http://www.youtube.com/watch?v=UF6e7Vap9QQ This chapter is the first practical test of DarkKobold's Enemy Phase script. With Alan able to take out one of 5 enemies in Turn 1 player phase, it gave 5 different ways for the RNs to behave, producing very different enemy phases each time. After testing all 5 possibilities, I discovered this to be the best, since I get rid of all the enemies surrounding Alan, and pull off a crit as well to speed up the carnage. I can safely say this has been a huge success, and I'll use this script for the more complex enemy phases especially. Turn summary: Turn 1: The reason this chapter took so long. Alan was repositioned in preparations, and it gave me a selection of 5 different targets he could KO on player phase. By using a new Lua script devised by DarkKobold, I was able to brute force test all 5 possibilities and select the quickest target here, which allows me to finish off every enemy on enemy phase. To begin with, Lance hands over a fresh Hand Axe and Javelin to Marcus. Marcus equips the Hand Axe himself and gives the Javelin to Alan - this makes Marcus only have to face 1 enemy in the entire enemy phase. Thany picks up Roy and starts moving. Marcus's position is important for clearing the way in Turn 2. Not only does Alan kill all the enemies around him, he also crits one of them, and finishes 3 exp away from levelling up. Turn 2: Marcus crits the fighter so Alan can move his full distance. Alan equips the Iron Sword to build up wexp, and a crit + level up is manipulated for him (HP, Str, Skl, Spd, Def) on the berserker. Turn 3: Marcus moves back so he doesn't lure enemies his way. Thany manipulates an enemy phase crit for Alan, while he takes out the Shaman. On enemy phase, Alan's crit removes a hand axe fighter. Turn 4: Thany moves ever closer to the boss, and Alan does the same. Geese shows up to waste some time, but there's not much I can do about this. Turn 5: Thany drops Roy, so he gains a support turn with Alan, and Alan KOs the boss (level up HP, Str, Skl, Spd, Luk). If Alan's HP was higher, the shaman would go for Roy, but it doesn't matter since he cannot ORKO Roy in any way. Turn 6: Roy seize. Wyrmslayer get. At the end of all this, I have Alan on 80 Sword wexp (100 is needed by the boss of Ch12 for the Wyrmslayer). I have a few opportunities to gain that by then, but I'm ahead of the test run in terms of wexp at this point, and Vykan was only at 97 wexp by the time he reached Aine, so I am confident I can get the sword rank up by then.
Post subject: Chapter 11A: Now with encode!
Active player (279)
Joined: 4/30/2009
Posts: 791
Chapter 11A!: http://dehacked.2y.net/microstorage.php/info/560681884/FE6%20TAS%20Ch1-11%20WIP.vbm Encode: http://www.youtube.com/watch?v=VIaLg8vVUx0 Another short one, this introduces the dancer Lalum, which will be another invaluable unit in this TAS. For those who don't know, a dancer can refresh a unit after they have acted, and make them act twice in a turn instead of once. Elphin the Bard (appears on B route) has the same ability. However, since A route is notably faster, he won't see play. Turn 1: Lalum starts in an awkward position, so Lance rescues her, Marcus takes her and moves her further, and Thany eventually drops her for next turn. Roy takes the last Door Key from Thany (needed for the next chapter) in exchange for his Vulnerary, and Alan equips a Javelin and picks up Roy, moving along with everyone else. No combat this turn, all the enemies are too far away, but they will move some. Turn 2: Lance moves in order to avoid combat on Turn 3 enemy phase. Marcus takes Roy from Alan, and moves further right. Thany picks up Alan, and also moves her full distance right. Lalum dances for Thany, so she can drop him over the wall, and have the distance to move out of harm's way. Alan nets a few kills in order to clear out the area near the boss, and gains A Lances in the process, and Lalum is forced to draw the Longbow archer's attention. Turn 3: A bit of rescue chaining in order to give Roy to Alan, so he can drop him for the next turn seize. Alan discards a 2 use Javelin which is just taking up space, and equips the Iron Blade. Oro has too high cev (critical evade) to be critted, so Alan is forced to double, but nets a nice level up in the process (Str, Skl, Spd, Luk, Def). I could drop Roy on the right edge to avoid the Hand Axe fighter, but he is close to levelling up to L4, so I figure I might as well give him the exp. Lalum dodges the longbow this time. Turn 4: Nothing to do but seize. After all these short chapters, here comes another long chapter. In Ch12 I need to turnskip to turn 26 in order to avoid the gaiden, and make sure Alan has C swords by the time he reaches the boss in order to use the Wyrmslayer sword. With 17 wexp to go, and 9 enemies to face before then (an armor + 2 fighters near the start, 4 fighters + warrior near Ray, sleep staff bishop near Aine), Alan has just enough combat to manage it. In case you are not familiar with how wexp works, each attack with a weapon type gives 1 wexp, and a kill with that weapon earns you 2 wexp. Every 50 wexp points earns you a weapon rank, which allows you to equip better (usually) weapons. The Killing Edge (+30 critical%) and Wyrmslayer (triple damage on mamkute and wyvern units) swords are both C rank, so they are an important milestone to aim for. Ranks are listed from E>D>C>B>A>S, and my main unit started with rank E Swords, so he had a long way to go. Promotion earned him +50 wexp swords though, which saved some time.
Active player (279)
Joined: 4/30/2009
Posts: 791
Chapter 12!: http://dehacked.2y.net/microstorage.php/info/374856110/FE6%20TAS%20Ch1-12%20WIP.vbm Encode: http://www.youtube.com/watch?v=ZerNaBDWQXc Right, here comes an annoying chapter. Unlike the other chapters with gaidens, there is no quick way to avoid the extra chapter, so I have to turnskip to turn 21 and seize. Turn 1: Roy rearranges Alan's equipment, so Alan now has the Wyrmslayer, Iron Blade, Iron Sword, Hand Axe, Door Key. Alan manipulates a crit on the armor, and gains 8 wexp on enemy phase. 9 more to go. Turn 2: 2 RNs are shifted so that Alan dodges all the archers. Not a time waste in any way, but looks cool. Turn 3: Planning ahead, I use the open space Alan has to the left to manipulate his turn 4 enemy phase, then move his full move to avoid the southern sleep staff priest. Turn 4: Roy is dropped off since Alan fails to double some of the fighters here, and positions himself to take advantage of the terrain. Two of the fighters and the warrior have Hand Axes, but by using one Hand Axe Fighter to block up the exit to the choke point, I force the other Hand Axe Fighter and Warrior into Alan's Sword. This allows all but one of the enemies there to be killed, as well as giving Alan the wexp needed for C Swords rank. Turn 5: 1 RN was needed to shift to get the critical on the fighter, which Alan gladly takes. Sticking with the sword means he doesn't respond to the shaman attacking on enemy phase. Turn 6: Alan manipulates a crit on the last Hand Axe fighter, for a nice level up (HP, Str, Skl, Spd, Luk). It is faster for Alan to double the armour rather than using Roy's restricted range to manipulate a critical hit. Turn 7: With all enemies except the priest next to Aine, and Aine himself (itself?) out of the way, Roy starts to move towards the boss area. Alan opens the door and moves back to avoid the sleep staff range. Roy avoids one attack from the archers. Turn 8: Roy moves out of range of all enemies, and Alan kills the priest. Turn 9: Roy moves ever closer, and Alan crits the mamkute with Wyrmslayer. Turn 10: Roy stops on the reinforcement spawn point, and Alan moves down to gain support turns. Turns 11-15: Turnskipping Turn 16: Alan blocks up the other spawn point. He can just about get C Roy support now, but I'll grab it at the start of chapter 13, seems the quickest point to do so. Turn 17-19: More turnskipping Turn 20: Roy moves in order to seize immediately on turn 21, and is forced to dodge a Hand Axe Fighter that appeared on the spawn point he was blocking (40 hit). Turn 21: Roy seize.
Skilled player (1652)
Joined: 11/15/2004
Posts: 2202
Location: Killjoy
Updated script, with multi-line capabilities. [code = FE_EPhase.lua] require "gd" BattleCheck =100; -- emu.speedmode('turbo'); CharacterStore = 0x0202AB78; --CharacterStore = 0x0202BCE8; EnemyStore = CharacterStore + 0x3E * 0x48; Phase = 0x0202AA57; key1 ={}; key1['A']=true; StartF = movie.framecount(); StatM = {'HpC','Lvl','EXP','Hp','Str','Skl','Spd','Def','Res','Lck','Con', 'X', 'Y'}; OffstC = {0x11, 0x8, 0x9,0x10, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x0E, 0x0F}; EnemyM = {'Alive','HpC','X','Y'}; OffstM = {0x00,0x11,0x0E, 0x0F}; Matcher = {}; newcount = 0; for checks = 0,0x3D,1 do Matcher[checks] = {}; for i = 1,13,1 do Matcher[checks] = memory.readbyte(CharacterStore+OffstC+checks*0x48); end; end; Estats = {}; for checks = 0,49,1 do Matcher[checks+0x3E] = {}; if memory.readbyte(EnemyStore +0x11+checks*0x48) > 0 then Estats[checks] = {}; Estats[checks][1] = false; Estats[checks][2] = false; Matcher[checks+0x3E][1] = true; for i = 2,4,1 do Matcher[checks+0x3E] = memory.readbyte(EnemyStore+OffstM+checks*0x48); end; else Matcher[checks+0x3E][1] = false; end; end; function nextrng(r1, r2, r3) return AND(XOR(SHIFT(r3, 5), SHIFT(r2, -11), SHIFT(r1, -1), SHIFT(r2, 15)),0xFFFF) end rngbase=0x03000000; RNGCheck = savestate.create(); savestate.save(RNGCheck); Unique = 0; FClist = {}; outsl = {}; RNGList = {}; TempC = {}; TempE = {}; Pstat = {}; outs2l = {}; OfX = 5; OfY = 42; SX = 5; SY = 5; for curord = 0,BattleCheck-1,1 do savestate.load(RNGCheck); --RNGLOOP for n = 1,curord,1 do Rtemp = nextrng(memory.readword(rngbase+4), memory.readword(rngbase+2), memory.readword(rngbase+0)); memory.writeword(rngbase+4, memory.readword(rngbase+2)); memory.writeword(rngbase+2, memory.readword(rngbase+0)); memory.writeword(rngbase+0, Rtemp); end; R = {}; for Rl = 0,4,2 do R[Rl/2] = memory.readword(rngbase+Rl); end; --PhaseLoop while memory.readbyte(Phase) == 128 do joypad.set(1,key1); key1.start = (not key1.start) or nil; emu.frameadvance(); gui.text(10,10, string.format('%d of %d done.', curord+1, BattleCheck)); end; outs = ""; for checks = 0,0x3D,1 do Pstat[checks] = false; for i = 1,11,1 do TempC = memory.readbyte(CharacterStore+OffstC+checks*0x48); end; if Matcher[checks][1] ~= TempC[1] then outs = outs .. string.format(' %d %dHP', checks, TempC[1] - Matcher[checks][1]); if TempC[1] == 0 then Pstat[checks] = true; outs = outs .. '-Dead'; end; end; if Matcher[checks][3] ~= TempC[3] then outs = outs .. string.format(' %d %dXP', checks, TempC[3] - Matcher[checks][3]); end; if Matcher[checks][2] ~= TempC[2] then outs = outs .. string.format(' %d +%dLvl', checks, TempC[2] - Matcher[checks][2]); for j = 4,11,1 do outs = outs .. string.format(' %d %d%s', checks, TempC[j] - Matcher[checks][j],StatM[j]); end; end; end; for checks = 0,49,1 do for i = 2,4,1 do TempC = memory.readbyte(CharacterStore+OffstM+(checks+0x3E)*0x48); end; if Matcher[checks+0x3E][1] then Estats[checks][1] = false; Estats[checks][2] = false; if Matcher[checks+0x3E][2] ~= TempC[2] then outs = outs .. string.format(' E%d %dHP', checks, TempC[2] - Matcher[checks+0x3E][2]); if TempC[2] == 0 then Estats[checks][1] = true; outs = outs .. '-Dead'; end; end; if (Matcher[checks+0x3E][3] ~= TempC[3]) or (Matcher[checks+0x3E][4] ~= TempC[4]) then Estats[checks][2] = true; Estats[checks][3] = Matcher[checks+0x3E][3]; Estats[checks][4] = Matcher[checks+0x3E][4]; Estats[checks][5] = TempC[3]; Estats[checks][6] = TempC[4]; end; end; end; FC = movie.framecount() - StartF; IsUnique = true; for n = 1,Unique,1 do if FClist[n] == FC and outsl[n] == outs then IsUnique = false; end; end; if IsUnique then -- emu.speedmode('normal'); Unique = Unique + 1; FClist[Unique] = FC; outsl[Unique] = outs; for i = 1,50,1 do gui.drawbox(0,0,320,240,'black','black'); tx = 1; ty = 1; for j = 1,string.len(outs),1 do gui.text(tx,ty,string.sub(outs,j,j)); tx = tx + 4; if tx > 238 then tx = 1; ty = ty + 9; end; end; gui.drawbox(2,40,159,158, 'black','white'); gui.text(163,40,"Frames:" .. FC); gui.text(163,49,"RNG Dist: " .. curord); gui.text(163,58,"RNGx00 = " .. R[0]); gui.text(163,67,"RNGx02 = " .. R[1]); gui.text(163,76,"RNGx02 = " .. R[2]); for checks = 0,0x3D,1 do if Matcher[checks][1] > 0 then if Pstat[checks] then X = Matcher[checks][12]; Y = Matcher[checks][13]; gui.drawbox(OfX+SX*X,SY*Y+OfY,OfX+SX*X+3,SY*Y+3+OfY,'Green','Blue'); else X = Matcher[checks][12]; Y = Matcher[checks][13]; gui.drawbox(OfX+SX*X,SY*Y+OfY,OfX+SX*X+3,SY*Y+3+OfY,'Green','Green'); end; end; end; for checks = 0,49,1 do if Matcher[checks+0x3E][1] then if Estats[checks][2] then X1 = OfX+SX*Estats[checks][3]+2; Y1 = OfY+SY*Estats[checks][4]+2; X2 = OfX+SX*Estats[checks][5]+2; Y2 = OfY+SY*Estats[checks][6]+2; gui.drawline(X1,Y1,X2,Y1,'blue'); gui.drawline(X2,Y1,X2,Y2,'blue'); if Estats[checks][1] then X = Estats[checks][5]; Y = Estats[checks][6]; gui.drawbox(OfX+SX*X,SY*Y+OfY,OfX+SX*X+3,SY*Y+3+OfY,'Red','Blue'); else X = Estats[checks][5]; Y = Estats[checks][6]; gui.drawbox(OfX+SX*X,SY*Y+OfY,OfX+SX*X+3,SY*Y+3+OfY,'Red','Red'); end; else if Estats[checks][1] then X = Matcher[checks+0x3E][3]; Y = Matcher[checks+0x3E][4]; gui.drawbox(OfX+SX*X,SY*Y+OfY,OfX+SX*X+3,SY*Y+3+OfY,'Red','Blue'); else X = Matcher[checks+0x3E][3]; Y = Matcher[checks+0x3E][4]; gui.drawbox(OfX+SX*X,SY*Y+OfY,OfX+SX*X+3,SY*Y+3+OfY,'Red','Red'); end; end; end; end; emu.frameadvance(); end; print("#".. Unique .. " unique - Distance: " .. curord); gdstr = gui.gdscreenshot(); SS = string.format('C:\\FE\\RNG%d.png',curord); gd.createFromGdStr(gdstr):png(SS); -- emu.speedmode('maximum'); end; end; [/code]
Sage advice from a friend of Jim: So put your tinfoil hat back in the closet, open your eyes to the truth, and realize that the government is in fact causing austismal cancer with it's 9/11 fluoride vaccinations of your water supply.
Skilled player (1652)
Joined: 11/15/2004
Posts: 2202
Location: Killjoy
This script identifies enemies and characters by their number. It's missing the fun of my SF script, but whateva. Download FE_MoveChars.lua
Language: lua

Camera =1; CharacterStore = 0x0202AB78; --CharacterStore = 0x0202BCE8; EnemyStore = CharacterStore + 0x3E * 0x48; SizeX = 24; SizeY = 24; Holding = false; leftclickrelease = true; lbrelease = true; lbrelease = true; Rl = {}; CamPosX = 0x0202AA14; CamPosY = 0x0202AA16; SX = 16; SY = 16; OfX = 0; OfY = 0; SizX = 15; SizY = 16; while true do CamX = memory.readword(CamPosX); CamY = memory.readword(CamPosY); CamX = math.floor(CamX/16); CamY = math.floor(CamY/16); OnScreen = {}; PosX = {}; PosY = {}; Ord = {}; i=0; for c = 0,0x3D,1 do if memory.readbyte(CharacterStore+0x11+c*0x48) > 0 then X = memory.readbyte(CharacterStore+0x0E+c*0x48)-CamX; Y = memory.readbyte(CharacterStore+0x0F+c*0x48)-CamY; if ((X >= 0) and (X < 16) and (Y >= 0) and (Y < 14)) then gui.drawbox(OfX+X*SX,OfY + Y*SY,OfX+X*SX+SizX,OfY + Y*SY + SizY,"clear","blue") gui.text(X*SX+6,Y*SY+4,string.format("%d",c)); end; end; end; for c = 0,0x49,1 do if memory.readbyte(EnemyStore+0x11+c*0x48) > 0 then X = memory.readbyte(EnemyStore+0x0E+c*0x48)-CamX; Y = memory.readbyte(EnemyStore+0x0F+c*0x48)-CamY; if ((X >= 0) and (X < 16) and (Y >= 0) and (Y < 14)) then gui.drawbox(OfX+X*SX,OfY + Y*SY,OfX+X*SX+SizX,OfY + Y*SY + SizY,"clear","red") gui.text(X*SX+6,Y*SY+4,string.format("%d",c)); end; end; end; emu.frameadvance(); end;
Sage advice from a friend of Jim: So put your tinfoil hat back in the closet, open your eyes to the truth, and realize that the government is in fact causing austismal cancer with it's 9/11 fluoride vaccinations of your water supply.
Active player (279)
Joined: 4/30/2009
Posts: 791
New enemy phase script could do with a bit of tweaking
Skilled player (1652)
Joined: 11/15/2004
Posts: 2202
Location: Killjoy
Toothache wrote:
New enemy phase script could do with a bit of tweaking
Uh, looks like I've run out of screen real estate. Not quite sure how to fit in all the info that needs to go on the screen. Also, holy crap that is a large map.
Sage advice from a friend of Jim: So put your tinfoil hat back in the closet, open your eyes to the truth, and realize that the government is in fact causing austismal cancer with it's 9/11 fluoride vaccinations of your water supply.
Post subject: Chapter 13: Now with encode!
Active player (279)
Joined: 4/30/2009
Posts: 791
Chapter 13: http://dehacked.2y.net/microstorage.php/info/1819002045/FE6%20TAS%20Ch1-13%20WIP.vbm Encode: http://www.youtube.com/watch?v=5w72D62JuzE Dear gods what a pain this chapter was. I had to test a lot in order to get this, but the results speak for themselves. Complicated rescue chains are the order of the day, as well as lots of heavy combat for Alan to endure. Turn 1: Roy hands a 1 use Javelin for Thany to sell. Alan makes his full move, and is refreshed by Lalum to move again. Between Zealot and Marcus, Lalum is dropped a bit further ahead, and Thany picks up Roy. On enemy phase, we see Zephiel pwning Cecilia (can't skip this), and Alan grabs a nice level up off the enemies (HP, Str, Skl, Spd). Turn 2: Marcus gets rid of the annoying troubadour. Zealot moves his full move, and is refreshed by Lalum. He then picks her up and moves again, so Alan can drop her off for next turn. Alan also gets a fresh Javelin from Zealot. Thany moves more distance. On enemy phase, units move, and at the end, Miledy joins our army. Turn 3: Miledy is immediately put to use by rescuing Marcus, and Zealot drops him for the next turn. Thany hands Roy to Miledy. Alan moves as far as he can, so that Lalum can refresh him and he can move again, equipping the Jav he got last turn. On enemy phase, I take care of all the combat, luring Percival into range, and net another sweet level up (Str, Skl, Luk, Def, Res). With Strength now at max, Alan can have an easier time with later level up manipulation, and Speed only has 2 points to go. I figured it was important for the lategame to get some defences in, since his Avoid can only take him so far. Turn 4: Miledy moves her full move, triggering the Narshen leaving cutscene. Marcus swaps his 2 use Javelin for the Rapier, and moves his full move. Zealot takes Roy from Miledy, moving his full distance. Thany occupies Zealot's previous spot. Marcus is refreshed, and immediately kills the Wyvern that Alan was unable to reach. Alan then moves his full distance to kill the sniper - it is faster to double here than to manipulate a crit, the extra Sword wexp is a nice bonus. On enemy phase, Percival does a double miss on Lalum. Turn 5: Lalum recruits Percival. Thany moves, and so does Marcus into position for enemy phase. Zealot heads further towards the boss area carrying Roy. Alan heads down, and kills one Wyvern, manipulating the enemy phase for Marcus to crit another Wyvern. Turn 6: Thany moves, and is refreshed to move again. Marcus kills the troubadour. Zealot hands Roy over to Alan, who equips the Wyrmslayer and drops Roy near the boss. On enemy phase, it is again faster to double than to crit. Turn 7: Thany empties her inventory, and buys 5 Killer Lances. Roy seizes.
Skilled player (1652)
Joined: 11/15/2004
Posts: 2202
Location: Killjoy
Better screen management, cool red text. Also, removed CON. Download FE_EPhase.lua
Language: lua

require "gd" BattleCheck =100; -- emu.speedmode('turbo'); CharacterStore = 0x0202AB78; --CharacterStore = 0x0202BCE8; EnemyStore = CharacterStore + 0x3E * 0x48; Phase = 0x0202AA57; key1 ={}; key1['A']=true; StartF = movie.framecount(); StatM = {'HpC','Lvl','EXP','Hp','Str','Skl','Spd','Def','Res','Lck', 'X', 'Y'}; OffstC = {0x11, 0x8, 0x9,0x10, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x0E, 0x0F}; EnemyM = {'Alive','HpC','X','Y'}; OffstM = {0x00,0x11,0x0E, 0x0F}; Matcher = {}; newcount = 0; for checks = 0,0x3D,1 do Matcher[checks] = {}; for i = 1,12,1 do Matcher[checks][i] = memory.readbyte(CharacterStore+OffstC[i]+checks*0x48); end; end; Estats = {}; for checks = 0,49,1 do Matcher[checks+0x3E] = {}; if memory.readbyte(EnemyStore +0x11+checks*0x48) > 0 then Estats[checks] = {}; Estats[checks][1] = false; Estats[checks][2] = false; Matcher[checks+0x3E][1] = true; for i = 2,4,1 do Matcher[checks+0x3E][i] = memory.readbyte(EnemyStore+OffstM[i]+checks*0x48); end; else Matcher[checks+0x3E][1] = false; end; end; function nextrng(r1, r2, r3) return AND(XOR(SHIFT(r3, 5), SHIFT(r2, -11), SHIFT(r1, -1), SHIFT(r2, 15)),0xFFFF) end rngbase=0x03000000; RNGCheck = savestate.create(); savestate.save(RNGCheck); Unique = 0; FClist = {}; outsl = {}; RNGList = {}; TempC = {}; TempE = {}; Pstat = {}; outs2l = {}; OfX = 5; OfY = 42; SX = 5; SY = 5; Colors = {}; for curord = 0,BattleCheck-1,1 do savestate.load(RNGCheck); --RNGLOOP for n = 1,curord,1 do Rtemp = nextrng(memory.readword(rngbase+4), memory.readword(rngbase+2), memory.readword(rngbase+0)); memory.writeword(rngbase+4, memory.readword(rngbase+2)); memory.writeword(rngbase+2, memory.readword(rngbase+0)); memory.writeword(rngbase+0, Rtemp); end; R = {}; for Rl = 0,4,2 do R[Rl/2] = memory.readword(rngbase+Rl); end; --PhaseLoop while memory.readbyte(Phase) == 128 do joypad.set(1,key1); key1.start = (not key1.start) or nil; emu.frameadvance(); gui.text(10,10, string.format('%d of %d done.', curord+1, BattleCheck)); end; outs = ""; OldLn = 1; for checks = 0,0x3D,1 do Pstat[checks] = false; for i = 1,11,1 do TempC[i] = memory.readbyte(CharacterStore+OffstC[i]+checks*0x48); end; if Matcher[checks][1] ~= TempC[1] then outs = outs .. string.format(' %d %dHP', checks, TempC[1] - Matcher[checks][1]); if TempC[1] == 0 then Pstat[checks] = true; for k = OldLn,string.len(outs),1 do Colors[k] = false; end; else for k = OldLn,string.len(outs),1 do Colors[k] = true; end; end; OldLn = string.len(outs); end; if Matcher[checks][3] ~= TempC[3] then outs = outs .. string.format(' %d %dXP', checks, TempC[3] - Matcher[checks][3]); for k = OldLn,string.len(outs),1 do Colors[k] = true; end; OldLn = string.len(outs); end; if Matcher[checks][2] ~= TempC[2] then outs = outs .. string.format(' %d +%dLvl', checks, TempC[2] - Matcher[checks][2]); for j = 4,10,1 do outs = outs .. string.format(' %d %d%s', checks, TempC[j] - Matcher[checks][j],StatM[j]); end; for k = OldLn,string.len(outs),1 do Colors[k] = true; end; OldLn = string.len(outs); end; end; for checks = 0,49,1 do for i = 2,4,1 do TempC[i] = memory.readbyte(CharacterStore+OffstM[i]+(checks+0x3E)*0x48); end; if Matcher[checks+0x3E][1] then Estats[checks][1] = false; Estats[checks][2] = false; if Matcher[checks+0x3E][2] ~= TempC[2] then outs = outs .. string.format(' E%d %dHP', checks, TempC[2] - Matcher[checks+0x3E][2]); if TempC[2] == 0 then Estats[checks][1] = true; for k = OldLn,string.len(outs),1 do Colors[k] = false; end; else for k = OldLn,string.len(outs),1 do Colors[k] = true; end; end; OldLn = string.len(outs); end; if (Matcher[checks+0x3E][3] ~= TempC[3]) or (Matcher[checks+0x3E][4] ~= TempC[4]) then Estats[checks][2] = true; Estats[checks][3] = Matcher[checks+0x3E][3]; Estats[checks][4] = Matcher[checks+0x3E][4]; Estats[checks][5] = TempC[3]; Estats[checks][6] = TempC[4]; end; end; end; FC = movie.framecount() - StartF; IsUnique = true; for n = 1,Unique,1 do if FClist[n] == FC and outsl[n] == outs then IsUnique = false; end; end; if IsUnique then -- emu.speedmode('normal'); Unique = Unique + 1; FClist[Unique] = FC; outsl[Unique] = outs; for i = 1,50,1 do gui.drawbox(0,0,320,240,'black','black'); tx = 1; ty = 1; for j = 1,string.len(outs),1 do if Colors[j-1] then gui.text(tx,ty,string.sub(outs,j,j)); else gui.text(tx,ty,string.sub(outs,j,j),'red'); end; tx = tx + 4; if tx > 238 then tx = 1; ty = ty + 9; end; end; gui.drawbox(2,40,200,158, 'black','white'); gui.text(1,32,string.format("FC: %d Dist: +%d Rx00 = %04X Rx02 = %04X Rx04 = %04X", FC, curord, R[0],R[1],R[2])); --gui.text(163,49,"Dist: +" .. curord); --gui.text(163,58,"Rx00 = " .. R[0]); --gui.text(163,67,"Rx02 = " .. R[1]); --gui.text(163,76,"Rx02 = " .. R[2]); for checks = 0,0x3D,1 do if Matcher[checks][1] > 0 then if Pstat[checks] then X = Matcher[checks][11]; Y = Matcher[checks][12]; gui.drawbox(OfX+SX*X,SY*Y+OfY,OfX+SX*X+3,SY*Y+3+OfY,'Green','Blue'); else X = Matcher[checks][11]; Y = Matcher[checks][12]; gui.drawbox(OfX+SX*X,SY*Y+OfY,OfX+SX*X+3,SY*Y+3+OfY,'Green','Green'); end; end; end; for checks = 0,49,1 do if Matcher[checks+0x3E][1] then if Estats[checks][2] then X1 = OfX+SX*Estats[checks][3]+2; Y1 = OfY+SY*Estats[checks][4]+2; X2 = OfX+SX*Estats[checks][5]+2; Y2 = OfY+SY*Estats[checks][6]+2; gui.drawline(X1,Y1,X2,Y1,'blue'); gui.drawline(X2,Y1,X2,Y2,'blue'); if Estats[checks][1] then X = Estats[checks][5]; Y = Estats[checks][6]; gui.drawbox(OfX+SX*X,SY*Y+OfY,OfX+SX*X+3,SY*Y+3+OfY,'Red','Blue'); else X = Estats[checks][5]; Y = Estats[checks][6]; gui.drawbox(OfX+SX*X,SY*Y+OfY,OfX+SX*X+3,SY*Y+3+OfY,'Red','Red'); end; else if Estats[checks][1] then X = Matcher[checks+0x3E][3]; Y = Matcher[checks+0x3E][4]; gui.drawbox(OfX+SX*X,SY*Y+OfY,OfX+SX*X+3,SY*Y+3+OfY,'Red','Blue'); else X = Matcher[checks+0x3E][3]; Y = Matcher[checks+0x3E][4]; gui.drawbox(OfX+SX*X,SY*Y+OfY,OfX+SX*X+3,SY*Y+3+OfY,'Red','Red'); end; end; end; end; emu.frameadvance(); end; print("#".. Unique .. " unique - Distance: " .. curord); gdstr = gui.gdscreenshot(); SS = string.format('C:\\FE\\RNG%d.png',curord); gd.createFromGdStr(gdstr):png(SS); -- emu.speedmode('maximum'); end; end;
Sage advice from a friend of Jim: So put your tinfoil hat back in the closet, open your eyes to the truth, and realize that the government is in fact causing austismal cancer with it's 9/11 fluoride vaccinations of your water supply.
Post subject: Chapter 13 improvement: Now with encode!
Active player (279)
Joined: 4/30/2009
Posts: 791
Chapter 13 improved!: http://dehacked.2y.net/microstorage.php/info/1332243403/FE6%20TAS%20Ch1-13%20improvement.vbm Encode: http://www.youtube.com/watch?v=CNkL2tUtDI4 Managed to bag a 1336 frame improvement on this chapter, with an entirely new strategy. Turn 1: First of all, notice Thany is entirely gone from this chapter. Roy moves forward, and drops a 1 use Javelin. Alan gallops forward, and is energised by Lalum. Zealot comes in, rescues Lalum for Marcus to take and drop off for next turn. Alan takes Zealot's Javelin and Killing Edge, and nets a different level up on enemy phase (HP, Str, Skl, Spd, Luk, Def). Turn 2: Roy takes some of Zealot's inventory, and then Zealot rescues Roy. Marcus crits the troubadour, and Lalum energises Marcus. Marcus takes Lalum and she is dropped off by Alan. Note the first two turns are almost identical to the old version, but now I have managed to get Lalum one space further ahead. This was the main point of improvement, since now Alan can eliminate all the enemies around Percival, with the exception of the troubadour who doesn't attack. Miledy joins at the end of a combat free enemy phase. Turn 3: Zealot moves his full distance, holding Roy. Marcus dumps most of his inventory on Zealot, takes Roy, and moves along the bridge, stopping just out of the ballista range. Alan swaps his 6 use Hand Axe with a 17 use Hand Axe that Marcus had, and goes as far as Lalum can reach to move again. Alan equips the fresh Javelin. Here's a new change - if Alan is below half health when it is the sniper's turn, he doesn't use the ballista and instead comes into normal attack range, allow him to be finished off. Unfortunately, the only attacker that went before the sniper was Percival, which made this hard to achieve (Percy had a mere 40 hit with his Silver Lance). With the amount of enemies attacking Alan, there was no choice with the Javelin being broken. Still, it works out well, all enemies killed, one critted, and a level up (HP, Str, Skl, Spd). Turn 4: Marcus moves his full distance. Lalum moves one space in order to lure Percival for recruitment. Alan equips the Killing Edge to crit the troubadour. On enemy phase, Lalum does a double dodge. Turn 5: Percival recruited. Marcus moves ready to hand Roy over next turn, and drops a 2 use Javelin. Alan crits one of the wyverns with the Hand Axe, takes the other two out with an enemy phase crit + double attack. Turn 6: Marcus hands Roy over to Alan. Alan equips the Killing Edge in order to crit the boss. Turn 7: Marcus buys 4 Killer Lances (I figured 5 was too many). Roy seize.
Active player (279)
Joined: 4/30/2009
Posts: 791
I've been contemplating restarting the entire run as it stands, given that I've discovered someone has a method to 2 turn chapter 5 (http://www.youtube.com/watch?v=kyUlCVnQPFs). This is a noticeable improvement, although it does require killing off 2 units in order to reposition Alan so he can open the door. There are other things that could be done with improving and changing too, but only now that I've got so far can I see these improvements. For instance, on one level up (Ch4) for Alan I allow the Skill level up to fail in order to get an early enough level up + crit. Since Skill requires the most growth and gives Alan more accuracy and crit chance, and Alan doubles everything with only a minimal gain in Speed, it would be best to guarantee Skill on every level up. For that matter, getting more defensive level ups might be a wise thing too - Res especially with the lategame staff users. Getting more Luck both adds to accuracy and avoid, so that should be another priority for level ups too. There are some item management improvements too. Merlinus has room a lot sooner to be useful in handing out the 1-2 weapons among the units, and he only fills his inventory once so far in ch5, and again in ch6 he empties the rest onto Roy for later. The hammer can be given to one of the units active in ch7 much earlier so Wade doesn't have to appear at all. Dropping items is much faster than selling them, so it's probably not worth selling the vulneraries or 1 use Silver Lance in ch4 (the Angelic Robe is a good early cash source though, which allows enough cash to get all the 1-2 weapons in ch4 and the killer weapons in ch13) There's one minor improvement possible too. Currently throughout the run, at the start of the turn the camera instantly locates to Roy's position. In some places this saves time, in other places it probably doesn't (such as the Ch12 turnskip). It is definitely worth doing a frame comparison to see if this saves time at all, but I very much doubt it. Probably in the long run, it saves more time to have the cursor locate on Roy at the turn start than not. One final note is that I didn't have access to the Lua scripts until Ch10. There is probably scope for better RNG manipulation using the scripts, since human trail and error can only go so far. With all this in mind, it's clear the current run has scope for improvement, and needs to start again. If there are any possible improvements people have spotted, please feel free to let me know now as I start again.
Rolanmen1
He/Him
Experienced player (764)
Joined: 2/20/2009
Posts: 569
Location: Dominican Republic
Hmm, probably that 2Turn strategy is faster, since one more turn means lots of units running wild and attacking. As for restarting, i think that you should probably go on, and maybe you can find more improvements forward, but that is your choosing of course. Another improvement you have to know, is that you can skip from the intro to the menu instantly, by pressing (ASAP) A, B, L and R, and in the next frame press Start and hold the 5 butons until you get to the menu. NOTE that i tried this with FE7 and with FE8 FEGirl hackrom, but the system should be the same with these 3 games.
Active player (279)
Joined: 4/30/2009
Posts: 791
Perhaps, since I've done all this work already I may as well finish the current version, and make any improvements in a future version. Seems a shame letting all this work go to waste. There is an improvement I can and should make now, in ch12 though. After Alan clears out the enemies in front of the boss door area, he should rescue Roy before he is targeted by the archers along the corridor. It won't be hard to redo Ch12 and 13 from here though, and should save a good few hundred frames. After that, its onto the desert. As for the reset trick in order to save time, I can start incorporating this.
1 2 3
7 8