This guide is an updated revision to
Leon Exodio's video tutorial.
This isn't much of a tutorial, but rather an explanation of how the process works, alongside its limitations.
The requirement is listed as "Turning With Item" in PSA and BrawlBox, but with PSA Compressor, it's unlabeled as Requirement 2724.
Here's a general template on how to have Character-Specific PSA coding.
If 2724: *Fighter's Slot ID (Value)*
*Alternate Coding*
Else
*Regular Coding*
EndIf
What this bit of coding will do is check to see which Fighter is in the match with your Fighter based on their Slot ID. You can use the image below as a reference of which Slot IDs each Fighter uses.
Note: If using Project M (or any build based off it), replace Petey Piranha with Roy and Rayquaza with Mewtwo.
The requirement also works with Expansion Slot IDs (BrawlEx/PMEx required).
To make explanation easier, I'm going to provide my own example coding, alongside a demonstration of its implications.
If 2724: 50
Basic Variable Set: RA-Basic[10] = 8
Else If 2724: 4
Basic Variable Set: RA-Basic[10] = 6
Else If 2724: 15
Basic Variable Set: RA-Basic[10] = 4
Else
Basic Variable Set: RA-Basic[10] = 2
EndIf
Here's the mentioned demonstration:
What this bit of coding does is check to see if Classic Ridley (0x50), Zero Suit Samus (0x4), or Falco (0x15) are in the same match as Fox before setting RA-Basic[10] to a custom value, which is then later applied to a hitbox (with its Damage Paramerter set to use RA-Basic[10]).
The coding works just how you'd expect it to with 1 v 1 matches, as I show each Fighter option one at a time (Mario is a stand-in for Fighters not specified in the coding block.
But the requirement shows its limitations once you enter a free-for-all. Like with the general demonstration, I'll also provide one for this next section as well.
As showcased by this demonstration, when I enter Classic Ridley and Falco in the same match, you'll notice the Classic Ridley-specific coding will apply to everyone. Because since the check for Classic Ridley's ID comes first in the coding stack, it'll apply the Classic Ridley-specific coding to everyone else in the match.
I then demonstrate a second scenario in which if I were to replace Ridley with Zero Suit Samus for the next match (while still keeping Falco), the Zero Suit Samus-specific coding will apply to everyone in the match, as her ID check comes after Classic Ridley's check.
After that, I conclude with replacing Zero Suit Samus with Mario. Hopefully, I don't need to explain what happens next.