flieskiller
Smash Journeyman
- Joined
- Jan 3, 2013
- Messages
- 426
This code is for the people that are doing their own version of Melee and want to tweak Melee in general regarding Meteor Cancel. Personally, I think that should have been in the game as default, but being a rushed game, some mechanics weren't perfect (crouch cancel being another one).
Reminder: The top 5 characters in this game doesn't have any meteor attacks (Marth in the PAL release has one, Peach dtilt), so adding any of these would be a buff to all other characters with a meteor attack.
There are 2 codes: One that prevent meteor cancelling after the player has reached a %, and after reaching a %, make the meteor cancel window take a longer time.
The default amount of frames for a meteor cancel is 8, and starts decrementing after the hitlag. Because the window is very small, meteor attacks like the one from the icies, that are weak, will make people meteor cancel before their animation even finish close to the stage, if meteored high enough, because they don't get knocked hard enough. This is less of a problem with stronger stomps, but players can't use them offensively.
So now, for the codes, starting with Action Replays:
8008f970 reduce by 1 the meteor cancel window. When at 0, can meteor cancel
8008d828 = load 8 from settings file to set as number of frames to meteor cancel
can't meteor cancel (1.02) [flieskiller]
0408f970 60000000
choose amount of frames before meteor cancel instead of 8 (1.02) [flieskiller]
0408d828 380000XX
And now, the main part, the Gecko Codes:
Can't Meteor Cancel when above 100% (1.02) [flieskiller]
C208F970 00000005
C21F1830 3E2042C8
92220020 C2220020
FC108840 4181000C
3803FFFF 48000008
7C601B78 00000000
This code checks the % when trying to decrement, and if it's above a certain %, it doesn't decrement anymore, so the player can't meteor cancel.
the number in green is the decimal for the condition. 42c80000 is 100, but it can be changed to any percent, just change it to another Single Float.
100 = 42c8
75 = 4296
50 = 4248
When over 75%, each 2 additional percents make meteor cancel 1 frame later (1.02) [flieskiller]
C208D828 00000009
800307F0 C21F1830
3E204296 92220020
C2220020 FC108840
4180002C EE108828
3E204000 62310000
92220020 C2220020
EE108824 FE00801E
DA020020 82020024
7C100214 00000000
This code, when setting the number of frames when receiving a meteor attack, loads the number of frames from the file, then checks the player's %. If it's above, the difference between the comparison % and the current % of the player is divided by 2, then added to the loaded 8 frames (or whatever number is in the settings file on the ISO).
The number in green is the starting % for longer meteor cancel window. In the Gecko code above, it's 75% as an example. It can be changed to 100% (for having consistency with how the character is weakened over 100% with the ledge attacks).
the number in teal is the decimal that divides the remaining frames. In the Gecko code, it divides by 2.0, so if the threshold is 75, and the player has 78.5, the calculations are: 78.5 - 75 = 3.5, 3.5 / 2 = 1.8, rounded down = +1 frame added. Other popular Single Floats would be:
1.0 = 3F800000
1.5 = 3FC00000
2.0 = 40000000
ASM notes:
Reminder: The top 5 characters in this game doesn't have any meteor attacks (Marth in the PAL release has one, Peach dtilt), so adding any of these would be a buff to all other characters with a meteor attack.
There are 2 codes: One that prevent meteor cancelling after the player has reached a %, and after reaching a %, make the meteor cancel window take a longer time.
The default amount of frames for a meteor cancel is 8, and starts decrementing after the hitlag. Because the window is very small, meteor attacks like the one from the icies, that are weak, will make people meteor cancel before their animation even finish close to the stage, if meteored high enough, because they don't get knocked hard enough. This is less of a problem with stronger stomps, but players can't use them offensively.
So now, for the codes, starting with Action Replays:
8008f970 reduce by 1 the meteor cancel window. When at 0, can meteor cancel
8008d828 = load 8 from settings file to set as number of frames to meteor cancel
can't meteor cancel (1.02) [flieskiller]
0408f970 60000000
choose amount of frames before meteor cancel instead of 8 (1.02) [flieskiller]
0408d828 380000XX
And now, the main part, the Gecko Codes:
Can't Meteor Cancel when above 100% (1.02) [flieskiller]
C208F970 00000005
C21F1830 3E2042C8
92220020 C2220020
FC108840 4181000C
3803FFFF 48000008
7C601B78 00000000
This code checks the % when trying to decrement, and if it's above a certain %, it doesn't decrement anymore, so the player can't meteor cancel.
the number in green is the decimal for the condition. 42c80000 is 100, but it can be changed to any percent, just change it to another Single Float.
100 = 42c8
75 = 4296
50 = 4248
When over 75%, each 2 additional percents make meteor cancel 1 frame later (1.02) [flieskiller]
C208D828 00000009
800307F0 C21F1830
3E204296 92220020
C2220020 FC108840
4180002C EE108828
3E204000 62310000
92220020 C2220020
EE108824 FE00801E
DA020020 82020024
7C100214 00000000
This code, when setting the number of frames when receiving a meteor attack, loads the number of frames from the file, then checks the player's %. If it's above, the difference between the comparison % and the current % of the player is divided by 2, then added to the loaded 8 frames (or whatever number is in the settings file on the ISO).
The number in green is the starting % for longer meteor cancel window. In the Gecko code above, it's 75% as an example. It can be changed to 100% (for having consistency with how the character is weakened over 100% with the ledge attacks).
the number in teal is the decimal that divides the remaining frames. In the Gecko code, it divides by 2.0, so if the threshold is 75, and the player has 78.5, the calculations are: 78.5 - 75 = 3.5, 3.5 / 2 = 1.8, rounded down = +1 frame added. Other popular Single Floats would be:
1.0 = 3F800000
1.5 = 3FC00000
2.0 = 40000000
ASM notes:
CODE: Can't meteor cancel when over 100%
subi r0, r3, 1
r31: character's temporary memory table
0x1830 = Player's % (single float)
8008f970
lfs f16, 0x1830(r31) #load Player's percent
lis r17, 0x42c8 #100.0 float
stw r17, 0x20(r2) #store 100.0
lfs f17, 0x20(r2) #f17 = 100.0
fcmpo cr0, f16, f17
bgt NOCANCEL
subi r0, r3, 1 #normal line
b END
NOCANCEL:
mr r0, r3 #like normal line, but without substracting
END:
CODE: When over 75%, each 2 additional percent make meteor cancel 1 frame later
lwz r0, 0x07F0 (r3) #load 8
r31: character's temporary memory table
0x1830 = Player's % (single float)
8008d828
lwz r0, 0x07F0 (r3) #default line (load default 8)
lfs f16, 0x1830(r31) #load Player's percent
lis r17, 0x4296 #75.0 float
stw r17, 0x20(r2) #store 75.0
lfs f17, 0x20(r2) #f17 = 75.0
fcmpo cr0, f16, f17
blt NOCHANGE
fsubs f16, f16, f17 #difference between threshold and player %
lis r17, 0x4000 #2.0 float
ori r17, r17, 0 #2nd part of float
stw r17, 0x20(r2) #store 2.0
lfs f17, 0x20(r2) #f17 = 2.0
fdivs f16, f16, f17 #divide diffence with 2.0
fctiwz f16, f16 #converting to r16
stfd f16, 0x20(r2) #converting to r16
lwz r16, 0x24(r2) #r16: load number of frames to add
add r0, r16, r0 #add frames to 8
NOCHANGE:
subi r0, r3, 1
r31: character's temporary memory table
0x1830 = Player's % (single float)
8008f970
lfs f16, 0x1830(r31) #load Player's percent
lis r17, 0x42c8 #100.0 float
stw r17, 0x20(r2) #store 100.0
lfs f17, 0x20(r2) #f17 = 100.0
fcmpo cr0, f16, f17
bgt NOCANCEL
subi r0, r3, 1 #normal line
b END
NOCANCEL:
mr r0, r3 #like normal line, but without substracting
END:
CODE: When over 75%, each 2 additional percent make meteor cancel 1 frame later
lwz r0, 0x07F0 (r3) #load 8
r31: character's temporary memory table
0x1830 = Player's % (single float)
8008d828
lwz r0, 0x07F0 (r3) #default line (load default 8)
lfs f16, 0x1830(r31) #load Player's percent
lis r17, 0x4296 #75.0 float
stw r17, 0x20(r2) #store 75.0
lfs f17, 0x20(r2) #f17 = 75.0
fcmpo cr0, f16, f17
blt NOCHANGE
fsubs f16, f16, f17 #difference between threshold and player %
lis r17, 0x4000 #2.0 float
ori r17, r17, 0 #2nd part of float
stw r17, 0x20(r2) #store 2.0
lfs f17, 0x20(r2) #f17 = 2.0
fdivs f16, f16, f17 #divide diffence with 2.0
fctiwz f16, f16 #converting to r16
stfd f16, 0x20(r2) #converting to r16
lwz r16, 0x24(r2) #r16: load number of frames to add
add r0, r16, r0 #add frames to 8
NOCHANGE:
Last edited: