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.

Taking Scripting Requests

Enough Scripts requests for now. I wil delete this once I am ready for more.

I am trying to practice scripting, so I thought I would lend my begginer scripting skills to the community :P Like I said, I am still a begginer scripter, so please don't requests anything too hard :P

What I can do:
Windows, selectable options, custom menus, probably some other things too, but just havn't scripted too many things.

Current Requests:
Creston's CMS

Finished Requests:
Genji's Script
 

Rare

Member

I need a CMS with the following:

-The battlers of the 2 main characters on the front
-An options command
-Possiblly avatars (faces) being able to be shown in some menus
-Location name
-Neat and tidy, with maybe some animations?

Thanks if you decide to do it!! ^^'
 
If i can ask it to you too (i made a request for it, but better make it know to much more people as possible), i'm looking for an anti-lag script that has little to do with the near fantastica one: i need something that slows up the updating frequence of events, that is too fast, because the system checks the events too frequently, and with lots of events it causes lag (i think u got the point now, right?).
I really don't know if this is something really advanced or simple, cause people in thread just answer "it's a stupid idea, there is the near fantastica script that is much better etc etc..." noone still told me if there is a way to do it or not, if it's difficult or not...
So, let me know if it's too hard or if u can do it ^^.
Thanks.
 

Genji

Member

If you can, I would like an option in a certain CMS I'm using. I will post the script for it, since you might need it. I want an option on the menu called "Cards". It should be like the default Inventory window. Like when I retreive a certain "card" item, it adds it to the Card menu. Thanks.

Code:
#===========================================================================
#  Custom Menu Script for kaze950
#  Created my MeisMe
#  Credit to: ccoa - Icon Status
#---------------------------------------------------------------------------
#  INSTRUCTIONS
#  1) Inset this script into a new section above 'Main'
#  2) Change both $scene = Scene_Menu.new(5) in Scene End to 
#     $scene = Scene_Menu.new(4)
#  3) Change the variables in the Game_System class to what you need.
#  4) Enjoy!
#===========================================================================


#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
#  This class handles data surrounding the system. Backround music, etc.
#  is managed here as well. Refer to "$game_system" for the instance of 
#  this class.
#==============================================================================

class Game_System
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :menu_help
  #--------------------------------------------------------------------------
  # * Object Aliasing
  #--------------------------------------------------------------------------
  alias old_initialize initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    old_initialize
    s1 = 'Use regular items.'
    s2 = 'Use character skills'
    s3 = 'Change character equipment.'
    s4 = 'View character status.'
    s5 = 'Quit the game.'
    @menu_help = [s1, s2, s3, s4, s5]
  end
end


#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles the actor. It's used within the Game_Actors class
#  ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================

class Game_Actor
  #--------------------------------------------------------------------------
  # * Get the current EXP
  #--------------------------------------------------------------------------
  def now_exp
    return @exp - @exp_list[@level]
  end
  #--------------------------------------------------------------------------
  # * Get the next level's EXP
  #--------------------------------------------------------------------------
  def next_exp
    return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  end
end

#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This class is for all in-game windows.
#==============================================================================

class Window_Base
  def make_battler_state_images(battler)
    images = []
    for i in battler.states
      images.push(RPG::Cache.icon($data_states[i].name))
    end
    return images
  end
  def draw_actor_state(actor, x, y, width = 120)
    images = make_battler_state_images(actor)
    for i in 0...images.length
      rect = Rect.new(x + (i * 26), y, self.width - 32, 24)
      self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
      self.contents.blt(x + (i * 26), y, images[i], Rect.new(0, 0, 24, 24), 255)
    end
  end
end


#==============================================================================
# ** Window_PlayTime
#------------------------------------------------------------------------------
#  This window displays play time on the menu screen.
#==============================================================================

class Window_PlayTime
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, "T")
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 0, 120, 32, text, 2)
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end


#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
#  This window displays party member status on the menu screen.
#==============================================================================

