Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> 


———
Before you ask! Read! ;)

You must have 30+ Posts to create a topic here!

Thanks for reading!
———

 
Reply to this topicStart new topic
> A Social Menu, Somewhat like Persona 3's.
Yuu-Mon Musuedo
post Feb 16 2012, 09:52 AM
Post #1


Gimmie [̲̅$̲̅(̲̅20̲̅)̲̅$̲̅]...
Group Icon

Group: Revolutionary
Posts: 166
Type: Artist
RM Skill: Skilled




I need a little help with this one. I want to make a "Social Network System" in my game using the Control Variables to show how many friends you gained, your charm and fatigue level, etc. It's kind of like Persona 3's one. The left side it shows the stats, and the right it shows the main hero.

I can make how the menu would look like myself, I just need someone who can make a menu where I can press a key of my choice to take you to the menu, and place the numbers in the right area like the screen below. The menu should have a background that can move as well, and pressing the ESC key takes you out. Like a second main menu where all you can do is look at your status. OR if somehow amazingly if you can make another option in Moghunter's main menu and place the menu there, I would be grateful, but it's optional.


This is something that might help you get the idea on how I want it.


This is how I want it to look like.


Thank you in advance, and I will answer questions if needed.


__________________________

The Huhja High School martial arts club's captain, known as one of the strongest martial artist captains has passed away last year. Prove of his death, and rumors about the ordinary club members leaving had surfaced to the other schools that are in rivalry to them. They begun taking up the Huhja's turfs and claiming to take over the school next.

The Huhja's martial arts club has now disbanded after a crushing defeat at their turfs.The school's morale quickly started disappearing... Till an quiet first year girl joins the school. This young, quiet, small girl may look weak and helpless, but her martial art style is unseen. With her help, Huhja High must revive the club, gain new allies, discover hidden fighting arts, restore the school's morale, take back their turfs, and defeat their powerful rivals.

A game inspired by: Ranma 1/2, Persona, and Slice-of-Life Animes.
Go to the top of the page
 
+Quote Post
   
Night_Runner
post Feb 18 2012, 04:22 AM
Post #2


Level 50
Group Icon

Group: +Gold Member
Posts: 1,529
Type: Scripter
RM Skill: Undisclosed




I've had a shot at this, 2 small problems I need to ask you about:

If you have a shot at the demo, you'll notice that I haven't rounded the corners of the Charm, Fatigue, etc menu, is that okay, or would you rather have them rounded?

And with the fullscreen image of the actor, would you like to supply that image separately, or did you just plan on using a zoomed battler image, I've I've used in the demo below?
If you're using a separate image, what filenaming convention are you using, for example 001_fullscreen.png for actor 1's fullscreen image? And would this be supplied with the hue/shadow?

Otherwise take a look smile.gif
Demo


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
Yuu-Mon Musuedo
post Feb 18 2012, 08:03 AM
Post #3


Gimmie [̲̅$̲̅(̲̅20̲̅)̲̅$̲̅]...
Group Icon

Group: Revolutionary
Posts: 166
Type: Artist
RM Skill: Skilled




Thanks! Sadly I can't seem to look at the demo because there is nothing there. 0 bytes size, a empty file. As for the image, it was plan just to be one image. I can't look on how the zoom in battler image is, but I do use Custom Battle System (CTB) by Charlie Fleed so I don't know if the battler show up in mult-sprite animation.

If separate, the naming would be for the actor: "Everylse_Social.png" The menu screen: "Social_Menu.png" Hope that helps.

This post has been edited by Yuu-Mon Musuedo: Feb 19 2012, 05:11 PM


__________________________

The Huhja High School martial arts club's captain, known as one of the strongest martial artist captains has passed away last year. Prove of his death, and rumors about the ordinary club members leaving had surfaced to the other schools that are in rivalry to them. They begun taking up the Huhja's turfs and claiming to take over the school next.

The Huhja's martial arts club has now disbanded after a crushing defeat at their turfs.The school's morale quickly started disappearing... Till an quiet first year girl joins the school. This young, quiet, small girl may look weak and helpless, but her martial art style is unseen. With her help, Huhja High must revive the club, gain new allies, discover hidden fighting arts, restore the school's morale, take back their turfs, and defeat their powerful rivals.

A game inspired by: Ranma 1/2, Persona, and Slice-of-Life Animes.
Go to the top of the page
 
+Quote Post
   
Yuu-Mon Musuedo
post Mar 12 2012, 04:48 PM
Post #4


Gimmie [̲̅$̲̅(̲̅20̲̅)̲̅$̲̅]...
Group Icon

Group: Revolutionary
Posts: 166
Type: Artist
RM Skill: Skilled




Anyone might be able to try this one or found something like this?


__________________________

The Huhja High School martial arts club's captain, known as one of the strongest martial artist captains has passed away last year. Prove of his death, and rumors about the ordinary club members leaving had surfaced to the other schools that are in rivalry to them. They begun taking up the Huhja's turfs and claiming to take over the school next.

The Huhja's martial arts club has now disbanded after a crushing defeat at their turfs.The school's morale quickly started disappearing... Till an quiet first year girl joins the school. This young, quiet, small girl may look weak and helpless, but her martial art style is unseen. With her help, Huhja High must revive the club, gain new allies, discover hidden fighting arts, restore the school's morale, take back their turfs, and defeat their powerful rivals.

A game inspired by: Ranma 1/2, Persona, and Slice-of-Life Animes.
Go to the top of the page
 
+Quote Post
   
Night_Runner
post Mar 14 2012, 03:56 AM
Post #5


Level 50
Group Icon

Group: +Gold Member
Posts: 1,529
Type: Scripter
RM Skill: Undisclosed




Okey dokey, I've started again, and this time I'll upload the code!

images

This is the windowskin I've been using, you can maek it lighter with harder edges if you like:
http://i.1dl.us/tfA.png
Just make sure it's in the Graphics/Windowskins folder, and it should be called "Windowskin - PZE - System.png", or you can rename it on line 10 to whatever you like happy.gif


And this is the edited Mn_lay.png found in the Pictures folder
http://i.1dl.us/tfB.png


code

Code 1: Inserting an extra option into the menu
CODE
#==============================================================================
# ** Window_Command
#------------------------------------------------------------------------------
#  Edited to allow the user to add a command
#==============================================================================

class Window_Command
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader   :commands
  #--------------------------------------------------------------------------
  # * Add Command
  #--------------------------------------------------------------------------
  def add_command(command_name)
    @commands << command_name.to_s
    @item_max = @commands.size
    self.contents.dispose if self.contents.is_a?(Bitmap)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    # Add a check that this is the window to fake the index for
    @nr_P3Menu_fake_index = true if @commands.include?('p3Menu')
  end
end



#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  Edited to have an exrta option in the menu
#==============================================================================

class Scene_Menu
  #--------------------------------------------------------------------------
  # * Alias Methods
  #--------------------------------------------------------------------------
  alias nr_p3Menu_intiailize  initialize  unless $@
  alias nr_p3Menu_update      update      unless $@
  #--------------------------------------------------------------------------
  # * Class Variables
  #--------------------------------------------------------------------------
  @@last_index = 0
  #--------------------------------------------------------------------------
  # Object Initialization
  #--------------------------------------------------------------------------
  def initialize(*args)
    # Run the original initialize
    nr_p3Menu_intiailize(*args)
    # Set the index from the last time this menu was opened
    @menu_index = @@last_index
  end
  #--------------------------------------------------------------------------
  # * Update Cursor Position
  #--------------------------------------------------------------------------
  def cursor_position_update
    @cursor_y = 100 + 206 * @command_window.index / 6 + 20
    @cursor_x = 50 + (3 - (3 - @command_window.index).abs) * 15 - 68  
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update(*args)
    # Add the extra command if necessary
    if not @command_window.commands.include?('p3Menu')
      @command_window.add_command('p3Menu')
    end
    # Run the orginal update
    nr_p3Menu_update(*args)
    # Save the last index
    @@last_index = @command_window.index
  end
  #--------------------------------------------------------------------------
  # * Update Command
  #--------------------------------------------------------------------------
  def update_command
    cursor_position_update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
    if Input.trigger?(Input::C)
      if $game_party.actors.size == 0 and @command_window.index < 4
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      case @command_window.index
      when 0
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Item.new
      when 1
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_SocialMenu.new
      when 5
        if $game_system.save_disabled
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Save.new
      when 6
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_End.new
      end
    return
    end
  end
end

#==============================================================================
# ** End of Script.
#==============================================================================


Code 2: Half working Scene_SocialMenu
CODE
class Window_P3 < Window_Base
  Window_Speed = 10
  Opacity_Speed = 10
  attr_reader   :finished_movement
  def initialize(x, y, width, height)
    @original_x = x
    @original_y = y
    @d_opacity = Opacity_Speed
    super
    self.windowskin = RPG::Cache.windowskin("Windowskin - PZE - System")
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = 0
    @finished_movement = false
    refresh
  end
  def update
    super
    return if @finished_movement
    dx = @desired_x - self.x
    dy = @desired_y - self.y
    self.x += (dx + Window_Speed - 1) / Window_Speed
    self.y += (dy + Window_Speed - 1) / Window_Speed
    self.opacity += @d_opacity
    if !(self.opacity.between?(1, 244)) and @desired_x == self.x and @desired_y == self.y
      @finished_movement = true
    end
  end
  def return_to_start
    @desired_x = @original_x
    @desired_y = @original_y
    @d_opacity = -Opacity_Speed
    @finished_movement = false
  end
end

class Window_P3Title < Window_P3
  Title_Text = 'Social Network'
  Title_Font_Increase = 10
  def initialize
    super(-640, -16, 672, 96)
    @desired_x = -16
    @desired_y = self.y
  end
  def refresh
    self.contents.clear
    self.contents.font.size += Title_Font_Increase
    t_width = self.contents.width
    t_height = self.contents.height
    t = Title_Text
    self.contents.draw_text(64, 0, t_width - 64, t_height, t)
    self.contents.font.size -= Title_Font_Increase
  end
end

class Window_P3Stats < Window_P3
  Stats = {"Charm" => 1,
           "Fatigue" => 2,
           "Scholarship" => 3,
           "Art"         => 4,
           "Courage"     => 5,
          }
  Friends = {"Number of Friends" => 6}
  Stats_Text_DY = 24
  Stats_Font_Size = Stats_Text_DY * 22 / 32 + 4
  def initialize
    super(-640, 86, 340, 340)
    @desired_x = 10
    @desired_y = self.y
  end
  def refresh
    self.contents.font.size = Stats_Font_Size
    # Initializa the y for the stats
    y = 0
    for stat in Stats.keys
      # Draw the stat name
      self.contents.draw_text(0, y, width - 32, Stats_Text_DY, stat.to_s)
      y += Stats_Text_DY
      # Draw the value
      value = $game_variables[Stats[stat].to_i].to_i
      value_text = "[%03d/%03d]" % [value, 100]
      self.contents.draw_text(10, y, width - 32, Stats_Text_DY, value_text)
      y += Stats_Text_DY
    end
    # Draw the friends section
    y = self.contents.height - Stats_Text_DY
    stat_text = Friends.keys[0].to_s + ": "
    value = $game_variables[Friends.values[0].to_i].to_i
    value_text = "[%03d/%03d]" % [value, 100]
    text = stat_text + value_text
    self.contents.draw_text(0, y, width - 32, Stats_Text_DY, text)
  end
end

class Window_P3Base < Window_P3
  def initialize
    super(640, 480 - 64 + 16, 672, 64)
    @desired_x = -16
    @desired_y = self.y
  end
  def refresh
    self.contents.clear
  end
end

class Scene_SocialMenu
  def main
    # Create the backdrop & windows
    create_background
    create_windows
    # Execute transition
    if MOG::MENU_BACKGROUND == 0
      Graphics.transition(MOG::MNTT, "Graphics/Transitions/" + MOG::MNTP)
    else
      Graphics.transition  
    end
    # 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
    return_window_to_start
    # Prepare for transition
    Graphics.freeze
    # Dispose of window
    dispose_background
    dispose_windows
  end
  
  def create_background
    if MOG::MENU_BACKGROUND == 0
      @mnback = Plane.new
      @mnback.bitmap = RPG::Cache.picture("Mn_back")
      @mnback.blend_type = 0
      @mnback.z = 5
      @mnback2 = Plane.new
      @mnback2.bitmap = RPG::Cache.picture("Mn_back")
      @mnback2.blend_type = 0
      @mnback2.z = 5
      @mnback2.opacity = 60
    else
      @spriteset = Spriteset_Map.new
    end
  end
  
  def create_windows
    dispose_windows if @windows.is_a?(Array)
    @windows = []
    @windows << Window_P3Title.new
    @windows << Window_P3Stats.new
    @windows << Window_P3Base.new
  end
  
  def update
    # Update the background and windows
    windows_slide_update
    @windows.each { |window| window.update}
    # If a button is triggered, play the se and return to the menu
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new
    elsif Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      $scene = Scene_Menu.new
    end
  end
  #--------------------------------------------------------------------------
  # Windows_slide_update
  #--------------------------------------------------------------------------
  def windows_slide_update
    if MOG::MENU_BACKGROUND == 0
       @mnback.oy += 1
       @mnback.ox += 1
       @mnback2.oy += 1
       @mnback2.ox -= 1
    end
  end
  
  def return_window_to_start
    @windows.each { |window| window.return_to_start }
    loop do
      finished_movement = true
      Graphics.update
      for window in @windows
        window.update
        finished_movement = false if window.opacity > 0
      end
      windows_slide_update
      break if finished_movement == true
    end
  end
  
  def dispose_background
    if MOG::MENU_BACKGROUND == 0
       @mnback.dispose
       @mnback.dispose
       @mnback2.dispose
       @mnback2.dispose
     else
       @spriteset.dispose
    end
  end
  
  def dispose_windows
    @windows.each { |window| window.dispose }
    @windows = nil
  end
