Twisted_Eye
He/Him
Active player (332)
Joined: 10/17/2005
Posts: 629
Location: Seattle, WA
Bah. Getting through the rest is tougher than I thought because of Si Ma Yi's 40000 health and the fact that even with the really strong Bo Ye on one guy I'm still doing only 700 or so to him at best per hit, so it's taking a loooong time, and I need to keep Ji Mian up for most of it! Gah. In the meantime, I found an weird, unhelpful glitch relating to death in the game. http://www.twistedeye.net/doae/DoaE%20Glitch.fcm
Joined: 1/1/2022
Posts: 1716
Have you considered getting Guan Ping? Granted, the time it takes to get the old key may be inefficient, but I wonder if his 210+ attack power may ultimately save you time through all of the all-outs and battles. It shouldn't take more than 1 minute to get him, and I think he may be able to save more than a minute because every round he'll kill probably 20 soldiers more than Mi Zhe or Huo Hu. Just wondering if this has been considered. The same question also arises with me with Zhou Cang and his 200+ AP.
Joined: 1/1/2022
Posts: 1716
Never mind the part about Zhou Cang. I saw you attack the castle with Lu Guang without him, but realized afterwards that it was to avoid going to the cave with Xu Zhe twice. I still wonder about Guan Ping, though
Editor, Skilled player (1172)
Joined: 9/27/2008
Posts: 1085
Eh, all I did was the first battle. Over 200 frames faster than the published run at this point through better manipulation of that first battle. I seem to like visiting the GameFAQs boards. MeteorStrike had dug into the game coding a bit. One measure of damage is how many digits of HP (Okay, soldiers. Happy now?) each general has. It multiplies damage by the square of the number of digits, so if you have 172 HP, your damage is multiplied by 9. The multiplier is still 9 even if you have 913 HP. But once you hit 1000, that's when you get a nice jump in damage. Additionally, weapons are important. They're a pretty big factor in how much damage you deal. Heck, if you went weaponless, you'd deal less than a third of the damage than if you actually took the time to equip the starter Flails. Some of that information might be nice to have here, though...
    1~    9 HP : x 1 damage  (Uh... Nice knowin' you...)
   10~   99 HP : x 4 damage
  100~  999 HP : x 9 damage
 1000~ 9999 HP : x16 damage
10000 and up   : x25 damage

( NONE )     12
Dagger       25
Flail        38   (Note, this has nothing to do with
Ax           56    the displayed attack power.)
Club         84
Spear       128
Sabre       192
Trident     435 (Good grief, that's a big jump!)
Bow         289 Two hits! (effectively 578)
Sword       655
Battleax   1024
Scimitar   1280
Crossbow    768 Two hits! (effectively 1536)
Lance      1536
Wan Sheng  1792
Bo Ye      1792
Qing Guang 2048
Nu Long    2048
Qing Long  2048
Halberd    4096
For those who actually looks at the input display, you may note mysteriously placed input. That would be me adding in a little something for Yoshi's Cookie without messing with the main run here. I wonder if I can squeeze one more game in there without interfering with what I have...
Twisted_Eye
He/Him
Active player (332)
Joined: 10/17/2005
Posts: 629
Location: Seattle, WA
Yeah, this was the first TAS I ever made, and I knew when I was finished that the first few sections were poorly manipulated, as I was still developing a sense of patience. There are bits of strategy that I think I can do without, like picking up Chi Tu Ma for example, and finding more ways to keep less max-health-gain-at-level in the party whenever possible. I also missed at least one of the TP increases by only having Zhu Ge Liang around. I've also realized that the amount of damage your tactics do is related to your character's strength, not intelligence, so having say Zhang Fei cast magic is actually a good idea in the game, he just really low odds of connecting, which is irrelevant in a TAS. Improving this run has always been in the back of my mind--maybe I should use it as an excuse to learn Lua scripting. Your info there is really useful, like it might be a good idea to pick up the guy in the first castle of the Northern region whose health is just over 1000 for his extra damage multiplier. Something to test.
Editor, Skilled player (1172)
Joined: 9/27/2008
Posts: 1085
From what I read, tactics damage is based off strength or intelligence, whatever is greater. Geniuses with no strength are still going to hurt stuff with a good tactic, I believe. Chi Tu Ma improves the hidden agility stat just by having it in the general's inventory. This gives a higher chance that said general goes first and possibly destroy something before it attacks, maybe even save a little time on manipulation of turn order. Whether that saves enough time to beat the menu transition to get it is hard to tell, but Chi Tu ma shows up early, giving it significant opportunity to be useful, even if you never bother trading it around. The damage advantage of having 1000 soldiers vanish if you take damage and go below 1000. Might turn out to be too high a maintenance just to maintain the increased damage potential, but this is something that should be checked, as usual. I'm curious if some time could be saved by picking up a few elixirs instead of having to backtrack to an inn at certain points, or as a replacement for that Chi Xin against Xu Rong and Guo Ji, preferring to All-Out the whole way through then heal with items after the battle. Naturally, this involves a trip to a shop and lots of shopping dialogue, but the advantages of skipping an inn trip and avoiding use of Chi Xin is something to be considered. Apparently, my run is a few frames slower than yours at initiating the first battle. That should be fixed, but I wonder if the luck manipulation will work out if I fix that difference. Even if not, I should be able to, theoretically, waste exactly enough time to get the same sort of luck as I did.
Twisted_Eye
He/Him
Active player (332)
Joined: 10/17/2005
Posts: 629
Location: Seattle, WA
There are a lot of ways to save time in a new run over the old, like doing one round of All-Out in a Castle battle that also has a couple Rebel Forces first thing so that their attacks don't waste time later, although Rebel Forces near the end of the game have a high enough agility that they could attack before other generals, giving another chance to manipulate a crit/miss. I like your elixir idea, though when group heals are available they're the way to go. Still, using All-Out more is definitely the way to save the most time in a new run. The formula using either STR or INT depending on which is stronger makes sense and that sure seems to be how it works; I had always assumed it was only the latter. And, yeah, the idea of Chi Tu Ma giving that general more first strikes to make fights potentially faster was the reason I picked him up, but with SO much manipulation in the game and so many parts of battle where you can't, I'm thinking it's probably fine just to not pick him up. At the same time, the logic of "it's just two seconds what'll it hurt" says it's okay. Pfft.
Editor, Skilled player (1172)
Joined: 9/27/2008
Posts: 1085
Well, I did successfully initiate the first battle several frames faster than the published run now, by equipping the Flails first thing after the introductory text, before I even take the first step. Having a little trouble manipulating the battle like I did before, but I haven't made thorough searches yet, been lazy. For now, I'm just scanning through the game's memory for things like the RNG (possibly 0x00AC to 0x00AF), data related to character stats, items, formation, and so forth (0x6000 and beyond). Alas, I so far have no idea about the RNG except for the suspected memory addresses, and I've only begun my search through these things. I'm curious what I can create with lua scripts. Even if it's as simple as displaying the hidden agility stat or telling you which one of the 7 "bags" the general is carrying, it's still something. Being able to read the necessary information at all is still useful for a brute-force bot, where we can successfully tell our bot that "total defeat" is not a desired outcome. A script that would calculate out an entire round of All-Out with a given starting RNG value and display the results and frames taken would be lovely, but that requires knowing some serious stuff about the game mechanics.
Twisted_Eye
He/Him
Active player (332)
Joined: 10/17/2005
Posts: 629
Location: Seattle, WA
MeteorStrike's amazingly detailed FAQ on the Item Exploitation/Disappearance Bug explains so many of the memory addresses beautifully here: http://faqs.ign.com/articles/974/974431p1.html Thanks to him doing ALL of the memory digging for me, I had a nice headstart on the script I wanted to make, and after a couple hours, I came up with this (probably really ugly) "Find the Best Frame to All-Out" script.
-- This script, when running correctly, will
-- brute force checking All-Out for a full
-- minute and keeps track of the best frame
-- for time and best frame for health of group.

	local i=0;
	local frame=0;
	local framecount=0;
	local bestframes=0;
	local bestframesframes=99999;
	local bestframeshealth=0;
	local besthealth=0;
	local besthealthframes=99999;
	local besthealthhealth=0;
	local health=0;
	local endloop=5;
	local enemies=0;
	local statell=savestate.create(9);
	local myinputs = joypad.read(1);
	FCEU.speedmode("maximum");
	savestate.save(statell);

	--Increase the second number here to brute force for more than a minute of gameplay.
	while (frame<(100)) do
		framecount=0;
		endloop=5;
		myinputs.A = nil;
		joypad.write(1,myinputs);
		savestate.load(statell);
		for i=0,frame do
			if (i~=frame) then
				joypad.write(1,myinputs);
				gui.text(8,150,"So far... Fastest: "..bestframes..", "..bestframesframes.." frames w/"..bestframeshealth.."HP.\n Healthiest: "..besthealth..", with "..besthealthhealth.."HP in "..besthealthframes.." frames.");
				FCEU.frameadvance();
			end;
		end;

		myinputs.A = true;
		joypad.write(1,myinputs);

		--Increase the latter number if you don't mind winning All_Outs longer than 5 minutes of gameplay.
		while (framecount<15000> bestframeshealth) then
						bestframes = frame;
						bestframeshealth = health;
						bestframesframes = framecount + frame;
					end;
				end;
				if ((framecount + frame) < bestframesframes) then
					bestframes = frame;
					bestframeshealth = health;
					bestframesframes = framecount + frame;
				end;
				if (health == besthealthhealth) then
					if ((framecount + frame) <besthealthframes> besthealthhealth) then
					besthealthhealth = health;
					besthealth = frame;
					besthealthframes = frame + framecount;
				end;
				endloop=1;
			end;

			if endloop==1 then
				framecount=18001;
			end;
			gui.text(8,8,frame.." "..framecount.." "..enemies.." "..endloop)
			gui.text(8,150,"So far... Fastest: "..bestframes..", "..bestframesframes.." frames w/"..bestframeshealth.."HP.\n Healthiest: "..besthealth..", with "..besthealthhealth.."HP in "..besthealthframes.." frames.");
			FCEU.frameadvance();
			framecount = framecount + 1;
		end;
		
		savestate.load(statell);
		--Printing bests to screen
		gui.text(8,150,"So far... Fastest: "..bestframes..", "..bestframesframes.." frames w/"..bestframeshealth.."HP.\n Healthiest: "..besthealth..", with "..besthealthhealth.."HP in "..besthealthframes.." frames.");
		frame = frame + 1;
	end;

	-- Loop the message forever until you choose to end the script.
	-- In the future I should change this to set state 7 to fastest's start and state 8 to healthiest's start via an anonymous state,
	-- maybe even set 6 to alternate healthiest or faster in case two come out equal so I can test both and see which is more entertaining to the viewer, say multiple consecutive crits/misses? I dunno.
	FCEU.speedmode("normal");
	gui.text(8,150,"All done! Fastest: "..bestframes..", with "..bestframesframes.." frames w/"..bestframeshealth.."HP.\n Healthiest: "..besthealth..", with "..besthealthhealth.."HP in "..besthealthframes.." frames.");
	FCEU.pause();
This will save a new state and press A on the first frame and record the results, reload the state, wait one frame, and do it again, up through however many times you tell it to (right now it's set really low, to 100). It automatically knows if all of the enemies are dead, and if that round was faster or had a healthier party (in case it's not too far behind in frames you have an alternative) and keeps records of which was best, displaying the results on screen during the whole exploration. It has its flaws still, though: You have to manually comment out the lines that check whether any of your allies have died if they enter the battle already dead (I can fix this later though), and when the script is ALL done, it loads the state and then advances a frame to right the final result to the screen. This is probably an easy fix. The idea was just to get something out there that works. (I wish I could figure out why it won't actually save to State 9 like the documentation says it should, though. It would be nice to add features later where it saves states for the best runs and you can just load those states to go straight to the frame.) And it DID work. Setting it to test for 100 frames, the script found a solution that was 134 frames faster than even your improvement, with ally generals having a cumulative health that was 15 more, after more than a second of consecutive failure frames, something I doubt a real person would've had the patience to go through! This script is only good for finding ways through the battle by hitting A and letting it run. It would require some serious math to come up with a bot that could possibly improve the battle with the B button to exit All-Out at precisely the right time,and then go right back into it, hmm. I also intend to write up a script that does the same thing as this one but presses the B button after a goal is reached, say, all Rebel Forces have been slain, so as to potentially make the rest of the battle faster if we have to switch to Tactics by removing their longwinded "Attacks! Damage done!" texts. Maybe I can combine them all into one dialog box with buttons and a fancy range 'o' knobs with iup i dunnos! Good idea about equipping the Flails without taking a step first, it makes a lot of sense. Add those frames in before the 92 frames of wait my script found, and there's potentially enough time to even go into the menu again and set Liu Bei as tactician or equip a Robe or something, just to see what it can do to save health or whatevs, since we'll be waiting anyway. In the 92 frame battle, Zhang Fei never takes any damage, hence the quicker ending, by Guan Yu is dropped to 22HP. If the Robe can save another few HP then we've got something good. I'll play around more after work.
Editor, Skilled player (1172)
Joined: 9/27/2008
Posts: 1085
I found my notes on physical damage I took while reading through GameFAQs. They're... Rather few, but I did effectively get this: Damage formula: * Strength * HP digits ^2 * Weapon power /256 * One of four random numbers (20, 23, 25, or the critical 51) /256 * (255 - enemy defense) /256 * (255 - enemy "castle defense") /256 Multiply them all together, in order and round down each step, and hope it works out. I'm not sure how accurate my notes are, but I'm somewhat sure all the factors are in there. EDIT: Hrm... Forgot the defend option. Unfortunately, my notes doesn't cover that. Thankfully, the displayed defense is actually what we're getting! Unfortunately, wearing just a Robe won't even let us last 10% longer... As for memory addresses that isn't already found on that guide's Memory Map, here's what I found so far:
61B4 -> 61BF - Agility
61D0 -> 61D9 -   0x40 - Done for the turn!
61E4 -> 61EE - Who's being targeted?
61EF -> 61F7 - Turn order
Also, address 00F3 looks promising -- Checking it for the value 8 seems like a good indicator whether we have access to the battle menu. I'll see what I can play around with in terms of scripting. Yours is definitely a start, especially since it already found something better than what I did, but I want to see if I can teach the bot how to back out of All-Out and re-initiate it. Maybe allow some basic win and fail conditions for the bot to watch out for. EDIT: Created a promising function...
local JoyEscape= {B= true}

local function WaitForRound(Escape)
--Will advance frames until the end of the round is found.
--It does so by checking 007E for the value 10.
--It won't leave before the round ends, so one might want to modify
--this function to place savestates in a spot just before the round
--ends if one wants to speed up brute-forcing.
    local WhoWent= 10
    while true do
        if Escape then  joypad.set(1,JoyEscape)  end
        emu.frameadvance()

        local temp= memory.readbyte(0x007E)
        if (temp >= 10) and (temp ~= WhoWent) then  break  end
        WhoWent= temp
    end
end
Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
I've been looking at this since a few days too, and found the above (about damage) and some more ... The random values are at $00AC-00AF, and randomized at $FDD3:
Carry = ($00AC & 2) xor ($00AD & 2)
Shift $00AC-00AF one bit to the right, with carry
$00AC += 5
$00AD += 7
$00AE += 11
$00AF += 13
This is usually called once per frame, sometimes not, sometimes more (when multiple random values are needed in the same frame?) ... all 4 bytes are used for different things, and the values can even change outside of this function. Then, for damage (normal attacks):
Before the attack animation (damage is calculated after):
  $00AC += $00AD
  $007C = $00AC

pow = weapon power
if STR and INT are both below the weapon's requirements (at $E740-E767):
  pow /= 2

if ($007C >= #$F0)   (1/16 chance for critical hit)
  mult = 51
else:
  $00AD += $00AE
  X = $00AD & #$0F
  mult = $9938,X    (1/8 chance for 20, 3/8 for 23, and 1/2 for 25)

dmg = STR * (HP digits)²
dmg *= pow / 256
dmg *= mult / 256
dmg *= (255 - defense) / 256

if your side is attacking, and you're in a boss battle, and not on the left tile from Nan Yang (Yuan Shu):
  X = battle id
  dmg *= $9948,X / 256   (castle defense)
  if Cheng Nei is effective:
    dmg *= 281 / 256   (1.1x)

if the target is defending:
  dmg /= 2
if Ji Rou is effective:
  dmg /= 2
if Bei Ji is effective:
  dmg *= 2
else if hidden soldier attack (Fu Bing):
  dmg *= 179 / 256   (0.7x)

dmg += 1
limit to remaining HP
Also a few more variables:
$0060-0061: Y position (mod 15, / 15)
$0062-0063: X position (mod 16, / 16)
$0075: battle id
$0078: attacker
$0079: target
$007A: side attacking (0: player, 1: enemy)
$6222-6231: various tactic effects, Jie Ce clears them

$61D0-61D9: #$80 = defending
$6221: hidden soldier attack (when Fu Bing is effective)
$6222:
  #$01 = Ji Rou
  #$02 = Wuo Jian
  #$04 = Shui Jian
  #$08 = Cheng Nei
$622E-622F: Bei Ji  (one bit per character, each side)
$6230-6231: Fu Bing (one bit per character, each side)
My goal with this (hopefully) is to determine the exact results from All-Out (given a starting state) and bruteforce the delays and cancels, as well ... but instead of doing it through the emulator with lua, I'd simulate it all in C so it can calculate much faster, like I've done with Monopoly and Dragon Warrior. This does mean I'll have to figure out every single thing involved, from formulas to how many times the random values change between uses, and so on, and it seems a little more complicated here ... but once I find out how the turn order is determined, and how enemies use tactics, this should be a good start.
Twisted_Eye
He/Him
Active player (332)
Joined: 10/17/2005
Posts: 629
Location: Seattle, WA
Awwwesome, wow. And here I was hoping it was just one little random address that changed once a frame and/or once per use so that it would all be a little easier! Silly. Good luck getting the predicting to work. It seems like you're pretty close to the formulas so far. My old run deserves to be bettered, and the game deserves the best it can get.
Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
So far, I got it to load RAM/SRAM from a movie savestate (right before doing All-Out) and, for any delay, determine the first turn's order, enemy tactics and targets! This took nearly 300 lines of code, and I'm not even at damage calculation yet ... The full explanation for those would be a bit long and complicated, but in short: - Agility multiplied by a value ranging from 0.6 to 1.4 (for allies) or 0.7 to 1.3 (for enemies), sorted in descending order, then ascending position (top-down, allies first) for ties, determines the turn order - Chi Tu Ma boosts agility itself by 1.5x, Qi Shou doubles the above value before multiplying - The value is limited to 255, both before and after multiplying - Enemies with INT >= STR or high INT use tactics more often - The odds also depend on the turn number (looping every 8), highest on the 1st turn and lowest on the 6th - Their HP (relative to max) affects the tactic type they're more likely to use (probably healing or defense, but I haven't checked) - Enemies using single target support tactics cast on themselves at 50% chance, or when picking an empty/dead spot - Dead/empty characters still choose a target, but go last (0 agility) and skip their turn - We already knew characters at the top are targeted more often, but not the exact odds per character count (>1): -- 2: 10, 6 (/16) -- 3: 8, 5, 3 -- 4: 6, 4, 4, 2 -- 5: 5, 4, 3, 2, 2 And a few more variables, again: - $0073: #$80 = All-Out is on - $007D: turn number - $622C-622D: Qi Shou - $61D0-61D9: #$01 = using a tactic - $6200-6209: tactics to use - $00F3 (mentioned before) is a temp variable, used for many things
Editor, Skilled player (1172)
Joined: 9/27/2008
Posts: 1085
Wow, that's pretty good progress! Soon, every battle will be taken apart thoroughly and with grace! The battles are a fairly significant portion of this run. But so is planning routes. Obviously, walking to various places is going to happen, but the battles themselves are still important. Just in case it is needed, here's the .fm2 of the "equip Flail first" run. Apparently, the Rebel Force's starting HP can be manipulated... I feel as though I should try to start up a discussion of the route... I mentioned elixirs. Some things that would be useful to know is how much time it takes to get to the first shop, how much more to go through the dialogue, and then menu transitions in the field to actually use those things. Is it too much to beat going to an inn or using Chi Xin? Is it possible to make use of purchasing a Gullwing as well while at the first shop? In Dong Zhuo's chapter, should we make a detour to the Gold Key and Gemsword so we don't have to fight Lu Bu until after we kill Yuan Shu? I note in the published run that there are three encounters with Lu Bu that we can practically erase using the Gemsword, and Lu Bu was definitely the focus of that run's attacks in the Yuan Shu battle. Another plus is we get a general with 255 strength, for a while, which can't be bad. It's a bunch of walking to get the Gold Key, and a bit more for Gemsword, so is it even worth the trip, even with a Gullwing on hand? And which generals can we skip? Mi Zhe seems like someone we're stuck with, assuming we want to keep building max TP until the next tactician rolls around, like Huo Hu. Are there anyone we're forced to grab that we don't want in our party? Something simple like having 7 generals in our current party might be of help, but is it worth dropping Zhao Yun or Ma Chao just so we can skip some level up text? In any case, the published run doesn't seem to manipulate the +5 TP on every level where a tactic is gained. Some mild testing seems to show that before the last "level up" general's text is displayed, you can manipulate the max TP. Any spots where this extra TP will come in handy? What about the TP we save by using elixirs instead of tactics? Will it ever be worth fighting a random battle for an earlier level-up? An Sha is certainly nice to have for just one battle earlier. But for that to happen, it looks like one would need over 3000 EXP from somewhere. Can that even happen from a single random battle? It helps to have a bunch of questions. Hopefully, this provokes further thoughts in other areas I fail to cover, seeing as there are less things to cover after this. I still plan to make attempts at including input for Yoshi's Cookie, seeing as we don't need the controller for a fairly large margin of time. Even walking around in the field, I seem to have 7 frames out of every 8 I can spend on things like double up on another game. More like an easter egg like what happened with this run...
Twisted_Eye
He/Him
Active player (332)
Joined: 10/17/2005
Posts: 629
Location: Seattle, WA
The first shop is at the very far back of town, so it's a long walk. Getting gullwings there probably wouldn't be useful this early in the run. Chi Xin, hmm. Since using TP for Lian Huo is a waste, it could be used to save time from going to an inn. It can only be used in battle, though, and that's a slow process, too, but probably less slow. In the planning process for my first one, it was recommended to me that going through the cave, getting the key, going through the later castle and getting the sword would take so long that it overrides the gains from removing Lu Bu from three fights and Guan Ping. When Acmlm's sexy, sexy script is finished up, it would probably be trivial to fully test. (The gullwing probably wouldn't help, since it can only take you back to Xu Zhou at that point.) Yes, Mi Zhe is probably a necessity, although it's possible that picking up the Songs would be a better idea. Ren is just as tactical as Zhe. My big idea for this section to test is picking up the Songs to start, ignoring Han Zhong, and fighting the front gate instead of that big looping rear path. The runner would be down an axe, but hopefully the manipulation will make up for it, saving a large amount of time. It is completely possible that, after Guan Yu and Zhang Fei are lost to guarding their castles, one can have a full party of generals that do not gain HP on level-up and can be changed out at will. Whenever you have a full party of seven and pick up one of the necessary generals, they go right to the reserve, and you never have to pick them up. (I do this in the published run to skip Zhao Yun, but it can also be used to skip Zhu Ge Liang. All other HP-gain generals can be ignored, and non-HP-gain generals are made more powerful by joining the TAS's weak army.) Some more enemy recruitment might be needed towards the end of the run as a result, perhaps, but it'll be a large amount of time saved on text between levels. I had no idea the TP gain was manipulable. That would've been very helpful to realize. This would end up giving us that extra An Sha that my old run needed but didn't have, causing an extra inn run at the very end. If Zhu Ge's not picked up, though, that's an extra TP gain that wasn't had in the first run (-2 compared to -1), unless Pang Tong is sequestered, which is quite the idea to toss around. Extra battle, long battle with his large health, but weak Rebel Forces and manipulation will make it not so bad. His 3000+ HP will be very useful for most of the middle part of the run. Actually I think it's a good idea to plan for. The only time that gaining a level is important is if the very next tactic gained will save a good deal of time in the very next battle. The only tactics to do this for would be Ye Huo, An Sha, and the first group healing tactic (Tong Xian I think? or Yin Xian). This would be completely conditional to the final run and would have to be tested for at the time. I say that it might be possible to save time this way but unlikely. Good questions, it lead to the Pang Tong idea. Any others you can think of?
Editor, Skilled player (1172)
Joined: 9/27/2008
Posts: 1085
The problem with Song Ren is his lacking intelligence. Sure, his 100 int is greater than his 80 strength, allowing him to learn tactics, but it isn't enough to learn Cheng Nei (120 int), a level we're getting before Huo Hu becomes available, losing us 5 TP. Better than no tactician, since between losing Liu Bei and gaining Huo Hu, the published run gains two levels, and would miss out on 10 MTP if we had no tactician. Each level up message for generals that gain HP takes around 80 frames. The published run (according to the .avi I have here) finishes at level 39. It recruits Zhao Yun at 15 (24 levels), Zhu Ge Liang at 16 (23 levels), and Ma Chao at 19 (20 levels). In total, that's roughly 5360 frames, close to 90 seconds. Will avoiding them eat up less time than the level up messages they bring? We're looking at roughly 30 seconds per general. Having more than one tactician in the party will eat up slightly more time for the messages to scroll through each one that learns the same tactic. Just to summarize what I see in the .avi here:
Tactic      Lv   Int  Published run's learner
Lian Huo     2    60  Liu Bei
Wuo Jian     3    80  Liu Bei, Mi Zhe
Shui Tu      4    70  Liu Bei, Mi Zhe
Chi Xin      5    70  Mi Zhe
Cheng Nei    6   120  Mi Zhe
Qi Shou      7   140  Mi Zhe, Huo Hu
Ye Huo       8    90  Huo Hu, Mi Zhe
Shui Jian    9   110  Huo Hu, Mi Zhe
Shui Xing   10   100  Huo Hu, Mi Zhe
Jie Ce      11   160  Huo Hu
Fu Bing     12   220  *MISS* (needs Liu Bei...)
Tong Xian   13   160  Xu Zhe
Yan Re      14   120  Xu Zhe
Shui Lei    15   130  Xu Zhe
Yin Xian    16   200  Xu Zhe
Ji Rou      17   200  Zhu Ge Liang
Bei Ji      18   240  Zhu Ge Liang
Yi Xin      19   180  Zhu Ge Liang
Li Jian     20   140  *MISS*
Hong Shui   21   160  Zhu Ge Liang
Da Re       22   180  Zhu Ge Liang
Wan Fu      23   220  Zhu Ge Liang
Ji Mian     24   200  Zhu Ge Liang, Zhou Yu
Tui Lu      25   140  Zhu Ge Liang, Zhou Yu
Gui Huan    26   150  Zhu Ge Liang, Zhou Yu
An Sha      27   180  Zhou Yu
Jin Xian    28   252  Zhu Ge Liang
Shui Long   29   220  Zhu Ge Liang, Zhou Yu
Huo Shen    30   220  Zhu Ge Liang, Zhou Yu
Ce Mian     31   240  Zhu Ge Liang
Keep in mind that the amount of available TP we can use is MTP * INT/256, the INT coming from our acting tactician's INT stat, naturally. If we learn every tactic, the highest MTP gets is 160, but we're obviously going to skip the MTP gain from Fu Bing, so 155. Zhou Yu's INT is 230, so the final segments will have us maxed at 139 TP to use. Skipping two MTP gains, leaving us with 145 MTP, will set us at 130 TP. I'll see what else I can pick at from the route. I'm still wondering if elixirs are worth it.
Twisted_Eye
He/Him
Active player (332)
Joined: 10/17/2005
Posts: 629
Location: Seattle, WA
EDIT: wrong, all of it actually. Strange. To avoid picking up Ma Chao immediately, you have to avoid Ma Dai as well and grab him from the reserve elsewhere. For Fu Bing, it's possible that we can pick up Jia Xu after the Dong Zhuo chapter. He's got exactly 220 INT and after the battle we're level 9. The 400 HP would help in the next section as well.
Editor, Skilled player (1172)
Joined: 9/27/2008
Posts: 1085
I want to make sure what I'm looking at and what you're looking at is the same run. The one I see says Ma Chao and Zhao Yun are picked up and used in the active party. The screenshot is especially incriminating. At the moment, I'm mildly confused.
Twisted_Eye
He/Him
Active player (332)
Joined: 10/17/2005
Posts: 629
Location: Seattle, WA
Wow, I must have done some tooling around a couple years ago and not finished any work, because my memory is off from the published run. I'll have to watch it to make sure I'm on the right page. Yeah, that's what happened, I was working on improvements but never completed it. I'm sorry for the confusion! --Rewatching my old run...so many moments of "man, what was I thinking??" Picking up weapons and not equipping them, or equipping them on people that aren't even fighting...A new run will just demolish the old one.
Editor, Skilled player (1172)
Joined: 9/27/2008
Posts: 1085
Twisted Eye wrote:
For Fu Bing, it's possible that we can pick up Jia Xu after the Dong Zhuo chapter. He's got exactly 220 INT and after the battle we're level 9. The 400 HP would help in the next section as well.
Where can we pick him up and is it worth the 5 MTP and the stack of HP then? We'd get someone who can't deal respectable damage without tactics if we do pick him up. I'm curious what the route should be against the Yellow Turbans. Picking up the Song brothers doesn't seem worth it -- There's the dialogue, their extra attacks that deals almost nonexistent damage (low strength, lack of Flails at the time), and an extra trip to the billet for room for more useful generals. What we get are meat shields that has a chance to save us a trip to the inn. Song Ren can't learn Cheng Nei, losing us 5 MTP if we skip Mi Zhe. So I'm guessing the route might look like this: - Zhang Bao + Get Ax + Use inn + Pick up Mi Zhe, fix up formation and equipment here - Zhang Jao + Get Ax - Han Zhong? + Use inn - Zhang Liang + If we get Han Zhong, Zhang Jao, cave version. Possibly skip Ax - If no Han Zhong, fight Zhang Jao at castle. Definitely no Ax + Usual plot advancement + This is the closest we'll ever be to the first item shop I'm starting to feel elixirs aren't worth it. How much use can we get from them? They offer the out-of-battle healing, but Chi Xin heals at the cost of a slow battle round, assuming we can afford the TP. Elixirs cost us shopping time and menu time when using them. If they can help avoid a detour to an inn, it's a possibility, but I get the impression it would have to be a significant detour that we avoid. We can still see if adding them to our shopping list while purchasing Gullwings can save time, though.
Twisted_Eye
He/Him
Active player (332)
Joined: 10/17/2005
Posts: 629
Location: Seattle, WA
(Jia Xu would actually require stepping out of Chang An in the wrong direction I believe, so it's probably not worth it over all.) Anyway, that probably is the best route. If getting the Songs and waiting until after Liu Feng to pick up Mi Zhe saves that first trip or two to the inn, well, it might just be worth testing. Thus, of course, would affect things if we wanted to do the Gold Key/Lu Bu idea, because the extra taken spot would require toodling around with sooner or later. Lotta stuff to juggle. It all depends on how powerful the automated script will be. The better manipulation alone will surely cut down on the number of inn runs in the TAS, so I dunno. Maybe we should just come up with a list of ideas and test each of them--if the script makes it relatively painless to test each idea, I sure wouldn't mind spending a couple hours seeing how far behind the silly sounding ones are. Which brings up the point about dropping the tigers to save the time on the HP gain. Rewatching the old run, I noticed that at the end of the game, Zhu Ge Liang, Ma Chao, and Zhao Yun had over 10,000HP, which is the best they can have for the damage multiplier. Picking up new generals near the end that have the multiplier and high damage would be a big expenditure of time, just to skip the levelling messages. But then what if they were sent to the reserve while weak and pulled out at the end of the game, now magically at their max? It would cut down on most of the level-up messages and skip needing to pick new generals at the end.
Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
All-Out? Why not? Victory! (this should be a good hint that we can skip a few inn trips, and maybe even skip Han Zhong) Bruteforcing All-Out now works, as long as it's only normal attacks (including misses and criticals) ... no tactics yet, and we'll need that for most of the run (even the first battle), but that's coming next! I also made a short test with a few manipulated battles (like the nearly impossible one above), as a preview of what it could look like: http://dehacked.2y.net/microstorage.php/info/744425358/doaetest1.fm2 (it's unoptimized outside of battles and doesn't follow the route) The way it works is that I give it a maximum amount of All-Out cancels and frames per delay (3 and 100 seems to work well), and it tries every possible combination (first with no cancel, then 1, 2 and up), listing every fastest winning one it finds:
  46  47  46  30   .   .   .   .   .   .   .   .   .   .   .  -> 2657
_____________________________________________
pos id        HP      Str  Int  Agi  Def  Pow
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
 0  A9 |     9/  114  245  180   58    0   38
 1  AA |     4/  114  250   75   60    0   38
 2  A8 |   125/  314  180  225   49    0   38
 3
 4

 5  38 |     0/  204   80   30   40   25   56
 6  04 |     0/  140   42   32    8   10   38
 7  04 |     0/  100   42   30    8   10   38
 8  04 |     0/  140   46   30    8   10   38
 9  04 |     0/  120   42   30    8   10   38
_____________________________________________
It lists the delay before each All-Out, when to cancel/restart ("." = no cancel), the total time, and the remaining HP. I can also tell it no character should die (like I did here), drop below 100 HP, or anything, and it'll abort any combination that doesn't match the conditions. As for the time it takes, that really depends on the battle to manipulate (less turns or better odds = faster) and how far I let it try combinations ... It does a few million per minute, and usually finds a good result within a few minutes, so it should work well for testing even the longer/harder ones. Also, according to MeteorStrike's enemy area map (from here), there's a small spot past Chang An where you can still get Jia Xu ... and, just one battle later, a single tile where you can fight endgame enemies, so that'd be the definite spot for EXP if it's worth the time.
Twisted_Eye
He/Him
Active player (332)
Joined: 10/17/2005
Posts: 629
Location: Seattle, WA
Holy CRAP, that one tile is exactly as the image appears! The rebel forces even are so strong that they can hit first, and hit for over 100 when over 1000 still. That's way too strong for even the TAS to work with--at the time, it would take casting Ye Huo to just do that much damage back. Each Rebel Force killed is about 205XP, and a typical castle battle of the area is about 130XP. If you come back later with a slightly stronger force, it might not be enough XP to balance the large use of time. The rest of the map's inconsistencies always pull from a previous chapter, so this is the only tile in the game to do this with looks like. Still, that's really cool to find! Glad to hear that your script is coming along so well! The demo video sure shows it well, the Zhang Liang battle looks very well manipulated in the end where Liang just hits Liu Bei over and over and on the last turn an ally general gets the first strike and knocks him out, for example. Looking real good so far!
Editor, Skilled player (1172)
Joined: 9/27/2008
Posts: 1085
Won't be long before we can test routes versus unlikely odds. This should end well, especially once Acmlm includes support for enemy using tactics. We'll certainly rely on it to improve this run significantly. If we can fight Zhang Bao (Zhang Fei and Guan Yu ends with 100 HP) then go directly to Zhang Jao (1) and win without losing any of our three generals, that would seem to be a fairly optimal start. If we can't, we might want to hop into Xu Zhou and use Mi Zhe as a spare stack of HP (Survival is optional -- We might only need him to exist for MTP, which being alive isn't a requirement) and see how things work that way. Avoiding one inn trip will save a little time, but Xu Zhou is right along the way between Zhang Bao and Zhang Jao. How much is skipping the inn dialogue worth? We'd have to pay in manipulation time and, in the case we do pick up Mi Zhe, extra attacks that deal almost negligible damage as well as more dialogue when learning a tactic early on. There are three good points where we can pick up Mi Zhe, depending on the level of awesomeness on which we can manipulate luck: Before any fighting, before fighting Zhang Liang, or after we drop Liu Bei. Except maybe a few Elixir A or a Gullwing, I don't foresee any need to worry about the route in the future that we can affect here, other than make sure we can accommodate any recruits during Dong Zhuo's and Yuan Shu's chapters. Power-leveling off the end-game enemies doesn't seem likely that it would save time, given their HP and the fact we can survive without the extra EXP anyway. The map is still handy. I was aware of it, but let it completely slip my mind here. That, and I don't think I could have found it again on my own. It won't hurt to have a few lua scripts that just give information. Having one that dumps out STR * HPdigits * HPdigits * (Wpn or Wpn/2) / 256 on the screen should give us some idea on whether we should bother even allowing the general to exist for attacking stuff. I can work on these scripts for a bit. Anything in particular that might be a good idea to look at? I can try to work something up. Edit: I checked for Jia Xu just in case, as I distinctly recall reading that Liu Bei is the only one that can raise our MTP through Fu Bing. I encountered Jia Xu with an end-game party and didn't get the chance to recruit him. Clearly, we will not get the 5 MTP from Fu Bing without a rather severe grind in the first area. Naturally, plan for, at the absolute peak, 155 MTP.
Twisted_Eye
He/Him
Active player (332)
Joined: 10/17/2005
Posts: 629
Location: Seattle, WA
Here's an interesting note I found at the end of a FAQ on GameFAQs: - On the way to Luo Yang the first time to fight Dong Zhuo, the second gate is kinda goofy. Every 1 out of 4 times I play the game, Xu Rong is accompanied by Guo Si. Guo Si had a decent attack and like 419 hit points, and you could recruit him too. Which is weird that he'd notice it's rare--the published TAS fights this guy here, yet a couple other FAQs also say that he shouldn't be in this fight. Just how powerful is the Item Exploit bug? If it can make characters disappear from a battle completely, who knows what we can do with it to make our run stronger--taking guys out makes things faster, and it also lowers XP after battle, bringing us closer to the 258 we have to lose before picking up Xu Zhe to gain Fu Bing. I dunno.