Ina00

Veteran
Veteran
Joined
Oct 10, 2020
Messages
106
Reaction score
5
First Language
Italian
Primarily Uses
RMVXA
I apologise for making another thread, but i need this.
In the base Rpg maker vx ace when a skill that buffs a stat is used it usually says "(actor)'s (stat) raised" or something similar (i have translated message texts). The maximum of buff you can do on a stat is 2, so for example you can buff twice your ATTACK, and then it will no longer incrase untill the buff disappeares.
The only annoying thing is that the game don't warn you if the buff has reached the max, like if you buff twice, as said before, yes, the stat won't ACTUALLY increase, but it still shows "(actor)'s (stat) raised", and not something like "(actor)'s (stat) can no longer increase" or "has reached the maximum level."
Is there a way to add this? (Also for debuffs, obviusly)
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,495
Reaction score
14,825
First Language
English
Primarily Uses
RMMV

I've moved this thread to RGSS3 Script Requests. Please be sure to post your threads in the correct forum next time. Thank you.

 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,138
Reaction score
709
First Language
English
Primarily Uses
RMVXA
"has reached the maximum level."
Ruby:
# ╔═════════════════════════════════════╦════════════════════╗
# ║ Title: Message on Max Buff          ║  Version: 1.00     ║
# ║ Author: Roninator2                  ║                    ║
# ╠═════════════════════════════════════╬════════════════════╣
# ║ Function:                           ║   Date Created     ║
# ║                                     ╠════════════════════╣
# ║ Show BattleLog Message              ║    06 May 2021     ║
# ╚═════════════════════════════════════╩════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Change the message below to what you want displayed      ║
# ║ When a battler has reached max buff or debuff.           ║
# ╚══════════════════════════════════════════════════════════╝
# ╔═════════════════════════════════════╗
# ║ Terms of use:                       ║
# ║ Free for all uses in RPG Maker      ║
# ╚═════════════════════════════════════╝

module Vocab

Buff_Max = "Reached the limit"
Debuff_Max = "All time low"

end

class Game_ActionResult
  attr_accessor :max_buffs              # added buffs
  attr_accessor :max_debuffs            # added debuffs
    alias r2_clear_max_buff    clear_status_effects
  def clear_status_effects
        r2_clear_max_buff
        @max_buffs = []
        @max_debuffs = []
    end
end

class Game_Battler < Game_BattlerBase

  #--------------------------------------------------------------------------
  # * Add Buff
  #--------------------------------------------------------------------------
  def add_buff(param_id, turns)
    return unless alive?
    @buffs[param_id] += 1 unless buff_max?(param_id)
    erase_buff(param_id) if debuff?(param_id)
    overwrite_buff_turns(param_id, turns)
    @result.added_buffs.push(param_id).uniq!
        @result.max_buffs.delete(param_id) if @result.max_buffs.include?(param_id)
        @result.max_buffs.push(param_id) if @buffs[param_id] == 2
    refresh
  end
  #--------------------------------------------------------------------------
  # * Add Debuff
  #--------------------------------------------------------------------------
  def add_debuff(param_id, turns)
    return unless alive?
    @buffs[param_id] -= 1 unless debuff_max?(param_id)
    erase_buff(param_id) if buff?(param_id)
    overwrite_buff_turns(param_id, turns)
    @result.added_debuffs.push(param_id).uniq!
        @result.max_debuffs.delete(param_id) if @result.max_debuffs.include?(param_id)
        @result.max_debuffs.push(param_id) if @buffs[param_id] == -2
    refresh
  end

end

class Window_BattleLog < Window_Selectable
  def display_buffs(target, buffs, fmt)
    buffs.each do |param_id|
      replace_text(sprintf(fmt, target.name, Vocab::param(param_id)))
            if fmt == Vocab::BuffAdd
                if target.result.max_buffs.include?(param_id)
                    add_text(Vocab::Buff_Max)
          wait
          wait
                end
            elsif fmt == Vocab::DebuffAdd
                if target.result.max_debuffs.include?(param_id)
                    add_text(Vocab::Debuff_Max)
          wait
          wait
                end
            end
      wait
    end
  end
end
 

Ina00

