Looking for a more efficient method for modifying parameters en masse...

Discussion in 'RPG Maker VX Ace' started by Solo, Jun 19, 2014.

Thread Status:
Not open for further replies.
  1. Solo

    Solo Veteran Veteran

    Messages:
    1,104
    Likes Received:
    154
    First Language:
    English
    Primarily Uses:
    RMVXA
    Hey, I want to raise or lower many characters' parameters at once when something happens, but this is very cumbersome and will make for absolutely huge event pages if I use the "Change Parameters" command for every actor.


    I tried using a script call utilizing a range like "$game_actors[1].atk..$game_actors[29].atk += 1" but I'm pretty sure this does nothing. Is there some method you can use for ranges regarding actors' stats, so I can do what I want to do with just one quick command? Is there even a method to modify parameters of characters who are only in the party?


    Thanks.
     
    #1
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    37,184
    Likes Received:
    11,053
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    What exactly are you trying to do? That script call doesn't make any sense, so I'm confused about your goal.


    If you want to bypass the event commands, look at Game_Interpreter and see the script call it makes for that command (there's actually a pinned thread - at the top of THIS forum, I think - that lists many of them, and I think those ones are included)
     
    #2
    Solo likes this.
  3. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,310
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    From the looks of it, you are trying to modify all actors params (from 1 - 29) in one script call ?

    (1..29).each do |i|  $game_actors.add_param(PARAM_ID,VALUE)endAnyway, you should really look into some of my statistic related script for the $D13x script series. The default add param method is highly inefficient - especially when you use it more than once in a single script call box (event script command box). My statistic control script - for example- allows you to NOT refresh the actors until its all been modified.

    Ehh... doesnt matter really. the code above will do what your wanting ^_^

    Edit:

    For only the current party members...

    Code:
    $game_party.members.each { |m| m.add_param(PARAM_ID,VALUE) }
     
    Last edited by a moderator: Jun 19, 2014
    #3
    Solo likes this.
  4. Solo

    Solo Veteran Veteran

    Messages:
    1,104
    Likes Received:
    154
    First Language:
    English
    Primarily Uses:
    RMVXA
    Thank you both! The method in Archeia's pinned topic works for all characters in the party, and Dekita's method works even for characters that haven't yet joined.


    Is there another method that could be used to modify the parameters of only ACTIVE characters? As in, you use four or five at once, while the rest are in reserve. Is there a method that disregards the characters in the reserve?


    If not, it's no big deal. Thank you so much.
     
    #4
  5. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,310
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    Course there is ;)

    If there was'nt I would have probably scripted it. Statistic mods are my absolute fave <3

    Hell, I even have elemental stat distribution systems... :D

    Anyway....

    Code:
    $game_party.battle_members.each { |m| m.add_param(PARAM_ID,VALUE) }
     
    #5
    Solo likes this.
  6. Shaz

    Shaz Veteran Veteran

    Messages:
    37,184
    Likes Received:
    11,053
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    How do you define active and reserve? Do you mean battle members and non battle members? If so, how do you end up with 5 battle members? If just changing the 4 to 5 in the script, it's all good. But if you're using another party-formation type script, or party-swapping/reserve script, the solution would need to be compatible with it.


    Anyway, if it's just RTP and you're talking about battlers, you are interested in

    Code:
    $game_party.battle_members
    instead of
    Code:
    $game_party.members
     
    #6
    Solo likes this.
  7. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,310
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    Mwahahahahhaaaaa..

    I have entered...

    Ninja Mode
     
    #7
    Solo likes this.
  8. Solo

    Solo Veteran Veteran

    Messages:
    1,104
    Likes Received:
    154
    First Language:
    English
    Primarily Uses:
    RMVXA
    You guys are GREAT!! :D
     
    #8
  9. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,310
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    B)
     
    #9
    Solo likes this.
  10. Shaz

    Shaz Veteran Veteran

    Messages:
    37,184
    Likes Received:
    11,053
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Yeah ... I think I'm going to have to take you down a peg or two ;)


    Anyway, before this totally turns into some kind of race to the finish, Solo, are you happy with it all now? Can I lock this up before Dekita posts again?
     
    Last edited by a moderator: Jun 19, 2014
    #10
    Solo and ?????? like this.
  11. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,310
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    Why would I post now? The thread can clearly be closed my dear ^_^

    Edit:

    Soooooo tempted t double post for the lolz ^_^

    I have nightmares about that blue text though, so I best not:D
     
    Last edited by a moderator: Jun 19, 2014
    #11
    Solo likes this.
  12. Solo

    Solo Veteran Veteran

    Messages:
    1,104
    Likes Received:
    154
    First Language:
    English
    Primarily Uses:
    RMVXA
    Yes, thank you both very much! :)
     
    #12
    ?????? likes this.
  13. ??????

    ?????? Diabolical Codemaster Veteran

    Messages:
    6,264
    Likes Received:
    2,310
    Location:
    Your OS
    First Language:
    Binary
    Primarily Uses:
    RMMV
    no problem ^_^
     
    #13
    Solo likes this.
  14. Shaz

    Shaz Veteran Veteran

    Messages:
    37,184
    Likes Received:
    11,053
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
     
    #14
    Solo likes this.
Thread Status:
Not open for further replies.

Share This Page