Ogłoszenie 

Uwaga! To forum jest w trybie offline.
Wszelką pomoc uzyskasz pod adresem
forum.ultimateam.pl


Administracja Forum


Poprzedni temat «» Następny temat
Galge Conversation System
Autor Wiadomość
Hegemont 




Preferowany:
RPG Maker VXAce

Dołączył: 17 Mar 2012
Posty: 9
Skąd: Kraków
Wysłany: Nie 03 Lut, 2013 19:23
Galge Conversation System
~ Galge Conversation System ~


Krótki opis:
System rozmów z wideo gierek typu Galge ;-)
Screenshoty mówią wszystko :-D

Autor:
Saba Kan

Tłumaczenie:
Kirinelf (Ang)

Kompatybilność:
RPG Maker VX Ace

Skrypt:
Spoiler:

Kod:
#==============================================================================
# ■ System rozmów Galge
#   @version 0.7 12/02/15 RGSS3
#   @author Saba Kan
#   @translator kirinelf (Made a small edit to picture IDs)
#------------------------------------------------------------------------------
#  
#==============================================================================
module Saba
  module Gal
    # --------------------Config---------------------

    # Fine tuning of actor graphic positioning.
    # {Actor ID=>pixels shifted} E.g. {1=>-4} (Actor ID 1's graphic shifted 4
    # pixels to the left/up)
    OFFSET_X = {1=>0, 2=>-30, 3=>-30, 6=>-40, 7=>-45, 8=>-40}
    OFFSET_Y = {1=>0, 2=>10, 3=>40, 4=>10, 7=>-15, 8=>5}

    # This only applies to OFFSET_X above, for displaying character graphics on
    # the left.
      # 座標に -1 をかける場合 true に設定します。
    # If the coordinates above have '-1', set to true. <= ?
    MIRROR_LEFT_OFFSET_X = false

    # Speech balloon graphic coordinates.
    BALLOON_LEFT_X = 210  # X Coordinate when it appears on the left.
    BALLOON_RIGHT_X = 300 # X Coordinate when it appears on the right.
    BALLOON_Y = 254       # Y Coordinate

    # Name window width. Default of 114 is for a name 4 characters long.
    NAME_WINDOW_WIDTH = 114

    # For skipping text. A is Shift on the keyboard.
    SKIP_BUTTON = Input::A

    # This switch ID disables skipping of the text.
    SKIP_DISABLE_SWITCH = 131

    # This switch changes the message display mode.
    MESSAGE_MODE_SWITCH = 132

    # This switch ID toggles display of the name.
    DISPLAY_NAME_SWITCH = 133

    # This switch toggles display of speech balloon graphics.
    DISPLAY_BALLOON_SWITCH = 134

    # This switch clears all speech balloon graphics.
    CLEAR_BALLOON_SWITCH = 135

    # This switch toggles playing of message sound effects.
    PLAY_MESSAGE_SE_SWITCH = 136

    # Variable to determine speech balloon color.
    # &#8251;Will be automatically entered into the variable.
    BALLOON_VARIABLE = 131

    # Variable to determine speech balloon location.
    # &#8251;Will be automatically entered into the variable.
    BALLOON_POSITION_VARIABLE = 132

    # If you want character graphics displayed on the right to be mirrored,
    # set to 'true'.
    MIRROR_LEFT = false

    # If you want character graphics displayed on the left to be mirrored,
    # set to 'true'.
    MIRROR_RIGHT = false

    # This setting changes the base picture ID of the potraits. Generally
    # speaking, the lower this is the better. However, some people might use
    # a lot of pictures, and it's a hassle to remember which IDs the script uses.
    # This setting allows you to define the base picture ID of the potraits.
    # Potraits on the right will have this ID, and potraits on the left will have
    # this ID + 2. For example, the default setting has the picture IDs of 10
    # and 12.
    BASE_PICTURE_ID = 10

    # If you don't want different characters to have different windowskins,
      # set to 'true'.
    # Window1.png and Balloon1.png will be used if 'true'.
    USE_SINGLE_WINDOW_SKIN = false

    # Tone overlay of characters in conversation.
    # Red, Green, Blue, Gray
      # Active Character
    ACTIVE_TONE = Tone.new(0, 0, 0, 0)
    # Inactive Character (0, 0, 0, 0) <= No change.
    INACTIVE_TONE = Tone.new(-104, -104, -104, 0)

    # Frames to wait after tone change during character switching.
    TONE_CHANGE_DURATION = 17

    #  Event Command "Show Balloon Icon" Icon Positioning
    OFFSET_EVENT_BALLOON_X = {1=>0, 2=>0, 3=>-30, 6=>-40, 7=>-45, 8=>-40}
    OFFSET_EVENT_BALLOON_Y = {1=>0, 2=>10, 3=>40, 4=>10, 7=>-15, 8=>5}
  end