Veteran
Veteran
Joined
Oct 10, 2020
Messages
106
Reaction score
5
First Language
Italian
Primarily Uses
RMVXA
Ruby:
# ╔═════════════════════════════════════╦════════════════════╗
# ║ Title: Message on Max Buff          ║  Version: 1.00     ║
# ║ Author: Roninator2                  ║                    ║
# ╠═════════════════════════════════════╬════════════════════╣
# ║ Function:                           ║   Date Created     ║
# ║                                     ╠════════════════════╣
# ║ Show BattleLog Message              ║    06 May 2021     ║
# ╚═════════════════════════════════════╩════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Change the message below to what you want displayed      ║
# ║ When a battler has reached max buff or debuff.           ║
# ╚══════════════════════════════════════════════════════════╝
# ╔═════════════════════════════════════╗
# ║ Terms of use:                       ║
# ║ Free for all uses in RPG Maker      ║
# ╚═════════════════════════════════════╝

module Vocab

Buff_Max = "Reached the limit"
Debuff_Max = "All time low"

end

class Game_ActionResult
  attr_accessor :max_buffs              # added buffs
  attr_accessor :max_debuffs            # added debuffs
    alias r2_clear_max_buff    clear_status_effects
  def clear_status_effects
        r2_clear_max_buff
        @max_buffs = []
        @max_debuffs = []
    end
end

class Game_Battler < Game_BattlerBase

  #--------------------------------------------------------------------------
  # * Add Buff
  #--------------------------------------------------------------------------
  def add_buff(param_id, turns)
    return unless alive?
    @buffs[param_id] += 1 unless buff_max?(param_id)
    erase_buff(param_id) if debuff?(param_id)
    overwrite_buff_turns(param_id, turns)
    @result.added_buffs.push(param_id).uniq!
        @result.max_buffs.delete(param_id) if @result.max_buffs.include?(param_id)
        @result.max_buffs.push(param_id) if @buffs[param_id] == 2
    refresh
  end
  #--------------------------------------------------------------------------
  # * Add Debuff
  #--------------------------------------------------------------------------
  def add_debuff(param_id, turns)
    return unless alive?
    @buffs[param_id] -= 1 unless debuff_max?(param_id)
    erase_buff(param_id) if buff?(param_id)
    overwrite_buff_turns(param_id, turns)
    @result.added_debuffs.push(param_id).uniq!
        @result.max_debuffs.delete(param_id) if @result.max_debuffs.include?(param_id)
        @result.max_debuffs.push(param_id) if @buffs[param_id] == -2
    refresh
  end

end

class Window_BattleLog < Window_Selectable
  def display_buffs(target, buffs, fmt)
    buffs.each do |param_id|
      replace_text(sprintf(fmt, target.name, Vocab::param(param_id)))
            if fmt == Vocab::BuffAdd
                if target.result.max_buffs.include?(param_id)
                    add_text(Vocab::Buff_Max)
          wait
          wait
                end
            elsif fmt == Vocab::DebuffAdd
                if target.result.max_debuffs.include?(param_id)
                    add_text(Vocab::Debuff_Max)
          wait
          wait
                end
            end
      wait
    end
  end
end
Oh yes thank you!
The only thing, the message appeares onece you buff for the second time. Is it possible to make it appear after the second time and to remove the increase message?
I explain myself better with some pictures, I hope you understand them, otherwise tell me.

The skill I used in these 3 turns is a skill that buffs the attack by 1.

FIRST TIME - ATT AT 1st LEVEL
buff lv 1.png

SECOND TIME - ATT AT 2nd LEVEL
buff lv 2.png

THIRD TIME - ATT STILL AT 2nd LEVEL, becouse the stat is at its max level

buff lv 3.png
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,138
Reaction score
709
First Language
English
Primarily Uses
RMVXA
Ruby:
# ╔═════════════════════════════════════╦════════════════════╗
# ║ Title: Message on Max Buff/Debuff   ║  Version: 1.10     ║
# ║ Author: Roninator2                  ║                    ║
# ╠═════════════════════════════════════╬════════════════════╣
# ║ Function:                           ║   Date Created     ║
# ║                                     ╠════════════════════╣
# ║ Show BattleLog Message              ║    06 May 2021     ║
# ╚═════════════════════════════════════╩════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Change the message below to what you want displayed      ║
# ║ When a battler has reached max buff or debuff.           ║
# ╚══════════════════════════════════════════════════════════╝
# ╔═════════════════════════════════════╗
# ║ Terms of use:                       ║
# ║ Free for all uses in RPG Maker      ║
# ╚═════════════════════════════════════╝

