Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [Forum post from 2015]
- This is an FCEUX Lua script for conveniently practising individual screens, originally created by DarkKobold for Mega Man 3, inspired by a similar script by dessyreqt for Super Metroid, and edited to work with other Mega Man games by me. It allows you to play the same screens over and over again, tracking your times on each attempt.
- When you launch the script it creates a save state, then starts watching certain memory values to detect when you advance to the next segment. On completing the segment it displays how many frames that took you and your current best time. With a press of a button, the script loads a save state it created at the end of your fastest attempt and starts again for the next segment.
- Usage:
- Load the script from File -> Lua -> New Script Window, then Browse..., then Run. If you've done this before, you can instead select the script directly from File -> Lua -> Recent. The first save state is created as the script first runs, so it's recommended to have the game paused, for example, during the READY text at the beginning of a stage, during a screen scroll, or near the end of a previous segment. The script will detect when the gameplay resumes after stage select or cutscenes, and set up the next save state closer to that point. The mechanism requires you to first go through the full sequence twice though.
- Once running, you have three commands. Q advances to next segment, R restarts current segment, C clears the current best, which you'll need if, for example, your fastest attempt used too much weapon energy or wasn't positioned correctly for the next screen. If you don't like these keys, you should be able to easily find the buttons defined at about the middle of the script and change them to something else. FCEUX will open the script for you in Notepad by pressing Edit in the script window (after which you'll need to save the changes and press Restart). You can also find the number of "pre-action" frames in the beginning of a segment at the very top.
- Downloads:
- https://www.dropbox.com/sh/spmqykpkredibz0/AABbWdlZmDJ4dg1uD4YyVaPYa?dl=0
- Known issues and limitations:
- The internal data in other Mega Man games doesn't line up as conveniently for the purposes of this script as 3's and they tend to have more corner cases too. So far I've been lazy about developing these and only aimed to get the other versions usable, so hardly anything has been done about anything that doesn't prevent you from getting through a regular stage. Specifically, there's nothing extra for properly handling alternate paths or teleports, so multiple games have issues with those. Stop the script and start it again once you're past whatever is causing problems to proceed.
- If FCEUX freezes and crashes, most likely the script got stuck in an infinite loop. I don't know of the versions posted here ever doing that, but it could easily happen while testing different things to get the scripts working in the first place. If this happens to you anyway, bug reports are appreciated.
- Mega Man 1:
- Rough initial version with only cursory testing done. The script watches a value that increments when scrolling, which happens at the END of the scroll. Thus there's no buffer time in the beginning of an attempt which makes this version far less pleasant to use. I'll figure out some workaround eventually but for now it works like this.
- Mega Man 2 and 4:
- Rough initial versions with only cursory testing done. Nothing special known so far though.
- Mega Man 5:
- The script watches two values, one of which updates as the screen starts to scroll, and one that updates as Mega Man crosses the screen boundary. If you start the script during the first half of a horizontal scroll, these will be desynced and the script will cut off at wrong points. Run the script again starting from any other point to fix this.
- Mega Man 6:
- The script watches a sort of a game state variable, and assumes a screen scroll is happening if it's in a state other than "normal gameplay" for a certain amount of frames. It occasionally detects a false positive - which I assume has to do with lag frames - and ends an attempt where it shouldn't.
Advertisement
Add Comment
Please, Sign In to add comment