Home Gallery Resources The Team Rules chat Login Register
Pages: [1]
Author Topic: [Novice] Character-Specific PSA Coding  (Read 6154 times)
0 Members and 1 Guest are viewing this topic.
KingJigglypuff
Meme Machine
Moderator
****
Offline Offline

Posts: 7206


  • Awards RAGE!! >9000 Hyperactive Contributor Heart Container

  • View Profile Awards
    « on: April 02, 2018, 11:53:07 AM »


    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.
    Quote
    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.
    Quote
    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.
    Logged

    I don't take requests.

    My PSA Thread

    Ricky (Br3)
    KC:MM Family JesterㅤThe Last One Here
    Administrator
    ******
    Offline Offline

    Posts: 7784


  • Awards KCMM Storyteller Decade Staff RAGE!! Warm Welcomer

  • View Profile WWW Awards
    « Reply #1 on: April 03, 2018, 10:21:11 AM »


    This is supposed to be "novice", but I don't get what you're trying to show at all
    Logged

    ㅤlㅤ

    ㅤlㅤ


    KingJigglypuff
    Meme Machine
    Moderator
    ****
    Offline Offline

    Posts: 7206


  • Awards RAGE!! >9000 Hyperactive Contributor Heart Container

  • View Profile Awards
    « Reply #2 on: April 03, 2018, 01:23:20 PM »


    This is supposed to be "novice", but I don't get what you're trying to show at all

    It's PSA coding that's dependent on which Fighters are in the match with you. It's how Fox has his unique victory quote if Falco was in the match with him (and vise verse).
    Logged

    I don't take requests.

    My PSA Thread

    Ricky (Br3)
    KC:MM Family JesterㅤThe Last One Here
    Administrator
    ******
    Offline Offline

    Posts: 7784


  • Awards KCMM Storyteller Decade Staff RAGE!! Warm Welcomer

  • View Profile WWW Awards
    « Reply #3 on: April 03, 2018, 08:08:21 PM »


    Instead of skimming through, I read it a little more carefully... You really should state that your tests are related to the damage, that's changed based on who's in the match with you. It's not so clear simply from looking at the coding if you're not familiar with the terminology.

    On a side note, the coding does exactly what it's written to do.

    I mean, it checks whether or not you're facing C-Ridley and sets the damage, then checks for ZSS, then checks for falco, then everyone else. In that case, as longs as Ridley is there, it doesn't matter who else is in the match, the damage is already set.

    It will never work differently than that as it is. In order for the damage to be dealt differently for each character individually, it would have to check, AS YOU ATTACK, whose hurtbox is being attacked, and calculate/deal the damage on the fly. I don't know if that is possible. But that really is only an issue if you're looking for damage or battle effects that are specific to a certain momentaneous interaction. After all, you could be hitting one character in a moment and another character later on.

    In the case of presence-specific events, this works just fine. It's however just too simple a code for the case of momentaneous interaction.
    Logged

    ㅤlㅤ

    ㅤlㅤ


    KingJigglypuff
    Meme Machine
    Moderator
    ****
    Offline Offline

    Posts: 7206


  • Awards RAGE!! >9000 Hyperactive Contributor Heart Container

  • View Profile Awards
    « Reply #4 on: April 04, 2018, 04:19:54 AM »


    Instead of skimming through, I read it a little more carefully... You really should state that your tests are related to the damage, that's changed based on who's in the match with you. It's not so clear simply from looking at the coding if you're not familiar with the terminology.
    I already specify that, alongside showing a recorded example.

    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.
    Logged

    I don't take requests.

    My PSA Thread

    Ricky (Br3)
    KC:MM Family JesterㅤThe Last One Here
    Administrator
    ******
    Offline Offline

    Posts: 7784


  • Awards KCMM Storyteller Decade Staff RAGE!! Warm Welcomer

  • View Profile WWW Awards
    « Reply #5 on: August 18, 2024, 11:54:54 PM »


    There's a missing image in the tutorial now (it's the fighter chart)
    Logged

    ㅤlㅤ

    ㅤlㅤ


    Pages: [1]
    Print
    Jump to: