Skip to content

Luigi Mash Event - #349

Draft
AmppSSBM wants to merge 3 commits into
AlexanderHarrison:masterfrom
AmppSSBM:luigi-mash-2
Draft

Luigi Mash Event#349
AmppSSBM wants to merge 3 commits into
AlexanderHarrison:masterfrom
AmppSSBM:luigi-mash-2

Conversation

@AmppSSBM

Copy link
Copy Markdown

Luigi Mash event, take 2! This was very fun to make, and I intend on doing more.

The event uses an action bar to show when B was pressed. Stats are provided on the right, with Height Gain being saved to memory card. Some of the pause options are there for easier mash practice, such as infinite jumps and infinite down-b charge.

Notes:

  • Tested on console and small crt. Text is readable.
  • mash.c started off as just a copied fc.c, but stripped down. Any similarities between the two is because of this.
  • Right hud is purely Text. It is a compromise to melee's hud found in wavedash, lcancel, ledgedash, and vanilla training mode.
    • Pros: more text is possible, and large modification is easy and possible (mainly size, as default melee hud can be pretty hard to read on worse crt's).
    • Cons: less consistent to overall training mode look, and small modifications can be harder (as you might have to readjust sizes and positions manually).
  • Text was given proper borders. This is done similar to how Text borders work on the top-bar's key, but instead of 4 passes (which can look bad sometimes), it is 8 passes.
    • Meaning, for every Text, there are 8 additional black texts drawn before the final white text.
    • Border was added because, on Yoshis Story, white text can be harder to read.
    • The current implementation uses a for() loop whenever there is a section of code that updates text.
    • The function that does this, setTextWithBorder(), could be added to events.c, with the idea of adding it to other events, like egg and slalom score tracker.
  • High scores (Height Gain) are floats for displaying, but are converted to ints for memory card saving. And vise versa.
  • Saving must be done by exiting the event. (egg and slalom exit automatically, but mash doesn't).
  • Added Events_CheckIfEventWasPlayedYet() to melee.link and event.h.
    • Reason is, if nothing is saved, Events_GetSavedScore() returns 0. This is fine for egg and slalom, as that is already the lowest value. But for mash's Height Gain, negatives are allowed, and 0 could be a new high score. So, without Events_CheckIfEventWasPlayedYet(), there is no way to categorize the 0 as a real high score or a fake uninitialized high score.
  • In events.c, .callbackPriority was set to 20.
  • This event can be pretty easily extended to include Mario, Doc, and IC's mash recoveries, which is a goal of mine.

@AlexanderHarrison

Copy link
Copy Markdown
Owner

Nice! This is a good idea for an event. Few things to change if you want this merged:

  • Remove the unused commented code.
  • Make all the global int and float declarations static.
  • Make all functions (except Event_Think and Event_Init) static.
  • You can get previous states using fighter_data->TM.state_prev[0]. State frame is similar.
  • Change casing to keep everything consistent (e.g. setTextWithBorder).
  • Can you automatically save if there's a new high score after finishing a cyclone mash? This would remove the need for people to hit Exit.
  • What's the purpose of the misfire rng, camera, and infinite jump options? Seems out of place.
  • Having the cyclone timings in LuigiActionStates doesn't make much sense to me.
  • What is the super tornado?

@AmppSSBM

Copy link
Copy Markdown
Author

Thank you for the feedback. I already had a couple other ideas for refactoring, so I will work on refactoring :)

To answer your questions:

  • Mid-event saving doesn't seem to exist, at least not easily. The only case I see it existing is with your recording exports in Training Lab. Otherwise, saving seems to only occur once out of the event.
    • For example, within Training Lab, you can set an OSD, or a Frame Advance Button, and it will save it to the memory card, but ONLY after you press "Exit". If you instead just close Dolphin, it will not save.
  • Pause options are fun, but are also practical for mash practice:
    • Infinite jumps lets you reposition a lot faster (very helpful)
    • Misfire control lets you guarantee the side-b you want (rarely helpful, but you never know what people will test)
    • Camera control (specifically "Fixed") lets you view Luigi's position and height gain from a better angle (rarely helpful for playing, but helpful for recording)
  • Super tornado (quick SSBM Tutorials explanation) is a weird mechanic where, if you start your down-b on the ground, then leave the ground within a few frames, you still get to mash, but without the large initial negative velocity that usually comes with airborne down-b.
    • You gain a lot more height doing this, which is why I made it not to save to high score.

@AlexanderHarrison

AlexanderHarrison commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Ok, sounds good. I just did a bit of research and added a simple way to save the memcard in the middle of a game. See a21b8b4

Just in case you aren't super exp with git, you will need to rebase your fork with this repo to see these changes on your end.

Just FYI, if you've made a PR that you're still working on, mark it as draft.

@AlexanderHarrison
AlexanderHarrison marked this pull request as draft July 18, 2026 16:59
@AmppSSBM

Copy link
Copy Markdown
Author

Seems like your new save system crashes on my end? This is after toggling one of the OSD's, on a fresh save file, straight from your source code:

image

It's a good change to this event, and I will implement it. But I'll first wait on a response/fix, and instead just work on refactoring in the meantime.

@AlexanderHarrison

Copy link
Copy Markdown
Owner

Toggling OSDs works fine for me. Might it be something on your end?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants