Skip to content

Conversation

@Alekemon
Copy link
Contributor

@Alekemon Alekemon commented Oct 6, 2025

Adds a random character option to the CSS just like official Smash games do.

Captura de pantalla 2025-10-06 181119 Captura de pantalla 2025-10-06 181135

@Alekemon
Copy link
Contributor Author

Alekemon commented Oct 6, 2025

I tested it and it works properly, and it was really not that difficult to make. The reason why there's so many commits it's because my main branch was messed up, but I cleaned it and now it only contains the necessary files.

@lufinkey
Copy link
Owner

lufinkey commented Oct 6, 2025

Thanks for submitting this. What did you test on?

@Alekemon
Copy link
Contributor Author

Alekemon commented Oct 6, 2025

Thanks for submitting this. What did you test on?

I've tested this on Windows 11, compiled in Visual Studio 2019. I'll see what I can do about what you reviewed and I'll let you know once I've finished

@Alekemon
Copy link
Contributor Author

Alekemon commented Oct 8, 2025

I've managed to come with an easy solution:

Global.h
Since there was a defined constant for the number of characters on the CSS I've made the random character equal to that constant, so in case a new character is added the last character slot will always be the random one.

Loader.cpp
I added an if block before the switch that manages loading characters that changes the character, so if you chose random the code will handle it in a way that it swaps the character number for a random character number belonging to an actual character, so if new characters get added in future updates the code chunk handling selecting random won't need to be changed.

@lufinkey
Copy link
Owner

I took a deeper look at this, and I think this might break the bluetooth p2p mode. Since it sends the character code during character selection, it doesn't resolve to the actual character code before sending. This means that it'll get loaded as a random character on both devices, and most likely as a different character

@lufinkey
Copy link
Owner

lufinkey commented Oct 14, 2025

I think if you want to implement random, you're probably better off having it auto-select a random character when you activate the character preview at the bottom. Or if you don't want to know what character its selected when you choose random, you can add an extra boolean to hide the selected character if its currently randomized. This might be more complicated though.

Edit: didn't mean to close it, sorry about that

@lufinkey lufinkey closed this Oct 14, 2025
@lufinkey lufinkey reopened this Oct 14, 2025
@Alekemon Alekemon marked this pull request as draft November 10, 2025 18:51
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