YES - Skill Equip Add-on: Passive States

● ARCHIVED · READ-ONLY
Started by Engr. Adiktuzmiko 19 posts View original ↗
  1. Overview

    This is an add-on for Yami Engine Symphony - Skill Equip script that allows you to make equipped skills add a state to the user. So basically, it's like giving the ability to have equipped passive states. Done per request of Oriceles

    Script

    Spoiler
    #==============================================================================# # ¥ Yami Engine Symphony - Skill Equip: States# -- Last Updated: 2015.07.18# -- Level: Easy# -- Requires: YES - Skill Equip# -- Author: Adiktuzmiko# -- Requested by: Oriceles# -- Documentation by: Oriceles##==============================================================================#==============================================================================# ¥ Updates# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# 2014.04.10 - Finished Script.# 2014.04.10 - Started Script.##==============================================================================#==============================================================================# ¥ Introduction# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# This script is an add-on for YES - Skill Equip, allows user to bind states to# skills, which will be added to the actor whenever it equips the skill.##==============================================================================# ¥ Instructions# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# To install this script, open up your script editor and copy/paste this script# to an open slot below ¥ Materials/‘fÞ but above ¥ Main. Remember to save.##==============================================================================# ¥ Known Issues# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# If one of the starting actors in new game has learned by default a skill# binded to a state the game will crash with a StackTooDeep Error. To avoid# this issue just don't add any skill binded to a state by default make them# learn them later in the game.# #==============================================================================# ¥ Compatibility# =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# This script is made strictly for RPG Maker VX Ace. It is highly unlikely that# it will run with RPG Maker VX without adjustments.# #============================================================================== #==============================================================================# ¡ Configuration#============================================================================== module ADIK module EQUIP_SKILL_STATES #Skill ID => State ID, #=========================================================================== # - Skill/State biding Settings - #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- # The following list will bind the skills to states. # Means that if skill 5 is equipped, state 4 will be added. #=========================================================================== LIST = { # Start #Skill #State 127 => 30, } # End endend #==============================================================================# ¥ Editting anything past this point may potentially result in causing# computer damage, incontinence, explosion of user's head, coma, death, and/or# halitosis so edit at your own risk.#============================================================================== class Game_Actor attr_accessor :passive_states_adik alias equip_skill_states_adik equip_skill def equip_skill(index,id) equip_skill_states_adik(index,id) refresh_passive_states_adik end #~ alias state_addable_adik_equip_skill? state_addable?#~ def state_addable?(state_id)#~ @forced = false if @forced.nil?#~ if @forced#~ state_addable_adik_equip_skill?(state_id)#~ else#~ return alive?#~ end#~ end def refresh_passive_states_adik return if @equip_skills.nil? @passive_states_adik = [] if @passive_states_adik.nil? @passive_states_adik.each do |id| self.erase_state(id) @passive_states_adik.delete(id) end @result.clear @equip_skills.each do |sk| next if sk == 0 if ADIK::EQUIP_SKILL_STATES::LIST.keys.include?(sk) id=ADIK::EQUIP_SKILL_STATES::LIST[sk] @forced = true self.add_state(id) @forced = false @passive_states_adik.push(id) end end end alias clear_states_states_adik clear_states def clear_states clear_states_states_adik refresh_passive_states_adik end end #==============================================================================# # ¥ End of File# #==============================================================================
    Terms of use

    Will follow the terms of the original script
  2. Tested this out in both my project and a fresh one. Ran into some problems.

    Ideally, I would like for this to be used with Yanfly's scripts: Learn Skill Engine and JP manager.

    The test project consisted of, in the following order:

    YEA JP Manager

    YEA Learn Skill Engine

    Skill Equip

    Skill Equip Addon: Passive States

    And nothing else, although I also tried adding Yami's Skill Equip Limitation Addon in between this addon and the main script as well.

    Tried with two skills: Attack +50% and HP +50%. Their effects are self-explanatory.

    Skill Equip is set to the default 4 slots for now.

    Equipping either skill creates the state on the actor accordingly. Equipping another skill in another slot cancels the first and applies the new state of the second equipped skill. Unequipping either skill cancels the entire script out for whatever reason. The states will no longer be applied after that.

    Is there anything that I should perhaps edit, something I'm doing wrong, or some advice anyone might have to offer? I'm so close to getting that skill system that I want.

    EDIT: I went ahead and tested with JUST Skill Equip and Skill Equip Addon: Passive States (No Yanfly scripts). I should also point out that the two skills are being given to the actor after the game starts, so as to avoid the issue in the "known issues," section. Still having the same problems, I'm afraid.
  3. Kazyn said:
    Equipping either skill creates the state on the actor accordingly. Equipping another skill in another slot cancels the first and applies the new state of the second equipped skill. Unequipping either skill cancels the entire script out for whatever reason. The states will no longer be applied after that.
    Hi, as OP says I requested this script, I haven't been able to replicate your issue. Did you created the Skill tags on Skill Equip: Limitation and created the bind list on this script?

    My project is a Tactical Sideview which mimics Final Fantasy Tactics Advance skill system. By now I've been running my gameplay with passive and reaction skills using this script with no problem.
  4. Sorry for reviving this but I've just ran into the same problem. I equipped HP+50% and the Hp raised accordingly (once I left the skill menu, it'd be nice if Hp and Mp changes were instantaneously visible on the menu but it doesn't matter much~), but once I equipped a secondary passive (Mp+50%) the first one was completely ignored by the script. And when I tried to remove both passives and readd them they simply stopped boosting my stats.

    Actually, I've just tested it again -- even just a single passive, if I unequip and reequip the boost isn't applied anymore.

    )':

    It's a shame, because other than that it's an awesome scripttttttt ;_______;
  5. JosephSeraph said:
    Sorry for reviving this but I've just ran into the same problem. I equipped HP+50% and the Hp raised accordingly (once I left the skill menu, it'd be nice if Hp and Mp changes were instantaneously visible on the menu but it doesn't matter much~), but once I equipped a secondary passive (Mp+50%) the first one was completely ignored by the script. And when I tried to remove both passives and readd them they simply stopped boosting my stats.

    Actually, I've just tested it again -- even just a single passive, if I unequip and reequip the boost isn't applied anymore.

    )':

    It's a shame, because other than that it's an awesome scripttttttt ;_______;

    I was just testing this script out and I have the same issues as well.

    Equipping multiple passives would result in one of them being ignored(despite still being equipped) and would then be forever unusable after that point even if I try to re-equip it.

    Just trying to replace 1 passive with another in the same slot would break it too and make it unusable after that point.
  6. SInce this resurfaced lately, I also confirm this issue. It's a great add-on to a great script, too bad it has this hiccup.
  7. I really wasn't able to replicate the issue with just these scripts. Does it happens to you even if the only script ur using are this and the passive skills? It might be an issue with some other scripts or something which I can't really do anything about.
  8. What i found out was pretty interesting: Whenever you unequip a passive skill, you won't be able to use its or another passive effect UNTIL you level up.
    - From SaintHell's PM to me


    Found it, it's because states cannot be added on the same "action turn" that they are removed. But since outside of battle, there is actually just 1 action turn, once you remove the state, you can't just put it back. At least based on the tests, that was how it went.


    So now I've made the script to reset the @results data of the actor after the script removes all passive states during refresh so that the game would now allow them to be re-added during that same refresh method.
  9. I'm having a small problem. Have tested it in a fresh project with only Yami's original script and the passive states add-on.

    Spoiler
    5R2PwTq.png
    This happens after I unequip a skill that increases max HP by 150%. It eventually goes away, but I am unable to figure out when, as it seems to vary. Sometime it seems to only take a couple of steps, other times when I leave the map. I've actually been able to go into battle like this! Thoughts?
  10. I'm not familiar at all with this script or Yami Engine in general, but that looks like unequipping passive states doesn't call the actor's refresh function, which, among other things, checks and sets HP to not exceed the maximum HP. Since by default the game triggers regeneration and other end turn effects every 20 steps on the map, you would see it reset HP to the reduced maximum then.

    At a glance, I'd guess you could fix it by adding a call to refresh when removing passive states:

    Code:
    def refresh_passive_states_adik    return if @equip_skills.nil?    @passive_states_adik = [] if @passive_states_adik.nil?    @passive_states_adik.each do |id|      self.erase_state(id)      @passive_states_adik.delete(id)      refresh # <-------------------------------------------------- Fixes the problem, maybe?    end    @result.clear    @equip_skills.each do |sk|      next if sk == 0      if ADIK::EQUIP_SKILL_STATES::LIST.keys.include?(sk)        id=ADIK::EQUIP_SKILL_STATES::LIST[sk]        @forced = true        self.add_state(id)        @forced = false        @passive_states_adik.push(id)      end    end  end
  11. @Garryl

    So, do I just plug this in under Materials and the other two scripts (Skill Equip and the add-on), or is it a script call? I can't seem to get it working.
  12. Er, no. What I wrote was just a snippet highlighting what I think is the problem and hopefully a potential solution. It's neither a workable script nor patch. Most important of all, I have no idea if it actually works, and I have no way of testing at the moment.

    In any case, I'm pretty sure the fix is probably a bit more complex than the one line change I was suggesting.
  13. Don't like to bump old threads, but the script is not accessible. The script is displayed in one line. I've tried to fix that problem before with no luck. I tried searching for the script elsewhere, no luck. The script is not on the author's website. Any help would be appreciated.
  14. Can somebody fix the format ?.....I tried but failed ......
  15. Give this a try (not tested)
    Code:
    #==============================================================================
    #
    # ¥ Yami Engine Symphony - Skill Equip: States
    # -- Last Updated: 2015.07.18
    # -- Level: Easy
    # -- Requires: YES - Skill Equip
    # -- Author: Adiktuzmiko
    # -- Requested by: Oriceles
    # -- Documentation by: Oriceles
    #
    #==============================================================================
    #==============================================================================
    # ¥ Updates
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # 2014.04.10 - Finished Script.
    # 2014.04.10 - Started Script.
    #
    #==============================================================================
    #==============================================================================
    # ¥ Introduction
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # This script is an add-on for YES - Skill Equip, allows user to bind states to
    # skills, which will be added to the actor whenever it equips the skill.
    #
    #==============================================================================
    # ¥ Instructions
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # To install this script, open up your script editor and copy/paste this script
    # to an open slot below ¥ Materials/‘fÞ but above ¥ Main. Remember to save.
    #
    #==============================================================================
    # ¥ Known Issues
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # If one of the starting actors in new game has learned by default a skill
    # binded to a state the game will crash with a StackTooDeep Error. To avoid
    # this issue just don't add any skill binded to a state by default make them
    # learn them later in the game.
    #
    #==============================================================================
    # ¥ Compatibility
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
    # it will run with RPG Maker VX without adjustments.
    #
    #==============================================================================
    #==============================================================================
    # ¡ Configuration
    #==============================================================================
    module ADIK
        module EQUIP_SKILL_STATES
        #Skill ID => State ID,
    #===========================================================================
    # - Skill/State biding Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # The following list will bind the skills to states.
    # Means that if skill 5 is equipped, state 4 will be added.
    #===========================================================================
        LIST = {
        # Start
        #Skill #State
        127 => 30, }
        # End
        end
    end
    #==============================================================================
    # ¥ Editting anything past this point may potentially result in causing
    # computer damage, incontinence, explosion of user's head, coma, death, and/or
    # halitosis so edit at your own risk.
    #==============================================================================
    class Game_Actor
    
        attr_accessor :passive_states_adik
       
        alias equip_skill_states_adik equip_skill
        def equip_skill(index,id)
            equip_skill_states_adik(index,id)
            refresh_passive_states_adik
        end
    
        alias state_addable_adik_equip_skill? state_addable?
        def state_addable?(state_id)
            @forced = false if @forced.nil?
            if @forced
                state_addable_adik_equip_skill?(state_id)
            else
                return alive?
            end
        end
    
        def refresh_passive_states_adik
            return if @equip_skills.nil?
            @passive_states_adik = [] if @passive_states_adik.nil?
            @passive_states_adik.each do |id|
                self.erase_state(id)
                @passive_states_adik.delete(id)
            end
            @result.clear
            @equip_skills.each do |sk|
                next if sk == 0
                if ADIK::EQUIP_SKILL_STATES::LIST.keys.include?(sk)
                    id=ADIK::EQUIP_SKILL_STATES::LIST[sk]
                    @forced = true
                    self.add_state(id)
                    @forced = false
                    @passive_states_adik.push(id)
                end
            end
        end
    
        alias clear_states_states_adik clear_states
        def clear_states
            clear_states_states_adik
            refresh_passive_states_adik
        end
    end
    #==============================================================================
    #
    # ¥ End of File
    #
    #==============================================================================
  16. Roninator2 said:
    Give this a try (not tested)
    Code:
    #==============================================================================
    #
    # ¥ Yami Engine Symphony - Skill Equip: States
    # -- Last Updated: 2015.07.18
    # -- Level: Easy
    # -- Requires: YES - Skill Equip
    # -- Author: Adiktuzmiko
    # -- Requested by: Oriceles
    # -- Documentation by: Oriceles
    #
    #==============================================================================
    #==============================================================================
    # ¥ Updates
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # 2014.04.10 - Finished Script.
    # 2014.04.10 - Started Script.
    #
    #==============================================================================
    #==============================================================================
    # ¥ Introduction
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # This script is an add-on for YES - Skill Equip, allows user to bind states to
    # skills, which will be added to the actor whenever it equips the skill.
    #
    #==============================================================================
    # ¥ Instructions
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # To install this script, open up your script editor and copy/paste this script
    # to an open slot below ¥ Materials/‘fÞ but above ¥ Main. Remember to save.
    #
    #==============================================================================
    # ¥ Known Issues
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # If one of the starting actors in new game has learned by default a skill
    # binded to a state the game will crash with a StackTooDeep Error. To avoid
    # this issue just don't add any skill binded to a state by default make them
    # learn them later in the game.
    #
    #==============================================================================
    # ¥ Compatibility
    # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
    # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
    # it will run with RPG Maker VX without adjustments.
    #
    #==============================================================================
    #==============================================================================
    # ¡ Configuration
    #==============================================================================
    module ADIK
        module EQUIP_SKILL_STATES
        #Skill ID => State ID,
    #===========================================================================
    # - Skill/State biding Settings -
    #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
    # The following list will bind the skills to states.
    # Means that if skill 5 is equipped, state 4 will be added.
    #===========================================================================
        LIST = {
        # Start
        #Skill #State
        127 => 30, }
        # End
        end
    end
    #==============================================================================
    # ¥ Editting anything past this point may potentially result in causing
    # computer damage, incontinence, explosion of user's head, coma, death, and/or
    # halitosis so edit at your own risk.
    #==============================================================================
    class Game_Actor
    
        attr_accessor :passive_states_adik
       
        alias equip_skill_states_adik equip_skill
        def equip_skill(index,id)
            equip_skill_states_adik(index,id)
            refresh_passive_states_adik
        end
    
        alias state_addable_adik_equip_skill? state_addable?
        def state_addable?(state_id)
            @forced = false if @forced.nil?
            if @forced
                state_addable_adik_equip_skill?(state_id)
            else
                return alive?
            end
        end
    
        def refresh_passive_states_adik
            return if @equip_skills.nil?
            @passive_states_adik = [] if @passive_states_adik.nil?
            @passive_states_adik.each do |id|
                self.erase_state(id)
                @passive_states_adik.delete(id)
            end
            refresh
            @result.clear
            @equip_skills.each do |sk|
                next if sk == 0
                if ADIK::EQUIP_SKILL_STATES::LIST.keys.include?(sk)
                    id=ADIK::EQUIP_SKILL_STATES::LIST[sk]
                    @forced = true
                    self.add_state(id)
                    @forced = false
                    @passive_states_adik.push(id)
                end
            end
        end
    
        alias clear_states_states_adik clear_states
        def clear_states
            clear_states_states_adik
            refresh_passive_states_adik
        end
    end
    #==============================================================================
    #
    # ¥ End of File
    #
    #==============================================================================

    Thanks!!! and....so sad it raised "stack too deep" (in empty project)
    .....I don‘t know if the origin script have this problem...
  17. hhldegujia said:
    it raised "stack too deep"
    remove the refresh. I added it in from the post mentioned above.
    Code updated
  18. Roninator2 said:
    remove the refresh. I added it in from the post mentioned above.
    Code updated
    Ohhh!I know ..!! If the skills set in the script are not the initial skills, will not raised the error.

    And really thanks for your help!!