collapse collapse

 Community


 User Info




Willkommen Gast. Bitte einloggen oder registrieren.

 Partnerseiten

rpgvx.net

Das Forum ist offline

Autor Thema: Punkteverteiling  (Gelesen 9446 mal)

Offline Master-M

  • FF IX Remaker
  • Mr. MACK-Tile
  • ***
  • Beiträge: 261
  • FF IX Remaken...
Punkteverteiling
« am: Juni 15, 2008, 15:44:04 »
Moin alle miteinander,
Das ist mein (eigentlich) 1 Beitrag hier im Forum und ich wollte euch das Skript "Punkte Verteilung" vorstellen. Also: Das Skript bringt das unter Beenden/Ende ein neuer Menü Punkt erscheint. Ich hab den Level Up Punkte genant. Jedes mal wenn ihr ein lvl Up habt kriegt ihr automatisch Punkte. Ich hab jetzt 3 Punkte eingestellt und, dass soweit ich das sehe, richtig Übersetzt.
Falls ihr immernoch nicht Wisst was damit gemeint ist hier eine Demo(PS: Die Map kommt aus meinen Jetztigen Projekt):
http://rapidshare.com/files/122614715/Level_Up_System.exe
Hier meine Version:
Spoiler for Hiden:
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/    ? ????????? - KGC_DistributeParameter ? VX ?
#_/    ? Last update : 2008/02/23 ?
#_/    Criador:KGC Softwares
#_/    Traduzido por:NaRuToMaKer
#_/----------------------------------------------------------------------------
#_/  Cria uma opção no menu de upgrade de atributos
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

#==============================================================================
# Customização
#==============================================================================

module KGC
module DistributeParameter
 
#~   Defina do seguinte modo
#~   :maxhp => [1, 30, 50]
#~   :maxhp => [RP que consome,quantidade do parametro que aumenta,maximo de pontos]
  
  GAIN_PARAMETER = {
    :maxhp => [1, 30, 500],  # MaxHP
    :maxmp => [1,  3, 500],  # MaxMP
    :atk   => [1,  2, 500],  # ???
    :def   => [1,  2, 500],  # ???
    :spi   => [1,  2, 500],  # ???
    :agi   => [1,  2, 500],  # ???
    :hit   => [3,  1, 200],  # ???
    :eva   => [3,  1, 200],  # ???
    :cri   => [3,  1, 200],  # ???????
  }  # ? ?? } ????????

  # ? RP (Reinforce Point) ???
  VOCAB_RP   = "Punkte"
  # ? RP ??? (?)
  VOCAB_RP_A = "Kosten"

#~   Pontos para distribuir
#~   ao aumentar de level
  GAIN_RP_EXP = "3"
  #  ????? 10% + 1 ???????
  # GAIN_RP_EXP = "level / 10 + 1"


#~   Vocabulario
  VOCAB_PARAM = {
    :hit => "Schlag",        # ???
    :eva => "Fliehen/Ausweihen",        # ???
    :cri => "Kritische Schläge",  # ???????
  }  
  DISTRIBUTE_SCENE_CAPTION = ""

#~   Cores para a barrinha
#~  
#~   Quando estiver enchendo
  GAUGE_START_COLOR = 28
#~   Quando estiver cheia
  GAUGE_END_COLOR   = 29

#~   Vai pararecer no menu?
  USE_MENU_DISTRIBUTE_PARAMETER_COMMAND = true
  # ? ?????????????????????????
  VOCAB_MENU_DISTRIBUTE_PARAMETER       = "Level up Punkte"

#~   Pode retirar pontos?
  ENABLE_REVERSE_DISTRIBUTE = true
end
end

#???????????????????????????????????????

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

module KGC::DistributeParameter
  # ???????????
  PARAMS = [:maxhp, :maxmp, :atk, :def, :spi, :agi, :hit, :eva, :cri]
end

#???????????????????????????????????????

#==============================================================================
# ? Vocab
#==============================================================================

module Vocab
  # ???
  def self.hit
    return KGC::DistributeParameter::VOCAB_PARAM[:hit]
  end

  # ???
  def self.eva
    return KGC::DistributeParameter::VOCAB_PARAM[:eva]
  end

  # ???????
  def self.cri
    return KGC::DistributeParameter::VOCAB_PARAM[:cri]
  end

  # RP
  def self.rp
    return KGC::DistributeParameter::VOCAB_RP
  end

  # RP (?)
  def self.rp_a
    return KGC::DistributeParameter::VOCAB_RP_A
  end

  # ?????????
  def self.distribute_parameter
    return KGC::DistributeParameter::VOCAB_MENU_DISTRIBUTE_PARAMETER
  end
end

#???????????????????????????????????????

#==============================================================================
# ? KGC::Commands
#==============================================================================

module KGC::Commands
  module_function
  #--------------------------------------------------------------------------
  # ? ???????????????????
  #--------------------------------------------------------------------------
  def check_distribution_values
    (1...$data_actors.size).each { |i|
      $game_actors.check_distribution_values
    }
  end
  #--------------------------------------------------------------------------
  # ? RP ???
  #     actor_id : ???? ID
  #     value    : ???
  #--------------------------------------------------------------------------
  def gain_rp(actor_id, value)
    actor = $game_actors[actor_id]
    return if actor == nil
    actor.gain_rp(value)
  end
  #--------------------------------------------------------------------------
  # ? ????????????????
  #     actor_index : ??????????
  #--------------------------------------------------------------------------
  def call_distribute_parameter(actor_index = 0)
    return if $game_temp.in_battle
    $game_temp.next_scene = :distribute_parameter
    $game_temp.next_scene_actor_index = actor_index
  end
end

class Game_Interpreter
  include KGC::Commands
end

#???????????????????????????????????????

#==============================================================================
# ? Game_Battler
#==============================================================================

class Game_Battler
  #--------------------------------------------------------------------------
  # ? ?????????????
  #--------------------------------------------------------------------------
  alias clear_extra_values_KGC_DistributeParameter clear_extra_values
  def clear_extra_values
    clear_extra_values_KGC_DistributeParameter

    clear_distribution_values
  end
  #--------------------------------------------------------------------------
  # ? ??????????????????
  #--------------------------------------------------------------------------
  def clear_distribution_values
    @distributed_count = {}
    KGC::DistributeParameter::PARAMS.each { |param|
      @distributed_count[param] = 0
    }
  end
  #--------------------------------------------------------------------------
  # ? ???????????????????
  #--------------------------------------------------------------------------
  def check_distribution_values
    last_distributed_count = @distributed_count

    clear_distribution_values

    @distributed_count = last_distributed_count if last_distributed_count != nil
  end
end

#???????????????????????????????????????

#==============================================================================
# ? Game_Actor
#==============================================================================