end

#=========================================================================
# Do not edit anything under this line unless you know what you're doing!
#=========================================================================

$imported = {} if $imported == nil
$imported["GalGameTalkSystem"] = true


# &#12500;&#12463;&#12481;&#12515;&#34920;&#31034;&#29992;
class Game_Interpreter

  def pic(name, index, position)
    actor_id = name["actor".length..-1].to_i
    $game_variables[Saba::Gal::BALLOON_POSITION_VARIABLE] = position
    x = picture_base_x(position) + offset_x(position, actor_id)
    y = picture_base_y(position) + offset_y(actor_id)
    $game_variables[Saba::Gal::BALLOON_VARIABLE] = actor_id
    picture = screen.pictures[position + Saba::Gal::BASE_PICTURE_ID]

    name = name + "_" + (index + 1).to_s
    @actor1_position = nil if @actor1_position == position
    if Saba::Gal::MIRROR_LEFT && position == 1
      picture.mirror_pic = true
    elsif Saba::Gal::MIRROR_RIGHT && position == 2
      picture.mirror_pic = true
    else
      picture.mirror_pic = false
    end
    picture.show(name, 0, x, y, 100, 100, 255, 0)
    if @actor_id != actor_id
      picture.start_tone_change(Saba::Gal::INACTIVE_TONE, 0)

      deactivate_other_pictures(position)
      activate(picture, position, actor_id)
    end
    @actor_id = actor_id
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12500;&#12463;&#12481;&#12515;&#12398;&#12458;&#12501;&#12475;&#12483;&#12488;&#20301;&#32622;&#12398;x&#24231;&#27161;&#21462;&#24471;
  #--------------------------------------------------------------------------
  def offset_x(position, actor_id)
    n = Saba::Gal::OFFSET_X[actor_id]

    return 0 if n == nil
    if position == 1 && Saba::Gal::MIRROR_LEFT_OFFSET_X
      return -n
    else
      return n
    end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12500;&#12463;&#12481;&#12515;&#12398;&#12458;&#12501;&#12475;&#12483;&#12488;&#20301;&#32622;&#12398;y&#24231;&#27161;&#21462;&#24471;
  #--------------------------------------------------------------------------
  def offset_y(actor_id)
    n = Saba::Gal::OFFSET_Y[actor_id]
    return 0 if n == nil
    return n
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12452;&#12505;&#12531;&#12488;&#12496;&#12523;&#12540;&#12531;&#12398;&#12458;&#12501;&#12475;&#12483;&#12488;&#20301;&#32622;&#12398;x&#24231;&#27161;&#21462;&#24471;
  #--------------------------------------------------------------------------
  def offset_event_balloon_x(position, actor_id)
    n = Saba::Gal::OFFSET_EVENT_BALLOON_X[actor_id]
    return 0 if n == nil
    if position == 1 && Saba::Gal::MIRROR_LEFT_OFFSET_X
      return -n
    else
      return n
    end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12452;&#12505;&#12531;&#12488;&#12496;&#12523;&#12540;&#12531;&#12398;&#12458;&#12501;&#12475;&#12483;&#12488;&#20301;&#32622;&#12398;y&#24231;&#27161;&#21462;&#24471;
  #--------------------------------------------------------------------------
  def offset_event_balloon_y(actor_id)
    n = Saba::Gal::OFFSET_EVENT_BALLOON_Y[actor_id]
    return 0 if n == nil
    return n
  end
  #--------------------------------------------------------------------------
  # &#9679; &#25351;&#23450;&#12398;&#12500;&#12463;&#12481;&#12515;&#12434;&#26126;&#12427;&#12367;
  #--------------------------------------------------------------------------
  def activate(picture, position, actor_id)
    if Input.press?(Saba::Gal::SKIP_BUTTON)
      picture.start_tone_change(Saba::Gal::ACTIVE_TONE, 1)
    else
      picture.start_tone_change(Saba::Gal::ACTIVE_TONE, 25)
    end
    $game_temp.pic_actors[position] = actor_id
  end
  #--------------------------------------------------------------------------
  # &#9679; &#25351;&#23450;&#12398;&#12500;&#12463;&#12481;&#12515;&#20197;&#22806;&#12434;&#26263;&#12367;
  #--------------------------------------------------------------------------
  def deactivate_other_pictures(position)
    screen.pictures.size.times do |index|
      next if screen.pictures[index].number == 1
      next if index == position + 10
      deactivate(screen.pictures[index])
    end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#25351;&#23450;&#12398;&#12500;&#12463;&#12481;&#12515;&#12434;&#26263;&#12367;
  #--------------------------------------------------------------------------
  def deactivate(picture)
    unless Input.press?(Saba::Gal::SKIP_BUTTON)
      picture.start_tone_change(Saba::Gal::INACTIVE_TONE, 25)
    end
  end
  def picture_base_x(position)
    case position
    when 2
      return 25
    when 0
      return Graphics.width - 244
    when 3
      return 200
    end
  end
  def picture_base_y(position)
    return 30
  end
  def act(position)
    $game_variables[Saba::Gal::BALLOON_VARIABLE] = $game_temp.pic_actors[position]
    if position < 3
      $game_variables[Saba::Gal::BALLOON_POSITION_VARIABLE] = position
    end
    picture = screen.pictures[position + 10]
    deactivate_other_pictures(position)
    if Input.press?(Saba::Gal::SKIP_BUTTON)
      picture.start_tone_change(Saba::Gal::ACTIVE_TONE, 1)
      @wait_count = 0
    else
      picture.start_tone_change(Saba::Gal::ACTIVE_TONE, Saba::Gal::TONE_CHANGE_DURATION)
     @wait_count = 0
    end
  end
  def dis(position)
    picture = screen.pictures[position + 10]
    picture.erase
  end
end

class Scene_Map
  #--------------------------------------------------------------------------
  # &#9679; &#12513;&#12483;&#12475;&#12540;&#12472;&#12454;&#12451;&#12531;&#12489;&#12454;&#12398;&#20316;&#25104;
  #--------------------------------------------------------------------------
  alias saba_gal_create_message_window create_message_window
  def create_message_window
    saba_gal_create_message_window
    create_gal_window
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12501;&#12524;&#12540;&#12512;&#26356;&#26032;
  #--------------------------------------------------------------------------
  alias saba_gal_update update
  def update
    create_gal_window
    update_gal_event_balloon
    saba_gal_update
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12462;&#12515;&#12523;&#12466;&#12540;&#12454;&#12451;&#12531;&#12489;&#12454;&#20316;&#25104;
  #   &#12462;&#12515;&#12523;&#12466;&#12540;&#12514;&#12540;&#12489;&#12398;&#26178;&#12289;&#12454;&#12451;&#12531;&#12489;&#12454;&#12434;&#20999;&#12426;&#26367;&#12360;&#12414;&#12377;&#12290;
  #--------------------------------------------------------------------------
  def create_gal_window
    if $game_switches[Saba::Gal::MESSAGE_MODE_SWITCH]
      if ! @message_window.is_a?(Window_MessageGal)
        # &#12462;&#12515;&#12523;&#12466;&#12540;&#12454;&#12451;&#12531;&#12489;&#12454;&#12395;&#12377;&#12427;
        @message_window.dispose
        @message_window = Window_MessageGal.new
      end
    else
      if @message_window.is_a?(Window_MessageGal)
        # &#36890;&#24120;&#12454;&#12451;&#12531;&#12489;&#12454;&#12395;&#25147;&#12377;
        @message_window.dispose
        @message_window = Window_Message.new
      end
    end
  end
  def on_a
    p 11
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12462;&#12515;&#12523;&#12466;&#12540;&#12454;&#12451;&#12531;&#12489;&#12454;&#12398;&#12501;&#12461;&#12480;&#12471;&#12450;&#12452;&#12467;&#12531;&#20316;&#25104;
  #--------------------------------------------------------------------------
  def create_gal_event_balloon(character)
    dispose_gal_event_balloon
    @saba_balloon_sprite = Sprite_Character.new(@viewport, character)
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12462;&#12515;&#12523;&#12466;&#12540;&#12454;&#12451;&#12531;&#12489;&#12454;&#12398;&#12501;&#12461;&#12480;&#12471;&#12450;&#12452;&#12467;&#12531;&#30772;&#26820;
  #--------------------------------------------------------------------------
  def dispose_gal_event_balloon
    if @saba_balloon_sprite
      @saba_balloon_sprite.dispose
      @saba_balloon_sprite = nil
    end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12462;&#12515;&#12523;&#12466;&#12540;&#12454;&#12451;&#12531;&#12489;&#12454;&#12398;&#12501;&#12461;&#12480;&#12471;&#12450;&#12452;&#12467;&#12531;&#26356;&#26032;
  #--------------------------------------------------------------------------
  def update_gal_event_balloon
    if @saba_balloon_sprite
      if @saba_balloon_sprite.character.balloon_id == 0 || Input.press?(Saba::Gal::SKIP_BUTTON)
        dispose_gal_event_balloon
      else
        @saba_balloon_sprite.update
      end
    end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12473;&#12503;&#12521;&#12452;&#12488;&#12475;&#12483;&#12488;&#12398;&#35299;&#25918;
  #--------------------------------------------------------------------------
  alias saba_gal_dispose_spriteset dispose_spriteset
  def dispose_spriteset
    saba_gal_dispose_spriteset
    dispose_gal_event_balloon
  end
