- Recorded with FCEUX 2.1.3 (started with 2.1.2), old PPU
- Fastest time
- Luck manipulation
I started working on this right after finishing Dragon Warrior, as this game's discussion thread had just been revived about improving the published run from 2006. This was another of my old favorite games, and it seems I was still in the mood for some heavy luck manipulation, so I decided to see what I could do ...
2 months and a cancelled submission later, I've improved the published run by 25:21 (91454 frames), and even my earlier attempt by 4:58 (17923)!
Most of the improvement came from the battles (now twice as fast), largely from better luck manipulation but also better strategies and route planning (sometimes at the cost of more walking or other delays, but always regained), and doing less inn trips.
For how linear this game is, there's quite a bit of route planning (who to get, weapons, etc.) ... I've redone fairly large parts more than once, and kept finding new improvements.
Main changes
- All-Out is used exclusively through the first half of the game, until Ma Chao
- I only use the inn 14 times (previously 27) and never ever heal in battle (it's slower than the inn anyway)
- Max TP gains on level up are maximized
- All gullwings are bought in one trip instead of two
- I skip Huo Hu (I don't need him, and only lose 5 TP)
- I go the long way to get Guan Ping and Lu Bu (they're so much better than the alternatives that it's really worth the time)
- I capture Wen Hun and (much later) Tai Si Ci and Lu Sun
- I don't execute Yuan Shu, it's faster to destroy him later
- Some weapon changes, like getting the Nu Long but not the Qing Guang
- Different parties/orders
Glitches
When canceling the first character's command, a table index underflow (for TP used) clears a byte in the "character status" table. Guo Ji (from Xu Rong's battle, before Dong Zhuo 1) just happens to belong to that byte, so he's completely removed from the game!
An unexpected (but also minor) one came up near the end, when the game skipped the HP increase text on level up. I have no clue how it happened, but it did save a few more seconds (and looks funny) ...
Luck manipulation
The random number is 4 bytes (32bit), and changes in 2 ways:
- Simple randomizer function (bit shift and additions), called every frame (except lag) and in a few cases where a random value is needed
- Add one of the bytes to another and use that as random, in many cases (but not all) where a random value is needed
That second one alone adds a lot of complexity, as it changes the random value sequence and depends on timing. For example, it's called after every step where a random battle can happen, so different step delays before a battle (or anything) will each give completely different results.
During All-Out in battle, I can only manipulate whole turns at once, by introducing delays between each (and canceling/restarting All-Out, which however takes time). Because of this, and the endless possibilities, there's no way I'll get perfect luck or even optimal manipulation ... but I still make most of the game seem much easier than it really is.
I've looked through the game code for everything that happens during All-Out (attacks, tactics, formulas, etc.), and simulated all of it in C so I could bruteforce through lots of delay combinations (up to 1 billion per hour!) and pick the best one I find. Depending on the battle, this ranged from near instant to a whole day ... and that's from a single starting point. I still had to do the rest manually (try different step delays and such, bruteforce All-Out for each), so there's still quite a bit of potential improvement left. But that's easier said than done ...
I've also done the same for random encounters, mostly for manipulating (and optimizing) the few specific encounters I need. Han Zhong, Wen Hun and Zhou Yu each came almost instantly with minimal rebel forces, and each was done multiple times to pick the best All-Out manipulation as well. Then the more extreme case, Lu Sun and Tai Si Ci by themselves (and in this order), is about a 1/20000 chance, and was limited to a very small area at 1/32 encounter rate ... but it still only cost half a second to manipulate!
You can see a screenshot of both in action (and overall setup while working on this run) here:
http://acmlm.cjb.net:2/other/doae-bruteforce3.png
http://acmlm.cjb.net:2/other/doae-bruteforce3.png
Battle durations
From first command to victory, not counting manipulation delays before each battle:
Enemy leader | Old | New |
---|---|---|
Yellow Scarves | ||
Zhang Bao | 1591 | 1066 |
Zhang Jao (1) | 2676 | 1869 |
Han Zhong (capture) | 1469 | 390 |
Zhang Liang | 850 | 690 |
Zhang Jao | 1885 | 1139 |
Dong Zhuo | ||
Hua Xiong | 1878 | 1555 |
Lu Bu (1) | 2325 | 1382 |
Li Jue | 1215 | 877 |
Xu Rong | 3441 | 537 |
Dong Zhuo (1) | 10069 | 1766 |
Lu Bu (2) | 7126 | 2806 |
Dong Min | 1372 | 802 |
Dong Zhuo (2) | 4038 | 1020 |
Yuan Shu | ||
Lei Bo | 2986 | 1422 |
Ji Ling | 2848 | 1422 |
Han Xian | 2853 | 1427 |
Liang Ji | 980 | 667 |
Chen Lan | 2481 | 1071 |
Yuan Shu | 8592 | 1459 |
Yuan Shao (ambush) | 787 | 618 |
Ji Zhou / Jing Zhou | ||
Lu Guang | 5644 | 1415 |
Jin Xuan | 2640 | 1434 |
Han Xuan | 8157 | 2589 |
Zhao Fan | 892 | 690 |
Xing Dao Rong | 493 | 502 |
Liu Du | 590 | 439 |
Xu Shou | 753 | 394 |
Wen Hun (capture) | 97 | |
Yuan Tan | 891 | 308 |
Ma Yan | 316 | 208 |
Zhang Yi | 347 | 232 |
Yuan Shao | 929 | 779 |
Shu | ||
Liu Kui | 3817 | 1243 |
Meng Da | 2759 | 1148 |
Yan Yan | 3192 | 2138 |
Huang Quan | 1126 | 873 |
Ma Chao | 3092 | 1825 |
Li Yan | 747 | 709 |
Lei Tong | 1874 | 869 |
Liu Zheng | 2859 | 1449 |
Wu | ||
Fan Zhang | 2151 | 1397 |
Ling Tong | 1730 | 1212 |
Gan Ning | 2311 | 1497 |
Zhou Yu | 2567 | 1967 |
Zhou Yu (capture) | 949 | 360 |
Zhu Ge Jin | 3188 | 2139 |
Ding Feng | 1548 | 905 |
Chen Pu | 3604 | 1880 |
Huang Gai | 1089 | 554 |
Sun Yu | 4293 | 2153 |
Sun Yi | 1392 | 549 |
Zhou Tai | 1024 | 693 |
Sun Huan | 940 | 921 |
Tai Si Ci | 1618 | 707 |
Sun Quan | 3070 | 1305 |
Lu Sun, Tai Si Ci (capture) | 342 | |
Wei | ||
Xia Hou Yuan | 1334 | 646 |
Zhang Liao | 1578 | 806 |
Cao Zhi | 1624 | 502 |
Cao Pi (1) | 3888 | 2421 |
Cao Xiu | 1442 | 638 |
Xia Hou Shang | 1645 | 655 |
Cao Pi (2) | 5367 | 2371 |
Si Ma Yi (1) | 5610 | 2890 |
Niu Jin | 1341 | 548 |
Si Ma Yi (2) | 4091 | 2233 |
Xun Huo | 1065 | 913 |
Dian Wei | 900 | 879 |
Liu Dai | 1013 | 880 |
Le Xin | 893 | 884 |
Si Ma Shi | 1245 | 607 |
Si Ma Yi (3) | 3202 | 2309 |
Total | 170292 | 82089 |
adelikat: Accepting as a (big) improvement to the published movie.