• Welcome to Smashboards, the world's largest Super Smash Brothers community! Over 250,000 Smash Bros. fans from around the world have come to discuss these great games in over 19 million posts!

    You are currently viewing our boards as a visitor. Click here to sign up right now and start on your path in the Smash community!

I'd like to hack items into being more balanced.

Muhznit

Smash Journeyman
Joined
Apr 10, 2008
Messages
455
Location
404...
A while back, Eternal Yoshi said in the "What have we NOT hacked" thread that he managed to modify hitboxes of various items to tone them down. Though I asked him to show them he never did.

So I'm asking the tutorial forum to tell me what he did, or at least give me a link to the results. My searches have been rather fruitless, but I managed to find this one code:

OHKO Hammer [Standardtoaster]
04FA0000 000003E7
04FA0078 000003E7
04FA00F0 000003E7
04FA0168 000003E7

And from a lucky guess with Windows Calculator, I figured out that 3E7 was 999 in decimal.
From what I can guess, they're probably altering damage of the hitbox(es). Of course I have NO CLUE how to even access the file the hammer's hitbox data is in, let alone how to identify and edit a hitbox in something other than PSA. The openPSA wiki has basically no documentation on this, so... I'm completely at a loss.

Help, please?
 

standardtoaster

Tubacabra
Joined
Nov 26, 2009
Messages
9,253
Location
Eau Claire, Wisconsin
That code does not work properly btw. I made that before I knew how to properly edit things such as common3 with codes. You are correct that this edits the damage of the hammer.

This one fixes it and actually works. The item parameters are in common3.

OHKO Hammer [Standardtoaster]
4A000000 910489E0
040003EC 000003E7
04000464 000003E7
040004DC 000003E7
04000554 000003E7
E0000000 80008000
 

Muhznit

Smash Journeyman
Joined
Apr 10, 2008
Messages
455
Location
404...
That code does not work properly btw. I made that before I knew how to properly edit things such as common3 with codes. You are correct that this edits the damage of the hammer.

This one fixes it and actually works. The item parameters are in common3.

OHKO Hammer [Standardtoaster]
4A000000 910489E0
040003EC 000003E7
04000464 000003E7
040004DC 000003E7
04000554 000003E7
E0000000 80008000
Well that's cool and all.... but that still leaves the other items to account for. I still have no what to look for in common3.pac, let alone how to edit it.
 

theEffinBear

Smash Apprentice
Joined
Jun 16, 2008
Messages
88
Location
North East
Well that's cool and all.... but that still leaves the other items to account for. I still have no what to look for in common3.pac, let alone how to edit it.
If you want to directly change the items themselves and don't mind dealing with hundreds of files to do so, check out the tutorials by Vile quoted in this post (and you can obtain common3_en.pac from the link earlier in the post).

The other procedure is to use OpenSA2, along with knowledge of hex editing and fighter.pac injection (but obviously injecting into common3.pac instead of fighter.pac). That's the method that Standardtoaster used in your quote.

Essentially:
Open up common3.pac in OpenSA2 and find the relevant item that you want to tweak. When you've opened an item, take note of the "command offset" that should be listed at bottom of the window; we'll take the case of the hammer, which is 910489E0.

