Achilles1515
Smash Master
Custom Subaction Event - Character Data Modifications (1.02) [Achilles]
This code presents a new, flexible-length subaction event that allows modifications to the character data structure of a player. SSBM Memory Spreadsheet - See the "Char Data Offsets" tab.
Inject this code into your ISO (I suggest using DRGN's Code Manager) and then you can start modifying subaction data within Pl__.dat files to include this new command.
Custom Subaction Format
F8FFAAAA BBCCDDDD EEEEEEEE .... BBCCDDDD EEEEEEEE ... BBCCDDDD EEEEEEEE ....
F8 = subaction command byte (always keep as 0xF8)
FF = flag for custom function (always keep as 0xFF)
AAAA = length of this custom subaction ( = 0x4 + 0x8*[# of char data offset mods])
The following data is for modifying a character data offset value. Modifications can be repeated in succession, as long as the "length of this custom subaction" is modified accordingly.
BB = modification type
EEEEEEEE = new value to be placed @ character data offset
NOTE: The BB and CC flags above do not add, except the 0x80 with the CC flag. So, setting the CC flag to 0x85 means to take the new value, multiply it by the facing direction, and then take the value [presumably a float] currently at the char data offset and multiply it by previous result.
@Ampers @Tater Itaru
omegagmaster use this for your Doc Mario Tornado mod by changing the y-velocity (try self-induced y veloc)
I just whipped this up really quickly tonight and didn't test it much at all. Let me know if there are any issues. Also, if you don't understand how the game uses the character offset data, you may be trying to change something that simply can't be done with a simple overwriting method like this. As an example, plugging in a new action state ID into the action state offset at 0x10 (0x70 minus 0x60) will not cause that player to enter the new action state. The game doesn't work that way (without further modifications). But setting things like velocities should cause instant changes.
Code:
C20716F8 00000033
80A40008 88C50001
2C0600FF 40820180
7CC802A6 90C1FFF4
8063002C A0C50002
7CE62A14 90E40008
38C6FFFC 39200008
7C864BD6 38A50004
88C50000 88E50001
A1050002 81250004
2C060000 4182001C
2C060001 41820024
2C060002 4182002C
2C060003 41820034
7D8340AE 4800009D
7D2341AE 480000FC
7D83422E 4800008D
7D23432E 480000EC
7D83402E 4800007D
7D23412E 480000DC
C0250004 54E9CFFF
41820010 C003002C
FC200072 38E7FF80
7D234214 C0090000
2C070000 41820044
2C070003 418000AC
4182001C 2C070004
4182001C 2C070005
4182001C 2C070006
4182001C FC21002A
48000018 FC200828
48000010 FC210032
48000008 EC200824
D0290000 4800006C
2C070000 4D820020
2C070001 4182002C
2C070002 4182002C
2C070003 4182002C
2C070004 4182002C
2C070005 4182002C
2C070006 4182002C
7D296038 4E800020
7D296378 4E800020
7D296214 4E800020
7D296050 4E800020
7D2C49D6 4E800020
7D2C4BD6 4E800020
38A50008 3884FFFF
2C040000 41A1FEBC
80C1FFF4 7CC803A6
4E800020 80640008
60000000 00000000
Inject this code into your ISO (I suggest using DRGN's Code Manager) and then you can start modifying subaction data within Pl__.dat files to include this new command.
Custom Subaction Format
F8FFAAAA BBCCDDDD EEEEEEEE .... BBCCDDDD EEEEEEEE ... BBCCDDDD EEEEEEEE ....
F8 = subaction command byte (always keep as 0xF8)
FF = flag for custom function (always keep as 0xFF)
AAAA = length of this custom subaction ( = 0x4 + 0x8*[# of char data offset mods])
ex. just one char data offset mod would have a total length of 0xC. Two mods at once would be 0x14. etc..
The following data is for modifying a character data offset value. Modifications can be repeated in succession, as long as the "length of this custom subaction" is modified accordingly.
BB = modification type
00 = byte [8-bit]
01 = half word [16-bit]
02 = word [32-bit]
03 = floating point number [32-bit]
CC = modification operation flag01 = half word [16-bit]
02 = word [32-bit]
03 = floating point number [32-bit]
00 = overwrite value at character data offset
01 = AND with value at character data offset
02 = OR with value at character data offset
03 = add to value at character data offset
04 = subtract from value at character data offset
05 = multiply with value at character data offset
06 = divide current value at char data offset with new value
+0x80 = [for floats to x-axis values] multiply new value by character facing direction
DDDD = character data offset01 = AND with value at character data offset
02 = OR with value at character data offset
03 = add to value at character data offset
04 = subtract from value at character data offset
05 = multiply with value at character data offset
06 = divide current value at char data offset with new value
+0x80 = [for floats to x-axis values] multiply new value by character facing direction
1.00 = facing right, -1.00 = facing left (these aren't important to know)
EEEEEEEE = new value to be placed @ character data offset
- in reference to x-axis values (e.g. velocity), with the 0x80 flag above enabled, positive float means forward and negative means backward
NOTE: The BB and CC flags above do not add, except the 0x80 with the CC flag. So, setting the CC flag to 0x85 means to take the new value, multiply it by the facing direction, and then take the value [presumably a float] currently at the char data offset and multiply it by previous result.
@Ampers @Tater Itaru
omegagmaster use this for your Doc Mario Tornado mod by changing the y-velocity (try self-induced y veloc)
I just whipped this up really quickly tonight and didn't test it much at all. Let me know if there are any issues. Also, if you don't understand how the game uses the character offset data, you may be trying to change something that simply can't be done with a simple overwriting method like this. As an example, plugging in a new action state ID into the action state offset at 0x10 (0x70 minus 0x60) will not cause that player to enter the new action state. The game doesn't work that way (without further modifications). But setting things like velocities should cause instant changes.
Last edited: