Status
Not open for further replies.

Oriceles

Veteran
Veteran
Joined
Apr 4, 2012
Messages
384
Reaction score
72
First Language
English
Primarily Uses
N/A
I'm trying to achieve Passive Skills with Yami Skill Equip, and Skill Equip Limitation, but instead of using a Yanfly Passive States or Neon Black Passive Skills as many people has tried, I want to go with a common event running on parallel with a conditional branch that will check if actor # has equipped skill # add/remove state #. (Sounds simple to me).

 
So I'm requesting a script call that I can modify for the conditional branch.
In this thread Senshu hinted that "a.skill_equipped?(3)" could work, but I got an interpreter error.
 
^ That or just a script that binds the equipped skill to having or not that state active.

(Just because I'm not completely sure that the common event idea will work fine).
 

Probably Asked Questions:

Q: Why in that way instead of going like this?
A: Well, some of the passive states that I want to have in my game use some of Yanfly Lunatic States or similar scripts which adds features through notetags, and if I use Neon Black Passive Skills the notetags wouldn't be inherited as he stated here.
 

Q: What do you hope to achieve with this?
A: A Skill System similar to Final Fantasy Tactics Advance, where the characters are able to have Support1 and Reaction Abilities2, which can be changed any time. This allowing to have skill builds, combos, party influenced skills and much more!.

1: Support skills are the same as Passives so this is what I'm rquesting, duh!

2: I think that I can achieve Reaction Skills with Hime Battle Reactions, but I haven't tested yet if it is compatible with Yami Skill Equip, so if they are not I'll probably create another thread for the matter...

Q: Is this only for your project?

A: No, I've seen too many threads1 requesting Passive Skills to work with Skill Equip. And as I have already linked above there are ways to make them compatible, but I'm just trying to go a bit foward with the number of external features that can be added, and I know for sure I'm not the only one requesting for things like Lunatic States and Elemental Absorb as optional passives.

1: I can google search them and link them here, don't challenge me!!! hahaha

So, please RGSS3 Scripters out there, help us the Tactical RPG lovers to have this!  :thumbsup-left: :D :thumbsup-right:
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,026
First Language
Tagalog
Primarily Uses
RMVXA
a is only present for the damage formula by default... so you'd probably actually be needing to use something like


$game_actors[id].skill_equipped?
 

Oriceles

Veteran
Veteran
Joined
Apr 4, 2012
Messages
384
Reaction score
72
First Language
English
Primarily Uses
N/A
A bit closer... but... I'm wondering if in the script call I could make it general, I mean, not specifying a single actor (may be self.actor? I'm a noob)... Also we would be missing how to ask for which skill id the condition is going to be set, for example if "Skill 150: perseverance" is equipped  then add the "state 50: health regen"  to the actor.

Also checking the script there is this piece of code, but I don't know how to go after that:

Code:
  #--------------------------------------------------------------------------  # new method: equip_skill  #--------------------------------------------------------------------------  def equip_skill(index, id)    return false unless skill_equippable?(id)    if @equip_skills.include?(id) && id != 0      @equip_skills[@equip_skills.index(id)] = @equip_skills[index]    end    @equip_skills[index] = id  end
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,026
First Language
Tagalog
Primarily Uses
RMVXA
A bit closer... but... I'm wondering if in the script call I could make it general, I mean, not specifying a single actor (may be self.actor? I'm a noob)... Also we would be missing how to ask for which skill id the condition is going to be set, for example if "Skill 150: perseverance" is equipped  then add the "state 50: health regen"  to the actor.
You can always just loop thru all actors if needed... as for the which state should be added, you can "automate" that by making a hash where you save the state ID using the skill ID as the key...


If all you need is a passive skill adding a passive state, I can probably whip up a script add-on for that... but the problem is the link to the script points to symphony's page which is down right now... and I would need to capture both the equip and unequip methods


If you can post the whole equip and unequip method, I can probably whip up something
 
Last edited by a moderator:

Oriceles

Veteran
Veteran
Joined
Apr 4, 2012
Messages
384
Reaction score
72
First Language
English
Primarily Uses
N/A
Yay, you are alway so nice  :D .

This is a link to the full Skill Equip @ Yami github.

The only thing that I need is that if actor # has equipped skill # add state #, if the skill is not equipped then the state removes that is why I was thinking on working with a parallel conditional branch haha (and yes the skill is just a symbolic way for managing the state). This is something way different than adding the features of the state to the object or skill as Hime, Yanfly, Victor and Neon black do on their scripts. 
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,026
First Language
Tagalog
Primarily Uses
RMVXA
Yeah... I personally do prefer adding the state as it is too... w8, I'm gonna see what I can whip up

EDIT:

can you try this? put it below the script and set-up the hash... It's not tested so I'm not sure if it works fine

Code:
module ADIK  module EQUIP_SKILL_STATES        #Skill ID => State ID,        LIST = {        #Means if skill 5 is equipped, state 4    #will be added    5 => 4,        }  endendclass Game_Actor    alias equip_skill_states_adik equip_skill  def equip_skill(index,id)    equip_skill_states_adik(index,id)    #time to refresh the passive states    refresh_passive_states_adik  end    def refresh_passive_states_adik    #we loop thru all equipped skills    #and determine if they should add    #a state    @equip_skills.each do |sk|      next if sk == 0      if ADIK::EQUIP_SKILL_STATES::LIST.keys.include?(sk)        add_state(ADIK::EQUIP_SKILL_STATES::LIST[sk])      end    end  end    alias clear_states_states_adik clear_states  def clear_states    clear_states_states_adik    #we refresh the passive states in case they were    #removed by original method    refresh_passive_states_adik  end  end
PS: Once it's all working fine, I'll put it up maybe on a thread here as an ADD-ON for Yami's script
 