class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 64, 480, 416)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = 68
      y = i * 96
      actor = $game_party.actors[i]
      bitmap = RPG::Cache.picture(actor.name)
      opacity = actor.state?(1) ? 160 : 255
      self.contents.blt(x - 64, y + 16, bitmap, Rect.new(0, 0, 64, 64), opacity)
      x = 78
      draw_actor_name(actor, x, y)
      draw_actor_level(actor, x + 144, y)
      draw_actor_state(actor, x + 144, y + 32)
      draw_actor_exp(actor, x + 144, y + 64)
      draw_actor_hp(actor, x, y + 32)
      draw_actor_sp(actor, x, y + 64)
    end
  end
  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, @index * 96, self.width - 32, 96)
    end
  end
end


#==============================================================================
# ** Window_Help2
#------------------------------------------------------------------------------
#  This window is a copy of Window_Help
#==============================================================================

class Window_Help2 < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 320, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
  end
  #--------------------------------------------------------------------------
  # * Set Text
  #  text  : text string displayed in window
  #  align : alignment (0..flush left, 1..center, 2..flush right)
  #--------------------------------------------------------------------------
  def set_text(text, align = 0)
    # If at least one part of text and alignment differ from last time
    if text != @text or align != @align
      # Redraw text
      self.contents.clear
      self.contents.font.color = normal_color
      self.contents.draw_text(4, 0, 280, 32, text, align)
      @text = text
      @align = align
    end
    self.visible = true
  end
end


#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs menu screen processing.
#==============================================================================

class Scene_Menu
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "End Game"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5])
    @command_window.index = @menu_index
    # If number of party members is 0
    if $game_party.actors.size == 0
      # Disable items, skills, equipment, and status
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
    end
    # If save is forbidden
    if $game_system.save_disabled
      # Disable save
      @command_window.disable_item(4)
    end
    @command_window.x = 480
    @command_window.y = 64
    # Make play time window
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 320
    @playtime_window.y = 0
    # Make gold window
    @gold_window = Window_Gold.new
    @gold_window.x = 480
    @gold_window.y = 0
    # Make status window
    @status_window = Window_MenuStatus.new
    @status_window.x = 0
    @status_window.y = 64
    @help_window = Window_Help2.new
    update_help
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @playtime_window.dispose
    @gold_window.dispose
    @status_window.dispose
    @help_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @playtime_window.update
    @gold_window.update
    @status_window.update
    @help_window.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
      update_help
      return
    end
    # If status window is active: call update_status
    if @status_window.active
      update_status
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # If command other than save or end game, and party members = 0
      if $game_party.actors.size == 0 and @command_window.index < 5
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Branch by command window cursor position
      case @command_window.index
      when 0  # item
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to item screen
        $scene = Scene_Item.new
      when 1  # skill
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4  # end game
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        $scene = Scene_End.new
      end
      return
    end
  end
  def update_help
    @help_window.set_text($game_system.menu_help[@command_window.index])
  end
end
 
Forget my request, i just discovered that frame rate is 20 fps.
Slowing it down would make the difference visible.
The script would be more a damage that an advantage.
Good luck for your scripting.
 

SFox

Member

I would like a script that allows this, but only if it is not to hard for you. What I want to happen is when the main character gets into a normal battle, and her health gets bellow 10%, (Even if her health gets to 0), she automatically shifts into her dragon form. When she wins the battle, she automatically reverts back to her human form, until she gets training. (Which is activated by a switch), then she is able to convert into her dragon form whenever she wants to, (Even in battle), without automaticaly shifting into her dragon form. (I am using RPT's for the girl and the dragon)
 
Sorry to say this, but I have been very busy lately and out quite a lot. I will be able to start working on these requests on saturday. I plan to get 2 done on that day and work on the rest the next day.
 
Erm, if you have time, I'd like a system where if you push a certain button a Ring Menu comes up. However there are four options. All of them are Question Marks to begin with, but when I flip certain switches I want them to change to different characters. When the player would select one of the characters, they would change into that character. A kind of Switch Lead Ring thing..
 

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