end


Sorry for taking so long, but that's the start, I should be able to get the rest done tomorrow night!


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
Yuu-Mon Musuedo
post Mar 14 2012, 05:08 AM
Post #6


Gimmie [̲̅$̲̅(̲̅20̲̅)̲̅$̲̅]...
Group Icon

Group: Revolutionary
Posts: 166
Type: Artist
RM Skill: Skilled




Nice! But where do I place it at? Do I add it to the current script or put it in a new row? I don't want to mess this up.


__________________________

The Huhja High School martial arts club's captain, known as one of the strongest martial artist captains has passed away last year. Prove of his death, and rumors about the ordinary club members leaving had surfaced to the other schools that are in rivalry to them. They begun taking up the Huhja's turfs and claiming to take over the school next.

The Huhja's martial arts club has now disbanded after a crushing defeat at their turfs.The school's morale quickly started disappearing... Till an quiet first year girl joins the school. This young, quiet, small girl may look weak and helpless, but her martial art style is unseen. With her help, Huhja High must revive the club, gain new allies, discover hidden fighting arts, restore the school's morale, take back their turfs, and defeat their powerful rivals.

A game inspired by: Ranma 1/2, Persona, and Slice-of-Life Animes.
Go to the top of the page
 
+Quote Post
   
Night_Runner
post Mar 15 2012, 01:08 PM
Post #7


Level 50
Group Icon

Group: +Gold Member
Posts: 1,529
Type: Scripter
RM Skill: Undisclosed




On my version I have a new row for each of the two scripts, and that works fine smile.gif

All I had left was the picture of your actor, do you mind if I grab a copy of the image you plan on using for the actor along the right hand side?


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
Yuu-Mon Musuedo
post Mar 15 2012, 02:56 PM
Post #8


Gimmie [̲̅$̲̅(̲̅20̲̅)̲̅$̲̅]...
Group Icon

Group: Revolutionary
Posts: 166
Type: Artist
RM Skill: Skilled




Will these do?

Normal

2x Size

Idea Position



__________________________

The Huhja High School martial arts club's captain, known as one of the strongest martial artist captains has passed away last year. Prove of his death, and rumors about the ordinary club members leaving had surfaced to the other schools that are in rivalry to them. They begun taking up the Huhja's turfs and claiming to take over the school next.

The Huhja's martial arts club has now disbanded after a crushing defeat at their turfs.The school's morale quickly started disappearing... Till an quiet first year girl joins the school. This young, quiet, small girl may look weak and helpless, but her martial art style is unseen. With her help, Huhja High must revive the club, gain new allies, discover hidden fighting arts, restore the school's morale, take back their turfs, and defeat their powerful rivals.

A game inspired by: Ranma 1/2, Persona, and Slice-of-Life Animes.
Go to the top of the page
 
+Quote Post
   
Night_Runner
post Mar 18 2012, 05:59 AM
Post #9


Level 50
Group Icon

Group: +Gold Member
Posts: 1,529
Type: Scripter
RM Skill: Undisclosed




