Posts for Nitrodon


1 2
11 12 13 14
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
A few corrections: 1) Maxim's normal attack at this point has a 5% chance (third RNG call < 13) of being a critical hit. Critical hits ignore defense. 2) Dive is actually double ATP, not double damage. 3)
        if(rng.callRN()<64>63 && a<128){          	// secundary item drop check\
I hope this was just a problem in copy/pasting, because this line won't compile. 4) Defending makes the attack deal 5/8 damage rounded up after everything else is factored in. It does not double DFP. 5) If the catfish used Flash the previous round, it will not do the RNG check for Flash this round.
002B: target random opponent
002D: with probability 193/256, go to 0x0040
0031: element 0x0004 physical attack with 65 power
0037: attack name "Mega quake"
0039: attack animation 80
003B: variable 1 := 0x0000
003F: stop
0040: if variable 1 != 0x0000, go to 0x0051
0046: with probability 225/256, go to 0x0051
004A: cast spell "Flash"
004C: variable 1 := 0x0001
0050: stop
0051: elements 0x0004
0054: attack
0055: variable 1 := 0x0000
0059: stop
Other than those, everything looks accurate apart from a few places where the game rounds intermediate values.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
Gunty wrote:
        state[round]=state[round-1];                    // load last round's state
If I'm reading the Java documentation correctly, this line adds another reference to the state object instead of making a new state object. Try making a copy constructor and using that instead. Of course, since I've never used Java, I may be completely wrong. Also, unless I'm mistaken, the targeting portion of boomerang's effect waits until the RNG is less than 43, not 46. P.S.: Just in case you weren't aware of this, the Catfish will never use Flash in two consecutive rounds.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
quietkane wrote:
Y'know... if the frame counter only determines how many numbers on the RNG are burned, shouldn't calling the RNG give you a new set of 32 time-dependant N's? Or at the very least, shouldn't exhausting the current "list" on the RNG do that? I.e: if I enter an unecessary battle, will that change the potential of the next floor? Hell... I hadn't considered that possibility.
Yes, but slashing a bush (64 RNG calls) or vine (82 RNG calls) would be much faster.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
There is precisely one solution to the bomb puzzle in the northern labyrinth, and precisely two (with the 6-bomb solution being faster than the 10-bomb solution) in the Tower of Sacrifice. This does not include solutions where two bombs are detonated in the same place, nor does it include permutations.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
Gunty wrote:
Wow, impressive, I'd have never been able to get all that information from that code. Do you by any chance have some notes on how item drops are determined as well?
For any attack, the RNG is used 21 times for that attack per target. (I know what all 21 do, but most are irrelevant for most actions.) Additional numbers may be used before all of these (for targeting, including attacks which always target all enemies) and after all of these (for the animation), but we'll just focus on the ones that change the effect on a certain target. After those 21, if the enemy dies, can drop an item, and no items have been dropped this turn, an additional number is generated. For Camu (for example), this number gives a 12% chance of continuing with the attempted drop (low number = drop). After that, if the first number succeeded, it generates a number 0-3, and a 1 (i.e., 0x40-0x7F) makes the item drop. In a multi-target attack, this occurs before the effects on the next enemy are determined.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
The reason that some are identical except for their drop sets is due to the fact that the drop set (8 chests, regardless of how many appear) is generated first. Some things, such as whether there is an Iris treasure or Providence, or how many times a certain set of 9 items (which appear in 22% of chests) appears, affect the amount of numbers used to generate the chests, and hence makes some sequences of numbers end up generating the same floors. This appears to be the order in which things are generated * Whether there is an Iris treasure * Whether there is Providence (only if no Iris treasure) * Contents of chests * Rooms * Doors between rooms * Maxim's starting location * Exit stairs * Treasure room; existence, location, and generation (room with 12 enemies and any treasures not in the rest of the floor) * Other enemies * Other treasures and that's as far as I got in my disassembly notes. As for Halamantariel's and my run, we actually haven't done any work on the run itself since November for various reasons, mostly coming back to manipulation of Dark Force against the last group of soldiers without a useable RNG state nearby.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
The cave is actually randomly generated from randomly placed rooms of random sizes. The frame-dependence in this randomness comes from the lower 5 bits of a counter at 7E0040, which determines how many numbers to waste before generating the next floor. The ancient cave routine is at 83/9E31-9F3E, and the routine that randomly generates a floor is at 83/9031-99C7 (called from 83/9F32). These addresses are exactly the same in the (U) and (E) ROMs.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
Halamantariel and I have been working on a test run in secret, but since Gunty made a full TAS, we decided there isn't much point in keeping it secret anymore. The test run reaches Gratze before the last soldiers fight, and we would probably reach the tank just over 3 hours into the run (PAL, so around 2:30 equivalent in NTSC). Based on the posted WIPs, we're nearly even with Gunty's run in Dankirk, but differences between PAL/NTSC loading times make an exact comparison impossible. http://dehacked.2y.net/microstorage.php/info/3650/Lufia%20II%20-%20Rise%20of%20the%20Sinistrals%20%28E%29%20%5B%21%5D.smv We plan to do an improved run sometime in the future. Particularly, we didn't get some items that we should have (e.g., Anger Brace, Pumkin Jewel) and some fights could be improved.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
http://dehacked.2y.net/microstorage.php/info/3566/Kwirk%20%28UA%29%20%5B%21%5D.vbm I'm aware that 3-8 can be done in fewer steps, but as in 1-10, pressing select fewer times probably makes my solution faster. Are there any possible improvements, no matter how small?
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
After talking to Tompa in IRC, I made this WIP yesterday. It finishes the first 20 floors. http://dehacked.2y.net/microstorage.php/info/3549/Kwirk%20%28UA%29%20%5B%21%5D.vbm
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
2-1 looks optimal. 2-2 looks like it can be improved, but I haven't looked at the level closely. 2-3 can be improved to 17 seconds (104 steps) with a different strategy, or 20 seconds (118 steps) with the same strategy you used. 2-4 has some minor movement errors. 2-5 looks like it could be optimal, but there are other possible strategies which are worth testing in the final version. In general, the fact that you need to push a block doesn't always mean that you should push it as soon as possible. The best time to push a block is when it requires the smallest amount of steps out of your way. This is how you can save 6 steps in 2-3 without changing your strategy. 2-7 can be done in 39 seconds (239 steps) when you get there.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
Floor 6 can be improved by 54 frames. Simply move the first character into the alcove instead of the second character, and also press select on an earlier frame. In floor 7, you don't need to go around the middle right rotator at the end of the puzzle. You can push it instead. This should save about 12 frames. http://dehacked.2y.net/microstorage.php/info/3506/Floors%206-7.vbm
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
Technically it's not a counter, but an RNG which is only changed when it is needed, or if you are in a menu, or if some text is waiting for you to press A. The same RNG is used to choose which enemy you fight, what the enemy does, the result of the action, and so forth. The RNG seed is located at 0026 (2 bytes), and each use of the RNG multiplies it by 0x0101 and adds 0x6375.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
At the end of every battle (if you win or run away, but not if you lose), you have a 1/4 probability of learning each PSI power you can learn at your current level. Each PSI learned can function as a luck manipulation foothold for learning or skipping any later PSI powers on the list.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
You can get to the roof at the start of the game, but Yoshi isn't there until you get 120 stars.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
00/0000-1FFF points to the same RAM as 7E/0000-1FFF. The command at C0/C263 stores the formation number, and the routine starting at C2/30E8 deals with the randomness of the encounters on the FC among other things. As for the extra 180 you fought, my best guess is that you forgot to write it down the first time. As far as I know, there is no way to change the order of formations.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
I haven't watched it, but it sounds like you only use cure once against the dark king. I'll explain how it works, and maybe you can use the information to use cure twice. Cure heals the target for (magic*1.5+50)% of its maximum HP (divided by the number of targets). For instance, if you use Cure with 32 magic, then Cure restores 98% of the target's maximum HP. In the case of the Dark King with full HP, the game adds 39200 to his current HP of 40000, but HP is only a 16-bit integer, so the result overflows to 13664. This is less than the Dark King's maximum HP, so the game accepts it as the Dark King's new HP and displays that he took 26336 damage. In short, the Dark King will take that amount of damage if and only if it won't bring his HP down to less than zero. Curing with Phoebe overflows all the way back to positive healing, but it can be used to set up a second damaging cure by the hero. I made a SMV to show this. It starts from near that point in your previous run. http://dehacked.2y.net/microstorage.php/info/2466/darkkingcure.smv ---- [Edit by Bisqwit Restored message content which NesVideoAgent accidentally overwrote.]
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
Due to a bug posted by VincentASM on FESS, I saved an additional 1166 frames (19s26f) in chapter 9. The preparation for optimal use of the bug goes back to chapter 6, so any savestates you may have after that won't work. People who don't like Lyn's normal mode will enjoy this trick. http://dehacked.2y.net/microstorage.php/info/2205/FE7.vbm I'm still foolishly hoping for a better chapter 8 manipulation, so at this rate I'll never reach Eliwood's mode.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
A better idea: correctly calculate that the number of combinations of left/right/idle in 18 or fewer frames where left/right take 2 frames each is actually 349,525. While still too much for a human, a bot may be able to deal with that.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
Shadow Byrn wrote:
*wow* It's just incredible that you can do that Nitrodon! Are you a 1337 Ninja coder or something? Anyways, this is how I understood what you said: Manipulting the fights while fighting will be next to impossilbe, but manipulating fights that you want that go generally how you want them to won't be too much trouble.
I'm not a 1337 Ninja coder or anything like that. All it took to determine those was patience, programming knowledge, a 65816 instruction list, and a debugging emulator. Luck manipulation after you are already in a battle is slow on the overworld and impossible in dungeons. However, manipulating the first 2-3 rounds of battle is relatively easy by starting the battle or conversation at a different frame. Apprentice battles would depend on the frame you exit a monster-infested area instead of the frame you start the conversation.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
The RNG routine multiplies the 2-byte value in the addresses I mentioned by 0x0383, then stores the result in the same addresses and returns the new high byte (7e006e). High RNG values cause hits, more damage, and other things. Information about battle algorithms can be found in Nati's character FAQ on GameFAQs. I have personally confirmed all of those algorithms with the game's ASM code with the exception of hit rate (which is a close approximation, but understandably the author doesn't know that there are only 11 different values for hit rate).
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
Unfortunately, the RNG only advances when used, which makes manipulation of long boss battles nearly impossible. The only reason that overworld battles are manipulable is that the waves crash against the shore at random intervals. The RNG values are 7e006c (low byte) and 7e006e (high byte). In addition, there is a separate RNG which controls enemy behavior with values at 7e0070 (low byte) and 7e0072 (high byte), but that isn't very manipulable. I've played this game extensively as a child and delved deep into the assembly code for my own interest, so I would be able to help with a TAS of this game if I'm convinced that the game's pace won't be too slow or the necessary S.Brain levelling won't be too tedious.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
fetofs wrote:
Hi guys! After two failed tries to manipulate the enemy, which costed me a lot of time, waiting two frames worked. But, I have a problem. When the movie stops, I can't move the cursor in frame-advance, but I can move it in real-time. What do you guys think? http://dehacked.2y.net/microstorage.php/info/1815/Advance%20Wars%202%20-%20Black%20Hole%20Rising%20%28U%29%20%28Intro%20Hack%29%20%28Mode7%29%20%5B1060%5D.vbm
I can move the cursor just fine in frame advance after that movie. Remember to wait until just before the cursor appears over your unit (around frame 12377). If you are referring to the time you tried to press L at the end of that movie, your cursor was already on the first unit. Pressing L a second time would have moved your cursor to the second unit. Except for the fact that you entered Flak Attack before Andy's Time, the movie looks good. There is a small counterintuitive result that could have saved 3 frames while you moved the B-copter to safety. Basically, you can make three knight's moves to make the cursor automatically catch up at the right time.
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
Lyn's mode completed 17126 frames (4m45s26f) faster than my test run. Any comments are welcome, especially suggestions for improvement. http://dehacked.2y.net/microstorage.php/info/1841/FE7.vbm I use a bug to move my characters places they aren't supposed to go, usually on top of my other characters. I'll need a name for this bug if I am to mention it in my submission comments. (EDIT: saved 150 additional frames on chapter 10)
Experienced Forum User, Published Author, Active player (283)
Joined: 3/4/2006
Posts: 341
Your input can be easily improved. The A button is delayed just as much as every other button, so feel free to press it earlier. For instance, L and A can be pressed on the same frame, and if the on-screen cursor automatically catches up (as it does when you are 2 spaces ahead of it), the direction buttons and A can be pressed on the same frame. This tendency of the on-screen cursor to automatically catch up causes some counterintuitive results for optimal cursor movement. As for the strategy, bait is only necessary when you want draw forces away from some other unit. Also, when you get attacked, remember to press A two frames before the circle appears around your unit. I have already explained both ways of manipulating luck. If you didn't do either of those, the outcome of the enemy phase will not change. http://dehacked.2y.net/microstorage.php/info/1796/Advance%20Wars%202%20-%20Black%20Hole%20Rising%20%28U%29%20%28Intro%20Hack%29%20%28Mode7%29%20%5B1060%5D.vbm
1 2
11 12 13 14