end


class Window_MessageGal < Window_Message
  #--------------------------------------------------------------------------
  # &#9679; &#12458;&#12502;&#12472;&#12455;&#12463;&#12488;&#21021;&#26399;&#21270;
  #--------------------------------------------------------------------------
  def initialize
    super
    self.x = 10
    create_baloon_sprite
    $game_temp.window_number = -1
    update_balloon
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12454;&#12451;&#12531;&#12489;&#12454;&#24133;&#12398;&#21462;&#24471;
  #--------------------------------------------------------------------------
  def window_width
    Graphics.width - 20
  end
  #--------------------------------------------------------------------------
  # &#9679; &#34920;&#31034;&#34892;&#25968;&#12398;&#21462;&#24471;
  #--------------------------------------------------------------------------
  def visible_line_number
    return 3
  end
  #--------------------------------------------------------------------------
  # &#9679; &#25913;&#12506;&#12540;&#12472;&#12364;&#24517;&#35201;&#12363;&#21028;&#23450;
  #--------------------------------------------------------------------------
  def need_new_page?(text, pos)
    pos[:y]  > contents.height && !text.empty?
  end
  #--------------------------------------------------------------------------
  # &#9679; &#36890;&#24120;&#25991;&#23383;&#12398;&#20966;&#29702;
  #--------------------------------------------------------------------------
  def process_normal_character(c, pos)
    if Input.press?(Saba::Gal::SKIP_BUTTON) && skip_enabled?
      @pause_skip = true
    end
    text_width = text_size&#169;.width
    if display_name? && (pos[:y] == 0)
      @name_sprite.bitmap.draw_text(pos[:x], 26, text_width * 2, pos[:height], c)
      pos[:x] += text_width
      return
    end
    if display_name?
      draw_text(pos[:x], pos[:y] - pos[:height], text_width * 2, pos[:height], c)
    else
      draw_text(pos[:x], pos[:y], text_width * 2, pos[:height], c)
    end
    pos[:x] += text_width
    unless Input.press?(Saba::Gal::SKIP_BUTTON) && skip_enabled?
      wait_for_one_character
    end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#21046;&#24481;&#25991;&#23383;&#12395;&#12424;&#12427;&#12450;&#12452;&#12467;&#12531;&#25551;&#30011;&#12398;&#20966;&#29702;
  #--------------------------------------------------------------------------
  def process_draw_icon(icon_index, pos)
    if display_name?
      draw_icon(icon_index, pos[:x], pos[:y] - pos[:height])
    else
      draw_icon(icon_index, pos[:x], pos[:y])
    end
    pos[:x] += 24
  end
  #--------------------------------------------------------------------------
  # &#9679; &#20840;&#12454;&#12451;&#12531;&#12489;&#12454;&#12398;&#20316;&#25104;
  #--------------------------------------------------------------------------
  def create_all_windows
    super
    @name_window = Window_Base.new(20, Graphics.height - 126, Saba::Gal::NAME_WINDOW_WIDTH, 37)
    @name_window.z = 480
    @name_window.visible = false

    @name_sprite = Sprite_Base.new(nil)
    @name_sprite.z = 500
    @name_sprite.x = 30
    @name_sprite.y = Graphics.height - 146
    @name_sprite.bitmap = Bitmap.new(230, 300)
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12501;&#12461;&#12480;&#12471;&#12473;&#12503;&#12521;&#12452;&#12488;&#12434;&#29983;&#25104;&#12375;&#12414;&#12377;&#12290;
  #--------------------------------------------------------------------------
  def create_baloon_sprite
    @balloon_sprite = Sprite_Base.new
    @balloon_sprite.z = 500
    @balloon_sprite.y = Graphics.height - 384
    @balloon_sprite.bitmap = Bitmap.new(400, 300)
    @balloon_sprite.visible = false
  end
  #--------------------------------------------------------------------------
  # &#9679; &#20840;&#12454;&#12451;&#12531;&#12489;&#12454;&#12398;&#35299;&#25918;
  #--------------------------------------------------------------------------
  def dispose_all_windows
    super
    @name_window.dispose
    @name_sprite.bitmap.dispose
    @name_sprite.dispose
    @balloon_sprite.dispose
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12454;&#12451;&#12531;&#12489;&#12454;&#12398;&#26356;&#26032;
  #--------------------------------------------------------------------------
  def update
    super
    update_name_visibility
    update_balloon_visibility
    update_balloon
    update_opacity
  end
  #--------------------------------------------------------------------------
  # &#9679; &#19981;&#36879;&#26126;&#24230;&#12398;&#26356;&#26032;
  #--------------------------------------------------------------------------
  def update_opacity
    if @background != 0
      self.opacity = 0
      return
    end
    return if self.opacity == 255
    self.opacity += 9
  end
  #--------------------------------------------------------------------------
  # &#9679; &#20837;&#21147;&#24453;&#12385;&#20966;&#29702;
  #--------------------------------------------------------------------------
  def input_pause
    self.pause = true
    wait(10)
    Fiber.yield until Input.trigger?(:<img src='http://www.rpgmakervxace.net/public/style_emoticons/<#EMO_DIR#>/cool.png' class='bbc_emoticon' alt='B)' /> || Input.trigger?(:C) || (Input.press?(Saba::Gal::SKIP_BUTTON) && skip_enabled?)
    if self.visible == false
      self.visible = true
      Sound.play_cursor
      input_pause
      return
    end
    Input.update
    self.pause = false
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12454;&#12451;&#12531;&#12489;&#12454;&#12434;&#38283;&#12365;&#12289;&#23436;&#20840;&#12395;&#38283;&#12367;&#12414;&#12391;&#24453;&#12388;
  #--------------------------------------------------------------------------
  def open_and_wait
    open
    update_picture
    until open?
      update_balloon
      Fiber.yield
    end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12454;&#12451;&#12531;&#12489;&#12454;&#12434;&#38281;&#12376;&#12289;&#23436;&#20840;&#12395;&#38281;&#12376;&#12427;&#12414;&#12391;&#24453;&#12388;
  #--------------------------------------------------------------------------
  def close_and_wait
    close
    @name_window.visible = false
    @name_sprite.visible = false

    until all_close?
      Fiber.yield
    end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#25913;&#12506;&#12540;&#12472;&#20966;&#29702;
  #--------------------------------------------------------------------------
  def new_page(text, pos)
    @name_sprite.bitmap.clear
    contents.clear
    reset_font_settings
    pos[:x] = new_line_x
    pos[:y] = 0
    pos[:new_x] = new_line_x
    pos[:height] = calc_line_height(text)
    clear_flags
  end
  #--------------------------------------------------------------------------
  # &#9679; &#31435;&#12385;&#32117;&#12398;&#26356;&#26032;
  #--------------------------------------------------------------------------
  def update_picture
    return if $game_message.face_name.empty?
    $game_map.interpreter.pic($game_message.face_name, $game_message.face_index, $game_message.position)
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12454;&#12451;&#12531;&#12489;&#12454;&#20301;&#32622;&#12398;&#26356;&#26032;
  #--------------------------------------------------------------------------
  def update_placement
    @position = 2
    self.y = @position * (Graphics.height - height) / 2
    @gold_window.y = y > 0 ? 0 : Graphics.height - @gold_window.height
  end
  #--------------------------------------------------------------------------
  # &#9679; &#32972;&#26223;&#12392;&#20301;&#32622;&#12398;&#22793;&#26356;&#21028;&#23450;
  #--------------------------------------------------------------------------
  def settings_changed?
    @background != $game_message.background
  end
  #--------------------------------------------------------------------------
  # &#9679; &#25913;&#34892;&#20301;&#32622;&#12398;&#21462;&#24471;
  #--------------------------------------------------------------------------
  def new_line_x
    return 0
  end
  #--------------------------------------------------------------------------
  # &#9679; &#27425;&#12398;&#35486;&#12434;&#34920;&#31034;&#12377;&#12409;&#12365;&#12363;&#12393;&#12358;&#12363;&#12434;&#21028;&#23450;&#12375;&#12414;&#12377;&#12290;
  #--------------------------------------------------------------------------
  def show_next_message?
    if skip_enabled?
      return Input.trigger?(Input::C) || Input.trigger?(Input::<img src='http://www.rpgmakervxace.net/public/style_emoticons/<#EMO_DIR#>/cool.png' class='bbc_emoticon' alt='B)' /> || Input.trigger?(Saba::Gal::SKIP_BUTTON)
    else
      return Input.trigger?(Input::C) || Input.trigger?(Input::<img src='http://www.rpgmakervxace.net/public/style_emoticons/<#EMO_DIR#>/cool.png' class='bbc_emoticon' alt='B)' />
    end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12513;&#12483;&#12475;&#12540;&#12472;&#12473;&#12461;&#12483;&#12503;&#12364;&#26377;&#21177;&#12363;&#12393;&#12358;&#12363;&#12434;&#21028;&#23450;&#12375;&#12414;&#12377;&#12290;
  #--------------------------------------------------------------------------
  def skip_enabled?
    return $game_switches[Saba::Gal::SKIP_DISABLE_SWITCH] != true
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12473;&#12452;&#12483;&#12481;&#12395;&#24467;&#12387;&#12390;&#12289;&#21517;&#21069;&#12454;&#12451;&#12531;&#12489;&#12454;&#12398;&#34920;&#31034;&#12434;&#20999;&#12426;&#26367;&#12360;&#12414;&#12377;&#12290;
  #--------------------------------------------------------------------------
  def update_name_visibility
    if @closing || close? || ! self.visible
      @name_window.visible = false
      @name_sprite.visible = false
      return
    end
    if $game_switches[Saba::Gal::DISPLAY_NAME_SWITCH] != true
      @name_window.visible = false
      @name_sprite.visible = false
    else
       @name_window.visible = true
      @name_sprite.visible = true
    end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12405;&#12365;&#12384;&#12375;&#12398;&#34920;&#31034;&#12434;&#20999;&#12426;&#26367;&#12360;&#12414;&#12377;&#12290;
  #--------------------------------------------------------------------------
  def update_balloon_visibility
    if self.openness < 255
      @balloon_sprite.visible = false
      return
    end
    if @balloon_sprite.visible != $game_switches[Saba::Gal::DISPLAY_BALLOON_SWITCH]
      @balloon_sprite.visible = $game_switches[Saba::Gal::DISPLAY_BALLOON_SWITCH]
      update_balloon
    end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#21517;&#21069;&#12434;&#34920;&#31034;&#12377;&#12409;&#12365;&#12363;&#12393;&#12358;&#12363;&#12434;&#21028;&#23450;&#12375;&#12414;&#12377;&#12290;
  #--------------------------------------------------------------------------
  def display_name?
    return $game_switches[Saba::Gal::DISPLAY_NAME_SWITCH] == true
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12501;&#12461;&#12480;&#12471;&#12434;&#12414;&#12387;&#12373;&#12425;&#12395;&#12375;&#12414;&#12377;&#12290;
  #--------------------------------------------------------------------------
  def clear_balloon
    @balloon_sprite.bitmap.clear_rect(100, 254, 300, 100)
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12454;&#12451;&#12531;&#12489;&#12454;&#12398;&#33394;&#12364;&#22793;&#12431;&#12387;&#12383;&#12363;&#12393;&#12358;&#12363;&#12434;&#21028;&#23450;&#12375;&#12414;&#12377;&#12290;
  #--------------------------------------------------------------------------
  def window_color_changed?
    if $game_temp.window_number != $game_variables[Saba::Gal::BALLOON_VARIABLE] || $game_switches[Saba::Gal::CLEAR_BALLOON_SWITCH]
      $game_temp.window_number = $game_variables[Saba::Gal::BALLOON_VARIABLE]
      return true
    end
    return false
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12501;&#12461;&#12480;&#12471;&#12434;&#26356;&#26032;&#12375;&#12414;&#12377;&#12290;
  #--------------------------------------------------------------------------
  def update_balloon
    return unless window_color_changed?
    clear_balloon
    if Saba::Gal::USE_SINGLE_WINDOW_SKIN
      self.windowskin = Cache.system("Window1")
    else
      self.windowskin = Cache.system("Window" + $game_temp.window_number.to_s)
      if openness == 255
        self.opacity = 140 unless $game_switches[Saba::Gal::CLEAR_BALLOON_SWITCH]
      end
    end
    $game_switches[Saba::Gal::CLEAR_BALLOON_SWITCH] = false
    if $game_temp.window_number != nil && $game_temp.window_number > 0
      if Saba::Gal::USE_SINGLE_WINDOW_SKIN
        balloon = Cache.system("Balloon1")
      else
        balloon = Cache.system("Balloon" + $game_temp.window_number.to_s)
      end
      w = balloon.width / 2
      h = balloon.height
      if $game_variables[Saba::Gal::BALLOON_POSITION_VARIABLE] == 2
        @balloon_sprite.bitmap.blt(Saba::Gal::BALLOON_LEFT_X, Saba::Gal::BALLOON_Y, balloon, Rect.new(w, 0, w, h))
      else
        @balloon_sprite.bitmap.blt(Saba::Gal::BALLOON_RIGHT_X, Saba::Gal::BALLOON_Y, balloon, Rect.new(0, 0, w, h))
      end
    end
  end

end


class Game_Picture
  attr_accessor:mirror_pic
  alias saba_gal_initialze initialize
  def initialize(number)
    saba_gal_initialze(number)
    @mirror_pic = false
  end
end

class Sprite_Picture < Sprite
  alias saba_gal_update update
  def update
    saba_gal_update
    if @picture_name != ""
      self.mirror = @picture.mirror_pic
    end
  end
end

class Game_Pictures
  def size
    return @data.size
  end
end

class Game_Temp
  attr_accessor :window_number
  attr_accessor :pic_actors
  alias saba_pic_initialize initialize
  def initialize
    saba_pic_initialize
    @pic_actors = []
  end
end

class Game_Interpreter
  #--------------------------------------------------------------------------
  # &#9679; &#12501;&#12461;&#12480;&#12471;&#12450;&#12452;&#12467;&#12531;&#12398;&#34920;&#31034;
  #--------------------------------------------------------------------------
  alias saba_gal_command_213 command_213
  def command_213
    unless message_mode?
      saba_gal_command_213
      return
    end
    command = @list[@index + 1]
    if command == nil || command.code != 101
      p "&#12452;&#12505;&#12531;&#12488;&#12467;&#12510;&#12531;&#12489;&#12398;&#12501;&#12461;&#12480;&#12471;&#12450;&#12452;&#12467;&#12531;&#12398;&#34920;&#31034;&#12288;&#12398;&#24460;&#12395;&#12513;&#12483;&#12475;&#12540;&#12472;&#12452;&#12505;&#12531;&#12488;&#12434;&#20837;&#12428;&#12390;&#12367;&#12384;&#12373;&#12356;"
      return
    end

    return if Input.press?(Saba::Gal::SKIP_BUTTON)
    params = command.parameters
    name = params[0]
    actor_id = name["actor".length..-1].to_i
    position = params[3]
    x = (picture_base_x(position) + offset_event_balloon_x(position, actor_id) + 80) / 32.0 + $game_map.display_x
    y = (picture_base_y(position) + offset_event_balloon_y(actor_id)) / 32.0 + $game_map.display_y
    balloon_char = Game_Character.new
    balloon_char.moveto(x, y)
    balloon_char.balloon_id = @params[1]
    SceneManager.scene.create_gal_event_balloon(balloon_char)
  end
  #--------------------------------------------------------------------------
  # &#9679; &#20250;&#35441;&#12514;&#12540;&#12489;&#12363;&#12393;&#12358;&#12363;&#12434;&#21028;&#23450;&#12375;&#12414;&#12377;&#12290;
  #--------------------------------------------------------------------------
  def message_mode?
    return $game_switches[Saba::Gal::MESSAGE_MODE_SWITCH] == true
  end
end



2. Sub script #1: Ukryj okno wiadomości i dostęp Zapisz Ekranie
Spoiler

#==============================================================================
# &#9632; Girl Game Message Window Expansion 4
#   @version 0.4 11/12/27 RGSS3
#   @author Saba Kan
#   @translator kirinelf
#------------------------------------------------------------------------------
# &#12288;Adds Hide Message Window and Call Save Window from Message Window options.
#==============================================================================
module Saba
  module GalEx
    # Hide Message Window (R is W on the keyboard).
    # To disable, use 'nil'.
    HIDE_BUTTON = Input::R

    # Save Button (L is Q on the keyboard).
    # To disable, use 'nil'.
    SAVE_BUTTON = Input::L
  end
end

#=========================================================================
# Do not edit anything under this line unless you know what you're doing!
#=========================================================================

class Scene_Map
  alias saba_hide_window_update update
  def update
    saba_hide_window_update
    return if @message_window.openness == 0
    if Input.trigger?(Saba::GalEx::HIDE_BUTTON)
      Sound.play_cursor
      @message_window.visible = ! @message_window.visible
    elsif Input.trigger?(Saba::GalEx::SAVE_BUTTON)
      if @message_window.is_a?(Window_MessageGal)
        Sound.play_cursor
        SceneManager.call(Scene_Save)
      end
    end
  end
end



class Window_MessageGal
  def visible=(v)
    super
    if v
      update_name_visibility
    else
      @name_sprite.visible = false
      @name_window.visible = false
    end
  end
  #--------------------------------------------------------------------------
  # &#9679; &#12405;&#12365;&#12384;&#12375;&#12398;&#34920;&#31034;&#12434;&#20999;&#12426;&#26367;&#12360;&#12414;&#12377;&#12290;
  #--------------------------------------------------------------------------
  alias saba_hide_window_update_balloon_visibility update_balloon_visibility
  def update_balloon_visibility
    unless self.visible
      @balloon_sprite.visible = false
      return
    end
    saba_hide_window_update_balloon_visibility
  end
end


Screeny:
Spoiler:






Demo:


Dodatkowe informacje:
Dla chętnych to link do postu tłumacza
http://www.rpgmakervxace....tion-system-07/
 
 
Sinithra 



Preferowany:
RPG Maker VXAce

Dołączyła: 10 Lis 2012
Posty: 3
Wysłany: Pon 04 Mar, 2013 16:35
Mam prośbę - czy mógłbyś napisać, jak tego używać? Nie jestem zbyt dobra w angielskim...
 
 
Wyświetl posty z ostatnich:   
Odpowiedz do tematu
Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Nie możesz załączać plików na tym forum
Możesz ściągać załączniki na tym forum
Dodaj temat do Ulubionych
Wersja do druku

Skocz do:  

Powered by phpBB modified by Przemo © 2003 phpBB Group | Template Klam by Ayene