Last edited by a moderator:

Oriceles

Veteran
Veteran
Joined
Apr 4, 2012
Messages
384
Reaction score
72
First Language
English
Primarily Uses
N/A
I tested and got this prompt:

dgm06.png


I'm testing on a blank project with just Equip Skill, Limitation, and this one. The error happenned just after i pressed "New Game".
 
Last edited by a moderator:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,026
First Language
Tagalog
Primarily Uses
RMVXA
try replacing

Code:
def refresh_passive_states_adik    #we loop thru all equipped skills    #and determine if they should add    #a state    @equip_skills.each do |sk|      next if sk == 0      if ADIK::EQUIP_SKILL_STATES::LIST.keys.include?(sk)        add_state(ADIK::EQUIP_SKILL_STATES::LIST[sk])      end    end  end
with
Code:
  def refresh_passive_states_adik    #we loop thru all equipped skills    #and determine if they should add    #a state    return if @equip_skills.nil?    @equip_skills.each do |sk|      next if sk == 0      if ADIK::EQUIP_SKILL_STATES::LIST.keys.include?(sk)        add_state(ADIK::EQUIP_SKILL_STATES::LIST[sk])      end    end  end
 

Oriceles

Veteran
Veteran
Joined
Apr 4, 2012
Messages
384
Reaction score
72
First Language
English
Primarily Uses
N/A
"System StackError ocurred.

stack level too deep"
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,026
First Language
Tagalog
Primarily Uses
RMVXA
which line (if there's one on the message) and which scripts are you using? I've tested it with only those two scripts and it doesn't error for me... try reorganizing the other scripts, just make sure that this is below the original equip skill script
 
Last edited by a moderator:

Oriceles

Veteran
Veteran
Joined
Apr 4, 2012
Messages
384
Reaction score
72
First Language
English
Primarily Uses
N/A
doesn't specify any number, I got very surprised.  :|  so I did another test.

I erased the skill that is specified on the script from the actor learning in database, then through event (quick npc learn skill command, ill try through level up later) the actor learned the skill, after i equipped the skill voila, the state was added but after unequip it wasn't removed.
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,026
First Language
Tagalog
Primarily Uses
RMVXA
ah yes, I forgot to remove the states... XD

Code:
module ADIK  module EQUIP_SKILL_STATES        #Skill ID => State ID,        LIST = {        #Means if skill 5 is equipped, state 4    #will be added    5 => 4,        }  endendclass 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    def refresh_passive_states_adik    return if @equip_skills.nil?    @passive_states_adik = [] if @passive_states_adik.nil?    @passive_states_adik.each do |id|      remove_state(id)    end    @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]        add_state(id)        @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
 

Oriceles

Veteran
Veteran
Joined
Apr 4, 2012
Messages
384
Reaction score
72
First Language
English
Primarily Uses
N/A
ah yes, I forgot to remove the states... XD

module ADIK module EQUIP_SKILL_STATES #Skill ID => State ID, LIST = { #Means if skill 5 is equipped, state 4 #will be added 5 => 4, } endendclass 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 def refresh_passive_states_adik return if @equip_skills.nil? @passive_states_adik = [] if @passive_states_adik.nil? @passive_states_adik.each do |id| remove_state(id) end @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] add_state(id) @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
OH MY GOD IT WORKS  :rock-left: :guffaw: :rock-right:  You Rock Adiktuzmiko  :D I really thank you. After the test the only thing that continued happenning is that if the starting actor knows a passive skill at the starting level the game will prompt the stack too deep error, may be because the known skills equip before the game start?, but for me that is just a known issue since i don't need a passive on lvl 1  :D now I'm a bit closer to finish the system i just have to test the compatibility of battle reactions and thats it
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,693
Reaction score
3,026
First Language
Tagalog
Primarily Uses
RMVXA
I'm not sure why it would happen only at that instance but probably something recursive is happening... I don't have the motivation right now to look at it though since it doesn't seem to be too much of a problem unless you need to have skills that are already equipped at start or something...
 

Archeia

Level 99 Demi-fiend
Staff member
Developer
Joined
Mar 1, 2012
Messages
15,601
Reaction score
16,219
First Language
Filipino
Primarily Uses
RMMZ
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.
 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

I'm working with Excel today, and I just hate VBA so much. It's like the designers said "How can we make a programming language that works as obtusely and inefficiently as possible?"
Beep-Beep-Motha-facka.gif

Just finished and uploaded the delivery truck base/sprite sheet. I've been steadily replacing the default assets with early modern alternatives. The air-ship for a biplane, horse-drawn wagon for a delivery truck, and next a sailboat for a steam-powered passenger liner (think of the SS Olympic and RMS Titanic).
I caught a shiny magikarp on pokemonGO today AND finally saw Detective Pikachu and it was so cute and I'm still so hype AHHHHH!!!
one of the coolest things I've learned from the forums is the ability to give yourself a hitbox. I have a move you can do on the fields. shoulder tackle. thanks to the forums, that tackle triggers self A switches on some events. NPC's and the environment now react to the tackle. awesome.
I really liked how this one turned out! :kaopride:
WYqMPf6.png

Character (Yes, this is a character): Nibiru the Primal Being from Yugioh.

Forum statistics

Threads
121,946
Messages
1,145,368
Members
160,219
Latest member
Tarasyring
Top