Jump to content
Shiggy

Advanced Buff System

Recommended Posts

In the default editor , buffs work like these ,when you buff a stat, the stat gains a 25% multiplier ,this can stack up to 50 %
Debuffs works the same (25% less) and buffs and debuffs cancel each other.
Did you wish you had more control over this?
Well I do so here is my script
 
 
** Description

This script give you more control over how buffs and debuffs works.You can have
buffs and debuffs that add a static value or act as a multiplier. You can control
how different buffs will stack with each other and choose minimal and maximal
value independantly on how buff stacks.

--------------------------------------------------------------------------------

** Usage
 
To add a buff/debuff effect to a skill,put thiscommand in the note box of the 
skill
 
Example1: <buff: atk 1 +100 1>  
Example2: <buff: def 3 *3 1>
Example3: <buff: mat 4 -10 1>
 
The first parameter is the stat you would like to buff:
mhp,mmp,atk,def,mat,mdf,agi or lck
 
The second parameter is the buff "slot",each stat has as many buff slots as you
want,if another skill de/buffs the same slot,it will replace the previous buff 
from that slot so you need to put different slots if you want different skills 
to stack
 
Slots 0 and 1 are special slots.If a buff is applied to one of this slot,it will 
stack with what was previously in the slot. Slot 0 is used for multiplier 
while slot 1 is used for static buffs
 
The third parameter is the value of the buff 
+x means it will add a x to the stat
-x means it will remove x to the stats
*x means it will multiply the stat by x (calculated after the bonuses from 
static buffs and equipments)
 
The fourth parameter is the number ofturns the buff/debuff will last
 
The default add buff/debuff from the editor are not used but they won't 
interfere either so you can use them for clarification in the editor.
The default remove buff/debuff from the editor should work fine removing 
all buff or all debuffs.
 
Buff will work 100% of the time,debuffs will work according to the base editor 
formula: debuff rate * luck_factor
Removing debuffs work 100% of the time , if RandomRemoveBuff is set to true 
removing buff will work according to the debuff formula
 
You can set maximal values for buff and debuffs
 
  MaxBuffPlus contains the maximal value for static buff
  MinBuffPlus contains the minimal value for static buff (aka - the maximal value 
for debuffs)
  
  MaxBuffRate containas the maximal buff multiplier
  MinBuffRate contains the minimal buff multiplier (default is 0)
 
Note that even if you are set to nil and the buffs have no limit,the actual 
parameters are limited to 999 if you don't  use a script to change it
 

 

 

=begin
#===============================================================================
Title: Advanced buff system
Author: Shiggy
Date: Jan 23, 2015

--------------------------------------------------------------------------------
** Change log
Jan 22, 2015
- Initial release of the script
Jan 23, 2015
-Debuff used default debuff rate from editor
-Removing buff can use the debuff rate if chosen
-Now if two de/buffs don't stack,the game will keep the biggest one instead of the 
last one (but it still refreshes the turn counter)
-Turns slots 0 and 1 into special slots (more info in description)
-Added explanation about min max buff values

--------------------------------------------------------------------------------
** Terms of Use
* Free to use in non-commercial projects
* Commercial uses
  * Ask permission
  * I may charge a small fee for it
  * I may ask a free copy of your game 
  * I may ask for other stuff like the right to use some assets
