collapse collapse

 Community


 User Info




Willkommen Gast. Bitte einloggen oder registrieren.

 Partnerseiten

rpgvx.net

Das Forum ist offline

Autor Thema: Laden des Speicherstand nicht möglich  (Gelesen 1102 mal)

Offline skillcrow

  • Ralph
  • *
  • Beiträge: 4
Laden des Speicherstand nicht möglich
« am: Januar 21, 2012, 01:31:07 »
Hallo ich bin neu hier und hab gleich mal ne frage. Bitte nicht töten!

Hab in google geschaut hier im forum und hab nicht gefunden...

Mein problem ist das wenn ich das Spiel speicher und dann laden möchte eine fehlermeldung kommt


Script 'Level Punkte' line 131: NoMethodError occurred.

undefined method `check_distribution_values' for #<Game_Actors:0x37ccba0>



Scripte die ich verwende.

Spoiler for Hiden:
# Setup
#==============================================================================
QUESTLOGNAME = "Aufgaben"            # Questlog Menu name
QUEST_MENU_ITEM_1 = "Aktive Aufgaben"    # Active Quest name
QUEST_MENU_ITEM_2 = "Beendete Aufgaben"  # Completed Quest name
SIZE_VAR = 20                        # Character Size
MAP_FORMAT = "png"                   # Quest-Map Ending
#==============================================================================
class Questlog
#==============================================================================
  def addQuest(id,header,description,state = "")
   $activelog << [id,header,description,state]
  end
#------------------------------------------------------------------------------ 
  def updateQuest(id,description,state = "")
   for i in 0..$activelog.size-1
     if $activelog[0] == id
      $activelog[2] = description
      $activelog[3] = state
      break
     end
   end
  end
#------------------------------------------------------------------------------
  def completeQuest(id)
   for i in 0..$activelog.size-1
     if $activelog[0] == id
      $completedlog << $activelog
      $activelog.delete_at(i)
      break
     end
   end
  end
#------------------------------------------------------------------------------
  def deleteQuest(id)
   for i in 0..$activelog.size-1
     if $activelog[0] == id
      $activelog.delete_at(i)
      break
     end
   end
  end
#------------------------------------------------------------------------------
  def getQuestState(id)
   for i in 0..$activelog.size-1
     if $activelog[0] == id
      return $activelog[3]
      break
     end
   end
  end
 
end
#==============================================================================
class Scene_Questlog < Scene_Base
#==============================================================================
  def initialize(from_menu = true)
   @from_menu = from_menu
  end
 
  def start
   super
   create_menu_background
   @help_window = Window_Help.new
   @help_window.set_text(QUESTLOGNAME,1)
 
   s1 = QUEST_MENU_ITEM_1
   s2 = QUEST_MENU_ITEM_2
 
   @select_window = Window_Command.new(544,[s1,s2],2,1)
   @select_window.y = 55
   @select_window.active = true
 
  end
#------------------------------------------------------------------------------
  def terminate
   super
   dispose_menu_background
   @help_window.dispose
   @select_window.dispose
  end
#------------------------------------------------------------------------------ 
  def kill_questwindows
   @quest_window.dispose
  end 
#------------------------------------------------------------------------------
  def return_scene
   if @from_menu
     $scene = Scene_Menu.new(4)
   else
     $scene = Scene_Map.new
   end
  end
#------------------------------------------------------------------------------
  def update
   super
   update_menu_background
   @help_window.update
   if @select_window.active
     @select_window.update
     update_select_selection
   elsif @quest_window.active
     @quest_window.update
     update_quest_selection
   end
  end
#------------------------------------------------------------------------------
  def update_select_selection
   if Input.trigger?(Input::B)
     Sound.play_cancel
     return_scene
   elsif Input.trigger?(Input::C)
     case @select_window.index
     when 0
      $oldlog = false
      @quest_window = Window_Quest.new(0,110,272,(24*11)+42)
      @select_window.active = false
      @quest_window.active = true
     when 1
      $oldlog = true
      @quest_window = Window_Quest.new(0,110,272,(24*11)+42)
      @select_window.active = false
      @quest_window.active = true
     end     
   end
  end
#------------------------------------------------------------------------------ 
  def update_quest_selection
   if Input.trigger?(Input::B)
     Sound.play_cancel
     kill_questwindows
     @select_window.active = true
   end
  end
 
end
#==============================================================================
class Scene_Title < Scene_Base
#==============================================================================
  alias create_game_objects_additions create_game_objects
  def create_game_objects
   create_game_objects_additions
   $questlog = Questlog.new
   $activelog = Array.new
   $completedlog = Array.new
  end
 
end
#==============================================================================
class Window_Help < Window_Base
#==============================================================================
  def initialize(x = 0,y = 0, width = 544, height = WLH+32)
   super(x, y, width, height)
  end
 
end
#==============================================================================
class Window_Description < Window_Base
#==============================================================================
  def initialize(x = 0,y = 0, width = 544, height = WLH+32)
   super(x, y, width, height)
   @text = nil
   @contents_x = 0
   @contents_y = 0
   @line_count = 0          # Line count drawn up until now
   update
  end
#------------------------------------------------------------------------------ 
  def new_line
   @contents_x = 0
   @contents_y += WLH
   @line_count += 1
   @line_show_fast = false
  end
#------------------------------------------------------------------------------ 
  def finish_message
   @text = nil
   @line_count = 0
   @contents_x = 0
   @contents_y = 0
  end
#------------------------------------------------------------------------------ 
  def write_text(str)
   if str != nil || str != ""
     create_contents
     update_msg(str)
   end
  end
#------------------------------------------------------------------------------ 
  def update_msg(str)
   str.each_line{|str2|iterator(str2)}
   finish_message
  end
#------------------------------------------------------------------------------   
  def iterator(str2)
   contents.font.size = SIZE_VAR
   contents.draw_text(@contents_x, @contents_y, str2.size*40, WLH, str2.delete("\n"))
   c_width = contents.text_size(str2).width
   @contents_x += c_width
   new_line
  end
 
end
#==============================================================================
class Window_Quest < Window_Selectable
#==============================================================================
  def initialize(x, y, width, height)
   super(x, y, width, height)
   @column_max = 1
   self.index = 0
 
   @quest_helper = Window_Description.new(271,110,273,(24*11)+42)
 
   refresh
  end
#------------------------------------------------------------------------------
  def refresh
   @data = []
   if !$oldlog
     for i in (0..$activelog.size-1)
      @data.push($activelog)
     end
   else
     for i in (0..$completedlog.size-1)
      @data.push($completedlog)
     end
   end
   @item_max = @data.size
   create_contents
   for i in 0...@item_max
     draw_item(i)
   end
  end
#------------------------------------------------------------------------------
  def draw_item(index)
   rect = item_rect(index)
   self.contents.clear_rect(rect)
   item = @data[index][1]
   if item != nil
     rect.width -= 4
     self.contents.draw_text(rect.x, rect.y, 172, WLH, item)
   end
  end
#------------------------------------------------------------------------------
  alias update_addition update
  def update
   update_addition
   update_description(@index)
   update_selection
  end
#------------------------------------------------------------------------------
  def update_selection
   if Input.trigger?(Input::B)
     Sound.play_cancel
     @quest_helper.dispose
     if @quest_map != nil
      @quest_map_bitmap.bitmap.dispose
      @quest_map_bitmap.dispose
      @quest_map.dispose
      @quest_map_viewport.dispose
      @quest_map = nil
     end
   end
  end
#------------------------------------------------------------------------------   
  def update_description(id)
   if defined?(@data[id][2])
     @quest_helper.write_text(@data[id][2])
     if @quest_map == nil
      if File.exist?("Graphics/Questmaps/"+@data[id][1]+"."+MAP_FORMAT)
        self.height /= 3
        @quest_map = Window_Description.new(0,210,272,(24*7)+38)
        @quest_map_bitmap = Sprite.new
        @quest_map_viewport = Viewport.new(3,213,268,(24*7)+35)
        @quest_map_bitmap.viewport = @quest_map_viewport
        @quest_map_bitmap.bitmap = Cache.questmaps(@data[id][1])
        @quest_map_bitmap.viewport.z = 150
      end
     else
      if File.exist?("Graphics/Questmaps/"+@data[id][1]+"."+MAP_FORMAT)
        @quest_map_bitmap.bitmap = Cache.questmaps(@data[id][1])
      else
        self.height *= 3
        @quest_map_bitmap.bitmap.dispose
        @quest_map_bitmap.dispose
        @quest_map.dispose
        @quest_map_viewport.dispose
        @quest_map = nil
      end
     end
   end
  end
 
end
#==============================================================================
class Scene_File < Scene_Base
#==============================================================================
  alias write_save_data_adds write_save_data
  def write_save_data(file)
   write_save_data_adds(file)   
   Marshal.dump($activelog,         file)
   Marshal.dump($completedlog,      file)
   Marshal.dump($questlog,         file)
  end
 
  alias read_save_data_adds read_save_data
  def read_save_data(file)
   read_save_data_adds(file)
   $activelog         = Marshal.load(file)
   $completedlog      = Marshal.load(file)
   $questlog         = Marshal.load(file)
  end
end
#==============================================================================
module Cache
#============================================================================== 
  def self.questmaps(filename)
   load_bitmap("Graphics/Questmaps/", filename)
  end
end

Re: Laden des Speicherstand nicht möglich

Offline skillcrow

  • Ralph
  • *
  • Beiträge: 4
Re: Laden des Speicherstand nicht möglich
« Antwort #1 am: Januar 21, 2012, 01:42:33 »
und
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

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


Re: Laden des Speicherstand nicht möglich

Offline skillcrow

  • Ralph
  • *
  • Beiträge: 4
Re: Laden des Speicherstand nicht möglich
« Antwort #2 am: Januar 21, 2012, 01:43:36 »
Spoiler for Hiden:
#==============================================================================
# ? 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::C)
      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

sry script musste ich teilen da sonnst nicht passte

wäre net wenn mir jemand helfen könnte

Re: Laden des Speicherstand nicht möglich

Offline Lucaya

  • Ralph
  • *
  • Beiträge: 10
Re: Laden des Speicherstand nicht möglich
« Antwort #3 am: Januar 21, 2012, 01:50:54 »
Zitat
Script 'Level Punkte' line 131: NoMethodError occurred.

undefined method `check_distribution_values' for #<Game_Actors:0x37ccba0>

Hast du an einem Script rumgebastelt? Ahh moment. Es sieht so aus, als hättest du ein fehlerhaftes oder ein altes, welches für den rpm maker xp oder so geschrieben wurde. Dann ist das kein Wunder. Da ich mich selber aber leider nicht mit der Sprache "Ruby"
auskenne, ist das lediglich spekulation.

Der Fehler geht von der Zeile "131" im Script Level Punkte. Da würde ich als erstes mal naschauen.

Viel Erfolg !!

Re: Laden des Speicherstand nicht möglich

Offline FlipelyFlip

  • Will sein Alter nicht verraten xD
  • Administrator
  • VX-Großmeister
  • ****
  • Beiträge: 884
  • Heyho (=
    • Flips Musik Kariere auf Facebook xD
Re: Laden des Speicherstand nicht möglich
« Antwort #4 am: Januar 21, 2012, 11:43:51 »
heyey,

@lucaya: Wenn dieses Script vom XP wäre, würde es schon beim testen zu einem fehler kommen, von daher hat das nix mit dem XP zu tun (:

@skillcrow: da das Level Punkte script aus 2 Scripten besteht, würde mich intressiern welches so benannt wurde (:
btw. andre Frage: Wenn du den Speicherstand lädst, hast du dann iwie ein neues Script oder sowas eingefügt? Wenn ja, dann mach beim testen solcher dinge immer Neues Spiel, ansonsten können viele Fehler entstehen, die normal nicht wären (:

lg flip

Re: Laden des Speicherstand nicht möglich

Offline skillcrow

  • Ralph
  • *
  • Beiträge: 4
Re: Laden des Speicherstand nicht möglich
« Antwort #5 am: Januar 23, 2012, 12:07:02 »
@ FlipelyFlip : ne Das Levelup script ist nur 1 script prob ist nur das ich nicht mehr wie 20.000 zeichen verwenden kann..

da ist auch der fehler und rumgebastelt hab ich da nix. Der fehler ist auf 131 zeile das weiß ich nur erkenne ich da kein fehler . Bin auch in scripten noch unerfahren und bevor ich was falsches mache oder alles kaputt mache wollte ich mal fragen.

der fehler ist in der zeile

Spoiler for Hiden:
#==============================================================================
# ? KGC::Commands
#==============================================================================

module KGC::Commands
  module_function
  #--------------------------------------------------------------------------
  # ? ???????????????????
  #--------------------------------------------------------------------------
  def check_distribution_values
    (1...$data_actors.size).each { |i|
      $game_actors.check_distribution_values <------------------------ Da zeigt es denn fehler an
    }
  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

#???????????????????????????????????????
ist nur ein ausschnitt vom script.

Re: Laden des Speicherstand nicht möglich

Offline FlipelyFlip

  • Will sein Alter nicht verraten xD
  • Administrator
  • VX-Großmeister
  • ****
  • Beiträge: 884
  • Heyho (=
    • Flips Musik Kariere auf Facebook xD
Re: Laden des Speicherstand nicht möglich
« Antwort #6 am: Januar 23, 2012, 14:27:37 »
gib mir mal bitte die zeile 131 an, so kann ich schwer überprüfen welche es ist ._.

Re: Laden des Speicherstand nicht möglich

Offline Domin0e

  • Leaf in the Wind
  • Mr. MACK-Tile
  • ***
  • Beiträge: 237
    • Mein kleiner Blog~
Re: Laden des Speicherstand nicht möglich
« Antwort #7 am: Januar 23, 2012, 16:49:29 »
Zitat
      $game_actors.check_distribution_values <------------------------ Da zeigt es denn fehler an

Er hat se doch markiert.. ;)
Aber zumindest ein paar [.code]-Tags wären nicht verkehrt gewesen :)
« Letzte Änderung: Januar 24, 2012, 17:29:50 von Domin0e »
"Twelve highlanders and a bagpipe make a rebellion." - Scottish Proverb

Mein kleiner Blog

Re: Laden des Speicherstand nicht möglich

Offline FlipelyFlip

  • Will sein Alter nicht verraten xD
  • Administrator
  • VX-Großmeister
  • ****
  • Beiträge: 884
  • Heyho (=
    • Flips Musik Kariere auf Facebook xD
Re: Laden des Speicherstand nicht möglich
« Antwort #8 am: Januar 23, 2012, 17:39:43 »
achso habs mir nich ganz angeguckt, werd später dann mal ev. ne lösung posten

edit: So grade nochma drübergeguckt und finde keinen direkten fehler, muss einfach wohl an der version liegen.
Diese version dürfte sogar noch funktionieren: >>Link <<

lg flip

 


 Bild des Monats

rooftop party

Views: 3582
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