Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

A few script edits

Default script:
I need the terms EXP, PDEF, and MDEF removed from the game (but ONLY for the Actors). My game's actors do not gain EXP, nor do they have PDEF or MDEF, so their existence in the main menu cannot be. And that includes the numbers that appear next to them.
Also, EXP earned at the end of the battle also needs to be removed the victory window, but Money and Items should still show.
One more thing, I do not want Armor Slots to exist for any character except Actor 1 (the main character) and Actor 8.

Trickster's Advanced Battle Points Script:
Needs to be slightly editted so that their magic doesn't automatically restore after every battle.


Thank you!
 
This will only remove EXP, PDEF, and MDEF from status window (and battle victory window for EXP); actors will still have them (but I assume you don't increase them in any way).

Since you don't provide any script for request #1, I assume you're using default menu system.

Code:
class Window_Status < Window_Base
  def refresh
    self.contents.clear
    draw_actor_graphic(@actor, 40, 112)
    draw_actor_name(@actor, 4, 0)
    draw_actor_class(@actor, 4 + 144, 0)
    draw_actor_level(@actor, 96, 32)
    draw_actor_state(@actor, 96, 64)
    draw_actor_hp(@actor, 96, 112, 172)
    draw_actor_sp(@actor, 96, 144, 172)
    draw_actor_parameter(@actor, 96, 192, 0)
    draw_actor_parameter(@actor, 96, 224, 3)
    draw_actor_parameter(@actor, 96, 256, 4)
    draw_actor_parameter(@actor, 96, 304, 5)
    draw_actor_parameter(@actor, 96, 336, 6)
    self.contents.font.color = system_color
    self.contents.font.color = system_color
    self.contents.draw_text(320, 160, 96, 32, "equipment")
    draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208)
    draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256)
    draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304)
    draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352)
    draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400)
  end
end

class Window_BattleResult < Window_Base
  def refresh
    self.contents.clear
    x = 4
    self.contents.font.color = normal_color
    cx = contents.text_size(@gold.to_s).width
    self.contents.draw_text(x, 0, cx, 32, @gold.to_s)
    x += cx + 4
    self.contents.font.color = system_color
    self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)
    y = 32
    for item in @treasures
      draw_item_name(item, 4, y)
      y += 32
    end
  end
end

As for the armor slots, are 1 and 8 actor IDs or actor positions in party?
 
Exsharaen said:
As for the armor slots, are 1 and 8 actor IDs or actor positions in party?

Actor IDs. I'll test that script now, and edit this if it doesn't quite work.

EDIT: Works perfectly, except that the "E 0/10" on the front page of the main menu is still there. Other than that, EXP is gone. And so are PDEF and MDEF.
 
Need one more thing I forgot to ask you...

For actors other than 1 or 8, will Equip menu still work? If yes, how will it differ from actor ID 1 and 8? Maybe just one slots or nothing at all...

EDIT:
I assume actors than actor ID 1 and 8 will unable to access Equip menu. If it's not the case, tell me and I'll recode.

You can also add more actor IDs that will be allowed to access Equip menu. Delete my last script and replace with this:

Code:
ALLOWED_EQUIP_ACTOR_ID = [1, 8]

class Window_Status < Window_Base
  def refresh
    self.contents.clear
    draw_actor_graphic(@actor, 40, 112)
    draw_actor_name(@actor, 4, 0)
    draw_actor_class(@actor, 4 + 144, 0)
    draw_actor_level(@actor, 96, 32)
    draw_actor_state(@actor, 96, 64)
    draw_actor_hp(@actor, 96, 112, 172)
    draw_actor_sp(@actor, 96, 144, 172)
    draw_actor_parameter(@actor, 96, 192, 0)
    draw_actor_parameter(@actor, 96, 224, 3)
    draw_actor_parameter(@actor, 96, 256, 4)
    draw_actor_parameter(@actor, 96, 304, 5)
    draw_actor_parameter(@actor, 96, 336, 6)
    self.contents.font.color = system_color
    self.contents.font.color = system_color
    self.contents.draw_text(320, 160, 96, 32, "equipment")
    draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208)
    draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256)
    draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304)
    draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352)
    draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400)
  end
end

class Window_BattleResult < Window_Base
  def refresh
    self.contents.clear
    x = 4
    self.contents.font.color = normal_color
    cx = contents.text_size(@gold.to_s).width
    self.contents.draw_text(x, 0, cx, 32, @gold.to_s)
    x += cx + 4
    self.contents.font.color = system_color
    self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)
    y = 32
    for item in @treasures
      draw_item_name(item, 4, y)
      y += 32
    end
  end
end

class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  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_hp(actor, x + 236, y + 32)
      draw_actor_sp(actor, x + 236, y + 64)
    end
  end
end

class Scene_Menu
  #--------------------------------------------------------------------------
  # * Frame Update (when status window is active)
  #--------------------------------------------------------------------------
  def update_status
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Make command window active
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 1  # skill
        # If this actor's action limit is 2 or more
        if $game_party.actors[@status_window.index].restriction >= 2
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to skill screen
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        # Get actor ID
        actor_id = $game_party.actors[@status_window.index].id
        if ALLOWED_EQUIP_ACTOR_ID.include?(actor_id)
          # Play decision SE
          $game_system.se_play($data_system.decision_se)
          # Switch to equipment screen
          $scene = Scene_Equip.new(@status_window.index)
        else
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
        end
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to status screen
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end

class Scene_Equip
  #--------------------------------------------------------------------------
  # * Frame Update (when right window is active)
  #--------------------------------------------------------------------------
  def update_right
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to menu screen
      $scene = Scene_Menu.new(2)
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # If equipment is fixed
      if @actor.equip_fix?(@right_window.index)
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Play decision SE
      $game_system.se_play($data_system.decision_se)
      # Activate item window
      @right_window.active = false
      @item_window.active = true
      @item_window.index = 0
      return
    end
    # If R button was pressed
    if Input.trigger?(Input::R)
      # Play cursor SE
      $game_system.se_play($data_system.cursor_se)
      # To next actor
      begin
        @actor_index += 1
        @actor_index %= $game_party.actors.size
        actor_id = $game_party.actors[@actor_index].id
      end until ALLOWED_EQUIP_ACTOR_ID.include?(actor_id)
      # Switch to different equipment screen
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
    # If L button was pressed
    if Input.trigger?(Input::L)
      # Play cursor SE
      $game_system.se_play($data_system.cursor_se)
      # To previous actor
      begin
        @actor_index += $game_party.actors.size - 1
        @actor_index %= $game_party.actors.size
        actor_id = $game_party.actors[@actor_index].id
      end until ALLOWED_EQUIP_ACTOR_ID.include?(actor_id)
      # Switch to different equipment screen
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
  end
end

Should there be any errors or anything doesn't fit your need, tell me and I'll fix it.

Enjoy! ^_^
 
Ehh... I should've been more specific. Sorry.

All characters have access to the Equip menu, but only Actors 1 and 8 have Armor slots. Actors 2-7 only have one Weapon slot each.

Actually, now that I think about my storyline a little more clearly, it'd make more sense if Actor 8 DIDN'T have armor slots.

So, all characters have accessible weapon slots, but only actor 1 will have armor slots, WHICH, if it's not any trouble, could maybe be inaccessible (but still visible and changeable with events)?
 
I wouldn't know how to work that script if I tried. If I did, I wouldn't be making a topic in the Script Requests...

Besides, Exsharaen almost has this one complete. I'd rather not have had him go through all that work for nothing.

Also Exsharaen, just so you know, mine is a commercial game. I'll need your specific permission to use your script, and your real name for the credits.
 
use this:
to 1 or 8
Code:
$game_actors[ID].weapon_slots = [0]
$game_actors[ID].armor_slots = [1,2,3,4]
2-7
Code:
$game_actors[ID].weapon_slots = [0]
$game_actors[ID].armor_slots = [2,3,4]

