Passive "Attack" Editor

Senshu

Veteran
Veteran
Joined
Nov 29, 2013
Messages
92
Reaction score
6
First Language
English
Primarily Uses
      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.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
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.
 

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
275
First Language
English
Primarily Uses
RMMV
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/
 
Last edited by a moderator:

Senshu

Veteran
Veteran
Joined
Nov 29, 2013
Messages
92
Reaction score
6
First Language
English
Primarily Uses
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
 
Last edited by a moderator:

Senshu

Veteran
Veteran
Joined
Nov 29, 2013
Messages
92
Reaction score
6
First Language
English
Primarily Uses
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?
 
Last edited by a moderator:

kerbonklin

Hiatus King
Veteran
Joined
Jan 6, 2013
Messages
1,726
Reaction score
275
First Language
English
Primarily Uses
RMMV
Yeah, it should be the same way as if you were adding coded conditions into a damage formula I think.
 

Senshu

Veteran
Veteran
Joined
Nov 29, 2013
Messages
92
Reaction score
6
First Language
English
Primarily Uses

Fomar0153

Arkz
Restaff
Joined
Mar 13, 2012
Messages
1,327
Reaction score
473
First Language
English
Primarily Uses
RMMZ
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
 
Last edited by a moderator:

Senshu

Veteran
Veteran
Joined
Nov 29, 2013
Messages
92
Reaction score
6
First Language
English
Primarily Uses
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
 
Last edited by a moderator:

Fomar0153

Arkz
Restaff
Joined
Mar 13, 2012
Messages
1,327
Reaction score
473
First Language
English
Primarily Uses
RMMZ
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>
 

Senshu

Veteran
Veteran
Joined
Nov 29, 2013
Messages
92
Reaction score
6
First Language
English
Primarily Uses
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?
 

Fomar0153

Arkz
Restaff
Joined
Mar 13, 2012
Messages
1,327
Reaction score
473
First Language
English
Primarily Uses
RMMZ
In the notebox of the skill (Attack in this case).
 

Senshu

Veteran
Veteran
Joined
Nov 29, 2013
Messages
92
Reaction score
6
First Language
English
Primarily Uses
the enemy attacked like 4 times and then it errored again O_O;;;;;;;;
 

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,682
Reaction score
3,003
First Language
Tagalog
Primarily Uses
RMVXA
what error? show us the screenshot of the error...
 

Senshu

Veteran
Veteran
Joined
Nov 29, 2013
Messages
92
Reaction score
6
First Language
English
Primarily Uses
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?
 
Last edited by a moderator:

Engr. Adiktuzmiko

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

Senshu

Veteran
Veteran
Joined
Nov 29, 2013
Messages
92
Reaction score
6
First Language
English
Primarily Uses
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

 
 
Last edited by a moderator:

Engr. Adiktuzmiko

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

Senshu

Veteran
Veteran
Joined
Nov 29, 2013
Messages
92
Reaction score
6
First Language
English
Primarily Uses
Both sripts i'm using to try this are just a little up the page
 
Last edited by a moderator:

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top