[XP] Easy LvlUp Notifier

Started by Blizzard, January 09, 2008, 04:40:24 pm

Previous topic - Next topic

Blizzard

January 09, 2008, 04:40:24 pm Last Edit: March 23, 2019, 11:27:08 am by Blizzard
Easy LvlUp Notifier
Authors: Blizzard
Version: 2.2
Type: Battle Report Display
Key Term: Misc Add-on



Introduction

This script will notify you when any character is leveled up after a battle. It will show any stats that were increased and any skills that were learned. The windows are animated, the code is less complex than any other so far and it is most efficient as well as highly optimized and detailed worked out.

This work is licensed under BSD License 2.0:
Quote
Copyright (c) Boris "Blizzard" Mikić
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1.  Redistributions of source code must retain the above copyright notice,
    this list of conditions and the following disclaimer.

2.  Redistributions in binary form must reproduce the above copyright notice,
    this list of conditions and the following disclaimer in the documentation
    and/or other materials provided with the distribution.

3.  Neither the name of the copyright holder nor the names of its contributors
    may be used to endorse or promote products derived from this software
    without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.


You may use this script for both non-commercial and commercial products without limitations as long as you fulfill the conditions presented by the above license. The "complete" way to give credit is to include the license somewhere in your product (e.g. in the credits screen), but a "simple" way is also acceptable. The "simple" way to give credit is as follows:
Quote
Easy LvlUp Notifier licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikić


Alternatively, if your font doesn't support diacritic characters, you may use this variant:
Quote
Easy LvlUp Notifier licensed under BSD License 2.0, Copyright (c) Boris "Blizzard" Mikic


In general other similar variants are allowed as long as it is clear who the creator is (e.g. "Easy LvlUp Notifier created by Blizzard" is acceptable). But if possible, prefer to use one of the two variants listed above.

If you fail to give credit and/or claim that this work was created by you, this may result in legal action and/or payment of damages even though this work is free of charge to use normally.



Features


  • shows increased stats and learned skills at level up
  • animated
  • shows EXP gain for each actor (!) only after gaining EXP after a battle
  • more simple and less laggy than other Level Up Notifiers
  • you can set up any sound to be played when a higher level is reached or a new skill is learned (LVLUP_SE and LEARN_SE further below)
  • now MUCH more simple and MUCH shorter than other Level Up Notifiers
  • increbibly compatible: can show increase of any stats after the battle in combination with any script, just put this script below those attribute modifying scripts
  • fully compatible with Tons of Add-ons

v1.2b

  • better window movement
  • higher compatibility
  • fixed a few "eventual" bugs

v1.3b

  • fully compatible with Tons of Add-ons

v1.4b

  • improved coding
  • rewritten conditions using classic syntax to avoid RGSS conditioning bug

v2.0

  • completely overworked and improved
  • now MUCH more simple than other Level Up Notifiers
  • halved the number of lines of code
  • much more compatible: can show increase of any stats after the battle in combination with any script, just put this script below those attribute modifying scripts

v2.1

  • improved coding
  • increased compatibility with CBS-es

v2.1b

  • fixed "stack level too deep" problem

v2.11b

  • fixed crash during escape

v2.2

  • added new license
  • added usage and crediting instructions




Screenshots




Demo

Easy LvlUp Notifier


Script

Just make a new script above main and paste this code into it.
Script Download


Instructions

Inside the script in the first comment.


Compatibility

98% compatible with SDK v1.x. 80% compatible with SDK 2.x. WILL corrupt old savegames. May cause slight problems with following systems and would need therefore slight recalibration:

  • exotic CBS-es
  • exotic skill systems (e.g. Soul Rage System)
  • exotic stat systems (additional stats like Wisdom, Luck etc.)



Credits and Thanks


  • Boris "Blizzard" Mikić



Author's Notes

If you find any bugs, please report them here:
http://forum.chaos-project.com

That's it! N-Joy! =D
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

blazinhandle

How would you suggest replacing the Stat name ($data_system.words.STAT) with icons?

Blizzard

Make config constants for file names. Then, where it says in the scripts that the text of the stat is drawn, use the RPG::Cache.icon method and the .blt methodto draw the icon instead. You might wanna look into Window_Skill#refresh or Window_Item#refresh to see how it's usually done.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