The first line of the Gecko code will be "4A000000" followed by the Hammer's memory address. This line tells Gecko to be start from the Hammer's offset, and will be followed by the overwrite mode, target offset to be overwritten (offset from the Hammer's absolute memory address), and the new values. So our first line will be:
4A000000 910489E0


Now you'll need to find the subaction that creates the Hammer's hitboxes, which should be a set of 06150F00 "Special Offensive Collision" commands (or possibly a set of 06000D00 "Offensive Collision" commands). Use the information here to get more information about the parameters: Brawl's Collisions event module.

Brawl deals in 4-byte words, which can be represented as 8 hex characters; each line of code consists of two words. (The .pac files also consist of things besides these lines of code, but we'll ignore that for now.) Each line of code that we care about is either a command or a param, and takes up 8 bytes. A command line is the command word followed by the location of its parameters (its "param offset"), or "00000000" if the command doesn't take parameters; a param line is the data type of the parameter followed by the data itself.

If I'm working through this correctly, there should be four Special Hitbox commands, as follows:
06150F00 000003E0
06150F00 00000458
06150F00 000004D0
06150F00 00000548


So you can now examine the parameters at those locations, hopefully finding out that the vBrawl damage params of the Hammer's hitboxes are all "00000000 00000016" = int 0x16 (decimal 22). You almost certainly don't want to change the data type of the damage param; you only need to care about the "00000016" word, which is the damage itself. This damage value is the second word (+0x4 bytes) of the second param (+0x8 bytes) of the hitbox, so add 0xC bytes to the hitbox's param offset to locate the damage values themselves:
0x3E0 + 0xC = 0x000003EC
0x458 + 0xC = 0x00000464
0x4D0 + 0xC = 0x000004DC
0x548 + 0xC = 0x00000554


So now you have the exact offsets of the exact words you wish to change! Now make the Gecko "write" commands. In this case, we want to tell Gecko to overwrite 4 bytes of memory with a specified value. An "overwrite 4 bytes (32 bits)" command is "04XXXXXX ZZZZZZZZ", where XXXXXX is the targeted offset, and ZZZZZZZZ is the new word you want there -- let's say, decimal 999 = 0x3E7. That gets us:
040003EC 000003E7
04000464 000003E7
040004DC 000003E7
04000554 000003E7


Lastly, close off with "E0000000 80008000", which marks the end of our "overwrite the specified words" Gecko code. Piece this all together to get our final result:

OHKO Hammer [Standardtoaster]
4A000000 910489E0
040003EC 000003E7
04000464 000003E7
040004DC 000003E7
04000554 000003E7
E0000000 80008000


...which just so happens to be Standardtoaster's OHKO Hammer code from before. Good news! Now you can try editing a new item with different values and hopefully everything goes well!

/RtEB
p.s. You can use the Programmer Mode of the built-in calculator of whatever OS you have, but I find it far far easier to keep a terminal window open and use Python as my calculator with its built-in hex() function to convert from decimal to hex; just typing something like "0x3E7" will indicate that its value is decimal 999.
 

Muhznit

Smash Journeyman
Joined
Apr 10, 2008
Messages
455
Location
404...
If you want to directly change the items themselves and don't mind dealing with hundreds of files to do so, check out the tutorials by Vile quoted in this post (and you can obtain common3_en.pac from the link earlier in the post).

The other procedure is to use OpenSA2, along with knowledge of hex editing and fighter.pac injection (but obviously injecting into common3.pac instead of fighter.pac). That's the method that Standardtoaster used in your quote.

Essentially:
Open up common3.pac in OpenSA2 and find the relevant item that you want to tweak. When you've opened an item, take note of the "command offset" that should be listed at bottom of the window; we'll take the case of the hammer, which is 910489E0.

The first line of the Gecko code will be "4A000000" followed by the Hammer's memory address. This line tells Gecko to be start from the Hammer's offset, and will be followed by the overwrite mode, target offset to be overwritten (offset from the Hammer's absolute memory address), and the new values. So our first line will be:
4A000000 910489E0


Now you'll need to find the subaction that creates the Hammer's hitboxes, which should be a set of 06150F00 "Special Offensive Collision" commands (or possibly a set of 06000D00 "Offensive Collision" commands). Use the information here to get more information about the parameters: Brawl's Collisions event module.

Brawl deals in 4-byte words, which can be represented as 8 hex characters; each line of code consists of two words. (The .pac files also consist of things besides these lines of code, but we'll ignore that for now.) Each line of code that we care about is either a command or a param, and takes up 8 bytes. A command line is the command word followed by the location of its parameters (its "param offset"), or "00000000" if the command doesn't take parameters; a param line is the data type of the parameter followed by the data itself.

If I'm working through this correctly, there should be four Special Hitbox commands, as follows:
06150F00 000003E0
06150F00 00000458
06150F00 000004D0
06150F00 00000548


So you can now examine the parameters at those locations, hopefully finding out that the vBrawl damage params of the Hammer's hitboxes are all "00000000 00000016" = int 0x16 (decimal 22). You almost certainly don't want to change the data type of the damage param; you only need to care about the "00000016" word, which is the damage itself. This damage value is the second word (+0x4 bytes) of the second param (+0x8 bytes) of the hitbox, so add 0xC bytes to the hitbox's param offset to locate the damage values themselves:
0x3E0 + 0xC = 0x000003EC
0x458 + 0xC = 0x00000464
0x4D0 + 0xC = 0x000004DC
0x548 + 0xC = 0x00000554


So now you have the exact offsets of the exact words you wish to change! Now make the Gecko "write" commands. In this case, we want to tell Gecko to overwrite 4 bytes of memory with a specified value. An "overwrite 4 bytes (32 bits)" command is "04XXXXXX ZZZZZZZZ", where XXXXXX is the targeted offset, and ZZZZZZZZ is the new word you want there -- let's say, decimal 999 = 0x3E7. That gets us:
040003EC 000003E7
04000464 000003E7
040004DC 000003E7
04000554 000003E7


Lastly, close off with "E0000000 80008000", which marks the end of our "overwrite the specified words" Gecko code. Piece this all together to get our final result:

OHKO Hammer [Standardtoaster]
4A000000 910489E0
040003EC 000003E7
04000464 000003E7
040004DC 000003E7
04000554 000003E7
E0000000 80008000


...which just so happens to be Standardtoaster's OHKO Hammer code from before. Good news! Now you can try editing a new item with different values and hopefully everything goes well!

/RtEB
p.s. You can use the Programmer Mode of the built-in calculator of whatever OS you have, but I find it far far easier to keep a terminal window open and use Python as my calculator with its built-in hex() function to convert from decimal to hex; just typing something like "0x3E7" will indicate that its value is decimal 999.
Many thanks kind sir. Currently at college, so I'll have to mess with this later.
 
Top Bottom