Stat-Based Variables Excluding Equipment

Discussion in 'RPG Maker MV' started by Drunken Paladin, Sep 26, 2017.

  1. Drunken Paladin

    Drunken Paladin Veteran Veteran

    Messages:
    82
    Likes Received:
    55
    First Language:
    English
    Hi folks, I'm kinda stumped on how to create a conditional that checks a character's stat without calculating their equipment. In particular, I don't want a weapon's attack value to contribute to the character's attack variable, so a more accurate "strength check" can be made without encouraging weapon-swapping.

    I also don't want to have to unequip the character and force them to re-equip anything. Thanks!

    Edit: After a couple of hours of banging my head against the wall, I figured out that you can at least run a script call to set your weapon's damage to a variable, then I just subtracted it from the total. All set now, I think.
     
    Last edited: Sep 26, 2017
    #1
  2. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    4,019
    Likes Received:
    10,170
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    Another easy way is to check the hero's class. Or I have "2 copies of 1 hero" in the database, one empty to show the base stats.
     
    #2
  3. gstv87

    gstv87 Veteran Veteran

    Messages:
    1,817
    Likes Received:
    851
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    actor.paramBase(2) ?
     
    #3
    Rukiri and Poryg like this.
  4. OnslaughtSupply

    OnslaughtSupply Ssshhh... Veteran

    Messages:
    731
    Likes Received:
    762
    Location:
    Texas
    First Language:
    English
    Primarily Uses:
    RMMV
    #4
  5. gstv87

    gstv87 Veteran Veteran

    Messages:
    1,817
    Likes Received:
    851
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    no, because "a" is the initiator of the action in battle, actor or enemy alike, and enemies don't have that function I think.
    "actor" will always refer to *actors* themselves, from the database, which are the only ones you'd want to differenciate final attack from raw attack without weapons.
    enemies don't have weapons, by default.
     
    #5
  6. OnslaughtSupply

    OnslaughtSupply Ssshhh... Veteran

    Messages:
    731
    Likes Received:
    762
    Location:
    Texas
    First Language:
    English
    Primarily Uses:
    RMMV
    The answer I gave was for damage formula and the link provided has the calls for parameters and such, trust me it works just like a.atk * 2 - b.def works for both enemies and actors alike, but with an enemy you are always dealing with flat parameters because like you said, they don't have weapons.
     
    #6
  7. Drunken Paladin

    Drunken Paladin Veteran Veteran

    Messages:
    82
    Likes Received:
    55
    First Language:
    English
    I was searching all over the place for something like actor.paramBase lmao

    Thanks though. The good news is that I do want other gear to contribute to the check, just not weapon, so my solution still does what I need
     
    #7
  8. gstv87

    gstv87 Veteran Veteran

    Messages:
    1,817
    Likes Received:
    851
    First Language:
    Spanish
    Primarily Uses:
    RMVXA
    actor.param(n) would still bring you the whole stack.
    paramBase() is called by param(), but you can still call it directly.
     
    #8

Share This Page