of course with the Scipt
 
Hmmm... Guillaume777's can do that actually, but I have to edit his Status menu (the EXP will show again :)) and do some trick to enable/disable some slots by some means.

Since no extra slots are needed, I think I will omit Guillaume777's for now and do the script on my own. Let me describe one more time:

Actor 1 have ALL slots, with armor slots may be inaccessible (changable via event)
Others (including actor 8) ONLY HAVE weapon slot.

I misinterpret your first post in fact ^_^;

Of course you may use it. I'll PM my real name after the work is complete.
 
I hope this meets your needs, for that equipment problem. Delete my old script and replace with this one:

Code:
# Setting goes here
ACTOR_EQUIPMENT =
{
1 =>
  {
  :weapon => [true, true], # [have slot?, accessible?]
  :armor  => [true, false]
  },
2 =>
  {
  :weapon => [true, true],
  :armor  => [false, false]
  },
3 =>
  {
  :weapon => [true, true],
  :armor  => [false, false]
  },
4 =>
  {
  :weapon => [true, true],
  :armor  => [false, false]
  },
5 =>
  {
  :weapon => [true, true],
  :armor  => [false, false]
  },
6 =>
  {
  :weapon => [true, true],
  :armor  => [false, false]
  },
7 =>
  {
  :weapon => [true, true],
  :armor  => [false, false]
  },
8 =>
  {
  :weapon => [true, false],
  :armor  => [false, false]
  }
}

class Window_Status < Window_Base
  def refresh
    self.contents.clear
    draw_actor_graphic(@actor, 40, 112)
    draw_actor_name(@actor, 4, 0)
    draw_actor_class(@actor, 4 + 144, 0)
    draw_actor_level(@actor, 96, 32)
    draw_actor_state(@actor, 96, 64)
    draw_actor_hp(@actor, 96, 112, 172)
    draw_actor_sp(@actor, 96, 144, 172)
    draw_actor_parameter(@actor, 96, 192, 0)
    draw_actor_parameter(@actor, 96, 224, 3)
    draw_actor_parameter(@actor, 96, 256, 4)
    draw_actor_parameter(@actor, 96, 304, 5)
    draw_actor_parameter(@actor, 96, 336, 6)
    self.contents.font.color = system_color
    self.contents.font.color = system_color
    self.contents.draw_text(320, 160, 96, 32, "equipment")
    draw_item_name($data_weapons[@actor.weapon_id], 320 + 16, 208)
    # have armor slot?
    if ACTOR_EQUIPMENT[@actor.id][:armor][0]
      draw_item_name($data_armors[@actor.armor1_id], 320 + 16, 256)
      draw_item_name($data_armors[@actor.armor2_id], 320 + 16, 304)
      draw_item_name($data_armors[@actor.armor3_id], 320 + 16, 352)
      draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400)
    end
  end
end

class Window_BattleResult < Window_Base
  def refresh
    self.contents.clear
    x = 4
    self.contents.font.color = normal_color
    cx = contents.text_size(@gold.to_s).width
    self.contents.draw_text(x, 0, cx, 32, @gold.to_s)
    x += cx + 4
    self.contents.font.color = system_color
    self.contents.draw_text(x, 0, 128, 32, $data_system.words.gold)
    y = 32
    for item in @treasures
      draw_item_name(item, 4, y)
      y += 32
    end
  end
end

class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  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_hp(actor, x + 236, y + 32)
      draw_actor_sp(actor, x + 236, y + 64)
    end
  end
end

# EDITS FOR EQUIPMENT FIX

class Window_Base
  #--------------------------------------------------------------------------
  # * Draw Item Name
  #     item : item
  #     x    : draw spot x-coordinate
  #     y    : draw spot y-coordinate
  # NEW color: text color (default: normal_color
  #--------------------------------------------------------------------------
  def draw_item_name(item, x, y, color = normal_color)
    if item == nil
      return
    end
    bitmap = RPG::Cache.icon(item.icon_name)
    self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
    self.contents.font.color = color
    self.contents.draw_text(x + 28, y, 212, 32, item.name)
  end
