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
11
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
11
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,512
Reaction score
12,002
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,512
Reaction score
12,002
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

My home state baseball team is going back to the World Series for the first time since 1999. I remember when they went in 1995 and won, that was like the best day of my life. (I'm a huge baseball fan and yes I'm talking about the Braves).
FL Studio is a huge step up from LMMS but I'm having such a tough time with it D:<
The new Dune movie reminds me of the game Dune 2 made by Westwood. A quality product on its own, but extremely disloyal to its source of inspiration.
Terrible Writing Advice, you've done it again.
1635026211997.png
Feeling like my new profile picture is nice. Thinking of making it semi-permanent, does any one has an opinion? Does it look too evil or does it work as a public profile picture? :)
Bishiba.png

Forum statistics

Threads
116,035
Messages
1,095,146
Members
151,369
Latest member
3ddl
Top