CODE
#==============================================================================
# ** XP: Night_Runner's Social Scene in MOD's Scene Menu script.
#------------------------------------------------------------------------------
# History:
#  Date Created: 19/Mar/2012
#  Created for: Yuu-Mon Musuedo
#   @> http://www.rpgrevolution.com/forums/index.php?showtopic=55386
#
# Description:
#  This script adds a social menu option to MOG's Scene_Menu, and contains
#  the details for the scene's functioning.
#
# How to Install:
#  Copy this entire script. In your game editor select Tools >> Script
#  Editor. Along the left scroll to the bottom, right click on 'Main' and
#  select 'Insert'. Paste this code on the right.
#
# Customisation:
#  See below on between lines 28 - 55.
#==============================================================================



#==============================================================================
# ** Customisation
#==============================================================================

module NR_P3_Menu
  #--------------------------------------------------------------------------
  # * Window Generics
  #--------------------------------------------------------------------------
  Window_Speed = 10                            # How slow to move the windows
  Opacity_Speed = 10          # Increase by 10 per frame (solid image is 255)
  #--------------------------------------------------------------------------
  # * Character Window
  #--------------------------------------------------------------------------
  Character_Picture_Name = "Everlyse_Social"             # Graphics/Pictures/
  #--------------------------------------------------------------------------
  # * Title Window
  #--------------------------------------------------------------------------
  Title_Text = 'Social Network'            # The text at the top of the scene
  Title_Font_Increase = 10             # Increases the font size by 10 pixels
  #--------------------------------------------------------------------------
  # * Stats Window
  #--------------------------------------------------------------------------
  Stats = {"Charm" => 1,                          # Charm looks in variable 1
           "Fatigue" => 2,                      # Fatigue looks in variable 2
           "Scholarship" => 3,              # Scholarship looks in variable 3
           "Art"         => 4,                      # Art looks in variable 4
           "Courage"     => 5,                  # Courage looks in variable 5
          }
  Friends = {"Number of Friends" => 6}   # No. of Friends looks in variable 6
  Stats_Text_DY = 24                            # Width between lines of text
  Stats_Font_Size = Stats_Text_DY * 22 / 32 + 4                   # Font size
end



#==============================================================================
# ** Window_Command
#------------------------------------------------------------------------------
#  Edited to allow the user to add a command
#==============================================================================

class Window_Command
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader   :commands
  #--------------------------------------------------------------------------
  # * Add Command
  #--------------------------------------------------------------------------
  def add_command(command_name)
    @commands << command_name.to_s
    @item_max = @commands.size
    self.contents.dispose if self.contents.is_a?(Bitmap)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    # Add a check that this is the window to fake the index for
    @nr_P3Menu_fake_index = true if @commands.include?('p3Menu')
  end
end



#==============================================================================
# ** Window_P3
#------------------------------------------------------------------------------
#  This window class contains the windowskin and movement functions.
#==============================================================================

class Window_P3 < Window_Base
  #--------------------------------------------------------------------------
  # * Included Modules
  #--------------------------------------------------------------------------
  include NR_P3_Menu
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader   :finished_movement
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  def initialize(x, y, width, height)
    @original_x = x
    @original_y = y
    @d_opacity = Opacity_Speed
    super
    self.windowskin = RPG::Cache.windowskin("Windowskin - PZE - System")
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = 0
    @finished_movement = false
    refresh
  end
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  def update
    super
    return if @finished_movement
    dx = @desired_x - self.x
    dy = @desired_y - self.y
    self.x += (dx + Window_Speed - 1) / Window_Speed
    self.y += (dy + Window_Speed - 1) / Window_Speed
    self.opacity += @d_opacity
    if !(self.opacity.between?(1, 244)) and @desired_x == self.x and @desired_y == self.y
      @finished_movement = true
    end
  end
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  def return_to_start
    @desired_x = @original_x
    @desired_y = @original_y
    @d_opacity = -Opacity_Speed
    @finished_movement = false
  end
end



#==============================================================================
# ** Window_P3Title
#------------------------------------------------------------------------------
#  This window displays the title information in the social menu.
#==============================================================================

class Window_P3Title < Window_P3
  #--------------------------------------------------------------------------
  # * Included Modules
  #--------------------------------------------------------------------------
  include NR_P3_Menu
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  def initialize
    super(-640, -16, 672, 96)
    @desired_x = -16
    @desired_y = self.y
  end
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.size += Title_Font_Increase
    t_width = self.contents.width
    t_height = self.contents.height
    t = Title_Text
    self.contents.draw_text(64, 0, t_width - 64, t_height, t)
    self.contents.font.size -= Title_Font_Increase
  end