class Game_Actor < Game_Battler
  #--------------------------------------------------------------------------
  # ? ??????
  #     actor_id : ???? ID
  #--------------------------------------------------------------------------
  alias setup_KGC_DistributeParameter setup
  def setup(actor_id)
    setup_KGC_DistributeParameter(actor_id)

    @rp = calc_init_rp
  end
  #--------------------------------------------------------------------------
  # ? ?????????????
  #     param : ?????? Symbol
  #--------------------------------------------------------------------------
  def distributed_param(param)
    n = KGC::DistributeParameter::GAIN_PARAMETER[param][1]
    return n * distributed_count(param)
  end
  #--------------------------------------------------------------------------
  # ? ?? MaxHP ???
  #--------------------------------------------------------------------------
  alias base_maxhp_KGC_DistributeParameter base_maxhp
  def base_maxhp
    n = base_maxhp_KGC_DistributeParameter + distributed_param(:maxhp)
    return n
  end
  #--------------------------------------------------------------------------
  # ? ?? MaxMP ???
  #--------------------------------------------------------------------------
  alias base_maxmp_KGC_DistributeParameter base_maxmp
  def base_maxmp
    n = base_maxmp_KGC_DistributeParameter + distributed_param(:maxmp)
    return n
  end
  #--------------------------------------------------------------------------
  # ? ????????
  #--------------------------------------------------------------------------
  alias base_atk_KGC_DistributeParameter base_atk
  def base_atk
    n = base_atk_KGC_DistributeParameter + distributed_param(:atk)
    return n
  end
  #--------------------------------------------------------------------------
  # ? ????????
  #--------------------------------------------------------------------------
  alias base_def_KGC_DistributeParameter base_def
  def base_def
    n = base_def_KGC_DistributeParameter + distributed_param(:def)
    return n
  end
  #--------------------------------------------------------------------------
  # ? ????????
  #--------------------------------------------------------------------------
  alias base_spi_KGC_DistributeParameter base_spi
  def base_spi
    n = base_spi_KGC_DistributeParameter + distributed_param(:spi)
    return n
  end
  #--------------------------------------------------------------------------
  # ? ????????
  #--------------------------------------------------------------------------
  alias base_agi_KGC_DistributeParameter base_agi
  def base_agi
    n = base_agi_KGC_DistributeParameter + distributed_param(:agi)
    return n
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  alias hit_KGC_DistributeParameter hit
  def hit
    n = hit_KGC_DistributeParameter + distributed_param(:hit)
    return n
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  alias eva_KGC_DistributeParameter eva
  def eva
    n = eva_KGC_DistributeParameter + distributed_param(:eva)
    return n
  end
  #--------------------------------------------------------------------------
  # ? ??????????
  #--------------------------------------------------------------------------
  alias cri_KGC_DistributeParameter cri
  def cri
    n = cri_KGC_DistributeParameter + distributed_param(:cri)
    return n
  end
  #--------------------------------------------------------------------------
  # ? RP ???
  #--------------------------------------------------------------------------
  def rp
    @rp = calc_init_rp if @rp == nil
    return @rp
  end
  #--------------------------------------------------------------------------
  # ? RP ??????
  #--------------------------------------------------------------------------
  def calc_init_rp
    n = 0
    rp_exp = KGC::DistributeParameter::GAIN_RP_EXP.gsub(/level/) { "i" }
    (1...level).each { |i| n += [Integer(eval(rp_exp)), 0].max }
    return n
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #     param : ?????????? (Symbol)
  #--------------------------------------------------------------------------
  def distributed_count(param)
    clear_distribution_values if @distributed_count == nil
    @distributed_count[param] = 0 if @distributed_count[param] == nil
    return @distributed_count[param]
  end
  #--------------------------------------------------------------------------
  # ? RP ???
  #     value : ???
  #--------------------------------------------------------------------------
  def gain_rp(value)
    @rp = [self.rp + value, 0].max
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #     param : ?????????? (Symbol)
  #     value : ???
  #--------------------------------------------------------------------------
  def gain_distributed_count(param, value = 1)
    n = distributed_count(param)
    @distributed_count[param] += value if n.is_a?(Integer)
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  alias level_up_KGC_DistributeParameter level_up
  def level_up
    level_up_KGC_DistributeParameter

    gain_level_up_rp
  end
  #--------------------------------------------------------------------------
  # ? ????????? RP ???
  #--------------------------------------------------------------------------
  def gain_level_up_rp
    n = [Integer(eval(KGC::DistributeParameter::GAIN_RP_EXP)), 0].max
    gain_rp(n)
  end
  #--------------------------------------------------------------------------
  # ? RP ?????????????
  #     param   : ?????????? (Symbol)
  #     reverse : ??????? true
  #--------------------------------------------------------------------------
  def rp_growth_effect(param, reverse = false)
    gain = KGC::DistributeParameter::GAIN_PARAMETER[param]
    return if gain == nil  # ????????

    if reverse
      return if distributed_count(param) == 0  # ?????
    else
      return unless can_distribute?(param)
    end

    gain_rp(gain[0] * (reverse ? 1 : -1))
    gain_distributed_count(param, reverse ? -1 : 1)
  end
  #--------------------------------------------------------------------------
  # ? ?????????????
  #     param   : ?????????? (Symbol)
  #--------------------------------------------------------------------------
  def can_distribute?(param)
    gain = KGC::DistributeParameter::GAIN_PARAMETER[param]
    return false if gain == nil                          # ????????
    return false if self.rp < gain[0]                    # RP ??
    return false if gain[2] <= distributed_count(param)  # ????

    return true
  end
end

#???????????????????????????????????????

#==============================================================================
# ? Window_Base
#==============================================================================

class Window_Base < Window
  #--------------------------------------------------------------------------
  # ? RP ???????
  #     actor : ????
  #--------------------------------------------------------------------------
  def rp_color(actor)
    return (actor.rp == 0 ? knockout_color : normal_color)
  end
  #--------------------------------------------------------------------------
  # ? ????????? 1 ???
  #--------------------------------------------------------------------------
  def distribute_gauge_color1
    color = KGC::DistributeParameter::GAUGE_START_COLOR
    return (color.is_a?(Integer) ? text_color(color) : color)
  end
  #--------------------------------------------------------------------------
  # ? ????????? 2 ???
  #--------------------------------------------------------------------------
  def distribute_gauge_color2
    color = KGC::DistributeParameter::GAUGE_END_COLOR
    return (color.is_a?(Integer) ? text_color(color) : color)
  end
  #--------------------------------------------------------------------------
  # ? RP ???
  #     actor : ????
  #     x     : ??? X ??
  #     y     : ??? Y ??
  #     width : ?
  #--------------------------------------------------------------------------
  def draw_actor_rp(actor, x, y, width = 120)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 40, WLH, Vocab::rp)
    self.contents.font.color = rp_color(actor)
    xr = x + width
    self.contents.draw_text(xr - 40, y, 40, WLH, actor.rp, 2)
    self.contents.font.color = normal_color
  end
  #--------------------------------------------------------------------------
  # ? ??????????
  #     actor : ????
  #     param : ?????
  #     x     : ??? X ??
  #     y     : ??? Y ??
  #     width : ?
  #--------------------------------------------------------------------------
  def draw_actor_distribute_gauge(actor, param, x, y, width = 120)
    gain = KGC::DistributeParameter::GAIN_PARAMETER[param]
    return if gain == nil
    gw = width * actor.distributed_count(param) / [gain[2], 1].max
    gc1 = distribute_gauge_color1
    gc2 = distribute_gauge_color2
    self.contents.fill_rect(x, y + WLH - 8, width, 6, gauge_back_color)
    self.contents.gradient_fill_rect(x, y + WLH - 8, gw, 6, gc1, gc2)
  end
end

#???????????????????????????????????????

#==============================================================================
# ? Window_Command
#==============================================================================

class Window_Command < Window_Selectable
  unless method_defined?(:add_command)
  #--------------------------------------------------------------------------
  # ? ???????
  #    ?????????
  #--------------------------------------------------------------------------
  def add_command(command)
    @commands << command
    @item_max = @commands.size
    item_index = @item_max - 1
    refresh_command
    draw_item(item_index)
    return item_index
  end
  #--------------------------------------------------------------------------
  # ? ???????????
  #--------------------------------------------------------------------------
  def refresh_command
    buf = self.contents.clone
    self.height = [self.height, row_max * WLH + 32].max
    create_contents
    self.contents.blt(0, 0, buf, buf.rect)
    buf.dispose
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def insert_command(index, command)
    @commands.insert(index, command)
    @item_max = @commands.size
    refresh_command
    refresh
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def remove_command(command)
    @commands.delete(command)
    @item_max = @commands.size
    refresh
  end
  end
end

#???????????????????????????????????????

#==============================================================================
# ? Window_DistributeParameterActor
#------------------------------------------------------------------------------
#   ????????????????????????????
#==============================================================================

class Window_DistributeParameterActor < Window_Base
  #--------------------------------------------------------------------------
  # ? ?????????
  #     x     : ?????? X ??
  #     y     : ?????? Y ??
  #     actor : ????
  #--------------------------------------------------------------------------
  def initialize(x, y, actor)
    super(x, y, Graphics.width, WLH + 32)
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_actor_name(@actor, 4, 0)
    draw_actor_level(@actor, 140, 0)
    draw_actor_rp(@actor, 240, 0, 80)
  end
end

#???????????????????????????????????????

#==============================================================================
# ? Window_DistributeParameterList
#------------------------------------------------------------------------------
#   ???????????????????????????????
#==============================================================================

class Window_DistributeParameterList < Window_Selectable
  #--------------------------------------------------------------------------
  # ? ?????????
  #     actor : ????
  #--------------------------------------------------------------------------
  def initialize(actor)
    off_h = (WLH + 32) * 2
    super(0, off_h, Graphics.width / 2 + 80, Graphics.height - off_h)
    @actor = actor
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # ? ?????????? Symbol ???
  #--------------------------------------------------------------------------
  def parameter_symbol
    return @data[self.index]
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def refresh
    @data = []
    gain_params = KGC::DistributeParameter::GAIN_PARAMETER
    KGC::DistributeParameter::PARAMS.each { |param|
      next if gain_params[param] == nil
      @data << param
    }
    @item_max = @data.size
    create_contents
    draw_caption
    @item_max.times { |i| draw_item(i, @actor.can_distribute?(@data)) }
  end
  #--------------------------------------------------------------------------
  # ? ????????????
  #     index : ????
  #--------------------------------------------------------------------------
  def item_rect(index)
    rect = super(index)
    rect.y += WLH
    return rect
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def draw_caption
    self.contents.font.color = system_color
    self.contents.draw_text(  4, 0, 96, WLH, "Parameter")
    self.contents.draw_text(120, 0, 40, WLH, Vocab.rp, 2)
    self.contents.draw_text(170, 0, 60, WLH, "Gewinnung", 2)
    self.contents.draw_text(240, 0, 80, WLH, "Maximum", 2)
    self.contents.font.color = normal_color
  end
  #--------------------------------------------------------------------------
  # ? ?????
  #     index   : ????
  #     enabled : ?????
  #--------------------------------------------------------------------------
  def draw_item(index, enabled = true)
    rect = item_rect(index)
    self.contents.clear_rect(rect)
    item = @data[index]
    if item != nil
      draw_parameter(rect.x, rect.y, @data[index], enabled)
    end
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #     x       : ??? X ??
  #     y       : ??? Y ??
  #     type    : ??????
  #     enabled : ?????
  #--------------------------------------------------------------------------
  def draw_parameter(x, y, type, enabled)
    case type
    when :maxhp
      name  = Vocab.hp
    when :maxmp
      name  = Vocab.mp
    when :atk
      name  = Vocab.atk
    when :def
      name  = Vocab.def
    when :spi
      name  = Vocab.spi
    when :agi
      name  = Vocab.agi
    when :hit
      name  = Vocab.hit
    when :eva
      name  = Vocab.eva
    when :cri
      name  = Vocab.cri
    else
      return
    end

    self.contents.font.color = normal_color
    self.contents.font.color.alpha = enabled ? 255 : 128
    self.contents.draw_text(x + 4, y, 96, WLH, name)

    gain = KGC::DistributeParameter::GAIN_PARAMETER[type]
    self.contents.draw_text(x + 120, y, 40, WLH, gain[0], 2)
    value = sprintf("%+d", gain[1])
    self.contents.draw_text(x + 190, y, 40, WLH, value, 2)
    value = sprintf("%3d/%3d", @actor.distributed_count(type), gain[2])
    self.contents.draw_text(x + 236, y, 80, WLH, value, 2)
    self.contents.font.color = normal_color
  end