* Will do bug fixes
* Compatibility patches may be requested but no guarantees 
* Please report any compatibility issues anyway
* Features may be requested but no guarantees, especially if it is non-trivial
* Credits to Shiggy in your project
* Preserve this header
* Be nice to other people ( I don't want mean people to use my scripts)

--------------------------------------------------------------------------------
** Description

This script give you more control over how buffs and debuffs works.You can have
buffs and debuffs that add a static value or act as a multiplier. You can control
how different buffs will stack with each other and choose minimal and maximal 
independantly on how buff stacks.

--------------------------------------------------------------------------------
** Usage

To add a buff/debuff effect to a skill,put thiscommand in the note box of the 
skill

Example1: <buff: atk 1 +100 1>  
Example2: <buff: def 3 *3 1>
Example3: <buff: mat 4 -10 1>

The first parameter is the stat you would like to buff:
mhp,mmp,atk,def,mat,mdf,agi or lck

The second parameter is the buff "slot",each stat has as many buff slots as you
want,if another skill de/buffs the same slot,it will replace the previous buff 
from that slot so you need to put different slots if you want different skills 
to stack

Slots 0 and 1 are special slots.If a buff is applied to one of this slot,it will 
stack with what was previously in the slot. Slot 0 is used for multiplier 
while slot 1 is used for static buffs

The third parameter is the value of the buff 
+x means it will add a x to the stat
-x means it will remove x to the stats
*x means it will multiply the stat by x (calculated after the bonuses from 
static buffs and equipments)

The fourth parameter is the number ofturns the buff/debuff will last

The default add buff/debuff from the editor are not used but they won't 
interfere either so you can use them for clarification in the editor.
The default remove buff/debuff from the editor should work fine removing 
all buff or all debuffs.

Buff will work 100% of the time,debuffs will work according to the base editor 
formula: debuff rate * luck_factor
Removing debuffs work 100% of the time , if RandomRemoveBuff is set to true 
removing buff will work according to the debuff formula

You can set maximal values for buff and debuffs

  MaxBuffPlus contains the maximal value for static buff
  MinBuffPlus contains the minimal value for static buff (aka - the maximal value 
for debuffs)
  
  MaxBuffRate containas the maximal buff multiplier
  MinBuffRate contains the minimal buff multiplier (default is 0)

Note that even if you are set to nil and the buffs have no limit,the actual 
parameters are limited to 999 if you don't  use a script to change it

--------------------------------------------------------------------------------
** To scripters
  @buffs is now a 2D array . If you want to read the buff values , you should 
use the buff_sum(param_id) and buff_product(param_id) methods.

--------------------------------------------------------------------------------
** Installation

Place this script below Materials and above Main.
This script redefines entirely how buffs works ,it probably won't be compatible 
with any other buff script

#===============================================================================
=end

module Shiggy
  module Buff_System
    #             [MHP,MMP,ATK,DEF,MAT,MDF,AGI,LUK]
    MaxBuffPlus = [nil,nil,nil,nil,nil,nil,nil,nil]
    MinBuffPlus = [nil,nil,nil,nil,nil,nil,nil,nil]
    MaxBuffRate = [nil,nil,nil,nil,nil,nil,nil,nil]
    MinBuffRate = [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ]
    
    RandomRemoveBuff = true 
  end
end

module Vocab
    BuffRemove      = "%s's %s buffs were removed."
    DebuffRemove      = "%s's %s debuffs were removed."
end

#======================================================
#Don't modify after this point if you don't know what you're doing
#========================================================

class Game_ActionResult
  
  attr_accessor :removed_debuffs
  
  alias buff_clear_status_effects clear_status_effects
  def clear_status_effects
    buff_clear_status_effects
    @removed_debuffs = []
  end
  
  #--------------------------------------------------------------------------
  # * Determine Whether Some Sort of Status (Parameter or State) Was Affected
  #--------------------------------------------------------------------------
  def status_affected?
    !(@added_states.empty? && @removed_states.empty? && @removed_debuffs.empty? &&
      @added_buffs.empty? && @added_debuffs.empty? && @removed_buffs.empty?)
    end
    
end

class Game_BattlerBase
  
   alias buff_param_plus param_plus
  def param_plus(param_id)
    buff_param_plus(param_id) + buff_sum(param_id)
  end
  
  
  def param_buff_rate(param_id)
    buff_product(param_id)
  end
  
  #--------------------------------------------------------------------------
  # * Get Current Buffs/Debuffs as an Array of Icon Numbers
  #--------------------------------------------------------------------------
  def buff_icons
    icons = []
    @buffs.each_index {|i| icons+buff_icon_index(i) }
    icons.delete(0)
    icons
  end
  
  #--------------------------------------------------------------------------
  # * Get Icon Number Corresponding to Buff/Debuff
  #--------------------------------------------------------------------------
  def buff_icon_index(param_id)
    icons = []
    if buff_sum(param_id) > 0
      icons.push( ICON_BUFF_START + 0 * 8 + param_id)
    elsif buff_sum(param_id) > 0
      icons.push( ICON_DEBUFF_START + 0 * 8 + param_id )
    else
      icons.push(0)
    end
    if buff_product(param_id) > 1
      icons.push( ICON_BUFF_START + 1 * 8 + param_id)
    elsif buff_product(param_id) < 1
      icons.push( ICON_DEBUFF_START + 1 * 8 + param_id )
    else
      icons.push(0)
    end
  end
  
end

class Game_Battler < Game_BattlerBase
  
  def clear_buffs
    @buffs = Array.new(8) { [1,0] }
    @buff_turns = Array.new(8) {[0,0]}
    @buffs_type = Array.new(8) {[0,1]}
  end
  
  
  def buff_sum(param_id)
    a = 0
    @buffs[param_id].each_index {|i|
      a += @buffs[param_id][i]*@buffs_type[param_id][i]
    }
    a = [Shiggy::Buff_System::MaxBuffPlus[param_id],a].min if  Shiggy::Buff_System::MaxBuffPlus[param_id]
    a = [a,Shiggy::Buff_System::MinBuffPlus[param_id]].max if  Shiggy::Buff_System::MinBuffPlus[param_id]
    return a
  end
  
  def buff_product(param_id)
     a = 1
    @buffs[param_id].each_index {|i|
      a *= @buffs[param_id][i] if @buffs_type[param_id][i] == 0
    }
    a = [Shiggy::Buff_System::MaxBuffRate[param_id],a].min if  Shiggy::Buff_System::MaxBuffRate[param_id]
    a = [a,Shiggy::Buff_System::MinBuffRate[param_id]].max if  Shiggy::Buff_System::MinBuffRate[param_id]
    return a
   
  end
  
 
  
  #--------------------------------------------------------------------------
  # * Add Buff
  #--------------------------------------------------------------------------
  def add_buff(param_id,buff_type,buff_id,value, turns,debuff = false)
    return unless alive?
    
    a = @buffs[param_id][buff_id]
    if buff_id == 0
        @buffs[param_id][buff_id] *= value
    elsif buff_id == 1
        @buffs[param_id][buff_id] += value
    else
      if @buffs_type[param_id][buff_id] != buff_type
        @buffs_type[param_id][buff_id] = buff_type
      end
      if a == nil
        @buffs[param_id][buff_id] = value
      elsif debuff
        @buffs[param_id][buff_id] = [value,a].min
      else
        @buffs[param_id][buff_id] = [value,a].max
      end
    end
    
    overwrite_buff_turns(param_id,buff_id, turns)
    @result.added_buffs.push(param_id).uniq!
    refresh
  end
  #--------------------------------------------------------------------------
  # * Remove Buff
  #--------------------------------------------------------------------------
  def remove_buff(param_id)
    return false unless alive?
    result = false
    @buffs[param_id].each_index{ |i|
        if @buffs_type[param_id][i] == 0 && @buffs[param_id][i] > 1         
            @buffs[param_id][i] = 1 
            result = true        
        end
        if @buffs_type[param_id][i] == 1 && @buffs[param_id][i] > 0 
          @buffs[param_id][i] = 0 
          result = true
        end
    }  
    @result.removed_buffs.push(param_id).uniq!
    refresh
    return result
  end
  
  #--------------------------------------------------------------------------
  # * Remove Deuff
  #--------------------------------------------------------------------------
  def remove_debuff(param_id)
    return false unless alive?
    result = false
    @buffs[param_id].each_index{ |i|
      if @buffs_type[param_id][i] == 0 && @buffs[param_id][i] < 1 
        @buffs[param_id][i] = 1 
        result = true
      end
      if @buffs_type[param_id][i] == 1 && @buffs[param_id][i] < 0 
        @buffs[param_id][i] = 0 
        result = true
      end
    }  
    @result.removed_buffs.push(param_id).uniq!
    refresh
    return result
  end
  
  
  #--------------------------------------------------------------------------
  # * Erase Buff/Debuff
  #--------------------------------------------------------------------------
  def erase_buff(param_id)
    @buffs[param_id] = []
    @buff_turns[param_id] = []
  end
  #--------------------------------------------------------------------------
  # * Determine Buff Status
  #--------------------------------------------------------------------------
  def buff?(param_id)
    if @buffs_type[param_id] == 0
       a = buff_product > 1
    else
       a = buff_sum > 0 
    end
    return a 
  end
  #--------------------------------------------------------------------------
  # * Determine Debuff Status
  #--------------------------------------------------------------------------
  def debuff?(param_id)
    if @buffs_type[param_id] == 0
       a = buff_product(param_id) < 1
    else
       a = buff_sum(param_id) < 0 
    end
    return a 
  end
  #--------------------------------------------------------------------------
  # * Determine if Buff Is at Maximum Level
  #--------------------------------------------------------------------------
  def buff_max?(param_id)
    if @buffs_type[param_id] == 0
        a = (buff_product(param_id) == Shiggy::Buff_System::MaxBuffRate[param_id])
    else
        a = (buff_sum(param_id) == Shiggy::Buff_System::MaxBuffPlus[param_id])
    end
    return a
  end
  #--------------------------------------------------------------------------
  # * Determine if Debuff Is at Maximum Level
  #--------------------------------------------------------------------------
  def debuff_max?(param_id)
    if @buffs_type[param_id] == 0
        a = (buff_product(param_id) == Shiggy::Buff_System::MinBuffRate[param_id])
    else
        a = (buff_sum(param_id) == Shiggy::Buff_System::MinBuffPlus[param_id])
    end
    return a  
  end
  #--------------------------------------------------------------------------
  # * Overwrite Buff/Debuff Turns
  #    Doesn't overwrite if number of turns would become shorter.
  #--------------------------------------------------------------------------
  def overwrite_buff_turns(param_id,buff_id, turns)
    @buff_turns[param_id][buff_id] = turns if @buff_turns[param_id][buff_id].to_i < turns
  end
  
  alias buff_item_effect_apply item_effect_apply
  def item_effect_apply(user, item, effect)
    
    buff_item_effect_apply(user,item,effect)
    new_buffs = read_buff(item)
    new_buffs.each{ |buff|
      while buff[1] > @buffs[buff[0]].size
        @buffs[buff[0]].push(0)
        @buffs_type[buff[0]].push(1)
        @buff_turns[buff[0]].push(0)
      end
      
      if (buff[2]==0 && buff[3]<1) || (buff[2]==0 && buff[3]<1)
        chance = debuff_rate(buff[0]) * luk_effect_rate(user)
        if rand < chance
          add_buff(buff[0],buff[2],buff[1],buff[3],buff[4],true)
          @result.success = true
        end
      else
          add_buff(buff[0],buff[2],buff[1],buff[3],buff[4])
          @result.success = true
      end
        
     
    }
  end
    
  def read_buff(item)
    new_buffs = []
    matches = item.note.scan(/<\s*buff\s*:\s*(\w+)\s+(\d+)\s+([-+*])([.0-9]+)\s*(\d+)\s*>/)
    
    matches.each{ |match|
      param_id = buff_string_to_i(match[0])
      slot = match[1].to_i
      case match[2]
        when "*"
        type = 0
        value = match[3].to_f
        when "+"
        type = 1
        value = match[3].to_i
        when "-"
        type = 1
        value = -match[3].to_i
      end
      turns = match[4].to_i
      new_buffs.push([param_id,slot,type,value,turns])
    } 
    return new_buffs
  end
  
  def buff_string_to_i(string)
    case string
    when "mhp"
      param_id = 0
    when "mmp"
      param_id = 1
    when "atk"
      param_id = 2
    when "def"
      param_id = 3
    when "mat"
      param_id = 4
    when "mdf"
      param_id = 5
    when "agi"
      param_id = 6
    when "luk"
      param_id = 7
    end
    return param_id
  end
  
  #--------------------------------------------------------------------------
  # * [Buff] Effect // removed to prevent error
  #--------------------------------------------------------------------------
  def item_effect_add_buff(user, item, effect)
    
  end
  #--------------------------------------------------------------------------
  # * [Debuff] Effect // removed to prevent error
  #--------------------------------------------------------------------------
  def item_effect_add_debuff(user, item, effect)
    
  end
  #--------------------------------------------------------------------------
  # * [Remove Buff] Effect
  #--------------------------------------------------------------------------
  def item_effect_remove_buff(user, item, effect)
    
      chance = debuff_rate(effect.data_id) * luk_effect_rate(user)
      if rand < chance || !Shiggy::Buff_System::RandomRemoveBuff
        result = remove_buff(effect.data_id) 
        @result.success = result
      else
        @result.success = false
      end
  end
  #--------------------------------------------------------------------------
  # * [Remove Debuff] Effect
  #--------------------------------------------------------------------------
  def item_effect_remove_debuff(user, item, effect) 
    
      result = remove_debuff(effect.data_id) 
      @result.success = result    
  end
  
  #--------------------------------------------------------------------------
  # * Automatically Remove Buffs/Debuffs
  #--------------------------------------------------------------------------
  def remove_buffs_auto
    @buffs.each_index { |param_id|
     @buffs[param_id].each_index{ |slot|
        if @buff_turns[param_id][slot] == 0
          if @buffs_type[param_id][slot] == 0 
            @buffs[param_id][slot] = 1
          else
            @buffs[param_id][slot] = 0
          end
        end
      }
    }
  end
  
  
  #--------------------------------------------------------------------------
  # * Update Buff/Debuff Turn Count
  #--------------------------------------------------------------------------
  def update_buff_turns
    @buffs.each_index { |param_id|
     @buffs[param_id].each_index{ |slot|
        @buff_turns[param_id][slot] -= 1 if @buff_turns[param_id][slot] > 0
      }
    }
  end
  
  #--------------------------------------------------------------------------
  # * Remove All Buffs/Debuffs
  #--------------------------------------------------------------------------
  def remove_all_buffs
    @buffs.each_index {|param_id| erase_buff(param_id) }
  end
  
  
  
end

class Window_BattleLog < Window_Selectable
  
  alias buff_display_changed_buffs display_changed_buffs 
  def display_changed_buffs(target)
    buff_display_changed_buffs(target)
    display_buffs(target, target.result.removed_debuffs, Vocab::DebuffRemove)
  end
  
end

 

 

Edited by Shiggy

Share this post


Link to post
Share on other sites

Indeed, I've always been trying to have a different formula for buffs and debuffs xD Nicely done!~ ^-^ This shall be put into good use.

Share this post


Link to post
Share on other sites

Thanks it's always nice to know you made something useful . I  tried to test various situations but there still may be some issues so report to me if you notice some bugs.

Share this post


Link to post
Share on other sites

I realeased a new version with the following changes:

 

-Debuff now use default debuff rate from editor
-Removing buff can use the debuff rate if chosen
-Now if two de/buffs don't stack,the game will keep the biggest one instead of the 
last one (but it still refreshes the turn counter)
-Slots 0 and 1 are now special slots (more info in description),basically this let you make buff skills that stack with themselves
-Added explanation about min max buff values
 
The OP has been updated
Edited by Shiggy

Share this post


Link to post
Share on other sites

That's a cool script.

But I'm a bit confuse about the "slot".

 

Slots 0 and 1 are special slots.If a buff is applied to one of this slot,it will 
stack with what was previously in the slot. Slot 0 is used for multiplier 
while slot 1 is used for static buffs
 
Can you give example for this ? 
Because when I see the third parameter, you already provide whether the parameter should be multiplied or added.

Share this post


Link to post
Share on other sites

I will try to explain it more clearly :

 

For slots above 1,let's say 2  every new buff with slot 2 will overwrite the previous buff/debuff

So you can't have a buff/debuff that stack with itself because you can't ask a skill one slot the first time and another slot the second time

 

So I made special slots where buff will stack instead of replacing the previous one

 

<buff: atk 1 +100 3>

 

is an atk buff into slot 1, so if i reuse the skill I can have 200 bonus atk

whereas you couldn't if it was a slot 2 buff

 

because slot 1 is special <buff: atk 1 *100 3> will add 100 atk the same way as <buff: atk 1 +100 3> (it's just the way it's coded)

Same for slot 0 <buff: atk 0 +2 3>  or  <buff: atk 0 -2 3> will multiply the atk by 2

I would still advise to keep +/- in your slots 1 buff and * in your slots 0 buff/debuff just for the sake of clarification

 

If you find this confusing but don't want a buff skill to stack with itself,simply use the other slots.

I hope it helped

Edited by Shiggy

Share this post


Link to post
Share on other sites

Hmm..

 

All the default buff and debuffs can 'stack' ~ would it be possible to do the same here?

 

For example I'd like to make something like this:

 

EXAMPLE SKILL:

Strengthening Blow

Deals 125% physical damage to one enemy.

Increases max HP by 3% for 10 turns for each successful hit. Effect can stack 20 times.

 

As everybody knows, it can't be done via default buffs or states, especially if I'd like to make few of these skills.

 

HOW IT SHOULD WORK:

Let's say, that character has 100 HP in total (with equipment and such).

 

> Character uses that skill and gains 3% MAX HP buff.

Character now has 100 + 3% = 103 HP and that MAX HP BUFF has 1 stack and 10 turns remaining.

 

> Character uses that skill again and gets 3% MAX HP buff stack.

Character now has 100 + 6% = 106 HP (not 103 + 3% to be clear, because that would be OP ^^) and that buff has 2 stacks and 10 turns remaining (due to being reapplied).

 

How to achieve that? Can I only make 2 of these skills (due to having 2 special slots)?

Also would it be possible to add a buff stack number in for example bottom right corner of the state icon (Or set the buff-icon-chain for that buff within a script, so I'd make multiple icons for one buff with the numbers manually in my iconset or somewhere else)? It would be really great.

 

That's what I'm looking for at least and I thought your script will help me. =3

Share this post


Link to post
Share on other sites

Note that your skill is affecting two different targets with two different effects, this script doesn't handle that (but this one does ;)  )

 

<buff: mhp 0 *1.03 10>

 

This command should do what you want , you gain 3% max hp for 10 turns and it stacks

 

if you want to make another skill like that,for example buff by 5%

<buff: mhp 0 *1.05 10>

 

so it will stack with itself but also with previous buff so you will 8% more max hp for 10 turns

and 13 % more hp for 10 turns if you use it again during the 10 turns

 

I made two specials slot because I thought there were already starting to be too much parameters and I didn't want to add a stackable? parameter plus how do you deal with it if the player use a non-stackable buff over a stackable buff.

I just thought about an option to choose the if a slot is special ,that shouldn't be too complicated, I can try to do that but it will have to wait Monday (I will be busy with Global Game Jam) 

 

The script doesn't check how many buffs you have ,it only checks if the sum of all your buffs is bigger than a certain value and nerf it to the maximal value allowed if it's the case (he won't remove a buff ,just don't take into account the "overbuff" ). you can use buff_sum and buff_product to know the value of the buff (so you can make an overall buff level icon but not really a buff count)

 

Edit : technically special slots works like the default buff/debuffs only with more precise values

Edited by Shiggy

Share this post


Link to post
Share on other sites

<buff: mhp 0 *1.03 10>

 

This command should do what you want , you gain 3% max hp for 10 turns and it stacks

 

if you want to make another skill like that,for example buff by 5%

<buff: mhp 0 *1.05 10>

 

so it will stack with itself but also with previous buff so you will 8% more max hp for 10 turns

and 13 % more hp for 10 turns if you use it again during the 10 turns

That's actually what I'll not need, because if a max HP buff would be applied from two different skills, then these buffs would be separate states.

Each skill could even use a different slot, because I don't want to stack multiple skills to one buff. Each skill gives a different buff, that adds parameters counting from base (and parameters from equipment is also counted to that 'base') parameter.

 

All I want is something like this:

EXAMPLE SKILLS:

Character has two skills:

 

Strengthening Blow

Deals 125% physical damage to one enemy.

Increases max HP by 3% for 10 turns for each successful hit. Effect can stack 20 times.

 

Endurance

Increases max HP by 10% for 4 turns and recovers 25% HP. Effect can stack 3 times.

 

SIMULATION:

Let's say, that character has 100 HP in total (with equipment and such).

 

---[ ERIC ]---

HP 100 / 100

 

> Eric uses Strengthening Blow and gains Strengthening Blow BUFF.

 

---[ ERIC ]---

HP 100 / 103 (+ (100 * 3%))

STATES: Strengthening Blow BUFF (+3% MAX HP | 1 stack | 10 turns remaining).

 

Eric uses Endurance and gains Endurance BUFF.

 

---[ ERIC ]---

HP 113 / 113 (+ (100 * 3%) + (100 * 10%))      (not 103 + 10% more ~ always counts from base mhp + eq.)

STATES: Strengthening Blow BUFF (+3% MAX HP   | 1/20 stacks | 9 turns remaining)

                Endurance                           (+10% MAX HP | 1/3 stacks   | 4 turns remaining)

 

Eric uses Strengthening Blow and gains Strengthening Blow BUFF stack.

 

---[ ERIC ]---

HP 113 / 116 (+ (100 * 6%) + (100 * 10%))      (not 106 + 10% more ~ always counts from base mhp + eq.)

STATES: Strengthening Blow BUFF (+6% MAX HP   | 2/20 stacks | 10 turns remaining)

                Endurance                           (+10% MAX HP | 1/3 stacks   | 3 turns remaining)

 

This is all I want. Just having something like default states, but with the ability to stack. Debuffs don't affect (remove) buffs and vice versa (unless there is a remove state note added in a skill) ~ there might be a skill that removes all buffs or something. It sounds simple, but I have no idea how it goes in scripting as I'm terrible at working with the default scripts and systems.

 

Hmm... So basically I need multiple-leveled states. Like:

> State 6 (raises mhp by 3%) is applied

> State 6 is re-applied before its duration ended ~ raise it's level (just multiply the effect -> raises mhp by 6%).

Different skills with similar states, but other numbers like (10% mhp buff) are simply different states/buffs.

or~

> State 7 (mhp buff tier 1) is applied

> State 7 is applied again -> it turns to state 8 (mhp buff tier 2).

> State 7 is applied again -> it turns the state 8 to state 9 (mhp buff tier 3).

 

Anyway if your script isn't made in the way I'd like to have, then don't worry about it ~ I'm not forcing you to work on what I want. Hmm... Now when I think about it, then it could be simply done via damage formulas and conditional branch, am I right? States limit is 999 if I'm not mistaking, so I'd have some space for them and I'd be able to easily configure each stage and give them different icons (to represent stack level). The only flaw is to fill the database with copy&paste states.

Share this post


Link to post
Share on other sites

I don't think I should modify my script to do what you want,but I will try to make a script for   multiple-leveled states. This sounds interesting to make.

 

Edit: This is for you Riki

 

http://www.rpgmakervxace.net/topic/37113-stackable-states/

Edited by Shiggy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×