Change Whole Party Walking Graphic?

Discussion in 'JS Plugin Requests' started by Isabella Ava, Dec 2, 2017.

  1. Isabella Ava

    Isabella Ava Veteran Veteran

    Messages:
    636
    Likes Received:
    752
    First Language:
    English
    Hi Guys, can you help me with scripts or a plugin to:
    change whole Party Walking Graphic (included Actors who joined but not in main Party?)
    and a method to check if whole Party's Walking Graphic is === a Specified Walking Graphic Or not (like "People1", "index6")
    Thanks guys
     
    #1
  2. dbchest

    dbchest Beast Master Veteran

    Messages:
    434
    Likes Received:
    297
    Location:
    Pennsylvania
    First Language:
    English
    Primarily Uses:
    RMMV
    the graphics you will be using; will they always be the same or will you change them from time to time?
     
    #2
    Isabella Ava likes this.
  3. Isabella Ava

    Isabella Ava Veteran Veteran

    Messages:
    636
    Likes Received:
    752
    First Language:
    English
    @dbchest the graphic will be using need to change time to time. I forgot to mention that i need a method to revert Party graphic to their default graphic too
     
    #3
  4. Shaz

    Shaz Veteran Veteran

    Messages:
    37,590
    Likes Received:
    11,309
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    What is your purpose?

    I have a couple of points in my game where all party members are riding horses, or all party members are swimming. I just do it using common events, and I call those common events from the events that control when they switch from one to another.

    The common event for swimming just loops through all actors who could be in my party at that time (for your purposes, you could just make it do ALL actors), and does a Change Actor Graphic to the swimming version. Same for the horses. And of course there's another common event to change them back to the regular walking sprite.

    Some people use common events in this way to change the party graphics on the overworld map, to make them smaller, and then back again when they go to another map.

    Don't really need a plugin for this.
     
    #4
    Isabella Ava and dbchest like this.
  5. Isabella Ava

    Isabella Ava Veteran Veteran

    Messages:
    636
    Likes Received:
    752
    First Language:
    English
    @Shaz But i afraid that i may have too many actors (over 100) . Also in my game Actors can be recruited that mean i can't tell which actors will be in the party at that time. It will be a painful task to manually do it (but it's not too complicated to do that with scripts, i think? Like store information into an array and retrieve it back later?)

    I am thinking to an idea like change whole Party into Cats then revert them back later
     
    Last edited: Dec 2, 2017
    #5
  6. dbchest

    dbchest Beast Master Veteran

    Messages:
    434
    Likes Received:
    297
    Location:
    Pennsylvania
    First Language:
    English
    Primarily Uses:
    RMMV
    @Isabella Ava if you are going to have a dynamic gameplay experience, then you need to be dynamic in your approach. instead of explicitly changing the graphics of every actor in the party, use the event commands to generate a loop to iterate over ever actor in the party and apply the settings you want.

    plugins are not the answer to every adversity; plugins are awesome for changing the way the engine behaves, but if you are not doing that (which you are not, in this case), then plugins are not the way to go. event commands are more than enough for this.
     
    #6
    Shaz likes this.
  7. Isabella Ava

    Isabella Ava Veteran Veteran

    Messages:
    636
    Likes Received:
    752
    First Language:
    English
    @dbchest but i don't know how to achieve that with command event loop :LZSsad:. Can you help me with a screenshot or something
     
    #7
  8. dbchest

    dbchest Beast Master Veteran

    Messages:
    434
    Likes Received:
    297
    Location:
    Pennsylvania
    First Language:
    English
    Primarily Uses:
    RMMV
    to change every party member's character images at once:
    Code:
    $gameParty.members().forEach(function(actor) {
        actor.setCharacterImage(image name here, image index here);
    });
    $gamePlayer.refresh();
    
    to check if every party member has that specific character image:
    Code:
    $gameParty.members().filter(function(actor) {return actor.characterName() === image name here && actor.characterIndex() === image index here}).length === $gameParty.members().length;
    
     
    Last edited: Dec 2, 2017
    #8
    Isabella Ava likes this.
  9. Isabella Ava

    Isabella Ava Veteran Veteran

    Messages:
    636
    Likes Received:
    752
    First Language:
    English
    Awesome, work like a charm, thank you @dbchest ! But is there any easy way to revert party graphic back to their default ? :LZSsmile:
     
    #9
  10. dbchest

    dbchest Beast Master Veteran

    Messages:
    434
    Likes Received:
    297
    Location:
    Pennsylvania
    First Language:
    English
    Primarily Uses:
    RMMV
    Code:
    $gameParty.members().forEach(function(actor) {
        var data = $dataActors[actor.actorId()];
        actor.setCharacterImage(data.characterName, data.characterIndex);
    });
    $gamePlayer.refresh();
     
    #10
    Isabella Ava likes this.
  11. Isabella Ava

    Isabella Ava Veteran Veteran

    Messages:
    636
    Likes Received:
    752
    First Language:
    English
    Ooh that's great @.@ thank you very much @dbchest
    that some great codes
     
    #11
  12. dbchest

    dbchest Beast Master Veteran

    Messages:
    434
    Likes Received:
    297
    Location:
    Pennsylvania
    First Language:
    English
    Primarily Uses:
    RMMV
    you are welcome. how about doing me a favor now? follow the link in my signature to my beast masters project and give it a like if it seems interesting.
     
    #12

Share This Page