Posts for Acmlm


1 2 3
6 7
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
Now that most tactics are handled properly (at least the ones used in the first few battles), I started a more serious attempt at a new improved run: Past Hua Xiong's gate, in 7:50 (1 minute ahead of the published run) I only used the inn once in the entire first chapter (between Zhang Jao (1) and Zhang Liang). Notice how few damage I took against Zhang Bao and Zhang Liang, too ... that cost a few seconds to manipulate, but it's worth saving another inn trip or holding over 100 HP longer for the next battle. I first tried skipping Han Zhong, but the front side battle took too long (it was quite hard just to manipulate a win with only All-Out) and it came out slower, before even counting Han Zhong and the third Ax: Past Hua Xiong's gate, in 8:01 (without Han Zhong) Now I'll have to find out whether Guan Ping and Lu Bu are worth the time (about 2 minutes) before getting to Yuan Shu, since they both have good HP and more STR than anyone else available by then ...
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
I've looked at the code for tactics now (but I still have to implement it), and found a few more things: - The success rate depends on the difference between the caster's INT and target's INT: (for some reason, the lower part is backwards ...)
+100>255: 15 (/16)
+ 50> 99: 12
+ 10> 49:  8
+  0>  9:  6
-  1>  9:  1
- 10> 49:  2
- 50> 99:  4
-100>255:  6
- For An Sha, multiply the above by the caster's INT / 256, and always fail against Sun Quan, Cao Pi, Si Ma Yi, or empty slots (it checks 8 values, but 5 of them are 00) - Fire, water and healing tactics each have a "potential" value, multiplied by max(STR,INT)/256 and (except for healing) a random value between 0.6 and 1.4 - Wan Fu (full heal) simply has its value set to 65535, so a weak general like Song Yong casting it would only heal about 15000 - Wuo Jian and Shui Jian drop fire/water damage by half - Defend, Ji Rou and Bei Ji (and the +1) affect tactics just like normal attacks - HP, castle defense and Cheng Nei have no effect - The tactician doesn't matter either (except for which tactics you get, of course) I still have a lot more coding and testing to do, but the real fun will start once that's done!
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
It wouldn't work, for 2 reasons: - Because of the way the randomized gold is calculated, the max value is always 1 less than the real value (5 for metal slimes, 79 for wolflord, 199 for goldman) - If you don't pick up the 120 gold the first time, it's gone forever (like the torch chest) It'd be possible to kill a goldman in 2 hits too, but only with perfect HP and damage, so the manipulation would take too long.
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
I've tried that just now with Liu Bei when he leaves, but Guan Yu and Zhang Fei come back to life ... even if it worked (maybe one of the later cases do), all you'd get in battle is an instant loss after one enemy turn. (looks funny, though) $6300-63FF seems to determine whether each character is alive, captured, maybe recruitable too (not sure, but it's at least 4 things), and $6312 just happens to be Guo Si (id $12) ... I tried setting other bytes to 0 in there, and it made other characters vanish from their battles (sometimes leading to funny things like "Prepare to fight Rebel Force" or even empty battles), even town NPC's were gone! The glitch is exactly as said, it decrements the "current character" variable from 0 to 255 then uses that as the TP use index:
9EE7:C6 78     DEC $0078 = #$00
9EE9:20 1B AE  JSR $AE1B

AE1B:A6 78     LDX $0078 = #$FF
AE1D:A9 00     LDA #$00
AE1F:9D 13 62  STA $6213,X @ $6312 = #$98   ;farewell, Guo Si
$0078 is set back to 0 after this, so that's probably the only byte we can clear that way. After optimizing my bruteforcer a bit (mostly making it keep every turn's result in memory instead of recalculating it), I got it to run about 10x faster! I can also make it look deeper (more cancels) into a good combination to try improving it ... I tried it on the Han Zhong fight from my earlier test and found a way to improve it by 5 seconds, even getting about 40% critical rate: http://dehacked.2y.net/microstorage.php/info/1487244271/doaetest1b.fm2 It's also possible to beat 2 high rebel forces in about a minute and half, using only All-Out (canceling/waiting on almost every turn). It's still not worth the time for a single level up, but shows again how far this can be manipulated: http://dehacked.2y.net/microstorage.php/info/1330208196/doaetest2.fm2
Experienced Forum User, Published Author, 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.
Experienced Forum User, Published Author, 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
Experienced Forum User, Published Author, 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.
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
Axe Knight to Garinham: 158 steps + 1 map change King to Garinham: 119 steps + 2 maps + death It's 39 less steps (10-11 seconds), but the death sequence alone (from the encounter until I can move) takes about 14 seconds, and the stairs add another 2 seconds, so it'd be at least 5 seconds slower. Another thing I tried was to kill a wolflord after the goldman (2 hits, no Sleep), buy 2 more keys to get the wings at Rimuldar, and use that instead of dying, but it was 7 seconds slower. The time difference at the dragonlord goes like this: - No sleep: 4 seconds gained from not casting Sleep, but 2 lost per turn (6 times) - 1st form in 7 hits (was 8): 5 seconds gained (3 with Sleep), 2 lost from the longer delays - 2nd form in 12 hits (was 11): 5 seconds lost for the added turn, but over 20 gained from shorter delays (from about 30 to 6)
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
* Recorded with FCEUX 2.0.4 (also syncs in 2.1.2, with new PPU) FCEUX 2.1.2 with old PPU gave that same desync here, so make sure to set it to new PPU first.
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
There's only 4 enemies with Stopspell, in the whole game: - Wolflord (20 EXP, 60-79 gold) - Druinlord (22 EXP, 67-89 gold) - Knight (33 EXP, 97-129 gold) - Dragonlord's first form Knights are near the metal slime area, and wolflords are with goldman, but obviously killing anything takes longer than picking up the chest ... For EXP, nothing can replace a metal slime ... even killing one less would put me 105 EXP away from level 7, and I don't even gain that from the rest of the run. The goldman could also be manipulated to give more gold, but only up to 5 more, still not enough. (the metal slimes can't give more either) But it does feel like the chest is mostly wasted, still ...
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
When you go pretty far out of the way to get some upgrades (over 1 minute for attack up + side laser, about 30 seconds for a chip upgrade), is it really going to save that much time later? But defense upgrades might be worth it if you can get 5 (makes you move faster) ... that'd be in area 7 if you only miss the one from corridor 13, but you skipped 2 more from minibosses already. I never thought about using death as a shortcut to exit areas, either ... but it wouldn't save as much time in my case since I sometimes had to pick up a few things on the way out.
Sabikage wrote:
why did you use the fireball against Optimom (I think that's what the spaghetti monster is called) rather than the lvl 2 saber? Wouldn't it be faster to follow him up close and use the saber, rather than avoid damage with the fireball? Alternately, you could be shooting him from closer and get a higher rate of fire and more fireballs into him in a shorter period of time.
I used the fireball for that boss in corridor 11 too (no saber yet) and it wasn't bad ... but I dodged more than I really needed to (took no damage) and didn't realize I could shoot the strands. The fireball sure seemed to do a better job than what I used in corridor 2 (long thin laser), as well ... However, I fought the second Optomon (corridor 3) pretty well with the level 2 saber, so that can be done (at least with the 2 defense upgrades I had by then).
Sabikage wrote:
Also, in the intro stage, I know it's possible to earn a score power-up - I've done it on the console - but is that due to a longer boss fight? Possibly it's because on the console I would kill the slow-moving spinning discs rather than the meteors. Does having a wider shot due to increased chips also increase the damage output of your main gun?
I scored 34540 in the intro level (20460 before the boss) ... The round things give 1000 points, worth missing a few other enemies if you have to, and the projectiles give 60 ... you'd get more of those in a longer boss fight so the points would add up, but I also tried to let enemies shoot as many as possible before killing them (like right before the boss). If anyone missed it earlier in this thread, my run can be found here ... it goes up to corridor 5 (near the boss) and it's a 100% run (all corridors, minibosses, max upgrades, etc.), but it hasn't been updated for nearly half a year ...
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
F:\avi = 2.62GB F:\avi\nesvideos = 1.64GB F:\avi\nesvideos\*-acmlm.* = 649MB I usually watch runs from the emulator movie file, except when I didn't have the ROM or wanted easier viewing/seeking ...
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
I made one of my SMB1 hack once: (New Strange Mario Bros (V05-xx-2000) (SMB1 Hack).nes) NES Strange Mario Bros in 04:25 I also made a silly ASM hack for SMB1 that makes the game really fast and weird (IPS patch here, use on PRG1), and a run of that: NES Superfast Mario Bros in 01:51
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
About the level 0 glitch: - It only works when you have at least 2 characters (the earliest you can do it is when you get Tia) - It only affects the character in the second slot (sets level 0 and 0 HP), but you can switch positions to do it to any other character - The stats only change once you save and reload the game (so the glitch can't be used for the Ancient Cave) - The stats are also random, and often much higher than 999 (see the near empty HP bar here). I remember doing up to 4000 damage with normal attacks once, and only 100 another time ... I'm sure it can be manipulated. - Level 0 characters are nearly invincible ... all enemy attacks will miss, but instant death moves can still hit. - Once you do it, you're stuck at 0 forever, even if the "next level" EXP drops to 0 - The glitch also seems to cause a delay (3-5 seconds) whenever the game loads a level 0 character's stats ... like on save/load or when winning a battle Then you could ignore all leveling and the bosses would be really easy ... but unless it saves a lot of time, a level 0 run probably isn't going to be very interesting ...
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
In other emulators like FCEU or Snes9x, I just set a key for up+left, which works quite nicely ... but that's not supported in VisualBoy Advance. And I took a look at the random encounters just now ... There's a 3 byte counter at $2000478-200047A (low byte first) that goes up while you walk on any area with monsters (per pixel), and causes a battle to start once the high byte ($200047A) reaches $10. It goes up at a varying rate, which changes at specific times (like entering any area), so you'd have to manipulate it to be as low as possible ... but the only way I found was to go in and out multiple times. Areas without monsters don't reset the counter, either ...
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
If it uses some sort of step countdown, search for a value that goes down whenever you walk, then find out what resets it and how it can be manipulated to either start higher or never reach 0. Phantasy Star 3 also used this and the battles couldn't be completely avoided, but I was able to manipulate the countdown to always start near its max value to minimize them ...
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
Give me my old posting mood from many years ago, and I'll add a dozen more once I quadruple my posts and even think of a good picture to start with ... then again, I should probably contribute more anyway, hehe. The new "Avatar preview" on the left when posting just shows a broken image for me, since I still have none ...
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
One of those was already done too, but rejected: NES Rambo in 18:40
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
At least he still managed to beat the previous run (which did use re-records) by 2 seconds ... But this game doesn't have much potential for runs, since most of it is either Waldo walking between levels (no action) or the player finding him instantly (too obvious) ... from what I remember anyway, since I only watched the old one (I'm not at home right now).
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
Ah, I see now, hitting lower goes faster ... the gain won't be as much with the ring and level up, but I'll also be able to use the ring for a larger part of it, so it could probably save a whole minute. Skipping the boss in the lava pit (which I've been able to do just now) seems to save about 8000 frames but costs 2512 EXP, which should be regained in about 5000 frames ... not a huge difference for what it is, but still good.
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
1- If you mean those slime monsters, I did use the downwards attack on each but only for the last hit ... if there's really a better way to do it (without getting hit), I should try, since that was the longest leveling part so far. 2- I haven't thought of that and it should save a few seconds, but (as said earlier) it seems that boss can be skipped completely anyway with left+right, and the EXP missed there can probably be gained faster later ... From what I remember, redoing earlier parts in this game works pretty well (I did it a few times), I think only the boss battles had to be redone. (probably won't be for a while since I'll want to finish my Guardian Legend run first)
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
I made an incomplete run of this before: (about halfway done) http://acmlm.cjb.net:2/emu/nes/fceu/fcs/Ys%20III%20-%20Wanderers%20From%20Ys%20%28J%29%204.fcm (the number font in your screenshot is different, is that a translated ROM? YS 3 on NES was only in Japanese) I found out about the left+right glitch too, it can even be used as a quick warp to town if you manage to fall off the bottom of the screen ... but it can't be done at many places, I only did it once. Even if the above shortcut worked (a nice one too, skipping the first boss), you wouldn't get much farther ... you need level 4 to hit the next boss, and level 3 to hit the monsters before it, and that's with the sword you get from the first boss. From what I remember, this was the minimum level to hit each boss up to where I stopped: (max level is 12) Tigray Quarry: 3, 4 Ilvern Ruins: ?, ? (I had the Broad Sword, so 5 was already well enough) Tigray Quarry II: 7 Eldam Mountains: 8 (but very low damage, so 9 is better) At least the forced leveling goes fast enough, it just tends to get repetitive ...
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
Up to level 7 now: http://acmlm.cjb.net:2/emu/snes/snes9x/smv1/lemmings-b2.smv Gained frames per level compared to my old one and Twelvepack's: 01: 165, 138 02: 5, -1 03: 99, 209 04: 61, 218 05: 101, 84 06: 80, 168 07: 432, 164 Total: 942, 981 Level 7 still seems improvable, if I could stop just a few more from turning back or falling down ...
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
I made those of SMB3 earlier this year: http://acmlm.cjb.net:2/emu/nes/fceu/fcs/SMB3-AESUTIIZ.fcm AESUTIIZ: grab blocks anywhere Just messing around ... http://acmlm.cjb.net:2/emu/nes/fceu/fcs/SMB3-fastnoscroll.fcm AEXLOGPA + TVUXNUEE + ATEZIUOZ: run faster, disable autoscroll Beating the game in 6:39
Experienced Forum User, Published Author, Experienced player (527)
Joined: 11/14/2004
Posts: 169
Location: Mirabel, Québec, Canada
I forgot why I picked 1.1, I guess there was no particular reason ... but it's not really going to matter unless there happens to be a bug in 1.0 that can save time. Both spots we picked for digging in level 1 have the same height, so they should be equally as good ... the time I lost by keeping the lemmings in the hole longer is regained by finishing the hole sooner.
1 2 3
6 7