end



#==============================================================================
# ** Window_P3Stats
#------------------------------------------------------------------------------
#  This window displays the stats in the social menu.
#==============================================================================

class Window_P3Stats < Window_P3
  #--------------------------------------------------------------------------
  # * Included Modules
  #--------------------------------------------------------------------------
  include NR_P3_Menu
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(-640, 86, 340, 340)
    @desired_x = 10
    @desired_y = self.y
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.font.size = Stats_Font_Size
    # Initialize the y for the stats
    y = 0
    for stat in Stats.keys
      # Draw the stat name
      self.contents.draw_text(0, y, width - 32, Stats_Text_DY, stat.to_s)
      y += Stats_Text_DY
      # Draw the value
      value = $game_variables[Stats[stat].to_i].to_i
      value_text = "[%03d/%03d]" % [value, 100]
      self.contents.draw_text(10, y, width - 32, Stats_Text_DY, value_text)
      y += Stats_Text_DY
    end
    # Draw the friends section
    y = self.contents.height - Stats_Text_DY
    stat_text = Friends.keys[0].to_s + ": "
    value = $game_variables[Friends.values[0].to_i].to_i
    value_text = "[%03d/%03d]" % [value, 100]
    text = stat_text + value_text
    self.contents.draw_text(0, y, width - 32, Stats_Text_DY, text)
  end
end



#==============================================================================
# ** Window_P3Base
#------------------------------------------------------------------------------
#  This window displays along the bottom of the scene, it contains no text
#==============================================================================

class Window_P3Base < Window_P3
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(640, 480 - 64 + 16, 672, 64)
    @desired_x = -16
    @desired_y = self.y
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
  end
end



#==============================================================================
# ** Window_P3Character
#------------------------------------------------------------------------------
#  This window displays the character along the right
#==============================================================================

class Window_P3Character < Window_P3
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(640, -16, 672, 512)
    self.back_opacity = 0
    @desired_x = -16
    @desired_y = self.y
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    bitmap = RPG::Cache.picture(Character_Picture_Name)
    self.contents.blt(0, 0, bitmap, bitmap.rect)
  end
end



#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  Edited to have an exrta option in the menu
#==============================================================================

class Scene_Menu
  #--------------------------------------------------------------------------
  # * Alias Methods
  #--------------------------------------------------------------------------
  alias nr_p3Menu_intiailize  initialize  unless $@
  alias nr_p3Menu_update      update      unless $@
  #--------------------------------------------------------------------------
  # * Class Variables
  #--------------------------------------------------------------------------
  @@last_index = 0
  #--------------------------------------------------------------------------
  # Object Initialization
  #--------------------------------------------------------------------------
  def initialize(*args)
    # Run the original initialize
    nr_p3Menu_intiailize(*args)
    # Set the index from the last time this menu was opened
    @menu_index = @@last_index
  end
  #--------------------------------------------------------------------------
  # * Update Cursor Position
  #--------------------------------------------------------------------------
  def cursor_position_update
    @cursor_y = 100 + 206 * @command_window.index / 6 + 20
    @cursor_x = 50 + (3 - (3 - @command_window.index).abs) * 15 - 68  
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update(*args)
    # Add the extra command if necessary
    if not @command_window.commands.include?('p3Menu')
      @command_window.add_command('p3Menu')
    end
    # Run the orginal update
    nr_p3Menu_update(*args)
    # Save the last index
    @@last_index = @command_window.index
  end
  #--------------------------------------------------------------------------
  # * Update Command
  #--------------------------------------------------------------------------
  def update_command
    cursor_position_update
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Map.new
      return
    end
    if Input.trigger?(Input::C)
      if $game_party.actors.size == 0 and @command_window.index < 4
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      case @command_window.index
      when 0
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Item.new
      when 1
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3
        $game_system.se_play($data_system.decision_se)
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_SocialMenu.new
      when 5
        if $game_system.save_disabled
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_Save.new
      when 6
        $game_system.se_play($data_system.decision_se)
        $scene = Scene_End.new
      end
    return
    end
  end
end



#==============================================================================
# ** Scene_SocialMenu
#------------------------------------------------------------------------------
#  This class performs the social menu processing.
#==============================================================================

