MultiSlots!

Discussion in 'RGSS Scripts (RMXP)' started by DerVVulfman, Aug 25, 2018.

    Tags:
  1. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    304
    Likes Received:
    149
    First Language:
    English
    Primarily Uses:
    RMXP
    MultiSlots!
    Version: 3.5


    Introduction
    This system allows you to increase the number of armor slots for your characters and grants select characters the ability to use two weapons at the same time.


    Features
    • Dual Wielding - Wanna use two daggers at the same time?
    • Two Handed Weapons - Can't use a shield when using these!
    • MonkeyGrip - Bypass all the limits of two-handed weapons
    • Cursed Equipment - Those pesky irremovable items ^_-
    • Switched Equipment - Trick players to equip cursed items!
    • Advanced Equipment Screen - Based on RPG Advocate's, shows more stats
    • Personalized Slots - Set up individual sets for each hero
    • Concealable Slots - Allow 1 or more slots to be invisible. ^_^
    • Offhand System - Prevents some weapons from use in off hand
    • Unarmed Combat Stats - Allows non-zero ATK/PDEF/MDEF values.
    • Optimize System - Lets you use an 'optimize' command on actors
    Screenshots
    None. But if you're familiar with Guillaume777's or Trickster's MultiSlot system, and RPG Advocate's Advanced Equipment menu... I kinda modeled its appearance on both.


    Demo
    MultiSlots!


    Script
    Four easy to use pages. (currently not updated)


    Instructions
    Fairly easy to use. Enter key phrases or numbers into the equipment's name allows you to add extra features such as cursed items, or identify them for use in the newer slots.


    Compatibility
    Made specifically for use with RPGMaker XP and the RGSS code. It requires rewrites of a number of methods in Game_Actor, Scene_Equip and other classes.


    Credits and Thanks
    To my sister Kalier. :) Also thanks to Guillaume777, Trickster and RPG Advocate for certain codes and ideas. And thanks to Habs11 for finding a bug related to the different database sizes between armor and weapons. And to Cloak of Laser Cannon for finding a 'character switching' glitch to fix. And to sixtyandaquarter for the notion of the monkeygrip feature which lets certain players handle two-handed weapons in dual wield mode as if they were regular ones. After that, thanks to jccaton for noticing the irregularity with how stats showed when equipping either weapon or shield in the second slot. And to XP Kobold for noting how changed armor equipment slots did not retain their equipment as Guillaume777's system was able. Jojozityjo found a critical error that came about when initializing players that had no gear which interfered with the armor setup routine. And a related error was found by Yin of Save-Point for me to fix because an 'initialize' value was missing from the Game_Actor class. And thanks to Waddle-Dee who found an error with the Status window when she had used a shield/sword style combination on an actor set to dual wield. And lastly, thanks to Zefir who noticed that the second weapon used by dual wielders did not perform its designed battle animations, using only the first weapons in its place.



    Author's Notes
    I included an old copy of Me(tm)'s Visual Equipment in the demo. It works with the system, but only for the default 5 slots.


    Terms and Conditions
    Free for use in games both commercial and free. Just give due credit.
     
    Last edited: Feb 5, 2019
    #1
    slimmmeiske2 likes this.
  2. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    304
    Likes Received:
    149
    First Language:
    English
    Primarily Uses:
    RMXP
    BUMP
    To Version 3.4

    Hey, guys! There was an overlooked issue in the system. But it is an issue overlooked in scripts allowing for multiple weapons in RPGMaker XP scripts for years, whether it be Fomar0153's Two Weapons (c) 2006, or Guillaume777's Multi Slot Equipment Script.

    If you were using two weapons on an attack, the first weapon would properly be used to attack the chosen target. However, the system would try to determine the next attack and randomly choose what target the next weapon would strike. It's how other scripts incidentally handled multiple weapon attacks. And it 'was' how MultiSlots had handled the second weapon strike.

    But no more.

    If any actor has a second weapon, it properly performs the second weapon's attack on the same target selected. The only times it won't are cases of the initial enemy being killed, whether it needs to select a new target or if the battle is won.

    Nice, eh? :D
     
    #2
  3. Zefir

    Zefir Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    German
    Primarily Uses:
    RMXP
    Greetings Wulfman,

    Thank you so much for this amazing script! I’ve been trying to implement a brawler class that can dual wield two gauntlets for ages and your work makes everything so much easier! :D


    When playing around a bit, I noticed that the following scenario does not play out as it is probably supposed to:

    Character A wields a sword in one hand and an axe in the other hand. When hitting an enemy with basic attacks, the sword animation is being displayed twice, although the second hit does seem to count for the axe, damage wise at least.

    Since I wasn’t sure if any of my other scripts messed with yours, I tested the whole thing in your demo build and got the same results.

    Would you happen to have any ideas on how to fix the problem? Of course the script is awesome as it is, it would just be a nice touch to see both animations if different weapons are equipped. :D
     
    Last edited: Feb 2, 2019
    #3
  4. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    304
    Likes Received:
    149
    First Language:
    English
    Primarily Uses:
    RMXP
    Easy Peasy Lemon Squeezie. :D Okay, I watched a few too many DC Comics Constantine features too much :p

    And I guess the NEXT version will have your name in the credits when I get the chance..... ;) To be version 3.5

    The last page of the code, mSlots (Scenes), go towards the section from lines 774 to 781:
    Code:
          # Cycle through attacks
          loop {
            battler.attack_count += 1
            if battler.attack_count == 2 ||
                battler.weapon_id(battler.attack_count) > 0
              break
            end
          }
    Right after that loop, and before the comment that talks about resetting the attack count, place the following code:

    Code:
          # Change Weapon Animation ID
          id = battler.weapon_id(battler.attack_count)
          unless id.nil?
            unless id == 0
              @animation1_id = $data_weapons[id].animation1_id
              @animation2_id = $data_weapons[id].animation2_id
            end
          end 
    
    This will cover both user animations as well as target strike animations. And I even doublechecked to make sure unarmed battle animations worked. As an example, I initially set the lead to use both Sword and axe, just as you. And it worked fine. Then I discarded the sword so he would 'punch' barehanded and then use the axe. The unarmed animation played on cue, followed by the axe attack.
     
    #4
  5. Zefir

    Zefir Warper Member

    Messages:
    2
    Likes Received:
    0
    First Language:
    German
    Primarily Uses:
    RMXP
    Amazing, thank you very much for the reply! It works perfectly now! :kaojoy:
    So glad to see that some people are still working on older XP scripts, seeing as many others have moved on to the newer engines. Your work is an absolute blessing, please keep it up!
     
    #5
  6. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    304
    Likes Received:
    149
    First Language:
    English
    Primarily Uses:
    RMXP
    Indubitably. I found some of my old classics needed overhaul since they're about a decade old and I learned new coding techniques and have more refined methods.

    Be advised... Your name is gonna be in the next version's credits. ;)
     
    #6
  7. DerVVulfman

    DerVVulfman Resident Werewolf Veteran

    Messages:
    304
    Likes Received:
    149
    First Language:
    English
    Primarily Uses:
    RMXP
    BUMP TO
    Version: 3.5


    Just as version 3.4 fixed an issue involving multiple attacks incorrectly targeting enemies, version 3.5 now fixes issues involving weapon animations.

    Zefir of RPGMakerWen.com took note of an issue when creating characters that can use two different weapons at a time. This issue was that battle animations for the second weapon was not used, instead using the first weapon's animation exclusively. As an example, Zefir's game would permit a character to use both sword and axe in combat. However, the second strike being performed would use a sword animation while it should have been the animation for an battle axe strike.

    This graphic issue may quite possibly be seen in other scripts that allow the player to dual wield. However, it is an issue within MultiSlots that is now resolved.
     
    #7

Share This Page