Status
Not open for further replies.
Joined
Aug 6, 2016
Messages
95
Reaction score
5
First Language
English
Primarily Uses
Hello, everybody!


Is there any way to make a state that makes a battler immune to buffs and debuffs?


No, not state, but the buffs and debuffs from the "Add Buff" command from the Effects part in the Skills tab.


Because I'm making a state that pretty much avoids everything including buffs and debuffs. Thanks. 
 

Silverskin

Villager
Member
Joined
Jun 21, 2016
Messages
27
Reaction score
12
First Language
English
Primarily Uses
are you using yanflys buffs & states core?


If yes, replay and I will figure out the code for you :)
 
Joined
Aug 6, 2016
Messages
95
Reaction score
5
First Language
English
Primarily Uses
are you using yanflys buffs & states core?


If yes, replay and I will figure out the code for you :)

I'm using Yanfly Engine Ace - Buff & State Manager v1.07 


Seems like Buffs and States Core is for MV :D
 

Silverskin

Villager
Member
Joined
Jun 21, 2016
Messages
27
Reaction score
12
First Language
English
Primarily Uses
Oh, I am sorry, didn't see you are using RMVXA, I am only familiar with RMV...


But my approach would have been a state that (if that works with the ace script) has a formular like

if (target.isBuffAffected(paramId)) {


target.atk -= target.paramPlus(paramId); 


}

but I think this won't be that easy because RMV uses javascript and RMVXA ruby...


Hope I could help you nevertheless...
 

xdan

Veteran
Veteran
Joined
Aug 21, 2016
Messages
158
Reaction score
59
First Language
Spanish
Primarily Uses
I think it can be done with a really complex engine. I can explain if you don't find any script.


Another option that involves Tsukihime's Battle Reactions: http://himeworks.com/2013/09/battle-reactions/


Make a skill that removes buffs and debuffs from the user. Then make a state that reacts to buffs and debuffs with that skill.
 
Last edited by a moderator:

Rinobi

Veteran
Veteran
Joined
Mar 24, 2014
Messages
579
Reaction score
220
First Language
English
Primarily Uses
RMVXA
I found this much easier to code myself.

#==============================================================================
# ** Resist Buff State Module
#------------------------------------------------------------------------------
#  Set the ID of the state(s) that will resist buffs and/or debuffs.
#==============================================================================
module RINOBI module RB_State
  Buff_Resist   = [1, 2, 5, 9]
  Debuff_Resist = [1, 2, 5, 9]
end end
#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
#  A battler class with methods for sprites and actions added. This class 
# is used as a super class of the Game_Actor class and Game_Enemy class.
#==============================================================================
class Game_Battler < Game_BattlerBase
  #--------------------------------------------------------------------------
  # * Alias Method: Add Buff
  #--------------------------------------------------------------------------
  alias :rb_add_buff :add_buff
  def add_buff(param_id, turns)
    rb = RINOBI::RB_State::Buff_Resist
    return if states.any? {|state| rb.include?(state.id)}
    rb_add_buff(param_id, turns)
  end
  #--------------------------------------------------------------------------
  # * Alias Method: Add Debuff
  #--------------------------------------------------------------------------
  alias :rb_add_debuff :add_debuff
  def add_debuff(param_id, turns)
    rb = RINOBI::RB_State::Debuff_Resist
    return if states.any? {|state| rb.include?(state.id)}
    rb_add_debuff(param_id, turns)
  end
end
 
Joined
Aug 6, 2016
Messages
95
Reaction score
5
First Language
English
Primarily Uses
Thanks both of you! I'll see what I can do..


@xdan how exactly the buff removal works? Does it only remove 1 buff stage or does it remove all  stages?


For example Actor A has his Attack buffed 3 times (3 stages)


Then when I remove buff for Attack, does it became 2 stages or it became 0 stages (Attack buffs completely removed)? 
 
Last edited by a moderator:
Joined
Aug 6, 2016
Messages
95
Reaction score
5
First Language
English
Primarily Uses
I found this much easier to code myself.

#==============================================================================
# ** Resist Buff State Module
#------------------------------------------------------------------------------
#  Set the ID of the state(s) that will resist buffs and/or debuffs.
#==============================================================================
module RINOBI module RB_State
  Buff_Resist   = [1, 2, 5, 9]
  Debuff_Resist = [1, 2, 5, 9]
end end
#==============================================================================
# ** Game_Battler
#------------------------------------------------------------------------------
#  A battler class with methods for sprites and actions added. This class 
# is used as a super class of the Game_Actor class and Game_Enemy class.
#==============================================================================
class Game_Battler < Game_BattlerBase
  #--------------------------------------------------------------------------
  # * Alias Method: Add Buff
  #--------------------------------------------------------------------------
  alias :rb_add_buff :add_buff
  def add_buff(param_id, turns)
    rb = RINOBI::RB_State::Buff_Resist
    return if states.any? {|state| rb.include?(state.id)}
    rb_add_buff(param_id, turns)
  end
  #--------------------------------------------------------------------------
  # * Alias Method: Add Debuff
  #--------------------------------------------------------------------------
  alias :rb_add_debuff :add_debuff
  def add_debuff(param_id, turns)
    rb = RINOBI::RB_State::Debuff_Resist
    return if states.any? {|state| rb.include?(state.id)}
    rb_add_debuff(param_id, turns)
  end
end

Thanks Rinobi!! It seems to work!


(Sorry for double posting but I just had to say thanks)
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,510
Reaction score
12,012
First Language
English
Primarily Uses
RMVXA
Kevin Eontrainer, please avoid double posting, as it is against the forum rules. You can review our forum rules here. Thank you.


What you do is click on the edit button of your last post and add what you want to say.


So can this be closed as solved?
 

xdan

Veteran
Veteran
Joined
Aug 21, 2016
Messages
158
Reaction score
59
First Language
Spanish
Primarily Uses
Thanks both of you! I'll see what I can do..


@xdan how exactly the buff removal works? Does it only remove 1 buff stage or does it remove all  stages?


For example Actor A has his Attack buffed 3 times (3 stages)


Then when I remove buff for Attack, does it became 2 stages or it became 0 stages (Attack buffs completely removed)? 



It removes all stages. Somebody wrote some script for this thought.
 
Joined
Aug 6, 2016
Messages
95
Reaction score
5
First Language
English
Primarily Uses
@xdan Yeah the script worked fine till now. Thanks for trying to help.


@ksjp17 yeah.. like this, right?
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,510
Reaction score
12,012
First Language
English
Primarily Uses
RMVXA
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 Profile Posts

I just successfully tested having events check if specific actors are in a particular party slot and then changing image to match. This will let me make scenes take into account who is in the party at the time and arrange them accordingly - this is important since I'll have extra actors beyond current party. The script used is the same from MV and is compatible with my current core plugin setup in MZ. Thank goodness.
That awkward moment when you're talking about thinking about writing a limited shop stock plugin for MZ and then find out you already wrote one...last May. My memory is so bad.
When I open my project and I'm like, hell yeah.
Some drawings I made in Lapis, one day I intend to involve them in some RPG Maker project.
* maybe two wall frames
*or some sprite flower tiara, or maybe it inspires someone to do something.
bdd19b62e539d17b3b00cc3d63034f7d.jpg

fcca5c8471b34483da8e032cfe579275.jpg
Step by step, I am coming back.

memorial.png

Forum statistics

Threads
118,422
Messages
1,115,839
Members
155,375
Latest member
CrazyCream
Top