class Scene_SocialMenu
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Create the backdrop & windows
    create_background
    create_windows
    # Execute transition
    if MOG::MENU_BACKGROUND == 0
      Graphics.transition(MOG::MNTT, "Graphics/Transitions/" + MOG::MNTP)
    else
      Graphics.transition  
    end
    # 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
    return_window_to_start
    # Prepare for transition
    Graphics.freeze
    # Dispose of window
    dispose_background
    dispose_windows
  end
  #--------------------------------------------------------------------------
  # * Create Background
  #--------------------------------------------------------------------------
  def create_background
    if MOG::MENU_BACKGROUND == 0
      # Get the default background
      @mnback = Plane.new
      @mnback.bitmap = RPG::Cache.picture("Mn_back")
      @mnback.blend_type = 0
      @mnback.z = 5
      @mnback2 = Plane.new
      @mnback2.bitmap = RPG::Cache.picture("Mn_back")
      @mnback2.blend_type = 0
      @mnback2.z = 5
      @mnback2.opacity = 60
    else
      @spriteset = Spriteset_Map.new
    end
  end
  #--------------------------------------------------------------------------
  # * Create Windows
  #--------------------------------------------------------------------------
  def create_windows
    dispose_windows if @windows.is_a?(Array)
    @windows = []
    @windows << Window_P3Title.new
    @windows << Window_P3Character.new
    @windows << Window_P3Stats.new
    @windows << Window_P3Base.new
    for i in 0...@windows.size
      window = @windows[i]
      window.z = 100 + i
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update the background and windows
    windows_slide_update
    @windows.each { |window| window.update}
    # If a button is triggered, play the se and return to the menu
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene = Scene_Menu.new
    elsif Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      $scene = Scene_Menu.new
    end
  end
  #--------------------------------------------------------------------------
  # Windows_slide_update
  #--------------------------------------------------------------------------
  def windows_slide_update
    if MOG::MENU_BACKGROUND == 0
       @mnback.oy += 1
       @mnback.ox += 1
       @mnback2.oy += 1
       @mnback2.ox -= 1
    end
  end
  #--------------------------------------------------------------------------
  # * Return Windows to Starting Position
  #--------------------------------------------------------------------------
  def return_window_to_start
    @windows.each { |window| window.return_to_start }
    loop do
      finished_movement = true
      Graphics.update
      for window in @windows
        window.update
        finished_movement = false if window.opacity > 0
      end
      windows_slide_update
      break if finished_movement == true
    end
  end
  #--------------------------------------------------------------------------
  # * Dispose Background
  #--------------------------------------------------------------------------
  def dispose_background
    if MOG::MENU_BACKGROUND == 0
       @mnback.dispose
       @mnback.dispose
       @mnback2.dispose
       @mnback2.dispose
     else
       @spriteset.dispose
    end
  end
  #--------------------------------------------------------------------------
  # * Dispose Windows
  #--------------------------------------------------------------------------
  def dispose_windows
    @windows.each { |window| window.dispose }
    @windows = nil
  end
end



#==============================================================================
# ** End of Script.
#==============================================================================


And hopefully it works this time, I've uploaded the demo if you need to see the resources:
link


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
Yuu-Mon Musuedo
post Mar 18 2012, 07:25 AM
Post #10


Gimmie [̲̅$̲̅(̲̅20̲̅)̲̅$̲̅]...
Group Icon

Group: Revolutionary
Posts: 166
Type: Artist
RM Skill: Skilled




All right! This is just awesome, and it's easy to config! Thank you so much. It's exactly what I wanted. I ran into no problems as well either. You did a awesome work. Thank you again.


__________________________

The Huhja High School martial arts club's captain, known as one of the strongest martial artist captains has passed away last year. Prove of his death, and rumors about the ordinary club members leaving had surfaced to the other schools that are in rivalry to them. They begun taking up the Huhja's turfs and claiming to take over the school next.

The Huhja's martial arts club has now disbanded after a crushing defeat at their turfs.The school's morale quickly started disappearing... Till an quiet first year girl joins the school. This young, quiet, small girl may look weak and helpless, but her martial art style is unseen. With her help, Huhja High must revive the club, gain new allies, discover hidden fighting arts, restore the school's morale, take back their turfs, and defeat their powerful rivals.

A game inspired by: Ranma 1/2, Persona, and Slice-of-Life Animes.
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 18th June 2013 - 03:39 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker