[XP] Modify Max Amount

Started by G_G, January 24, 2009, 05:58:21 pm

Previous topic - Next topic

G_G

January 24, 2009, 05:58:21 pm Last Edit: February 21, 2009, 05:57:26 am by shdwlink1993
Modify Max Amount Script
Authors: game_guy
Version: 1.2
Type: Misc Add-On
Key Term: Misc Add-On



Introduction

Tired of having only 99 items? Maybe tired of having 9999 as the max HP or SP. Want to have be able to change maximum gold amount?
This is the script for you! This script allows you to change the max for a few things!


Features


  • Change Max Amount of Items Owned
  • Change Max Amount of HP
  • Change Max Amount of SP
  • Change Max Amount of Gold
  • Change Max Amount of Steps
  • Change Max Amount of Strength, Dexterity, Agility, and Intelligence



Screenshots

Screenies will come. Just be patient.
Here are the screenies!
Spoiler: ShowHide

Spoiler: ShowHide


Here are some new screenies!
Spoiler: ShowHide

Spoiler: ShowHide



Demo

http://rapidshare.com/files/188928640/Project4.zip.html <= This is Version 1.0
http://www.savefile.com/files/1981582 <= Version 1.2 Now with enemy stat breaker and equipment stat breaker.



Script
Script is in demo and in here:
Spoiler: ShowHide
# This is a collection of game add ons that alter the max amount of everything
# almost. Here you can easily change the max amount of items owned, or gold
# amount, actor hp, actor sp etc.
=begin

Version History
Version 1.0 1-24-09:
Script Made
Configure HP, SP, Gold, Steps, and Items

THIS SCRIPT HAS MODDED VERSIONS OF WINDOW_ITEM, WINDOW_MENUSTATUS, PARTS OF
WINDOW_BASE, WINDOW_TARGET. DO NOT USE ANY OTHER MODDED VERSIONS OF THESE WINDOS
IF YOU WOULD LIKE THIS TO WORK!

IT ALSO HAS SOME PARTS MODDED FROM THE GAME_PARTY, GAME_ACTOR, AND GAME_BATTLER.
DO NOT USE ANYTHING THAT REPLACES THESE PARTS IN THE SCRIPT!

class Game_Party
  def gain_item(item_id, n)
    if item_id > 0
      @items[item_id] = [[item_number(item_id) + n, 0].max, Config::Max_Items].min
    end
  end
  def gain_gold(n)
    @gold = [[@gold + n, 0].max, Config::Max_Gold].min
  end
  def increase_steps
    @steps = [@steps + 1, Config::Max_Steps].min
  end
end
class Game_Actor
  def maxhp
    n = [[base_maxhp + @maxhp_plus, 1].max, Config::Max_HP].min
    for i in @states
      n *= $data_states[i].maxhp_rate / 100.0
    end
    n = [[Integer(n), 1].max, Config::Max_HP].min
    return n
  end
end
class Game_Battler
  def maxsp
    n = [[base_maxsp + @maxsp_plus, 0].max, Config::Max_SP].min
    for i in @states
      n *= $data_states[i].maxsp_rate / 100.0
    end
    n = [[Integer(n), 0].max, Config::Max_SP].min
    return n
  end
end


YOU CAN HAVE THINGS THAT ALTER GAME_PARTY GAME_ACTOR AND GAME_BATTLER1 JUST NOT
THOSE PARTS IN THE SCRIPT> THIS ONLY APPLIES TO THE ABOVE PARTS LISTED. DO NOT
REPLACE THE MODDED WINDOWS WITH ANYTHING UNLESS YOU WANT THINGS TO LOOK WIERD.

IT ALSO HAS A SMALL MODIFICATION OF SCENE_ITEM IN IT. DO NOT OVERWRITE THIS

@target_window.x = 160

ITS LOCATED IN SCENE_ITEM DEF UPDATE_ITEM BELOW TOWARDS THE END


To add more than 99 items at a time, go to Script and type this in
$game_party.gain_item(x, y)
x = item id
y = amount

To do that with gold do
$game_party.gain_gold(x)
x = amount of gold

