Passive "Attack" Editor

      I know the title might sound a little.... odd at best but it's all I could come up with, so let me explain in greater detail what it is I have in my head here.

II want to make a passive skill, that affects the normal attack command, for an example, one that I actually want to use, when a mage gets to level 15, I want them to learn "Magic Force" which will add 50% of their magic attack to their normal attack damage, I'm hoping to make it an equipable passive skill via another script (Fomar0153's equipable pasive skill script if you know it) but as i've seen the attack command is fairly stubborn and I just can't find a way to do this very easily, I tried one thing where as long as the mage was a sub class that it would take effect, but I found balancing a sub class system rather difficult.

      What I am looking for (Again sorry if i'm not explaining well) is a SKILL I can make PASSIVE that changes the normal attack of the character it is equipped to. If anyone picks this up and scripts it for me, I'll be so greatful, and you'll have helped me get my dream game in motion. Thank you ahead of time.
This could be useful, if you can't already do it through states?

The problem with using a skill is you have to USE the skill to have the bonus applied, and you can't use the skill and use attack at the same time.  So you have to do it through states or features.
I believe there was a script by Tsukihime somewhere that allows you to tag a skill (ie: Attack Skill) and give it a condition in the notetag. If the condition is true (your actor has the passive state on them) then it will use a different skill instead. (your Magic Force skill)

This would be the best option to approach your request.

Edit: here it is.

http://himeworks.wordpress.com/2013/05/19/skill-change/
So, I couldn't have a skill made passive, apply a 50% Matk bonus to normal attacks this way? Or is it that it might just be difficult to do regardless, because of how RPGMVXACE does their normal attack?

Edit: I'm sorry for the double post, Kerbonklin's post came up as I hit send
I believe there was a script by Tsukihime somewhere that allows you to tag a skill (ie: Attack Skill) and give it a condition in the notetag. If the condition is true (your actor has the passive state on them) then it will use a different skill instead. (your Magic Force skill)

This would be the best option to approach your request.

Edit: here it is.

http://himeworks.wordpress.com/2013/05/19/skill-change/
oh man, this sounds promising, I'm going to go over this a bit, and see what I can do with it, Thank you so much!

ok I looked it over and it does sound easy to use, though I need to know if I can make it activate if the character is ffected by a status condition placed on them by a passive skill, they had this line in the instructions:

b[0].state?(5)   # first target has state 5 applied

b[1].state?(2)   # second target has state 2 aplied

b[-1].state?(6)  # last target has state 6 applied

would it work if I set it to

a.state?(6) if state 6 was the "Magic Force" status condition?
Yeah, it should be the same way as if you were adding coded conditions into a damage formula I think.
Ok, I think it's close, but I must be missing something, probably small. Here are the Scripts i'm using:

http://himeworks.wordpress.com/2013/05/19/skill-change/
and
http://forums.rpgmakerweb.com/index.php?/topic/6727-skill-equip/

I can equip the passive skill in game, and the attack change worrks fine when I have the state on, but! The passive is not affecting
me with the state upon battle start, it has to be used, is there something i'm missing? or something I can do?
Because Tsukihime made other script for adding a state at the beginning of the battle :

http://www.rpgmakervxace.net/topic/7596-auto-states/
This should be pretty easy to do. Just wait until it's not christmas day and I'll throw it together. Or today if I get a spare 15 minutes.
 
Ok here we go:
 

class Scene_Battle < Scene_Base  #--------------------------------------------------------------------------  # * Use Skill/Item  #--------------------------------------------------------------------------  def use_item    item = @subject.current_action.item    @log_window.display_use_item(@subject, item)    @subject.use_item(item)        # Edit    item = $data_skills[eval(item.on_use_skill)] if item.is_a?(RPG::Skill) && item.on_use_skill != ""    # End Edit        refresh_status    targets = @subject.current_action.make_targets.compact    show_animation(targets, item.animation_id)    targets.each {|target| item.repeats.times { invoke_item(target, item) } }  endendThen notetag the skill like this:
 

Code:
class RPG::Skill < RPG::UsableItem  def on_use_skill    if @on_use_skill.nil?      if @note =~ /<use_skill>(.*)<\/use_skill>/im        @on_use_skill = $1      else        @on_use_skill = ""      end    end    @on_use_skill  endend
I got an error upon trying to attack, is there anything in the script that you need me to tweak?

"Script 'Auto Use Skill' line 11: NoMethodError occurred.
undefined method 'on_use_skill' for #<RPG::Skill:0xa41ac30>"

Sorry if what's missing is silly or should be obvious and again, thank you for so much as looking at this post during such a busy time.

@Chaos17
I tried using the script you directed me to, but there's one hurdle that's getting in my way, it's like the skill i always active, not just when I equip the passive skill, it seems like the issue im having is making 'equiping' a passive skill be like an on/off switch. So either the scripts work as they should and the passive skill is always on weither it's equiped or not, or it doesn't work and I have to use the passive to get the effect :x
Oops the code got messed up:

Code:
class Scene_Battle < Scene_Base  #--------------------------------------------------------------------------  # * Use Skill/Item  #--------------------------------------------------------------------------  def use_item    item = @subject.current_action.item    @log_window.display_use_item(@subject, item)    @subject.use_item(item)        # Edit    item = $data_skills[eval(item.on_use_skill)] if item.is_a?(RPG::Skill) && item.on_use_skill != ""    # End Edit        refresh_status    targets = @subject.current_action.make_targets.compact    show_animation(targets, item.animation_id)    targets.each {|target| item.repeats.times { invoke_item(target, item) } }  endendclass RPG::Skill < RPG::UsableItem  def on_use_skill    if @on_use_skill.nil?      if @note =~ /<use_skill>(.*)<\/use_skill>/im        @on_use_skill = $1      else        @on_use_skill = ""      end    end    @on_use_skill  endend
And then notetag:
Code:
<use_skill>if @subject.is_a?(Game_Actor) && @subject.passive_skills.include?($data_skills[4])3else1end</use_skill>
ok, I might not be using this right, I just put the first script under materials, and then what, the second in the skill I want as a passive? or the state I want as a passive?
In the notebox of the skill (Attack in this case).
the enemy attacked like 4 times and then it errored again O_O;;;;;;;;
what error? show us the screenshot of the error...
can't seem to post the screenshot from my desktop, but it says

"Script 'auto use skill' line 11: NoMethod Error occured
undefined mrthod 'passive_skills' for #<Game_Actor:0xa3e5044>

now, is this script supposed to use the scripts I posted earlier or is it supposed to be stand alone?
it means your actor doesn't have the passive_skills data set-up properly or something

though for that case, it should always error everytime that actor attacks
arrrgh, what's frustrating is that it seemed so close, I just needed the passive skill to activate, but now i'm just getting all confused.

I'm just not sure how what he typed refers both the skill ID 4 and having to have the ability equipped in game.
like, right now I have 2 skills named "Magic Force" Listed, one is supposed to be the equipable, passive skill that the player would equip that is supposed to add the 'Magic Force" state, that was supposed to change his normal attack into the second "Magic Force" Skill that had a differant attack formula

I just need a script to tell a skill to be auto used at the start of battle, but only if it's equipped via the equipable skill script

 
Then I think you need to change the .passive_skill into whatever array holds the data for equipped skills... (which is IDK since I don't have the script ur using for equipping skills)

btw, you don't even need the state on this... once you know how to access the equipped skills data, you're fine... then just make that "passive" magic force into a skill that does nothing and cannot be used...

btw, in case you wanna stick with Tsukihime's skill change (so you would remove the script that Fomar gave you):

<skill change>
id: ID of active magic force
chance: 1
condition: a.Whatever_is_holding_the_passive_skills.include?(magic force passive ID)
</skill change>

EDIT: looked at the script, try out this notetag (For tsukihime's skill change)

<skill change>
id: ID of active magic force
chance: 1
condition: a.equipped_skills.include?(magic force passive ID)
</skill change>

Note: It might bug if an enemy attacks so you might wanna try this other one

<skill change>
id: ID of active magic force
chance: 1
condition: a.skill_equipped?(ID of passive magic force)
</skill change>

then add this script

Code:
class Game_Battler  def skill_equipped?(id)    return false unless self.actor?    return true if self.actor.equipped_skills.include?(id)    return false  endend
Both sripts i'm using to try this are just a little up the page

Original thread: https://forums.rpgmakerweb.com/threads/passive-attack-editor.21383/