blazinhandle

What I currently have:
Spoiler: ShowHide
class Window_LevelUp < Window_Base

  attr_reader :limit

  def initialize(a, d)
    x = a.index * 156
    text = []
    text.push([$data_system.words.hp[0, 3],  d[0], a.maxhp]) if d[0] != a.maxhp
    text.push([$data_system.words.sp[0, 3],  d[1], a.maxsp]) if d[1] != a.maxsp
    text.push([$data_system.words.str[0, 3], d[2], a.str])   if d[2] != a.str
    text.push([$data_system.words.dex[0, 3], d[3], a.dex])   if d[3] != a.dex
    text.push([$data_system.words.agi[0, 3], d[4], a.agi])   if d[4] != a.agi
    text.push([$data_system.words.int[0, 3], d[5], a.int])   if d[5] != a.int
    if a.armor4_id == nil or $game_switches[55]==false
      h = text.size * 32 + (58)
    else
      h = text.size * 32 + (96)
    end
    @limit, y = 365 - h, 480 - h + (h/64+1)*64
    super(x+156, y, 180, h)
      self.z, self.back_opacity = 100, WINDOW_BACK_OPACITY
      self.contents = Bitmap.new(self.width - 32, self.height - 32)
      self.contents.font.color = normal_color
      if a.armor4_id == nil or $game_switches[55]==false
        draw_statsdisplay_wo(a, 0, 0)
        draw_actor_weapon_exp_battle(a, 26, -8)
        draw_weapon_icon(a, 2, 28)
      else
        # Weapon Experience
        draw_statsdisplay_wo(a, 0, 0)
        draw_actor_weapon_exp_battle(a, 26, -8)
        draw_weapon_icon(a, 2, 28)
        # AuroraOre Experience
        draw_statsdisplay_wo(a, 0, 32)
        draw_actor_armor4_exp_battle(a, 26, 24)
        draw_auroraore_icon(a, 2, 60)
      end
      if a.armor4_id == nil or $game_switches[55]==false
        self.contents.font.bold = true
        self.contents.font.size = 13
        self.contents.draw_text(10, 2, 128, 24, "#{$game_weapons[a.weapon_id].weapon_exp - d[6]} EXP", 1)
        self.contents.font.size = 16
        self.contents.font.color = gold_color
        self.contents.draw_text(10, 2, 128, 24, $game_weapons[a.weapon_id].weapon_level.to_s, 2)
      else
        self.contents.font.bold = true
        self.contents.font.size = 13
        self.contents.draw_text(10, 2, 128, 24, "#{$game_weapons[a.weapon_id].weapon_exp - d[6]} EXP", 1)
        self.contents.draw_text(10, 34, 128, 24, "#{$game_armors[a.armor4_id].armor4_exp - d[7]} EXP", 1)
        self.contents.font.size = 16
        self.contents.font.color = gold_color
        self.contents.draw_text(10, 2, 128, 24, $game_weapons[a.weapon_id].weapon_level.to_s, 2)
        self.contents.font.color = gold_color
        self.contents.draw_text(10, 34, 128, 24, $game_armors[a.armor4_id].armor4_level.to_s, 2)
      end
      text.each_index {|i|
        index = i + 1
        self.contents.font.size, self.contents.font.bold = 20, true
        self.contents.font.color = system_color
        if a.armor4_id == nil or $game_switches[55]==false
          draw_statsdisplay_wo(a, 0, (index*31))
          self.contents.draw_text(0, index*31, 128, 24, text[i][0])
          self.contents.draw_text(75, index*31, 32, 24, '»')
          self.contents.font.color = normal_color
          self.contents.draw_text(-10, index*31, 76, 24, text[i][1].to_s, 2)
          if text[i][1] > text[i][2]
            self.contents.font.color = Color.new(255, 64, 0)
          else
            self.contents.font.color = Color.new(0, 255, 64)
          end
          self.contents.draw_text(-10, index*31, 128, 24, text[i][2].to_s, 2)
        else
          draw_statsdisplay_wo(a, 0, 34+(index*31))
          self.contents.draw_text(0, 34+(index*31), 128, 24, text[i][0])
          self.contents.draw_text(75, 34+(index*31), 32, 24, '»')
          self.contents.font.color = normal_color
          self.contents.draw_text(-10, 34+(index*31), 76, 24, text[i][1].to_s, 2)
          if text[i][1] > text[i][2]
            self.contents.font.color = Color.new(255, 64, 0)
          else
            self.contents.font.color = Color.new(0, 255, 64)
          end
          self.contents.draw_text(-10, 34+(index*31), 128, 24, text[i][2].to_s, 2)     
        end
      }
  end