module Vocab

Buff_Max = "%s is already at the max!"
Debuff_Max = "%s is already at the bottom!"

end

class Game_ActionResult
  attr_accessor :max_buffs              # added buffs
  attr_accessor :max_debuffs            # added debuffs
    alias r2_clear_max_buff    clear_status_effects
  def clear_status_effects
        r2_clear_max_buff
        @max_buffs = []
        @max_debuffs = []
    end
end

class Game_Battler < Game_BattlerBase

  #--------------------------------------------------------------------------
  # * Add Buff
  #--------------------------------------------------------------------------
  def add_buff(param_id, turns)
    return unless alive?
    @result.max_buffs.delete(param_id) if @result.max_buffs.include?(param_id)
    if @buffs[param_id] == 2
      @result.max_buffs.push(param_id)
    end
    @buffs[param_id] += 1 unless buff_max?(param_id)
    erase_buff(param_id) if debuff?(param_id)
    overwrite_buff_turns(param_id, turns)
    @result.added_buffs.push(param_id).uniq!
    refresh
  end
  #--------------------------------------------------------------------------
  # * Add Debuff
  #--------------------------------------------------------------------------
  def add_debuff(param_id, turns)
    return unless alive?
    @result.max_debuffs.delete(param_id) if @result.max_debuffs.include?(param_id)
    if @buffs[param_id] == -2
      @result.max_debuffs.push(param_id)
    end
    @buffs[param_id] -= 1 unless debuff_max?(param_id)
    erase_buff(param_id) if buff?(param_id)
    overwrite_buff_turns(param_id, turns)
    @result.added_debuffs.push(param_id).uniq!
    refresh
  end

end

class Window_BattleLog < Window_Selectable
  def display_buffs(target, buffs, fmt)
    buffs.each do |param_id|
      if fmt == Vocab::BuffAdd
        if target.result.max_buffs.include?(param_id)
          replace_text(sprintf(Vocab::Buff_Max, target.name, Vocab::Buff_Max))
          wait
          wait
        else
          replace_text(sprintf(fmt, target.name, Vocab::param(param_id)))
        end
      elsif fmt == Vocab::DebuffAdd
        if target.result.max_debuffs.include?(param_id)
          replace_text(sprintf(Vocab::Debuff_Max, target.name, Vocab::Debuff_Max))
          wait
          wait
        else
          replace_text(sprintf(fmt, target.name, Vocab::param(param_id)))
        end
      else
        replace_text(sprintf(fmt, Vocab::param(param_id),target.name))
      end
      wait
    end
  end
end
 
Last edited:

Ina00

Veteran
Veteran
Joined
Oct 10, 2020
Messages
106
Reaction score
5
First Language
Italian
Primarily Uses
RMVXA
Ruby:
# ╔═════════════════════════════════════╦════════════════════╗
# ║ Title: Message on Max Buff          ║  Version: 1.10     ║
# ║ Author: Roninator2                  ║                    ║
# ╠═════════════════════════════════════╬════════════════════╣
# ║ Function:                           ║   Date Created     ║
# ║                                     ╠════════════════════╣
# ║ Show BattleLog Message              ║    06 May 2021     ║
# ╚═════════════════════════════════════╩════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Change the message below to what you want displayed      ║
# ║ When a battler has reached max buff or debuff.           ║
# ╚══════════════════════════════════════════════════════════╝
# ╔═════════════════════════════════════╗
# ║ Terms of use:                       ║
# ║ Free for all uses in RPG Maker      ║
# ╚═════════════════════════════════════╝

module Vocab

Buff_Max = "%s is already at the max!"
Debuff_Max = "%s is already at the bottom!"

end

class Game_ActionResult
  attr_accessor :max_buffs              # added buffs
  attr_accessor :max_debuffs            # added debuffs
    alias r2_clear_max_buff    clear_status_effects
  def clear_status_effects
        r2_clear_max_buff
        @max_buffs = []
        @max_debuffs = []
    end