Credits
game_guy for modding the default scripts
enterbrain for making the default scripts
fantasist for helping me understand window_item alot better
=end
#CONFIGURATION
module Config
  Max_Items = 10000000
  Max_Gold = 10
  Max_Steps = 2
  Max_HP = 100000
  Max_SP = 100000
end


# DO NOT MESS WITH ANYTHING BELOW THIS LINE UNLESS YOU KNOW WHAT YOU"RE DOING!


# THIS IS THE MODDED WINDOW_ITEM
class Window_Item < Window_Selectable
  def initialize
    super(0, 64, 640, 416)
    @column_max = 1
    refresh
    self.index = 0
    if $game_temp.in_battle
      self.y = 64
      self.height = 256
      self.back_opacity = 160
    end
  end
  def item
    return @data[self.index]
  end
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 1...$data_items.size
      if $game_party.item_number(i) > 0
        @data.push($data_items[i])
      end
    end
    unless $game_temp.in_battle
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0
          @data.push($data_weapons[i])
        end
      end
      for i in 1...$data_armors.size
        if $game_party.armor_number(i) > 0
          @data.push($data_armors[i])
        end
      end
    end
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
  def draw_item(index)
    item = @data[index]
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    if item.is_a?(RPG::Item) and
       $game_party.item_can_use?(item.id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4 + index % @column_max * (288 + 32)
    y = index / @column_max * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_text(x + 150, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 155, y, 100, 32, number.to_s, 2)
  end
  def update_help
    @help_window.set_text(self.item == nil ? "" : self.item.description)
  end
end

# HERE IS THE MODDED TARGET_WINDOW
class Window_Target < Window_Selectable
  def initialize
    super(0, 0, 480, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.z += 10
    @item_max = $game_party.actors.size
    refresh
  end
  def refresh
    self.contents.clear
    for i in 0...$game_party.actors.size
      x = 64
      y = i * 116
      actor = $game_party.actors[i]
      draw_actor_name(actor, x, y)
      draw_actor_class(actor, x + 144, y)
      draw_actor_level(actor, x + 8, y + 32)
      draw_actor_state(actor, x + 8, y + 64)
      draw_actor_hp(actor, x + 152, y + 32)
      draw_actor_sp(actor, x + 152, y + 64)
    end
  end
  def update_cursor_rect
    if @index <= -2
      self.cursor_rect.set(0, (@index + 10) * 116, self.width - 32, 96)
    elsif @index == -1
      self.cursor_rect.set(0, 0, self.width - 32, @item_max * 116 - 20)
    else
      self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
    end
  end
end

# HERE IS THE MODDED WINDOW_MENUSTATUS
class Window_MenuStatus < Window_Selectable
  def initialize
    super(0, 0, 480, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = 64
      y = i * 116
      actor = $game_party.actors[i]
      draw_actor_graphic(actor, x - 40, y + 80)
      draw_actor_name(actor, x, y)
      draw_actor_class(actor, x + 144, y)
      draw_actor_level(actor, x, y + 32)
      draw_actor_state(actor, x + 90, y + 32)
      draw_actor_exp(actor, x, y + 64)
      draw_actor_hp(actor, x + 220, y + 32)
      draw_actor_sp(actor, x + 220, y + 64)
    end
  end
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
    end
  end
end
# BELOW THIS IS THE MODDED PARTS OF WINDOW BASE
class Window_Base < Window
  def draw_actor_hp(actor, x, y, width = 144)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
    if width - 32 >= 108
      hp_x = x + width - 108
      flag = true
    elsif width - 32 >= 48
      hp_x = x + width - 48
      flag = false
    end
    self.contents.font.color = actor.hp == 0 ? knockout_color :
      actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
    self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
    if flag
      self.contents.font.color = normal_color
      self.contents.draw_text(hp_x + 48, y, 15, 32, "/", 1)
      self.contents.draw_text(hp_x + 60, y, 50, 32, actor.maxhp.to_s)
    end
  end
  def draw_actor_sp(actor, x, y, width = 144)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
    if width - 32 >= 108
      sp_x = x + width - 108
      flag = true
    elsif width - 32 >= 48
      sp_x = x + width - 48
      flag = false
    end
    self.contents.font.color = actor.sp == 0 ? knockout_color :
      actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
    self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
    if flag
      self.contents.font.color = normal_color
      self.contents.draw_text(sp_x + 48, y, 15, 32, "/", 1)
      self.contents.draw_text(sp_x + 60, y, 50, 32, actor.maxsp.to_s)
    end
  end
end

# BELOW IS THE MODDED VERSION OF WINDOW_ITEM
class Window_Item < Window_Selectable
  def initialize
    super(0, 64, 640, 416)
    @column_max = 1
    refresh
    self.index = 0
    if $game_temp.in_battle
      self.y = 64
      self.height = 256
      self.back_opacity = 160
    end
  end
  def item
    return @data[self.index]
  end
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 1...$data_items.size
      if $game_party.item_number(i) > 0
        @data.push($data_items[i])
      end
    end
    unless $game_temp.in_battle
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0
          @data.push($data_weapons[i])
        end
      end
      for i in 1...$data_armors.size
        if $game_party.armor_number(i) > 0
          @data.push($data_armors[i])
        end
      end
    end
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
  def draw_item(index)
    item = @data[index]
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    if item.is_a?(RPG::Item) and
       $game_party.item_can_use?(item.id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4 + index % @column_max * (288 + 32)
    y = index / @column_max * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_text(x + 150, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 155, y, 100, 32, number.to_s, 2)
  end
  def update_help
    @help_window.set_text(self.item == nil ? "" : self.item.description)
  end
end

# BELOW ARE THE MODDED PARTS OF GAME_ACTOR GAME_PARTY AND GAME_BATTLER1
class Game_Party
  def gain_item(item_id, n)
    if item_id > 0
      @items[item_id] = [[item_number(item_id) + n, 0].max, Config::Max_Items].min
    end
  end
  def gain_gold(n)
    @gold = [[@gold + n, 0].max, Config::Max_Gold].min
  end
  def increase_steps
    @steps = [@steps + 1, Config::Max_Steps].min
  end
end
class Game_Actor
  def maxhp
    n = [[base_maxhp + @maxhp_plus, 1].max, Config::Max_HP].min
    for i in @states
      n *= $data_states[i].maxhp_rate / 100.0
    end
    n = [[Integer(n), 1].max, Config::Max_HP].min
    return n
  end
end
class Game_Battler
  def maxsp
    n = [[base_maxsp + @maxsp_plus, 0].max, Config::Max_SP].min
    for i in @states
      n *= $data_states[i].maxsp_rate / 100.0
    end
    n = [[Integer(n), 0].max, Config::Max_SP].min
    return n
  end
end

class Scene_Item
  def update_item
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(0)
      return
    end
    if Input.trigger?(Input::C)
      @item = @item_window.item
      unless @item.is_a?(RPG::Item)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      unless $game_party.item_can_use?(@item.id)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      $game_system.se_play($data_system.decision_se)
      if @item.scope >= 3
        @item_window.active = false
        @target_window.x = 160
        @target_window.visible = true
        @target_window.active = true
        if @item.scope == 4 || @item.scope == 6
          @target_window.index = -1
        else
          @target_window.index = 0
        end
      else
        if @item.common_event_id > 0
          $game_temp.common_event_id = @item.common_event_id
          $game_system.se_play(@item.menu_se)
          if @item.consumable
            $game_party.lose_item(@item.id, 1)
            @item_window.draw_item(@item_window.index)
          end
          $scene = Scene_Map.new
          return
        end
      end
      return
    end
  end
end

Version 1.2: ShowHide

# This is a collection of game add ons that alter the max amount of everything
# almost. Here you can easily change the max amount of items owned, or gold
# amount, actor hp, actor sp etc.
=begin

Version History
Version 1.0 1-24-09:
Script Made
Configure HP, SP, Gold, Steps, and Items

Version 1.2 1-25-09:
Strength, Agility, and Dexterity Added
Configure HP, SP, Gold, Steps, Items, Strength, Dexterity, and Agility

THIS SCRIPT HAS MODDED VERSIONS OF WINDOW_ITEM, WINDOW_MENUSTATUS, PARTS OF
WINDOW_BASE, WINDOW_TARGET. DO NOT USE ANY OTHER MODDED VERSIONS OF THESE WINDOS
IF YOU WOULD LIKE THIS TO WORK!

IT ALSO HAS SOME PARTS MODDED FROM THE GAME_PARTY, GAME_ACTOR, AND GAME_BATTLER.
DO NOT USE ANYTHING THAT REPLACES THESE PARTS IN THE SCRIPT!

class Game_Party
  def gain_item(item_id, n)
    if item_id > 0
      @items[item_id] = [[item_number(item_id) + n, 0].max, Config::Max_Items].min
    end
  end
  def gain_gold(n)
    @gold = [[@gold + n, 0].max, Config::Max_Gold].min
  end
  def increase_steps
    @steps = [@steps + 1, Config::Max_Steps].min
  end
end
class Game_Actor
  def maxhp
    n = [[base_maxhp + @maxhp_plus, 1].max, Config::Max_HP].min
    for i in @states
      n *= $data_states[i].maxhp_rate / 100.0
    end
    n = [[Integer(n), 1].max, Config::Max_HP].min
    return n
  end
end
class Game_Battler
  def maxsp
    n = [[base_maxsp + @maxsp_plus, 0].max, Config::Max_SP].min
    for i in @states
      n *= $data_states[i].maxsp_rate / 100.0
    end
    n = [[Integer(n), 0].max, Config::Max_SP].min
    return n
  end
end


YOU CAN HAVE THINGS THAT ALTER GAME_PARTY GAME_ACTOR AND GAME_BATTLER1 JUST NOT
THOSE PARTS IN THE SCRIPT> THIS ONLY APPLIES TO THE ABOVE PARTS LISTED. DO NOT
REPLACE THE MODDED WINDOWS WITH ANYTHING UNLESS YOU WANT THINGS TO LOOK WIERD.

IT ALSO HAS A SMALL MODIFICATION OF SCENE_ITEM IN IT. DO NOT OVERWRITE THIS

@target_window.x = 160

ITS LOCATED IN SCENE_ITEM DEF UPDATE_ITEM BELOW TOWARDS THE END


To add more than 99 items at a time, go to Script and type this in
$game_party.gain_item(x, y)
x = item id
y = amount

To do that with gold do
$game_party.gain_gold(x)
x = amount of gold

Credits
game_guy for modding the default scripts
enterbrain for making the default scripts
fantasist for helping me understand window_item alot better
=end
#CONFIGURATION
module Config
  Max_Items = 10000000
  Max_Gold = 10
  Max_Steps = 2
  Max_HP = 100000
  Max_SP = 100000
  Max_Strength = 5000
  Max_Agility = 3000
  Max_Dexterity = 2000
  Max_Intelligence = 2500
end


# DO NOT MESS WITH ANYTHING BELOW THIS LINE UNLESS YOU KNOW WHAT YOU"RE DOING!


# THIS IS THE MODDED WINDOW_ITEM
class Window_Item < Window_Selectable
  def initialize
    super(0, 64, 640, 416)
    @column_max = 1
    refresh
    self.index = 0
    if $game_temp.in_battle
      self.y = 64
      self.height = 256
      self.back_opacity = 160
    end
  end
  def item
    return @data[self.index]
  end
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 1...$data_items.size
      if $game_party.item_number(i) > 0
        @data.push($data_items[i])
      end
    end
    unless $game_temp.in_battle
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0
          @data.push($data_weapons[i])
        end
      end
      for i in 1...$data_armors.size
        if $game_party.armor_number(i) > 0
          @data.push($data_armors[i])
        end
      end
    end
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
  def draw_item(index)
    item = @data[index]
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    if item.is_a?(RPG::Item) and
       $game_party.item_can_use?(item.id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4 + index % @column_max * (288 + 32)
    y = index / @column_max * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_text(x + 240, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 256, y, 100, 32, number.to_s, 2)
  end
  def update_help
    @help_window.set_text(self.item == nil ? "" : self.item.description)
  end
end

# HERE IS THE MODDED TARGET_WINDOW
class Window_Target < Window_Selectable
  def initialize
    super(0, 0, 480, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.z += 10
    @item_max = $game_party.actors.size
    refresh
  end
  def refresh
    self.contents.clear
    for i in 0...$game_party.actors.size
      x = 64
      y = i * 116
      actor = $game_party.actors[i]
      draw_actor_name(actor, x, y)
      draw_actor_class(actor, x + 144, y)
      draw_actor_level(actor, x + 8, y + 32)
      draw_actor_state(actor, x + 8, y + 64)
      draw_actor_hp(actor, x + 152, y + 32)
      draw_actor_sp(actor, x + 152, y + 64)
    end
  end
  def update_cursor_rect
    if @index <= -2
      self.cursor_rect.set(0, (@index + 10) * 116, self.width - 32, 96)
    elsif @index == -1
      self.cursor_rect.set(0, 0, self.width - 32, @item_max * 116 - 20)
    else
      self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
    end
  end
end

# HERE IS THE MODDED WINDOW_MENUSTATUS
class Window_MenuStatus < Window_Selectable
  def initialize
    super(0, 0, 480, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = 64
      y = i * 116
      actor = $game_party.actors[i]
      draw_actor_graphic(actor, x - 40, y + 80)
      draw_actor_name(actor, x, y)
      draw_actor_class(actor, x + 144, y)
      draw_actor_level(actor, x, y + 32)
      draw_actor_state(actor, x + 90, y + 32)
      draw_actor_exp(actor, x, y + 64)
      draw_actor_hp(actor, x + 220, y + 32)
      draw_actor_sp(actor, x + 220, y + 64)
    end
  end
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
    end
  end
end
# BELOW THIS IS THE MODDED PARTS OF WINDOW BASE
class Window_Base < Window
  def draw_actor_hp(actor, x, y, width = 144)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
    if width - 32 >= 108
      hp_x = x + width - 108
      flag = true
    elsif width - 32 >= 48
      hp_x = x + width - 48
      flag = false
    end
    self.contents.font.color = actor.hp == 0 ? knockout_color :
      actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
    self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
    if flag
      self.contents.font.color = normal_color
      self.contents.draw_text(hp_x + 48, y, 15, 32, "/", 1)
      self.contents.draw_text(hp_x + 60, y, 50, 32, actor.maxhp.to_s)
    end
  end
  def draw_actor_sp(actor, x, y, width = 144)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
    if width - 32 >= 108
      sp_x = x + width - 108
      flag = true
    elsif width - 32 >= 48
      sp_x = x + width - 48
      flag = false
    end
    self.contents.font.color = actor.sp == 0 ? knockout_color :
      actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
    self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
    if flag
      self.contents.font.color = normal_color
      self.contents.draw_text(sp_x + 48, y, 15, 32, "/", 1)
      self.contents.draw_text(sp_x + 60, y, 50, 32, actor.maxsp.to_s)
    end
  end
  def draw_actor_parameter(actor, x, y, type)
    case type
    when 0
      parameter_name = $data_system.words.atk
      parameter_value = actor.atk
    when 1
      parameter_name = $data_system.words.pdef
      parameter_value = actor.pdef
    when 2
      parameter_name = $data_system.words.mdef
      parameter_value = actor.mdef
    when 3
      parameter_name = $data_system.words.str
      parameter_value = actor.str
    when 4
      parameter_name = $data_system.words.dex
      parameter_value = actor.dex
    when 5
      parameter_name = $data_system.words.agi
      parameter_value = actor.agi
    when 6
      parameter_name = $data_system.words.int
      parameter_value = actor.int
    end
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 32, parameter_name)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 120, y, 50, 32, parameter_value.to_s, 2)
  end
end

# BELOW IS THE MODDED VERSION OF WINDOW_ITEM
class Window_Item < Window_Selectable
  def initialize
    super(0, 64, 640, 416)
    @column_max = 1
    refresh
    self.index = 0
    if $game_temp.in_battle
      self.y = 64
      self.height = 256
      self.back_opacity = 160
    end
  end
  def item
    return @data[self.index]
  end
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @data = []
    for i in 1...$data_items.size
      if $game_party.item_number(i) > 0
        @data.push($data_items[i])
      end
    end
    unless $game_temp.in_battle
      for i in 1...$data_weapons.size
        if $game_party.weapon_number(i) > 0
          @data.push($data_weapons[i])
        end
      end
      for i in 1...$data_armors.size
        if $game_party.armor_number(i) > 0
          @data.push($data_armors[i])
        end
      end
    end
    @item_max = @data.size
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, row_max * 32)
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
  def draw_item(index)
    item = @data[index]
    case item
    when RPG::Item
      number = $game_party.item_number(item.id)
    when RPG::Weapon
      number = $game_party.weapon_number(item.id)
    when RPG::Armor
      number = $game_party.armor_number(item.id)
    end
    if item.is_a?(RPG::Item) and
       $game_party.item_can_use?(item.id)
      self.contents.font.color = normal_color
    else
      self.contents.font.color = disabled_color
    end
    x = 4 + index % @column_max * (288 + 32)
    y = index / @column_max * 32
    rect = Rect.new(x, y, self.width / @column_max - 32, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon(item.icon_name)
    opacity = self.contents.font.color == normal_color ? 255 : 128
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.draw_text(x + 28, y, 212, 32, item.name, 0)
    self.contents.draw_text(x + 250, y, 16, 32, ":", 1)
    self.contents.draw_text(x + 255, y, 100, 32, number.to_s, 2)
  end
  def update_help
    @help_window.set_text(self.item == nil ? "" : self.item.description)
  end
end

# BELOW ARE THE MODDED PARTS OF GAME_ACTOR GAME_PARTY AND GAME_BATTLER1
class Game_Party
  def gain_item(item_id, n)
    if item_id > 0
      @items[item_id] = [[item_number(item_id) + n, 0].max, Config::Max_Items].min
    end
  end
  def gain_gold(n)
    @gold = [[@gold + n, 0].max, Config::Max_Gold].min
  end
  def increase_steps
    @steps = [@steps + 1, Config::Max_Steps].min
  end
end
class Game_Actor
  def maxhp
    n = [[base_maxhp + @maxhp_plus, 1].max, Config::Max_HP].min
    for i in @states
      n *= $data_states[i].maxhp_rate / 100.0
    end
    n = [[Integer(n), 1].max, Config::Max_HP].min
    return n
  end
  def base_str
    n = $data_actors[@actor_id].parameters[2, @level]
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon != nil ? weapon.str_plus : 0
    n += armor1 != nil ? armor1.str_plus : 0
    n += armor2 != nil ? armor2.str_plus : 0
    n += armor3 != nil ? armor3.str_plus : 0
    n += armor4 != nil ? armor4.str_plus : 0
    return [[n, 1].max, Config::Max_Strength].min
  end
  def base_dex
    n = $data_actors[@actor_id].parameters[3, @level]
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon != nil ? weapon.dex_plus : 0
    n += armor1 != nil ? armor1.dex_plus : 0
    n += armor2 != nil ? armor2.dex_plus : 0
    n += armor3 != nil ? armor3.dex_plus : 0
    n += armor4 != nil ? armor4.dex_plus : 0
    return [[n, 1].max, Config::Max_Dexterity].min
  end
  def base_agi
    n = $data_actors[@actor_id].parameters[4, @level]
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon != nil ? weapon.agi_plus : 0
    n += armor1 != nil ? armor1.agi_plus : 0
    n += armor2 != nil ? armor2.agi_plus : 0
    n += armor3 != nil ? armor3.agi_plus : 0
    n += armor4 != nil ? armor4.agi_plus : 0
    return [[n, 1].max, Config::Max_Agility].min
  end
  def base_int
    n = $data_actors[@actor_id].parameters[5, @level]
    weapon = $data_weapons[@weapon_id]
    armor1 = $data_armors[@armor1_id]
    armor2 = $data_armors[@armor2_id]
    armor3 = $data_armors[@armor3_id]
    armor4 = $data_armors[@armor4_id]
    n += weapon != nil ? weapon.int_plus : 0
    n += armor1 != nil ? armor1.int_plus : 0
    n += armor2 != nil ? armor2.int_plus : 0
    n += armor3 != nil ? armor3.int_plus : 0
    n += armor4 != nil ? armor4.int_plus : 0
    return [[n, 1].max, Config::Max_Intelligence].min
  end
end
class Game_Battler
  def maxsp
    n = [[base_maxsp + @maxsp_plus, 0].max, Config::Max_SP].min
    for i in @states
      n *= $data_states[i].maxsp_rate / 100.0
    end
    n = [[Integer(n), 0].max, Config::Max_SP].min
    return n
  end
  def str
    n = [[base_str + @str_plus, 1].max, Config::Max_Strength].min
    for i in @states
      n *= $data_states[i].str_rate / 100.0
    end
    n = [[Integer(n), 1].max, Config::Max_Strength].min
    return n
  end
  def dex
    n = [[base_dex + @dex_plus, 1].max, Config::Max_Dexterity].min
    for i in @states
      n *= $data_states[i].dex_rate / 100.0
    end
    n = [[Integer(n), 1].max, Config::Max_Dexterity].min
    return n
  end
  def agi
    n = [[base_agi + @agi_plus, 1].max, Config::Max_Agility].min
    for i in @states
      n *= $data_states[i].agi_rate / 100.0
    end
    n = [[Integer(n), 1].max, Config::Max_Agility].min
    return n
  end
  def int
    n = [[base_int + @int_plus, 1].max, Config::Max_Intelligence].min
    for i in @states
      n *= $data_states[i].int_rate / 100.0
    end
    n = [[Integer(n), 1].max, Config::Max_Intelligence].min
    return n
  end
end

class Scene_Item
  def update_item
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new(0)
      return
    end
    if Input.trigger?(Input::C)
      @item = @item_window.item
      unless @item.is_a?(RPG::Item)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      unless $game_party.item_can_use?(@item.id)
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      $game_system.se_play($data_system.decision_se)
      if @item.scope >= 3
        @item_window.active = false
        @target_window.x = 160
        @target_window.visible = true
        @target_window.active = true
        if @item.scope == 4 || @item.scope == 6
          @target_window.index = -1
        else
          @target_window.index = 0
        end
      else
        if @item.common_event_id > 0
          $game_temp.common_event_id = @item.common_event_id
          $game_system.se_play(@item.menu_se)
          if @item.consumable
            $game_party.lose_item(@item.id, 1)
            @item_window.draw_item(@item_window.index)
          end
          $scene = Scene_Map.new
          return
        end
      end
      return
    end
  end
end



Instructions

here you'll see this in the config
module Config
Max_Items = x
Max_Gold = x
Max_Steps = x
Max_HP = x
Max_SP = x
Max_Strength = x
Max_Agility = x
Max_Dexterity = x
Max_Intelligence = x

x = the number you want the max to be for each configuration.

I Plan on doing this for the rest of the parameters as well.


Compatibility

Not compaible with anything that replaces these parts in the script
Spoiler: ShowHide
class Game_Party
  def gain_item(item_id, n)
    if item_id > 0
      @items[item_id] = [[item_number(item_id) + n, 0].max, Config::Max_Items].min
    end
  end
  def gain_gold(n)
    @gold = [[@gold + n, 0].max, Config::Max_Gold].min
  end
  def increase_steps
    @steps = [@steps + 1, Config::Max_Steps].min
  end
end
class Game_Actor
  def maxhp
    n = [[base_maxhp + @maxhp_plus, 1].max, Config::Max_HP].min
    for i in @states
      n *= $data_states[i].maxhp_rate / 100.0
    end
    n = [[Integer(n), 1].max, Config::Max_HP].min
    return n
  end
end
class Game_Battler
  def maxsp
    n = [[base_maxsp + @maxsp_plus, 0].max, Config::Max_SP].min
    for i in @states
      n *= $data_states[i].maxsp_rate / 100.0
    end
    n = [[Integer(n), 0].max, Config::Max_SP].min
    return n
  end
end


Go ahead and overwrite them but it won't be my fault when the script messes up or something goes wrong. I've been warned! :evil:

and do not overwrite the modded windows. If you overwrite them things will look wierd.

Must be below blizz's scripts. I realized tons overwrites some methods in it


Credits and Thanks


  • Enterbrain for making the default scripts
  • game_guy for modding the scripts
  • Fantasist for helping me understand the Window_Item more



Author's Notes

Make sure you don't overwrite these or else the game will make the numbers look wierd or the script might not work.

Starrodkirby86

Add a script in the Scripts section of the Script and I'll move this to the RMXP Script Database (Whew, that's a lot of "Script" in one).

I can't judge this yet since I'm too lazy to download the demo and the script isn't there, but from the looks of it, it's a much more convenient way to get your maximums up instead of editing manually. I noticed another person who made this script over in Creation Asylum and I hope this one is more optimized than his.

What's osu!? It's a rhythm game. Thought I should have a signature with a working rank. ;P It's now clickable!
Still Aqua's biggest fan (Or am I?).




G_G

Woops sorry I forgot to add that in there. :shy:


G_G

January 25, 2009, 01:42:44 am #4 Last Edit: January 25, 2009, 05:52:53 pm by game_guy
Thanks Reno glad you think its neat. Hope its put to good use.

EDIT: I'm done editing the other parameters.

There is now Strength, Agility, Intelligence, and Dexterity.

You can go above 999 but can't go above 999 in editor.

Reno-s--Joker

^^ No problem.
Hey, so does this work for enemies?
The editor's limitations are really annoying... D:

G_G

I do believe it is possible for enemies. You'd have to do some scripting though. Maybe check the manual. I'll do some research on it and get back to you.

anagura.raziel

first off, Sorry for the necro post.

I was wondering, would it be possible to set your maximum damage cap to 9,999 per attack (like in earlier final fantasy games)?

I'd also like certain skills/attacks to ignore the maximum limit, and to be able to switch the effects of this script on/off during the game with events.


I've been looking for something like this for the past couple of weeks. But I actually stumbled upon this while looking for an update of your achievements script (I dled it last year, lol). Anyway, I read that you've been unwell, so no pressure.

Get well soon!

G_G

I can do that, however I'll need to do it in a separate script.

anagura.raziel

Would that be an addon? or would you pretty much just rewrite the entire script? Either way, if it works, i'm happy.

Also, Being able to set enemies HP to 1 million would be pretty cool too. any chance of that?


G_G

Yea I can do that as well. I made a fix but forgot to update it. The Damage Cap seems like a script on its own.

anagura.raziel

August 11, 2010, 02:55:50 pm #11 Last Edit: August 11, 2010, 10:32:29 pm by anagura.raziel
Ah, excellent.

I'm looking foward to it. Will it be very complicated?


trying to think of a polite way to ask for a time-frame without putting pressure on, sorry about that.

Just seems like I've hit a stump with the project i'm working on so I've just been adding weapons, and items and collecting scripts for a few days, lol.

EDIT: I forgot to mention, do you think it could be compatible with Chaos Rage Limit System and Tons of Addons?

G_G

Its almost done actually and yes it'll be compatible with toa, basically any script.

element

Wait so if u insert max lvl editing you broke almoast every limit didn't you.
Except for variables and switches...

anagura.raziel


G_G


anagura.raziel

Thanks, works like a charm (so far, still need to mess around with it a bit, but I have faith)

Any plans for changing enemies max HP?

G_G

I'm gonna remake this, not happy with how sloppy it is. :S

anagura.raziel

Cool *waits anxiously*

I'll be checking back here every 3-4 days.

ShadowBlaze

So how do I change the max HP of enemies for Blizz ABS?
Results for being 100% left handed:

Things I know about you
1. Your reading my comment
2. Now your saying/thinking thats a stupid fact.
4. You didnt notice that i skipped 3.
5. Your checking it now.
6. Your smiling.
7. Your still reading my comment.
8. You know all you have read is true.
10. You didnt notice that i skipped 9.
11. Your checking it now.
12. You didnt notice there are only 10 facts