end

#???????????????????????????????????????

#==============================================================================
# ? Window_DistributeParameterStatus
#------------------------------------------------------------------------------
#   ???????????????????????????????
#==============================================================================

class Window_DistributeParameterStatus < Window_Base
  #--------------------------------------------------------------------------
  # ? ?????????
  #     actor : ????
  #--------------------------------------------------------------------------
  def initialize(actor)
    dx = Graphics.width / 2 + 80
    off_h = (WLH + 32) * 2
    super(dx, off_h, Graphics.width - dx, Graphics.height - off_h)
    @actor = actor
    refresh
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(0, 0, width - 32, WLH, "Parameter", 1)
    self.contents.font.color = normal_color
    dy = WLH
    gain_params = KGC::DistributeParameter::GAIN_PARAMETER
    KGC::DistributeParameter::PARAMS.each { |param|
      next if gain_params[param] == nil
      draw_parameter(0, dy, param)
      dy += WLH
    }
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #     x    : ??? X ??
  #     y    : ??? Y ??
  #     type : ??????
  #--------------------------------------------------------------------------
  def draw_parameter(x, y, type)
    case type
    when :maxhp
      name  = Vocab.hp
      value = @actor.maxhp
    when :maxmp
      name  = Vocab.mp
      value = @actor.maxmp
    when :atk
      name  = Vocab.atk
      value = @actor.atk
    when :def
      name  = Vocab.def
      value = @actor.def
    when :spi
      name  = Vocab.spi
      value = @actor.spi
    when :agi
      name  = Vocab.agi
      value = @actor.agi
    when :hit
      name  = Vocab.hit
      value = @actor.hit
    when :eva
      name  = Vocab.eva
      value = @actor.eva
    when :cri
      name  = Vocab.cri
      value = @actor.cri
    else
      return
    end
    draw_actor_distribute_gauge(@actor, type, x + 106, y, 48)
    self.contents.font.color = system_color
    self.contents.draw_text(x + 4, y, 96, WLH, name)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 106, y, 48, WLH, value, 2)
  end
end

#???????????????????????????????????????

#==============================================================================
# ? Scene_Map
#==============================================================================

class Scene_Map < Scene_Base
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  alias update_scene_change_KGC_DistributeParameter update_scene_change
  def update_scene_change
    return if $game_player.moving?    # ??????????

    if $game_temp.next_scene == :distribute_parameter
      call_distribute_parameter
      return
    end

    update_scene_change_KGC_DistributeParameter
  end
  #--------------------------------------------------------------------------
  # ? ?????????????????
  #--------------------------------------------------------------------------
  def call_distribute_parameter
    $game_temp.next_scene = nil
    $scene = Scene_DistributeParameter.new(
      $game_temp.next_scene_actor_index,
      0,
      Scene_DistributeParameter::HOST_MAP)
  end
end

#???????????????????????????????????????

#==============================================================================
# ? Scene_Menu
#==============================================================================

