This code (a modified version of _glook's omega stage toggle) allows having custom stage .dat files for every stage. This allows redirecting which stage is gonna be loaded (changes the ID, I mean) and which file is gonna be loaded (changes the filename to load) per SSS slot (plus per button combo). So, you can have a different Hyrule Castle for every single slot you put it in, and various button combos to other stages in every one of those slots, for example.
It's called "XT Alternate Stage Loader" since it works in a similar way to Brawl's ASL code, you write an "ASL entry" which tells the code what stage it should replace with which stage, which file to load and what button combo to detect. Hold the defined button combo until the stage loads up and you'll get an alternate stage depending on how you set up the code and files. And the XT because I made it for Melee XT (well, duh).
If you use it in your own mod, credit is appreciated, but crediting _glook is probably the most important thing, he was the one who made the original codes and all the related documentation without which I really doubt I'd have ever done anything. Huge thanks to him for the excellent original code.
It's called "XT Alternate Stage Loader" since it works in a similar way to Brawl's ASL code, you write an "ASL entry" which tells the code what stage it should replace with which stage, which file to load and what button combo to detect. Hold the defined button combo until the stage loads up and you'll get an alternate stage depending on how you set up the code and files. And the XT because I made it for Melee XT (well, duh).
NOTE: Click on the images to get larger versions of them.
First, download the text file at the bottom of the page, and then drop that text file into your Melee Code Manager's "Mods Library" folder.
Now, press the little edit button on the bottom right of this code (after going to the new code tab, called "XT Alternate Stage Loader"):
It should then take you to the "mod construction" tab, where you need to select the xtAslData standalone function on the left. Here it is selected in the image:
Now it's time to actually add our ASL entries. It might sound a little bit scary, but if you have patience to read through instructions, it should be easy. Even easier if you have used Dantarion's ASL code for Brawl, as this is similar to it, but simpler.
An ASL entry looks like this:
Where each field means the following:
WWWW = Stage ID to replace
XXXX = Button combo
YYYY = Replacement stage ID
ZZ = stage filename byte (this is the "r" in the "Gr**.dat" filenames)
The stage IDs to use can be found here: https://code.google.com/archive/p/vgce/wikis/ssbmStageID.wiki
Use the value between the brackets for the stage ID. If you want to load the same stage ID but with a different filename, set the replacement stage ID to the same as the stage to replace, and change the stage filename byte (we'll get to that later).
Button combo works like this, you add together these values with a hex calculator to get your desired button combo. The one included with Windows in programmer mode and in hex mode in the left bar should work.
Do note that the A and Start buttons have values, and if you don't put the button you use to select stages in the combo, you'll need to quickly release it before inputting the combo. For this reason, I recommend just adding the A button to all button combinations, since it's easier to hold it than time releasing it correctly. Here's the button codes:
And finally, the stage filename byte is merely an ASCII letter, but in hex. There's special behavior for it, if you set it to 00, it'll just load the normal stage filename (72 is the hex code for "r", and setting it to that works too but 00 is easier to memorize). So, if we set it to 72 (lowercase x in hex), for, say, a Yoshi's Story stage, it'll make the code load "GxSt.dat" instead of vanilla "GrSt.dat".
NOTE: I'm pretty sure this is case-sensitive, so make sure to name your file with the same casing as what you put in here!
You might have noticed there's a 47 before the filename byte, this is just in case the code ever updates to add the ability to modify the "G" in the stage filename too, so that previous definitions don't need to be updated. Just don't change that value and there will be nothing to worry about.
So, as an example, let's make Venom (id 16), load Pikachu's target test (id 32) while using 6F as the filename byte (lowercase o in hex), with a button combo of R+A:
And, since we set the filename byte to 6F (again, lowercase o in hex), it'll load "GoTPk.dat" instead of "GrTPk.dat".
We put that in the code (removing the original "put your ASL entries here" comment), which would look like this:
If you want to add more entries, just add another line before "00000000 BEC0FFEE" and type another ASL entry in. I added 2 more in this example:
And that's pretty much about it. Hope you understood my explanation!
First, download the text file at the bottom of the page, and then drop that text file into your Melee Code Manager's "Mods Library" folder.
Now, press the little edit button on the bottom right of this code (after going to the new code tab, called "XT Alternate Stage Loader"):
It should then take you to the "mod construction" tab, where you need to select the xtAslData standalone function on the left. Here it is selected in the image:
Now it's time to actually add our ASL entries. It might sound a little bit scary, but if you have patience to read through instructions, it should be easy. Even easier if you have used Dantarion's ASL code for Brawl, as this is similar to it, but simpler.
An ASL entry looks like this:
Code:
WWWWXXXX YYYY47ZZ
WWWW = Stage ID to replace
XXXX = Button combo
YYYY = Replacement stage ID
ZZ = stage filename byte (this is the "r" in the "Gr**.dat" filenames)
The stage IDs to use can be found here: https://code.google.com/archive/p/vgce/wikis/ssbmStageID.wiki
Use the value between the brackets for the stage ID. If you want to load the same stage ID but with a different filename, set the replacement stage ID to the same as the stage to replace, and change the stage filename byte (we'll get to that later).
Button combo works like this, you add together these values with a hex calculator to get your desired button combo. The one included with Windows in programmer mode and in hex mode in the left bar should work.
Do note that the A and Start buttons have values, and if you don't put the button you use to select stages in the combo, you'll need to quickly release it before inputting the combo. For this reason, I recommend just adding the A button to all button combinations, since it's easier to hold it than time releasing it correctly. Here's the button codes:
Code:
0000 = No Buttons Held
0001 = Left D-Pad
0002 = Right D-Pad
0004 = Down D-Pad
0008 = Up D-Pad
0010 = Z button
0020 = R trigger (digital/full press)
0040 = L trigger (digital/full press)
0100 = A button
0200 = B button
0400 = X button
0800 = Y button
1000 = Start button
NOTE: I'm pretty sure this is case-sensitive, so make sure to name your file with the same casing as what you put in here!
You might have noticed there's a 47 before the filename byte, this is just in case the code ever updates to add the ability to modify the "G" in the stage filename too, so that previous definitions don't need to be updated. Just don't change that value and there will be nothing to worry about.
So, as an example, let's make Venom (id 16), load Pikachu's target test (id 32) while using 6F as the filename byte (lowercase o in hex), with a button combo of R+A:
Code:
00160120 0032476F
We put that in the code (removing the original "put your ASL entries here" comment), which would look like this:
If you want to add more entries, just add another line before "00000000 BEC0FFEE" and type another ASL entry in. I added 2 more in this example:
And that's pretty much about it. Hope you understood my explanation!
If you use it in your own mod, credit is appreciated, but crediting _glook is probably the most important thing, he was the one who made the original codes and all the related documentation without which I really doubt I'd have ever done anything. Huge thanks to him for the excellent original code.
Attachments
-
2.5 KB Views: 122
Last edited: