YES - Skill Equip Add-on: Passive States

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,671
Reaction score
2,993
First Language
Tagalog
Primarily Uses
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

#==============================================================================# # ¥ 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
 
Last edited by a moderator:

Kazyn

Advanced Member
Member
Joined
Oct 16, 2012
Messages
24
Reaction score
1
First Language
English
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.
 
Last edited by a moderator:

Oriceles

0 + a.atk * 4 - b.def * 2
Veteran
Joined
Apr 4, 2012
Messages
384
Reaction score
69
First Language
English
Primarily Uses
N/A
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.
 

JosephSeraph

White Mage
Restaff
Joined
Mar 7, 2014
Messages
900
Reaction score
768
First Language
Portuguese
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 ;_______;
 

Ganches

Warper
Member
Joined
Aug 29, 2014
Messages
2
Reaction score
1
First Language
Swedish
Primarily Uses
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.
 

Ravenith

Veteran
Veteran
Joined
Mar 27, 2012
Messages
263
Reaction score
15
First Language
Greek
Primarily Uses
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.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,671
Reaction score
2,993
First Language
Tagalog
Primarily Uses
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.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,671
Reaction score
2,993
First Language
Tagalog
Primarily Uses
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.
 
Last edited by a moderator:

C.W. Plainview

Veteran
Veteran
Joined
Nov 14, 2012
Messages
143
Reaction score
45
First Language
English
Primarily Uses
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.

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?
 

Garryl

Villager
Member
Joined
Feb 19, 2015
Messages
25
Reaction score
4
First Language
English
Primarily Uses
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
 

C.W. Plainview

Veteran
Veteran
Joined
Nov 14, 2012
Messages
143
Reaction score
45
First Language
English
Primarily Uses
@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.
 

Garryl

Villager
Member
Joined
Feb 19, 2015
Messages
25
Reaction score
4
First Language
English
Primarily Uses
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.
 
Last edited by a moderator:

Probotector 200X

Probotect and Serve
Veteran
Joined
Mar 14, 2012
Messages
890
Reaction score
147
Primarily Uses
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.
 

hhldegujia

Villager
Member
Joined
Aug 3, 2017
Messages
15
Reaction score
1
First Language
chinese
Primarily Uses
RMVXA
Can somebody fix the format ?.....I tried but failed ......
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
1,923
Reaction score
414
First Language
English
Primarily Uses
RMVXA
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
#
#==============================================================================
 
Last edited:

hhldegujia

Villager
Member
Joined
Aug 3, 2017
Messages
15
Reaction score
1
First Language
chinese
Primarily Uses
RMVXA
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...
 

hhldegujia

Villager
Member
Joined
Aug 3, 2017
Messages
15
Reaction score
1
First Language
chinese
Primarily Uses
RMVXA
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!!
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Stream will be live shortly with a guest stream! Tonight, a new guest joins~ Feel free to drop by!
Finally told my boss I need a day off. Tomorrow will be my first in 23 days.
Kind of a goofy question but has the pandemic inspired you in any way?
Eric from RTP: is a veteran
Game: Lvl 1

Forum statistics

Threads
95,417
Messages
929,023
Members
125,648
Latest member
dertasa12
Top