MLSS Script v0.5
- Added "Run Event". You can choose the event from a list (depends on which ROM of the game is used) and it will be run on the spot.
- EditActionCommands: Fixed that the script sometimes crashed when closing the EditActionCommands display while the "Edit" form was not active.
- MushCalculator: Fixed that MushCalculator did not recognize the European ROM.
- Added SwingBros, CycloneBros, FireBros, ThunderBros to "Basic Info" and to "Notifications".
- Basic Info: Added indicator of how long it took to switch the brothers' places.
Please play around with the Run Event thing and let me know if you have questions or thoughts. I didn't go to search for pointers on the european version because I think nobody uses it anyway.
Some explanations on events and on how "Run Event" should be used:
Events are basicly cutscenes. There are two layers, which allows the game to run two events at the same time (but I haven't really seen it do so - I don't know the real explanation why it uses two layers). For each layer, there is an address that stores an event pointer, and an address that tells what to do with it (i.e. activity). There is also a timer address.:
(All addresses are EWRAM, 4 bytes)
Layer1:
$4ac4 Activity*
$4ac0 Timer
$4a24 Pointer
Layer2:
$4b6c Activity*
$4b68 Timer
$4acc Pointer
* 0 = not active, nothing happens
1 = active, the event is run
3 = if the event pointer is invalid, increments the event pointer until a valid one is found
5 = waiting for an object or brother to reach a certain position before running the event
11 = waiting for the timer address to decrement down to 0 before running the event
Most cutscenes (events) are basicly "move sprite XY over there, play this sound, give him this animation pattern, fade out now, ...". If you force such events to run in a wrong room, then very unexpected behavior can happen, usually leading to the emulator's crash. Some events are robust, however, and can be forced to run almost always without consequences. This is because those events usually fade into the correct room or screen and then go on from there, rather than trying to do something with wrong objects in a wrong room. I have gone looking for those robust pointers and now you can select them from a list in my script and run them as you like.
This includes
- saving anywhere
- shopping anywhere
- fighting bosses at any time
- going to certain points in the game
I wrote those robust events can "almost always" be run without consequences. You see, as for events that start boss fights (and some others), if you beat the boss then you will often not be placed in the room where the boss was but will rather go on from where you were - and the game may try to run a post-battle event. And as said, bad things happen when cutscenes are forced to run in the wrong room. You can't just disable that post-battle event either, because then the game softlocks on a black screen after the battle. But you can overwrite it with another event, and I made my script so that it overwrites it with one that does nothing (specifically, the fade-in that happens after finishing saving the game).
(As for the koopaling teleports in my script, you may need to be both brothers, and it may cause glitchy behavior if you are in another event already, so be cautious.)
In the "Run Event" display in my script, the "Prevent problems" option does what I said above: Overwrites post-battle or post-Little Fungitown minigame dialogues and events with something that does nothing.
The "Override" option will let you override events that are already running - this may cause unexpected behavior and may mess up the camera, so be careful, but otherwise should work well. If this option is turned off, you will not be able to run an event if there is already one running in the game.
There are some known problems, like if you use the "Prevent problems" option with the koopaling teleports, then you may not actually teleport there. Just use savestates for safety before doing something.
Speaking of which, be careful when running events while the game is faded out and don't load states right after attempting to run an event.
Also: Battles, the staff credits, minigames are all handled differently and you cannot run anything when those are active - in fact, you can run something but it will be postponed to run until after the battle or minigame(not sure) is finished.
Oh also: If you start a new game and go to some later point in the game directly, you will lack action commands (hammers, highjump etc.) and will be unable to use hammers in battle, and also may be unable to use bros attacks and flee in-battle. Be cautious. I may add something later so you get all that stuff automatically, but right now I don't know how it even works so I can't add it yet.
The prefix for each list item is just for some clarity. It does not have any deeper meaning. There is Prog (progress-related), Boss, Game (mini game), Scr (screen) and Other (anything that doesnt fit in the other categories).
I'm really not sure, but on US, the game may freeze when attempting to save the game where you aren't supposed to, but does not freeze on JP. Needs more testing to be sure about this one...