class Scene_Menu < Scene_Base
  if KGC::DistributeParameter::USE_MENU_DISTRIBUTE_PARAMETER_COMMAND
  #--------------------------------------------------------------------------
  # ? ????????????
  #--------------------------------------------------------------------------
  alias create_command_window_KGC_DistributeParameter create_command_window
  def create_command_window
    create_command_window_KGC_DistributeParameter

    return if $imported["CustomMenuCommand"]

    @__command_distribute_parameter_index =
      @command_window.add_command(Vocab.distribute_parameter)
    if @command_window.oy > 0
      @command_window.oy -= Window_Base::WLH
    end
    @command_window.index = @menu_index
  end
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  alias update_command_selection_KGC_DistributeParameter update_command_selection
  def update_command_selection
    call_distribute_parameter_flag = false
    if Input.trigger?(Input::C)
      case @command_window.index
      when @__command_distribute_parameter_index  # ?????????
        call_distribute_parameter_flag = true
      end
    end

    # ??????????????
    if call_distribute_parameter_flag
      if $game_party.members.size == 0
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      start_actor_selection
      return
    end

    update_command_selection_KGC_DistributeParameter
  end
  #--------------------------------------------------------------------------
  # ? ?????????
  #--------------------------------------------------------------------------
  alias update_actor_selection_KGC_DistributeParameter update_actor_selection
  def update_actor_selection
    if Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when @__command_distribute_parameter_index  # ?????????
        $scene = Scene_DistributeParameter.new(
          @status_window.index,
          @__command_distribute_parameter_index,
          Scene_DistributeParameter::HOST_MENU)
        return
      end
    end

    update_actor_selection_KGC_DistributeParameter
  end
end

#???????????????????????????????????????

#==============================================================================
# ? Scene_DistributeParameter
#------------------------------------------------------------------------------
#   ???????????????????????
#==============================================================================

class Scene_DistributeParameter < Scene_Base
  #--------------------------------------------------------------------------
  # ? ??
  #--------------------------------------------------------------------------
  HOST_MENU   = 0  # ????? : ????
  HOST_MAP    = 1  # ????? : ???
  #--------------------------------------------------------------------------
  # ? ?????????
  #     actor_index : ??????????
  #     menu_index  : ?????????????
  #     host_scene  : ????? (0..????  1..???)
  #--------------------------------------------------------------------------
  def initialize(actor_index = 0, menu_index = 0, host_scene = HOST_MENU)
    @actor_index = actor_index
    @menu_index = menu_index
    @host_scene = host_scene
  end
  #--------------------------------------------------------------------------
  # ? ????
  #--------------------------------------------------------------------------
  def start
    super
    create_menu_background

    @actor = $game_party.members[@actor_index]
    create_windows
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def create_windows
    @help_window = Window_Help.new
    @help_window.set_text(KGC::DistributeParameter::DISTRIBUTE_SCENE_CAPTION)
    dy = @help_window.height
    @actor_window = Window_DistributeParameterActor.new(0, dy, @actor)
    @parameter_window = Window_DistributeParameterList.new(@actor)
    @status_window = Window_DistributeParameterStatus.new(@actor)
  end
  #--------------------------------------------------------------------------
  # ? ????
  #--------------------------------------------------------------------------
  def terminate
    super
    dispose_menu_background
    @help_window.dispose
    @actor_window.dispose
    @parameter_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def return_scene
    case @host_scene
    when HOST_MENU
      $scene = Scene_Menu.new(@menu_index)
    when HOST_MAP
      $scene = Scene_Map.new
    end
  end
  #--------------------------------------------------------------------------
  # ? ??????
  #--------------------------------------------------------------------------
  def update
    super
    update_menu_background
    update_window
    if @parameter_window.active
      update_parameter_list
    end
  end
  #--------------------------------------------------------------------------
  # ? ???????
  #--------------------------------------------------------------------------
  def update_window
    @help_window.update
    @actor_window.update
    @parameter_window.update
    @status_window.update
  end
  #--------------------------------------------------------------------------
  # ? ????????
  #--------------------------------------------------------------------------
  def refresh_window
    @actor_window.refresh
    @parameter_window.refresh
    @status_window.refresh
    Graphics.frame_reset
  end
  #--------------------------------------------------------------------------
  # ? ??????????????
  #--------------------------------------------------------------------------
  def next_actor
    @actor_index += 1
    @actor_index %= $game_party.members.size
    $scene = Scene_DistributeParameter.new(@actor_index,
      @menu_index, @host_scene)
  end
  #--------------------------------------------------------------------------
  # ? ??????????????
  #--------------------------------------------------------------------------
  def prev_actor
    @actor_index += $game_party.members.size - 1
    @actor_index %= $game_party.members.size
    $scene = Scene_DistributeParameter.new(@actor_index,
      @menu_index, @host_scene)
  end
  #--------------------------------------------------------------------------
  # ? ?????? (???????????????????)
  #--------------------------------------------------------------------------
  def update_parameter_list
    if Input.trigger?(Input::cool.gif\" style=\"vertical-align:middle\" emoid=\"B)\" border=\"0\" alt=\"cool.gif\" /]
      Sound.play_cancel
      return_scene
    elsif input_growth?
      # ??
      param = @parameter_window.parameter_symbol
      unless @actor.can_distribute?(param)
        Sound.play_buzzer
        return
      end
      Input.repeat?(Input::C) ? Sound.play_decision : Sound.play_cursor
      @actor.rp_growth_effect(param)
      refresh_window
    elsif input_reverse_growth?
      # ??
      param = @parameter_window.parameter_symbol
      if @actor.distributed_count(param) == 0
        Sound.play_buzzer
        return
      end
      Input.repeat?(Input::A) ? Sound.play_decision : Sound.play_cursor
      @actor.rp_growth_effect(param, true)
      refresh_window
    elsif Input.trigger?(Input::R)
      Sound.play_cursor
      next_actor
    elsif Input.trigger?(Input::L)
      Sound.play_cursor
      prev_actor
    end
  end
  #--------------------------------------------------------------------------
  # ? ????
  #--------------------------------------------------------------------------
  def input_growth?
    if KGC::DistributeParameter::ENABLE_REVERSE_DISTRIBUTE
      return Input.repeat?(Input::C) || Input.repeat?(Input::RIGHT)
    else
      return Input.trigger?(Input::C)
    end
  end
  #--------------------------------------------------------------------------
  # ? ????
  #--------------------------------------------------------------------------
  def input_reverse_growth?
    if KGC::DistributeParameter::ENABLE_REVERSE_DISTRIBUTE
      return Input.repeat?(Input::A) || Input.repeat?(Input::LEFT)
    else
      return false
    end
  end
end

#???????????????????????????????????????

#==============================================================================
# ? Scene_File
#==============================================================================

class Scene_File < Scene_Base
  #--------------------------------------------------------------------------
  # ? ???????????
  #     file : ??????????????? (??????)
  #--------------------------------------------------------------------------
  alias read_save_data_KGC_DistributeParameter read_save_data
  def read_save_data(file)
    read_save_data_KGC_DistributeParameter(file)

    KGC::Commands.check_distribution_values
    Graphics.frame_reset
  end
end

Und hier noch 2 Screens:
Wie das im Menü ausieht (Natürlich habt ihr noch euer altes Menü das ist bloß meins)

Und so sieht das im System aus:

Hoffe das System Lohnt sich für euch.

Credit an KGC Software und Narutomaker
« Letzte Änderung: August 09, 2008, 00:56:25 von Master-M »


Punkteverteiling

Offline Jisatsu

  • VX-Kenner
  • ****
  • Beiträge: 457
Punkteverteiling
« Antwort #1 am: Juni 15, 2008, 16:07:32 »
Sieht schon mal klasse aus und ist eine echte Bereicherung für den Maker. Werd's vielleicht auch in meinem Projekt verwenden.

Punkteverteiling

Offline SatansRightHand

  • Metzelschnetzelnder Schentzelmetzler
  • Database-Verunstalter
  • **
  • Beiträge: 182
  • jaja...
Punkteverteiling
« Antwort #2 am: Juni 15, 2008, 17:08:19 »
lol...
ganeu nach sowas suche ich seid tagen

Punkteverteiling

Offline Master-M

  • FF IX Remaker
  • Mr. MACK-Tile
  • ***
  • Beiträge: 261
  • FF IX Remaken...
Punkteverteiling
« Antwort #3 am: Juni 15, 2008, 18:45:44 »
Ich bin froh das es hilft.


Punkteverteiling

Offline eugene222

  • König der Lügner
  • VX-Meister
  • ****
  • Beiträge: 675
Punkteverteiling
« Antwort #4 am: Juni 15, 2008, 19:50:22 »
Kannst du bitte auch erwähnen an wen man Credits geben soll?

Punkteverteiling

Offline Master-M

  • FF IX Remaker
  • Mr. MACK-Tile
  • ***
  • Beiträge: 261
  • FF IX Remaken...
Punkteverteiling
« Antwort #5 am: Juni 15, 2008, 19:54:49 »
Ich kann kein Potugisches huh.gif\" style=\"vertical-align:middle\" emoid=\":huh:\" border=\"0\" alt=\"huh.gif\" /] , aber ich glaub an "NaRuToMaKeR"
Doch ist schon richtig soweit ich jetzt lese (auf Deutsch^^)
Créditos:KGC Softwares e NaRuToMaKeR por traduzir!
« Letzte Änderung: Juni 15, 2008, 19:56:33 von Master-M »


Punkteverteiling

Offline OceanBlue

  • Palmenfan
  • VX-Großmeister
  • *****
  • Beiträge: 822
  • Back from the Dead
Punkteverteiling
« Antwort #6 am: Juni 15, 2008, 20:06:05 »
Nö, Credit an KGC Software (Narutomaker hat's nur übersetzt)


Punkteverteiling

Kenshin

  • Gast
Punkteverteiling
« Antwort #7 am: Juni 16, 2008, 17:43:53 »
geil habe ich grad eingefügt
  cool.gif\" style=\"vertical-align:middle\" emoid=\"B)\" border=\"0\" alt=\"cool.gif\" /]

Punkteverteiling

luffy

  • Gast
Punkteverteiling
« Antwort #8 am: Juni 16, 2008, 20:36:16 »

Punkteverteiling

Offline Master-M

  • FF IX Remaker
  • Mr. MACK-Tile
  • ***
  • Beiträge: 261
  • FF IX Remaken...
Punkteverteiling
« Antwort #9 am: Juni 18, 2008, 14:43:04 »
Ja ich Kenn das aber finde meins besser weil man sonst wenn man schon ein extra Status Menü gemacht hat das auch noch ändern muss.
« Letzte Änderung: September 21, 2008, 05:00:53 von Master-M »


Punkteverteiling

Kenshin

  • Gast
Punkteverteiling
« Antwort #10 am: Juni 18, 2008, 16:58:23 »
Deins ist auch bessa  dry.gif\" style=\"vertical-align:middle\" emoid=\"<_<\" border=\"0\" alt=\"dry.gif\" /]

Punkteverteiling

Offline Redeemer

  • Database-Verunstalter
  • **
  • Beiträge: 179
Punkteverteiling
« Antwort #11 am: Juni 25, 2008, 09:43:57 »
Top script kann man wirklich mal gebrauchen.

Gut gemacht Master-M. ;)

Re: Punkteverteiling

Spawn

  • Gast
Re: Punkteverteiling
« Antwort #12 am: August 02, 2008, 13:22:14 »
Kann man auch Variablen skillen anstat MaxHp oder Atk ?

wenn ja, kann mir jemand diesen skript genauer erklären ^^ ?

Re: Punkteverteiling

Offline Duke

  • Titel sind überbewertet!
  • RTP-Mapper
  • *
  • Beiträge: 45
  • Projekt: Übermensch
Re: Punkteverteiling
« Antwort #13 am: September 23, 2008, 23:04:29 »
Huhu,

ich hoffe mal, dass der Post jetzt nicht unter's Necroposting fällt! xD
Aber nen neues Thema hierzu aufzumachen wär ja Unfug.^^

Naja, hab bezüglich dieses Scripts ein Anliegen, bzw. eine Frage.^^

Also:
Ist ja schön und gut, dass die Punktverteilung im Menü stattfindet,
allerdings nutzt ich das MOG Menu Yui ...
Jetzt wollte ich die Punktverteilung durch ein Call-Script starten,
allerdings komm ich auf keinen konkreten Befehl dazu--- :(

Ich würde mir auch im MOG Menu Yui eine neue Scene für
die Punkteverteilung anlegen, allerdings bin ich hierzu auch zu doof! :D
Also mit dem XP konnte ich neue Szenen im Mogmenü erstllen...
Entweder hab ich's vergessen oder RGSS2 ist da ein wenig anders. D:

Ich wäre also froh, wenn mir jemand den Befehl zum Aufrufen per Call-Script
oder eben eine Erklärung zum Erstellen einer neuen Scene im Menü geben könnte.^^

MfG,
Duke

Hier nochmal der Link zum Mog Menü: http://www.atelier-rgss.com/RGSS/Menu/VX_Menu03.html
Hatte ich vergessen...^^"

Edit II:
Hat sich erledigt!^^
« Letzte Änderung: September 24, 2008, 07:39:35 von Duke »

Re: Punkteverteiling

Offline Sk!p

  • Foren-ReArchitekt
  • VX-Großmeister
  • *****
  • Beiträge: 975
  • Mit(t)arbeiter schreibt man mit einem T =P
    • Foren-ReArchitekt
Re: Punkteverteiling
« Antwort #14 am: September 23, 2008, 23:14:37 »
Wow das sieht klasse aus.
Ich denke das werde ich auf jeden Fall benutzen.
Mann kann nie genug vom Standart wegkommen. Top!

Sk!p

Klischee Antagonist! | Back From Hell To Conquer The World!


 


 Bild des Monats

rooftop party

Views: 3614
By: papilion

 Umfrage

  • Wer soll das BdM gewinnen?
  • Dot Kandidat 1
  • 3 (25%)
  • Dot Kandidat 2
  • 1 (8%)
  • Dot Kandidat 3
  • 2 (16%)
  • Dot Kandidat 4
  • 0 (0%)
  • Dot Kandidat 5
  • 6 (50%)
  • Stimmen insgesamt: 12
  • View Topic

 Schnellsuche





SimplePortal 2.3.3 © 2008-2010, SimplePortal