Implementing Weapon/Armor Swaps In-Game?

Discussion in 'PVGames Resource Packs' started by PsychicToaster, Nov 4, 2018.

  1. PsychicToaster

    PsychicToaster Best Clairvoyant Appliance 2018 Veteran

    Messages:
    417
    Likes Received:
    425
    Location:
    The Kitchen
    First Language:
    English
    Primarily Uses:
    N/A
    Howdy gang! I finally decided to put my nose to the grindstone and start working with the Medieval stuff to put together a game. I've managed to somehow work in the Character Creator without causing too much hassle really., it crashes occasionally but it's not a big deal to load a character back up that one has worked on.

    I have been unsuccessful in finding any plugins that work to allow your sprites to change individual pieces of equipment out. The Visual Equipment plugin is long dead, and I'm by no means a serious coder for something along those lines. So my solution?

    Well...look at the madness.

    upload_2018-11-3_18-12-37.png

    It's actually fairly fast to make my character sprite in the Character Creator, hit the arrow over for the "Main" slider, and export the spritesheet with the character holding that specific weapon, and presumably I can have RPG Maker MV change the actor's battlesheet(characters won't be holding weapons outside of combat) based on the weapon they are using. However, things get more complicated from here. These are all the one-handed weapons, without a shield. If I want to pair weapons with a shield, I'll have to make a separate sheet for each one of the combinations, which is fairly quick really. If I want to pair weapons with one another or more than one type of shield...well, you get the idea. Imagine how many images one would need if they were to also have armor and weapon pairings.

    Is there a way to avoid this fate? If I have to make separate battlesheets for every conceivable combination of weapon and shield, that's more than enough work to do without also doing it for various armor equips. I could pull it off, Diablo II style, where most armor items in the game basically share the same graphic with others, but good lord that is a lot of work. If I have 15 or so planned party members possible in the game, it isn't as bad as it sounds. I'd just like to avoid the laborious nature of the undertaking if I can.

    xD
     
    #1
  2. Jesse - PVGames

    Jesse - PVGames Game and Graphics Developer Veteran

    Messages:
    1,731
    Likes Received:
    2,716
    Location:
    U.S.
    First Language:
    English
    In RPG Maker, by default, you can't do it. It would require a plug-in and I don't know if such a plug-in exists for it. In other software, like Construct, this sort of thing is very easy to do. Kind of wish RPG Maker would start implementing features into their engine that have existed in other engines for nearly the past decade lol
     
    #2
  3. PsychicToaster

    PsychicToaster Best Clairvoyant Appliance 2018 Veteran

    Messages:
    417
    Likes Received:
    425
    Location:
    The Kitchen
    First Language:
    English
    Primarily Uses:
    N/A
    Agh. Welp. I guess I'll be doing weapons and shields only. I'm not actually sure how to have RPGM check for a specific sword+shield combo though to change the battler graphic. I know how to have it change the graphic for a single weapon, but not for a combination of two. I'll get it figured out.

    I'm sure players will get over it if I can make the world interesting and fun enough.
     
    Last edited: Nov 4, 2018
    #3
  4. Jesse - PVGames

    Jesse - PVGames Game and Graphics Developer Veteran

    Messages:
    1,731
    Likes Received:
    2,716
    Location:
    U.S.
    First Language:
    English
    The way I did it in Aleph was basically how you figured you would do it. A separate sprite sheet for each character and weapon combination. I think I just had a very limited number of potential weapon combinations with shields though to cut down on the sheer amount of sprite sheets that would otherwise be required. I think just sword and shield and mace and shield were the only weapon and shield combos I had, and not every character could use shields or swords or maces so in the end I didn't need *that* many. With game making software like Construct or Game Maker, you can just put it in that if the player equips X weapon to character, show X weapon sprite overlayed on top of the character - which is how I made the various weapons for the latest version of Tough to Kill.
     
    #4
  5. PsychicToaster

    PsychicToaster Best Clairvoyant Appliance 2018 Veteran

    Messages:
    417
    Likes Received:
    425
    Location:
    The Kitchen
    First Language:
    English
    Primarily Uses:
    N/A
    I'll probably be cutting down on graphics as well. I can do simple palette swaps for weapons if need be. I've considered using another maker but are your resources licensed for it?

    Also, I've been playing a lot of Aleph lately xD. I love it. Like yourself, the Ultima games are a huge inspiration for my project, although I'm taking more of the Ultima VII approach. The Virtues were basically no longer needed, and the people had moved on from them when the Fellowship came along(absolutely not a cult). I have a Renown and Infamy system in place, instead of Virtues, just to create a series of consequences or benefits for being a terrible jerk or a beacon of justice. Total derail from the thread topic but eh. Basically your Infamy can be reduced, but it can never fall below a certain threshold. So if you keep doing bad things, eventually you're stuck being viewed as a bad person, which might result in certain ruling government authorities sending someone to "deal with you". Actions are weighted toward the two different meters, and will apply or remove points from or another accordingly. Petty theft? Not a huge deal. Outright murder? Lots of Infamy points to be gained.
     
    #5
  6. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    4,014
    Likes Received:
    10,158
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    PV assets can be used not only in any rpg maker, but also in any other game making software, not just rpg makers. It's specified in the terms of use as well as on Jesse's website.
     
    #6
  7. PsychicToaster

    PsychicToaster Best Clairvoyant Appliance 2018 Veteran

    Messages:
    417
    Likes Received:
    425
    Location:
    The Kitchen
    First Language:
    English
    Primarily Uses:
    N/A
    Nice. I think I've got it figured out through common events though. Still won't be changing graphics when it comes to armor. Too much work. But weapons should be easily doable really.
     
    #7
  8. HasdrubalBarca

    HasdrubalBarca Veteran Veteran

    Messages:
    160
    Likes Received:
    56
    First Language:
    English
    You could also do it via Yanfly's passive states. That's how I did it but it requires extensive use of code. But the end result is something more flexible than common events since you can also switch weapons during battle such as the change equipment plugin or the Olivia's weapon swap plugin. The way I set it up you could change the shield, armor, weapon and helmet and it would change the graphic of the character. The downside is that I was using the mastersheet so the size quickly balloned up so I eneded up just doing armor+helmet for non-combat and the others for combat only.

    Example:
     
    #8
    Jesse - PVGames likes this.
  9. PsychicToaster

    PsychicToaster Best Clairvoyant Appliance 2018 Veteran

    Messages:
    417
    Likes Received:
    425
    Location:
    The Kitchen
    First Language:
    English
    Primarily Uses:
    N/A
    I appreciate the reply ^^. I'm not looking to actually have it reflected upon the character on the map, it's literally just for the battler spritesheet. How do you do that with the passive states? I'm not using the master sheet either xD
     
    Last edited: Nov 11, 2018
    #9
  10. HasdrubalBarca

    HasdrubalBarca Veteran Veteran

    Messages:
    160
    Likes Received:
    56
    First Language:
    English
    You would do something like this:

    <Custom Passive Condition>
    //Full helmet check state 101
    if (user.isStateAffected(101) && user.isStateAffected(135)){ //xBow 135 stat.
    $gameActors.actor(1).setCharacterImage('&PV1-MCNakedXBowNoShieldFullHelm_Mastersheet', 0);
    $gameActors.actor(1).setFaceImage('MCNakedAxeNoShieldFullHelm_Face', 0);
    $gameActors.actor(1).setBattlerImage('MCNakedXBowNoShieldFullHelm_MVsv');
    $gamePlayer.refresh();

    Basically assign weapons different passive states and than anchor one piece of equipment as the one to check the equipment. Since you can't use common events during battles or the menu this method would allow you to make changes during battle.
    In your case you can just use $gameActors.actor().setBattlerImage to change the battler graphic.
     
    #10
    Jesse - PVGames likes this.
  11. PsychicToaster

    PsychicToaster Best Clairvoyant Appliance 2018 Veteran

    Messages:
    417
    Likes Received:
    425
    Location:
    The Kitchen
    First Language:
    English
    Primarily Uses:
    N/A
    Thank you friend ^^. It's nice to know I can achieve what I want to in terms of this issue.
     
    Last edited: Nov 11, 2018
    #11

Share This Page