end



Here, I tried this (I know it's not right or what you meant) and it gave me bitmap errors, bitmap to string errors, etc.:

Spoiler: ShowHide
class Window_LevelUp < Window_Base

  attr_reader :limit

  def initialize(a, d)
    x = a.index * 156
    text = []
    text.push([RPG::Cache.icon($data_system.words.hp), d[0], a.maxhp]) if d[0] != a.maxhp
    ##### REMOVED FROM POST TO SAVE FACE #####
    if a.armor4_id == nil or $game_switches[55]==false
      h = text.size * 32 + (58)
    else
      h = text.size * 32 + (96)
    end
    @limit, y = 365 - h, 480 - h + (h/64+1)*64
    super(x+156, y, 180, h)
      self.z, self.back_opacity = 100, WINDOW_BACK_OPACITY
      self.contents = Bitmap.new(self.width - 32, self.height - 32)
      self.contents.font.color = normal_color
      if a.armor4_id == nil or $game_switches[55]==false
        draw_statsdisplay_wo(a, 0, 0)
        draw_actor_weapon_exp_battle(a, 26, -8)
        draw_weapon_icon(a, 2, 28)
      else
        # Weapon Experience
        draw_statsdisplay_wo(a, 0, 0)
        draw_actor_weapon_exp_battle(a, 26, -8)
        draw_weapon_icon(a, 2, 28)
        # AuroraOre Experience
        draw_statsdisplay_wo(a, 0, 32)
        draw_actor_armor4_exp_battle(a, 26, 24)
        draw_auroraore_icon(a, 2, 60)
      end
      if a.armor4_id == nil or $game_switches[55]==false
        self.contents.font.bold = true
        self.contents.font.size = 13
        self.contents.draw_text(10, 2, 128, 24, "#{$game_weapons[a.weapon_id].weapon_exp - d[6]} EXP", 1)
        self.contents.font.size = 16
        self.contents.font.color = gold_color
        self.contents.draw_text(10, 2, 128, 24, $game_weapons[a.weapon_id].weapon_level.to_s, 2)
      else
        self.contents.font.bold = true
        self.contents.font.size = 13
        self.contents.draw_text(10, 2, 128, 24, "#{$game_weapons[a.weapon_id].weapon_exp - d[6]} EXP", 1)
        self.contents.draw_text(10, 34, 128, 24, "#{$game_armors[a.armor4_id].armor4_exp - d[7]} EXP", 1)
        self.contents.font.size = 16
        self.contents.font.color = gold_color
        self.contents.draw_text(10, 2, 128, 24, $game_weapons[a.weapon_id].weapon_level.to_s, 2)
        self.contents.font.color = gold_color
        self.contents.draw_text(10, 34, 128, 24, $game_armors[a.armor4_id].armor4_level.to_s, 2)
      end
      text.each_index {|i|
        index = i + 1
        self.contents.font.size, self.contents.font.bold = 20, true
        self.contents.font.color = system_color
        if a.armor4_id == nil or $game_switches[55]==false
          draw_statsdisplay_wo(a, 0, (index*31))
          self.contents.blt(0, index*31, 128, 24, text[i][0])
          self.contents.draw_text(75, index*31, 32, 24, '»')
          self.contents.font.color = normal_color
          self.contents.draw_text(-10, index*31, 76, 24, text[i][1].to_s, 2)
          if text[i][1] > text[i][2]
            self.contents.font.color = Color.new(255, 64, 0)
          else
            self.contents.font.color = Color.new(0, 255, 64)
          end
          self.contents.draw_text(-10, index*31, 128, 24, text[i][2].to_s, 2)
        else
          draw_statsdisplay_wo(a, 0, 34+(index*31))
          self.contents.draw_blt(0, 34+(index*31), 128, 24, text[i][0])
          self.contents.draw_text(75, 34+(index*31), 32, 24, '»')
          self.contents.font.color = normal_color
          self.contents.draw_text(-10, 34+(index*31), 76, 24, text[i][1].to_s, 2)
          if text[i][1] > text[i][2]
            self.contents.font.color = Color.new(255, 64, 0)
          else
            self.contents.font.color = Color.new(0, 255, 64)
          end
          self.contents.draw_text(-10, 34+(index*31), 128, 24, text[i][2].to_s, 2)     
        end
      }
  end
end

Blizzard

Try this instead.
Spoiler: ShowHide
class Window_LevelUp < Window_Base

  attr_reader :limit

  def initialize(a, d)
    x = a.index * 156
    text = []
## EDIT
    text.push([HP_ICON,  d[0], a.maxhp]) if d[0] != a.maxhp
    text.push([SP_ICON,  d[1], a.maxsp]) if d[1] != a.maxsp
    text.push([STR_ICON, d[2], a.str])   if d[2] != a.str
    text.push([DEX_ICON, d[3], a.dex])   if d[3] != a.dex
    text.push([AGI_ICON, d[4], a.agi])   if d[4] != a.agi
    text.push([INT_ICON, d[5], a.int])   if d[5] != a.int
## /EDIT
    if a.armor4_id == nil or $game_switches[55]==false
      h = text.size * 32 + (58)
    else
      h = text.size * 32 + (96)
    end
    @limit, y = 365 - h, 480 - h + (h/64+1)*64
    super(x+156, y, 180, h)
      self.z, self.back_opacity = 100, WINDOW_BACK_OPACITY
      self.contents = Bitmap.new(self.width - 32, self.height - 32)
      self.contents.font.color = normal_color
      if a.armor4_id == nil or $game_switches[55]==false
        draw_statsdisplay_wo(a, 0, 0)
        draw_actor_weapon_exp_battle(a, 26, -8)
        draw_weapon_icon(a, 2, 28)
      else
        # Weapon Experience
        draw_statsdisplay_wo(a, 0, 0)
        draw_actor_weapon_exp_battle(a, 26, -8)
        draw_weapon_icon(a, 2, 28)
        # AuroraOre Experience
        draw_statsdisplay_wo(a, 0, 32)
        draw_actor_armor4_exp_battle(a, 26, 24)
        draw_auroraore_icon(a, 2, 60)
      end
      if a.armor4_id == nil or $game_switches[55]==false
        self.contents.font.bold = true
        self.contents.font.size = 13
        self.contents.draw_text(10, 2, 128, 24, "#{$game_weapons[a.weapon_id].weapon_exp - d[6]} EXP", 1)
        self.contents.font.size = 16
        self.contents.font.color = gold_color
        self.contents.draw_text(10, 2, 128, 24, $game_weapons[a.weapon_id].weapon_level.to_s, 2)
      else
        self.contents.font.bold = true
        self.contents.font.size = 13
        self.contents.draw_text(10, 2, 128, 24, "#{$game_weapons[a.weapon_id].weapon_exp - d[6]} EXP", 1)
        self.contents.draw_text(10, 34, 128, 24, "#{$game_armors[a.armor4_id].armor4_exp - d[7]} EXP", 1)
        self.contents.font.size = 16
        self.contents.font.color = gold_color
        self.contents.draw_text(10, 2, 128, 24, $game_weapons[a.weapon_id].weapon_level.to_s, 2)
        self.contents.font.color = gold_color
        self.contents.draw_text(10, 34, 128, 24, $game_armors[a.armor4_id].armor4_level.to_s, 2)
      end
      text.each_index {|i|
        index = i + 1
        self.contents.font.size, self.contents.font.bold = 20, true
        self.contents.font.color = system_color
        if a.armor4_id == nil or $game_switches[55]==false
          draw_statsdisplay_wo(a, 0, (index*31))
## EDIT
          icon RPG::Cache.icon(text[i][0])
          self.contents.blt(0, index*31, icon, Rect(0, 0, 24, 24))
## /EDIT
          self.contents.draw_text(75, index*31, 32, 24, '»')
          self.contents.font.color = normal_color
          self.contents.draw_text(-10, index*31, 76, 24, text[i][1].to_s, 2)
          if text[i][1] > text[i][2]
            self.contents.font.color = Color.new(255, 64, 0)
          else
            self.contents.font.color = Color.new(0, 255, 64)
          end
          self.contents.draw_text(-10, index*31, 128, 24, text[i][2].to_s, 2)
        else
          draw_statsdisplay_wo(a, 0, 34+(index*31))
## EDIT
          icon RPG::Cache.icon(text[i][0])
          self.contents.blt(0, 34+index*31, icon, Rect(0, 0, 24, 24))
## /EDIT
          self.contents.draw_text(75, 34+(index*31), 32, 24, '»')
          self.contents.font.color = normal_color
          self.contents.draw_text(-10, 34+(index*31), 76, 24, text[i][1].to_s, 2)
          if text[i][1] > text[i][2]
            self.contents.font.color = Color.new(255, 64, 0)
          else
            self.contents.font.color = Color.new(0, 255, 64)
          end
          self.contents.draw_text(-10, 34+(index*31), 128, 24, text[i][2].to_s, 2)     
        end
      }
  end
end

Just define the 6 constants somewhere before. :3
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

blazinhandle

Hmmm I modified it like this:
Spoiler: ShowHide
class Window_LevelUp < Window_Base

  attr_reader :limit

  def initialize(a, d)
    x = a.index * 156
    text = []
    # EDIT
    text.push([draw_LIFE_ICON,  d[0], a.maxhp]) if d[0] != a.maxhp
    text.push([draw_STAMINA_ICON(x, y),  d[1], a.maxsp]) if d[1] != a.maxsp
    text.push([draw_STRENGTH_ICON, d[2], a.str])   if d[2] != a.str
    text.push([draw_EXECUTION_ICON, d[3], a.dex])   if d[3] != a.dex
    text.push([draw_PARRY_ICON, d[4], a.agi])   if d[4] != a.agi
    text.push([draw_JUDGMENT_ICON, d[5], a.int])   if d[5] != a.int
    # EDIT
    if a.armor4_id == nil or $game_switches[55]==false
      h = text.size * 32 + (58)
    else
      h = text.size * 32 + (96)
    end
    @limit, y = 365 - h, 480 - h + (h/64+1)*64
    super(x+156, y, 180, h)
      self.z, self.back_opacity = 100, WINDOW_BACK_OPACITY
      self.contents = Bitmap.new(self.width - 32, self.height - 32)
      self.contents.font.color = normal_color
      if a.armor4_id == nil or $game_switches[55]==false
        draw_statsdisplay_wo(a, 0, 0)
        draw_actor_weapon_exp_battle(a, 26, -8)
        draw_weapon_icon(a, 2, 28)
      else
        # Weapon Experience
        draw_statsdisplay_wo(a, 0, 0)
        draw_actor_weapon_exp_battle(a, 26, -8)
        draw_weapon_icon(a, 2, 28)
        # AuroraOre Experience
        draw_statsdisplay_wo(a, 0, 32)
        draw_actor_armor4_exp_battle(a, 26, 24)
        draw_auroraore_icon(a, 2, 60)
      end
      if a.armor4_id == nil or $game_switches[55]==false
        self.contents.font.bold = true
        self.contents.font.size = 13
        self.contents.draw_text(10, 2, 128, 24, "#{$game_weapons[a.weapon_id].weapon_exp - d[6]} EXP", 1)
        self.contents.font.size = 16
        self.contents.font.color = gold_color
        self.contents.draw_text(10, 2, 128, 24, $game_weapons[a.weapon_id].weapon_level.to_s, 2)
      else
        self.contents.font.bold = true
        self.contents.font.size = 13
        self.contents.draw_text(10, 2, 128, 24, "#{$game_weapons[a.weapon_id].weapon_exp - d[6]} EXP", 1)
        self.contents.draw_text(10, 34, 128, 24, "#{$game_armors[a.armor4_id].armor4_exp - d[7]} EXP", 1)
        self.contents.font.size = 16
        self.contents.font.color = gold_color
        self.contents.draw_text(10, 2, 128, 24, $game_weapons[a.weapon_id].weapon_level.to_s, 2)
        self.contents.font.color = gold_color
        self.contents.draw_text(10, 34, 128, 24, $game_armors[a.armor4_id].armor4_level.to_s, 2)
      end
      text.each_index {|i|
        index = i + 1
        self.contents.font.size, self.contents.font.bold = 20, true
        self.contents.font.color = system_color
        if a.armor4_id == nil or $game_switches[55]==false
          draw_statsdisplay_wo(a, 0, (index*31))
          # EDIT
          icon=RPG::Cache.icon(text[i][0])
          self.contents.blt(0, index*31, icon, Rect(0, 0, 24, 24))
          # EDIT
          self.contents.draw_text(75, index*31, 32, 24, '»')
          self.contents.font.color = normal_color
          self.contents.draw_text(-10, index*31, 76, 24, text[i][1].to_s, 2)
          if text[i][1] > text[i][2]
            self.contents.font.color = Color.new(255, 64, 0)
          else
            self.contents.font.color = Color.new(0, 255, 64)
          end
          self.contents.draw_text(-10, index*31, 128, 24, text[i][2].to_s, 2)
        else
          draw_statsdisplay_wo(a, 0, 34+(index*31))
          # EDIT
          icon = RPG::Cache.icon(text[i][0])
          self.contents.blt(0, 34+index*31, icon, Rect(0, 0, 24, 24))
          # EDIT
          self.contents.draw_text(75, 34+(index*31), 32, 24, '»')
          self.contents.font.color = normal_color
          self.contents.draw_text(-10, 34+(index*31), 76, 24, text[i][1].to_s, 2)
          if text[i][1] > text[i][2]
            self.contents.font.color = Color.new(255, 64, 0)
          else
            self.contents.font.color = Color.new(0, 255, 64)
          end
          self.contents.draw_text(-10, 34+(index*31), 128, 24, text[i][2].to_s, 2)     
        end
      }
  end
end


With these ?Constants?
Spoiler: ShowHide
  def draw_LIFE_ICON(x, y)
    bitmap = RPG::Cache.icon($data_system.words.hp)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 28, y, 212, 32, $data_system.words.hp)
  end
  def draw_STAMINA_ICON(x, y)
    bitmap = RPG::Cache.icon($data_system.words.sp)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 28, y, 212, 32, $data_system.words.sp)
  end
  def draw_STRENGTH_ICON(x, y)
    bitmap = RPG::Cache.icon($data_system.words.str)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 28, y, 212, 32, $data_system.words.str)
  end
  def draw_EXECUTION_ICON(x, y)
    bitmap = RPG::Cache.icon($data_system.words.dex)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 28, y, 212, 32, $data_system.words.dex)
  end