end

class Game_Battler < Game_BattlerBase

  #--------------------------------------------------------------------------
  # * Add Buff
  #--------------------------------------------------------------------------
  def add_buff(param_id, turns)
    return unless alive?
    @result.max_buffs.delete(param_id) if @result.max_buffs.include?(param_id)
    if @buffs[param_id] == 2
      @result.max_buffs.push(param_id)
    end
    @buffs[param_id] += 1 unless buff_max?(param_id)
    erase_buff(param_id) if debuff?(param_id)
    overwrite_buff_turns(param_id, turns)
    @result.added_buffs.push(param_id).uniq!
    refresh
  end
  #--------------------------------------------------------------------------
  # * Add Debuff
  #--------------------------------------------------------------------------
  def add_debuff(param_id, turns)
    return unless alive?
    @result.max_debuffs.delete(param_id) if @result.max_debuffs.include?(param_id)
    if @buffs[param_id] == -2
      @result.max_debuffs.push(param_id)
    end
    @buffs[param_id] -= 1 unless debuff_max?(param_id)
    erase_buff(param_id) if buff?(param_id)
    overwrite_buff_turns(param_id, turns)
    @result.added_debuffs.push(param_id).uniq!
    refresh
  end

end

class Window_BattleLog < Window_Selectable
  def display_buffs(target, buffs, fmt)
    buffs.each do |param_id|
            if fmt == Vocab::BuffAdd
                if target.result.max_buffs.include?(param_id)
                    replace_text(sprintf(Vocab::Buff_Max, target.name, Vocab::Buff_Max))
          wait
          wait
        else
          replace_text(sprintf(fmt, target.name, Vocab::param(param_id)))
                end
            elsif fmt == Vocab::DebuffAdd
                if target.result.max_debuffs.include?(param_id)
                    replace_text(sprintf(Vocab::Debuff_Max, target.name, Vocab::Debuff_Max))
          wait
          wait
        else
          replace_text(sprintf(fmt, target.name, Vocab::param(param_id)))
                end
            end
      wait
    end
  end
end
Works perfectly. Thanks so much for all the time you dedicate doing this <3
 

Ina00

Veteran
Veteran
Joined
Oct 10, 2020
Messages
106
Reaction score
5
First Language
Italian
Primarily Uses
RMVXA
Ruby:
# ╔═════════════════════════════════════╦════════════════════╗
# ║ Title: Message on Max Buff          ║  Version: 1.10     ║
# ║ Author: Roninator2                  ║                    ║
# ╠═════════════════════════════════════╬════════════════════╣
# ║ Function:                           ║   Date Created     ║
# ║                                     ╠════════════════════╣
# ║ Show BattleLog Message              ║    06 May 2021     ║
# ╚═════════════════════════════════════╩════════════════════╝
# ╔══════════════════════════════════════════════════════════╗
# ║ Change the message below to what you want displayed      ║
# ║ When a battler has reached max buff or debuff.           ║
# ╚══════════════════════════════════════════════════════════╝
# ╔═════════════════════════════════════╗
# ║ Terms of use:                       ║
# ║ Free for all uses in RPG Maker      ║
# ╚═════════════════════════════════════╝

module Vocab

Buff_Max = "%s is already at the max!"
Debuff_Max = "%s is already at the bottom!"

end

class Game_ActionResult
  attr_accessor :max_buffs              # added buffs
  attr_accessor :max_debuffs            # added debuffs
    alias r2_clear_max_buff    clear_status_effects
  def clear_status_effects
        r2_clear_max_buff
        @max_buffs = []
        @max_debuffs = []
    end
end