end

class Window_EquipRight < Window_Selectable
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @data = []
    @data.push($data_weapons[@actor.weapon_id])
    self.contents.font.color = system_color
    self.contents.draw_text(4, 32 * 0, 92, 32, $data_system.words.weapon)
    color = (ACTOR_EQUIPMENT[@actor.id][:weapon][1]) ? normal_color : disabled_color
    draw_item_name(@data[0], 92, 32 * 0, color)
    # have armor slots?
    if ACTOR_EQUIPMENT[@actor.id][:armor][0]
      @data.push($data_armors[@actor.armor1_id])
      @data.push($data_armors[@actor.armor2_id])
      @data.push($data_armors[@actor.armor3_id])
      @data.push($data_armors[@actor.armor4_id])
      self.contents.font.color = system_color
      self.contents.draw_text(4, 32 * 1, 92, 32, $data_system.words.armor1)
      self.contents.draw_text(4, 32 * 2, 92, 32, $data_system.words.armor2)
      self.contents.draw_text(4, 32 * 3, 92, 32, $data_system.words.armor3)
      self.contents.draw_text(5, 32 * 4, 92, 32, $data_system.words.armor4)
      # accessible?
      color = (ACTOR_EQUIPMENT[@actor.id][:armor][1]) ? normal_color : disabled_color
      draw_item_name(@data[1], 92, 32 * 1, color)
      draw_item_name(@data[2], 92, 32 * 2, color)
      draw_item_name(@data[3], 92, 32 * 3, color)
      draw_item_name(@data[4], 92, 32 * 4, color)
    end
    @item_max = @data.size
  end
end

class Scene_Equip
  #--------------------------------------------------------------------------
  # * Frame Update (when right window is active)
  #--------------------------------------------------------------------------
  def update_right
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to menu screen
      $scene = Scene_Menu.new(2)
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # selecting which slot?
      case @right_window.index
      when 0 # weapon
        # accessible?
        unless ACTOR_EQUIPMENT[@actor.id][:weapon][1]
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
      else # always armor
        # accessible?
        unless ACTOR_EQUIPMENT[@actor.id][:armor][1]
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
      end
      # If equipment is fixed
      if @actor.equip_fix?(@right_window.index)
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Play decision SE
      $game_system.se_play($data_system.decision_se)
      # Activate item window
      @right_window.active = false
      @item_window.active = true
      @item_window.index = 0
      return
    end
    # If R button was pressed
    if Input.trigger?(Input::R)
      # Play cursor SE
      $game_system.se_play($data_system.cursor_se)
      # To next actor
      @actor_index += 1
      @actor_index %= $game_party.actors.size
      # Reset right window index to 0
      @right_window.index = 0
      # Switch to different equipment screen
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
    # If L button was pressed
    if Input.trigger?(Input::L)
      # Play cursor SE
      $game_system.se_play($data_system.cursor_se)
      # To previous actor
      @actor_index += $game_party.actors.size - 1
      @actor_index %= $game_party.actors.size
      # Reset right window index to 0
      @right_window.index = 0
      # Switch to different equipment screen
      $scene = Scene_Equip.new(@actor_index, @right_window.index)
      return
    end
  end
end

Settings should not necessarily be changed, however you may change it if you wish so.

It's an interesting idea I think. Could I have a free version of your game (a demo maybe)?
 
Okay. The removal of EXP, PDEF, and MDEF was successful. But I still need the edit for Trickster's ABP script. It just needs to be edited so that characters' don't regain all their SP after battle.
 
BUMP.

I still need the edit to Trickster's ABP script. Oh, and Trickster, if you're reading this, I need your documented legal permission to use the script. Mine is a commercial game, so I really don't want to risk being sued.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top