But I got a "disposed window error"

Blizzard

No, you draw the stuff too early. I draw it afterwards, I only save the icon filenames that should be drawn afterwards. Use my code, just change the constant names if you want them.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

blazinhandle

You're the man, B. I messed with it a little and got it to work. Thanks again!

Real Mugen

Exist something like this script....but usefull for BLIZZ ABS?

MikeyUchiha

Is this usable with the Blizz ABS?

Blizzard

Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

MikeyUchiha

Is there a way to make it so that it does?

Blizzard

I would find windows floating around, while enemies kick my ass, pretty annoying. I'm not making this compatible with Blizz-ABS because there is no point.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

MikeyUchiha

Well I was thinking a little quick render of a Level Up picture or text in the upper right hand corner that automatically fades away.

Blizzard

August 18, 2008, 03:23:16 pm #14 Last Edit: August 18, 2008, 03:23:59 pm by Blizzard
But then again, you won't even be able to see it right. And it might cover something important during that time. Freezing the game is also not an option as it will interrupt the player at each level up which can get very annoying when having a few party members that level up often. I'd say the game can live without it. Most old-school console RPGs don't have it either. i.e. Secret of Mana. Terranigma did have it, but it was only one actor on the map and it as made in a smart way so the level up blast acts like a powerful attack (which I will not add in Blizz-ABS) to disallow the player getting screwed up.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ninjason