class Game_Battler < Game_BattlerBase

  #--------------------------------------------------------------------------
  # * Add Buff
  #--------------------------------------------------------------------------
  def add_buff(param_id, turns)
    return unless alive?
    @result.max_buffs.delete(param_id) if @result.max_buffs.include?(param_id)
    if @buffs[param_id] == 2
      @result.max_buffs.push(param_id)
    end
    @buffs[param_id] += 1 unless buff_max?(param_id)
    erase_buff(param_id) if debuff?(param_id)
    overwrite_buff_turns(param_id, turns)
    @result.added_buffs.push(param_id).uniq!
    refresh
  end
  #--------------------------------------------------------------------------
  # * Add Debuff
  #--------------------------------------------------------------------------
  def add_debuff(param_id, turns)
    return unless alive?
    @result.max_debuffs.delete(param_id) if @result.max_debuffs.include?(param_id)
    if @buffs[param_id] == -2
      @result.max_debuffs.push(param_id)
    end
    @buffs[param_id] -= 1 unless debuff_max?(param_id)
    erase_buff(param_id) if buff?(param_id)
    overwrite_buff_turns(param_id, turns)
    @result.added_debuffs.push(param_id).uniq!
    refresh
  end

end

class Window_BattleLog < Window_Selectable
  def display_buffs(target, buffs, fmt)
    buffs.each do |param_id|
            if fmt == Vocab::BuffAdd
                if target.result.max_buffs.include?(param_id)
                    replace_text(sprintf(Vocab::Buff_Max, target.name, Vocab::Buff_Max))
          wait
          wait
        else
          replace_text(sprintf(fmt, target.name, Vocab::param(param_id)))
                end
            elsif fmt == Vocab::DebuffAdd
                if target.result.max_debuffs.include?(param_id)
                    replace_text(sprintf(Vocab::Debuff_Max, target.name, Vocab::Debuff_Max))
          wait
          wait
        else
          replace_text(sprintf(fmt, target.name, Vocab::param(param_id)))
                end
            end
      wait
    end
  end
end
Hi again. I noticed this now, the battle log that displays BuffRemove ("(actor)'s (stat) turned back to normal") disappeared. Dunno if this script influences it.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,138
Reaction score
709
First Language
English
Primarily Uses
RMVXA
I use the dafault VXA battle system.
And the default system works fine. So you have something in there that is overwriting that function.
What scripts do you have?
 

Ina00

Veteran
Veteran
Joined
Oct 10, 2020
Messages
106
Reaction score
5
First Language
Italian
Primarily Uses
RMVXA
And the default system works fine. So you have something in there that is overwriting that function.
What scripts do you have?
I tried disabling your script and the issue solves...
Anyway I have these scripts that influence the battle:
- Hime's actor inventory
- Yanfly's Victory Aftermath
- Yanfly's Skill Restrictions
- Yanfly's Weapon Attack Replace
- Yanfly's element reflect
- This damage pop up script
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,138
Reaction score
709
First Language
English
Primarily Uses
RMVXA
Anyway I have these scripts that influence the battle:
- Hime's actor inventory
- Yanfly's Victory Aftermath
- Yanfly's Skill Restrictions
- Yanfly's Weapon Attack Replace
- Yanfly's element reflect
- This damage pop up script
I just put all of those into my test project and still works fine.

Do you want to send me a copy of your project?
If so then send me a private message with the file link.
 

Ina00

Veteran
Veteran
Joined
Oct 10, 2020
Messages
106
Reaction score
5
First Language
Italian
Primarily Uses
RMVXA
I just put all of those into my test project and still works fine.

Do you want to send me a copy of your project?
If so then send me a private message with the file link.
I have a less confusing option, I just made a new completly empty project and put only your script.
Try use the att+ skill (3 turns) and you'll see that when the buff ends the message won't show.
I leave the link here (sorry for the language):
 

Latest Threads

Latest Posts

Latest Profile Posts

Make a Game in RMMZ Streams are going to remain in hiatus this week. Too much to do! 4 things will be announced on Monday though! Look forward to that.
Typed a long-ish reply to a post... forgot to actually HIT the post button, and moved to a different page.... finally noticed, don't remember what all I had typed and don't feel like trying to re-type it all.... smh....
Their tactics are evolving. They've learned to call for help when cornered. Never trust a mammal!
Good morning all. I still have a post up on video editing for cinematic trailers. Please make sure to check that out and give me a message as its still active in offers.
Hey everyone! I'm back :D

Snow White? More like Snowhere to be seen amiright? Hahaha I'm so sorry!! :kaocry:

Forum statistics

Threads
112,370
Messages
1,067,839
Members
146,017
Latest member
Anselmo00
Top