Good day to you all, since this is my first post on this forum.

I am currently using the easy lvl up notifier in a series of games i wrote and found it for my newest game, that I only wish to show a new learned skill
and not the stat-change-popup.

Is it possible, that anyone (preferably Blizz, as the author of this script) could cut exactly that part out, or tell me, from which to which line I would have to copy+paste the script into the script-section?

I find myself not to be very well versed in script editing.

Thank you in advance and I'll be waiting for any reply.

(PS I know, the reply-function is telling me to consider opening a new topic for this request, but I don't think this fits into another place than the original script-post...)
there's only one Ninja

Blizzard

I can post an edited version later.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ninjason

I'd be very much oblidged to you, Blizz.
there's only one Ninja

Blizzard

December 02, 2009, 09:25:05 am #18 Last Edit: December 04, 2009, 08:08:44 am by Blizzard
Here you go.

Spoiler: ShowHide
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Easy Skills Learned Notifier by Blizzard
# Version: 1.1b
# Type: Battle Report Display
# Date: 2.11.2009
# Date v1.0b: 3.11.2009
# Date v1.1b: 4.11.2009
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#   
#  This work is protected by the following license:
# #----------------------------------------------------------------------------
# # 
# #  Creative Commons - Attribution-NonCommercial-ShareAlike 3.0 Unported
# #  ( http://creativecommons.org/licenses/by-nc-sa/3.0/ )
# # 
# #  You are free:
# # 
# #  to Share - to copy, distribute and transmit the work
# #  to Remix - to adapt the work
# # 
# #  Under the following conditions:
# # 
# #  Attribution. You must attribute the work in the manner specified by the
# #  author or licensor (but not in any way that suggests that they endorse you
# #  or your use of the work).
# # 
# #  Noncommercial. You may not use this work for commercial purposes.
# # 
# #  Share alike. If you alter, transform, or build upon this work, you may
# #  distribute the resulting work only under the same or similar license to
# #  this one.
# # 
# #  - For any reuse or distribution, you must make clear to others the license
# #    terms of this work. The best way to do this is with a link to this web
# #    page.
# # 
# #  - Any of the above conditions can be waived if you get permission from the
# #    copyright holder.
# # 
# #  - Nothing in this license impairs or restricts the author's moral rights.
# # 
# #----------------------------------------------------------------------------
#
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
#
# Compatibility:
#
#   98% compatible with SDK v1.x. 80% compatible with SDK 2.x. WILL corrupt old
#   savegames. May cause slight problems with following systems and would need
#   therefore slight recalibration:
#   - exotic CBS-es
#   - exotic skill systems
#
#
# Features:
#
#   - shows learned skills at the end of a battle
#
#
# Instructions:
#
# - Explanation:
#
#   This script will notify you when any character has learned a new skill.
#
# - Configuration:
#   
#   There are a few options you can set up below.
#   
#   LEARN_SE            - sound effect played when a new skill was learned,
#                         keep in mind that the script takes into account that
#                         skills can only be learned after a level up
#
#
# If you find any bugs, please report them here:
# http://forum.chaos-project.com
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#          RPG::AudioFile.new('FILENAME', VOLUME, PITCH)
LEARN_SE = RPG::AudioFile.new('106-Heal02', 80, 100)

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

$easy_skill_learn_notifier = true

#==============================================================================
# Scene_Battle
#==============================================================================

class Scene_Battle
 
  alias main_skill_learn_later main
  def main
    @old_skills = {}
    (1...$data_actors.size).each {|i|
        @old_skills[$game_actors[i]] = $game_actors[i].skills.clone}
    main_skill_learn_later
  end
 
  alias start_phase5_skill_learn_later start_phase5
  def start_phase5
    start_phase5_skill_learn_later
    @skill_texts = []
    $game_party.actors.each {|actor|
        actor.remove_states_battle
        (actor.skills - @old_skills[actor]).each {|id|
            @skill_texts.push("#{actor.name} learned #{$data_skills[id].name}!")}}
  end
 
  alias battle_end_skill_learn_later battle_end
  def battle_end(result)
    if @skill_texts.size > 0
      $game_system.se_play(LEARN_SE)
      @help_window.set_text(@skill_texts.shift, 1)
    else
      battle_end_skill_learn_later(result)
    end
  end
 
end
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Ninjason

Hmm i inserted the script, but there is no message, whatsoever after a character reaches a skill-learning level...
there's only one Ninja