UltimaForum

Skrypty [VX] - Menu z dodatkami

SaE - Pią 09 Paź, 2009 18:33
Temat postu: Menu z dodatkami
Witajcie Mejkerowcy ^^ Idąc za przykładem użytkowników, którzy od jakiegoś czasu nie opuszczają działu Skrypty VX, postawnowiłam też się przysłużyć.

Mój pierwszy skypt to przerobione nieco menu, dodane są:
- pasek doświadczenia,
- ikony statusów bohaterów,
- okno z lokacją
- okno z czasem gry



A to kod:

Spoiler:

Kod:
##################################################
# Mog Basic Menu Plus V 1.0                      #
##################################################
# By Moghunter
# korekta SaE
##############

module Szkodnik_Sae       
Lokacja = "Lokacja"
Czas_gry = "Czas Gry"
Doswiadczenie = "EXP"     
end


class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end

class Window_Base < Window 

 
  def draw_actor_level_menu(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, WLH, Vocab::level_a)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 16, y, 24, WLH, actor.level, 2)
  end 
  def draw_actor_class_menu(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 85, WLH, actor.class.name)
  end   
 def exp_gauge_color1
    return text_color(30)
  end
  def exp_gauge_color2
    return text_color(31)
  end 
def draw_actor_exp_meter(actor, x, y, width = 100) 
  if actor.next_exp != 0
  exp = actor.now_exp
  else
  exp = 1
  end
    gw = width * exp / [actor.next_exp, 1].max
    gc1 = exp_gauge_color1
    gc2 = exp_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)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 30, WLH, Szkodnik_Sae::Doswiadczenie)   
    self.contents.font.color = normal_color
    xr = x + width
    self.contents.draw_text(xr - 60, y, 60, WLH,  actor.next_rest_exp_s, 2)   
end
end

class Window_MenuStatus < Window_Selectable
  def initialize(x, y)
    super(x, y, 384, 416)
    refresh
    self.active = false
    self.index = -1
  end
  def refresh
    self.contents.clear
    @item_max = $game_party.members.size
    for actor in $game_party.members
      draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
      x = 104
      y = actor.index * 96 + WLH / 2
      draw_actor_name(actor, x, y)
      draw_actor_class_menu(actor, x + 120, y)
      draw_actor_level_menu(actor, x + 200, y)
      draw_actor_state(actor, x, y + WLH * 2)
      draw_actor_hp(actor, x + 120, y + WLH * 1)
      draw_actor_mp(actor, x + 120, y + WLH * 2)
      draw_actor_exp_meter(actor, x , y + WLH * 1)
    end
  end
  def update_cursor
    if @index < 0               
      self.cursor_rect.empty
    elsif @index < @item_max   
      self.cursor_rect.set(0, @index * 96, contents.width, 96)
    elsif @index >= 100         
      self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
    else                     
      self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
    end
  end
end

class Game_Map
attr_reader   :map_id 
def mpname
$mpname = load_data("Data/MapInfos.rvdata")
$mpname[@map_id].name
end
end

class Window_Mapname < Window_Base
  def initialize(x, y)
    super(x, y, 160, WLH + 64)
    refresh
  end 
def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, Szkodnik_Sae::Lokacja)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_map.mpname.to_s, 2)
end
end

class Window_Time < Window_Base
  def initialize(x, y)
    super(x, y, 160, WLH + 64)
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, Szkodnik_Sae::Czas_gry)
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, text, 2)
end
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end

class Scene_Menu   
  def main
    start                         
    perform_transition           
    Input.update                 
    loop do
      Graphics.update           
      Input.update             
      update                     
      break if $scene != self     
    end
    Graphics.update
    pre_terminate             
    Graphics.freeze               
    terminate                   
  end 
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end 
  def create_menu_background
    @menuback_sprite = Sprite.new
    @menuback_sprite.bitmap = $game_temp.background_bitmap
    @menuback_sprite.color.set(16, 16, 16, 128)
    update_menu_background
  end 
  def create_menu_background
    @menuback_sprite = Sprite.new
    @menuback_sprite.bitmap = $game_temp.background_bitmap
    @menuback_sprite.color.set(16, 16, 16, 128)
    update_menu_background
  end
  def dispose_menu_background
    @menuback_sprite.dispose
  end
  def update_menu_background
  end 
  def perform_transition
     Graphics.transition(10)
  end
  def start
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(0, 360)
    @status_window = Window_MenuStatus.new(160, 0)
    @playtime_window = Window_Time .new(0, 270)
    @mapname_window = Window_Mapname.new(0, 178)
    @status_window.openness = 0
    @playtime_window.openness = 0
    @mapname_window.openness = 0
    @gold_window.openness = 0
    @status_window.open
    @playtime_window.open
    @mapname_window.open
    @gold_window.open
  end
  def pre_terminate
    @status_window.close
    @playtime_window.close
    @mapname_window.close
    @gold_window.close
    @command_window.close
    begin
    @status_window.update
    @playtime_window.update
    @mapname_window.update
    @gold_window.update
    @command_window.update
    Graphics.update
    end until @status_window.openness == 0
  end 
  def terminate
    dispose_menu_background
    @command_window.dispose
    @gold_window.dispose
    @status_window.dispose
    @playtime_window.dispose
    @mapname_window.dispose
  end
  def update
    update_menu_background
    @command_window.update
    @gold_window.update
    @status_window.update
    @mapname_window.update
    @playtime_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
    @command_window.index = @menu_index
    @command_window.openness = 0
    @command_window.open
    if $game_party.members.size == 0           
      @command_window.draw_item(0, false)     
      @command_window.draw_item(1, false)     
      @command_window.draw_item(2, false)     
      @command_window.draw_item(3, false)   
    end
    if $game_system.save_disabled             
      @command_window.draw_item(4, false)     
    end
  end
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0     
        $scene = Scene_Item.new
      when 1,2,3   
        start_actor_selection
      when 4       
        $scene = Scene_File.new(true, false, false)
      when 5     
        $scene = Scene_End.new
      end
    end
  end
  def start_actor_selection
    @command_window.active = false
    @status_window.active = true
    if $game_party.last_actor_index < @status_window.item_max
      @status_window.index = $game_party.last_actor_index
    else
      @status_window.index = 0
    end
  end
  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
  end
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1
        $scene = Scene_Skill.new(@status_window.index)
      when 2   
        $scene = Scene_Equip.new(@status_window.index)
      when 3 
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end
end
$mogscript = {} if $mogscript == nil
$mogscript["basic_menu_plus"] = true


Czeliosss - Wto 03 Lis, 2009 17:46

Fajny skrypt, ale nie działa z Beskyriuszem. Jak można ulepszyć go to proszę o pomoc
Ayene - Wto 03 Lis, 2009 20:23

Proszę, to skrypt z dodanym bestiariuszem :-)

Spoiler:

Kod:
##################################################
# Mog Basic Menu Plus V 1.0                      #
##################################################
# By Moghunter
# korekta SaE
##############

module Szkodnik_Sae       
Lokacja = "Lokacja"
Czas_gry = "Czas Gry"
Doswiadczenie = "EXP"     
end


class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end

class Window_Base < Window

 
  def draw_actor_level_menu(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, WLH, Vocab::level_a)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 16, y, 24, WLH, actor.level, 2)
  end
  def draw_actor_class_menu(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 85, WLH, actor.class.name)
  end   
 def exp_gauge_color1
    return text_color(30)
  end
  def exp_gauge_color2
    return text_color(31)
  end
def draw_actor_exp_meter(actor, x, y, width = 100)
  if actor.next_exp != 0
  exp = actor.now_exp
  else
  exp = 1
  end
    gw = width * exp / [actor.next_exp, 1].max
    gc1 = exp_gauge_color1
    gc2 = exp_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)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 30, WLH, Szkodnik_Sae::Doswiadczenie)   
    self.contents.font.color = normal_color
    xr = x + width
    self.contents.draw_text(xr - 60, y, 60, WLH,  actor.next_rest_exp_s, 2)   
end
end

class Window_MenuStatus < Window_Selectable
  def initialize(x, y)
    super(x, y, 384, 416)
    refresh
    self.active = false
    self.index = -1
  end
  def refresh
    self.contents.clear
    @item_max = $game_party.members.size
    for actor in $game_party.members
      draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
      x = 104
      y = actor.index * 96 + WLH / 2
      draw_actor_name(actor, x, y)
      draw_actor_class_menu(actor, x + 120, y)
      draw_actor_level_menu(actor, x + 200, y)
      draw_actor_state(actor, x, y + WLH * 2)
      draw_actor_hp(actor, x + 120, y + WLH * 1)
      draw_actor_mp(actor, x + 120, y + WLH * 2)
      draw_actor_exp_meter(actor, x , y + WLH * 1)
    end
  end
  def update_cursor
    if @index < 0               
      self.cursor_rect.empty
    elsif @index < @item_max   
      self.cursor_rect.set(0, @index * 96, contents.width, 96)
    elsif @index >= 100         
      self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
    else                     
      self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
    end
  end
end

class Game_Map
attr_reader   :map_id
def mpname
$mpname = load_data("Data/MapInfos.rvdata")
$mpname[@map_id].name
end
end

class Window_Mapname < Window_Base
  def initialize(x, y)
    super(x, y, 160, 80)
    refresh
  end
def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, -10, 120, 32, Szkodnik_Sae::Lokacja)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 20, 120, 32, $game_map.mpname.to_s, 2)
end
end

class Window_Time < Window_Base
  def initialize(x, y)
    super(x, y, 160, 80)
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, -10, 120, 32, Szkodnik_Sae::Czas_gry)
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 20, 120, 32, text, 2)
end
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end

class Scene_Menu   
  def main
    start                         
    perform_transition           
    Input.update                 
    loop do
      Graphics.update           
      Input.update             
      update                     
      break if $scene != self     
    end
    Graphics.update
    pre_terminate             
    Graphics.freeze               
    terminate                   
  end
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  def create_menu_background
    @menuback_sprite = Sprite.new
    @menuback_sprite.bitmap = $game_temp.background_bitmap
    @menuback_sprite.color.set(16, 16, 16, 128)
    update_menu_background
  end
  def create_menu_background
    @menuback_sprite = Sprite.new
    @menuback_sprite.bitmap = $game_temp.background_bitmap
    @menuback_sprite.color.set(16, 16, 16, 128)
    update_menu_background
  end
  def dispose_menu_background
    @menuback_sprite.dispose
  end
  def update_menu_background
  end
  def perform_transition
     Graphics.transition(10)
  end
  def start
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(0, 360)
    @status_window = Window_MenuStatus.new(160, 0)
    @playtime_window = Window_Time.new(0, 280)
    @mapname_window = Window_Mapname.new(0, 200)
    @status_window.openness = 0
    @playtime_window.openness = 0
    @mapname_window.openness = 0
    @gold_window.openness = 0
    @status_window.open
    @playtime_window.open
    @mapname_window.open
    @gold_window.open
  end
  def pre_terminate
    @status_window.close
    @playtime_window.close
    @mapname_window.close
    @gold_window.close
    @command_window.close
    begin
    @status_window.update
    @playtime_window.update
    @mapname_window.update
    @gold_window.update
    @command_window.update
    Graphics.update
    end until @status_window.openness == 0
  end
  def terminate
    dispose_menu_background
    @command_window.dispose
    @gold_window.dispose
    @status_window.dispose
    @playtime_window.dispose
    @mapname_window.dispose
  end
  def update
    update_menu_background
    @command_window.update
    @gold_window.update
    @status_window.update
    @mapname_window.update
    @playtime_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = Vocab::save
    s6 = Vocab::game_end
    s7 = 'Bestiariusz'
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
    @command_window.index = @menu_index
    @command_window.openness = 0
    @command_window.open
    if $game_party.members.size == 0           
      @command_window.draw_item(0, false)     
      @command_window.draw_item(1, false)     
      @command_window.draw_item(2, false)     
      @command_window.draw_item(3, false)   
    end
    if $game_system.save_disabled             
      @command_window.draw_item(4, false)     
    end
  end
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0     
        $scene = Scene_Item.new
      when 1,2,3   
        start_actor_selection
      when 4       
        $scene = Scene_File.new(true, false, false)
      when 5     
        $scene = Scene_End.new
      when 6
        $scene = Scene_MonsterBook.new
      end
    end
  end
  def start_actor_selection
    @command_window.active = false
    @status_window.active = true
    if $game_party.last_actor_index < @status_window.item_max
      @status_window.index = $game_party.last_actor_index
    else
      @status_window.index = 0
    end
  end
  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
  end
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1
        $scene = Scene_Skill.new(@status_window.index)
      when 2   
        $scene = Scene_Equip.new(@status_window.index)
      when 3
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end
end
$mogscript = {} if $mogscript == nil
$mogscript["basic_menu_plus"] = true


Pozdrawiam :-)

Czeliosss - Sob 07 Lis, 2009 18:05

Jak dodałem ten skrypt i chciałem zobaczyć bestariusz to wyskoczył mi błąd. Proszę o pomoc.
Ayene - Pon 09 Lis, 2009 09:10

A z którego bestiariusza korzystasz? I wklej tutaj jak możesz screena z wyskakującym błędem.
Czeliosss - Sro 11 Lis, 2009 16:46

Wstawię jak będę miał ustawione HTML
Azsak von Triger - Sro 11 Lis, 2009 16:59

Po co ci Html :!:
Dodaj zdjęcie na powiedzmy Imageshack ,i jego link wpisz pomiędzy znaczniki [img]link[/img] :-) To wszystko ,więc html nie jest ci potrzebny :-)

Czeliosss - Czw 12 Lis, 2009 21:48

Ok to stronka http://img248.imageshack....dbestariusz.png
Ayene - Czw 12 Lis, 2009 21:58

A masz w ogóle skrypt bestiariusza? Coś mi wygląda, że umieściłeś tylko powyższy skrypt, który jest jedynie z nim kompatybilny. Musisz umieścić w projekcie jeszcze ten skrypt.

A jeśli masz skrypt bestiariusza, to w jego treści zmień linijkę
Kod:
SHOW_IN_MENU = true # Pokazuj Bestiariusz w Menu? (true / false)

na
Kod:
SHOW_IN_MENU = false # Pokazuj Bestiariusz w Menu? (true / false)

Czeliosss - Czw 12 Lis, 2009 22:01

Zapomniałem o nim. Już wszystko działa.
MomoMarcin3 - Nie 31 Sty, 2010 13:33

Jest możliwość aby działał skrypt z rozdawaniem punktów co poziom?
Ayene - Nie 31 Sty, 2010 17:48

Zamień powyższy skrypt w całości na poniższy:
Spoiler:

Kod:
##################################################
# Mog Basic Menu Plus V 1.0                      #
##################################################
# By Moghunter
# korekta SaE
##############

module Szkodnik_Sae       
Lokacja = "Lokacja"
Czas_gry = "Czas Gry"
Doswiadczenie = "EXP"     
end


class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end

class Window_Base < Window

 
  def draw_actor_level_menu(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, WLH, Vocab::level_a)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 16, y, 24, WLH, actor.level, 2)
  end
  def draw_actor_class_menu(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 85, WLH, actor.class.name)
  end   
 def exp_gauge_color1
    return text_color(30)
  end
  def exp_gauge_color2
    return text_color(31)
  end
def draw_actor_exp_meter(actor, x, y, width = 100)
  if actor.next_exp != 0
  exp = actor.now_exp
  else
  exp = 1
  end
    gw = width * exp / [actor.next_exp, 1].max
    gc1 = exp_gauge_color1
    gc2 = exp_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)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 30, WLH, Szkodnik_Sae::Doswiadczenie)   
    self.contents.font.color = normal_color
    xr = x + width
    self.contents.draw_text(xr - 60, y, 60, WLH,  actor.next_rest_exp_s, 2)   
end
end

class Window_MenuStatus < Window_Selectable
  def initialize(x, y)
    super(x, y, 384, 416)
    refresh
    self.active = false
    self.index = -1
  end
  def refresh
    self.contents.clear
    @item_max = $game_party.members.size
    for actor in $game_party.members
      draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
      x = 104
      y = actor.index * 96 + WLH / 2
      draw_actor_name(actor, x, y)
      draw_actor_class_menu(actor, x + 120, y)
      draw_actor_level_menu(actor, x + 200, y)
      draw_actor_state(actor, x, y + WLH * 2)
      draw_actor_hp(actor, x + 120, y + WLH * 1)
      draw_actor_mp(actor, x + 120, y + WLH * 2)
      draw_actor_exp_meter(actor, x , y + WLH * 1)
    end
  end
  def update_cursor
    if @index < 0               
      self.cursor_rect.empty
    elsif @index < @item_max   
      self.cursor_rect.set(0, @index * 96, contents.width, 96)
    elsif @index >= 100         
      self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
    else                     
      self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
    end
  end
end

class Game_Map
attr_reader   :map_id
def mpname
$mpname = load_data("Data/MapInfos.rvdata")
$mpname[@map_id].name
end
end

class Window_Mapname < Window_Base
  def initialize(x, y)
    super(x, y, 160, 80)
    refresh
  end
def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, -10, 120, 32, Szkodnik_Sae::Lokacja)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 20, 120, 32, $game_map.mpname.to_s, 2)
end
end

class Window_Time < Window_Base
  def initialize(x, y)
    super(x, y, 160, 80)
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, -10, 120, 32, Szkodnik_Sae::Czas_gry)
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 20, 120, 32, text, 2)
end
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end

class Scene_Menu   
  def main
    start                         
    perform_transition           
    Input.update                 
    loop do
      Graphics.update           
      Input.update             
      update                     
      break if $scene != self     
    end
    Graphics.update
    pre_terminate             
    Graphics.freeze               
    terminate                   
  end
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  def create_menu_background
    @menuback_sprite = Sprite.new
    @menuback_sprite.bitmap = $game_temp.background_bitmap
    @menuback_sprite.color.set(16, 16, 16, 128)
    update_menu_background
  end
  def create_menu_background
    @menuback_sprite = Sprite.new
    @menuback_sprite.bitmap = $game_temp.background_bitmap
    @menuback_sprite.color.set(16, 16, 16, 128)
    update_menu_background
  end
  def dispose_menu_background
    @menuback_sprite.dispose
  end
  def update_menu_background
  end
  def perform_transition
     Graphics.transition(10)
  end
  def start
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(0, 360)
    @status_window = Window_MenuStatus.new(160, 0)
    @playtime_window = Window_Time.new(0, 280)
    @mapname_window = Window_Mapname.new(0, 200)
    @status_window.openness = 0
    @playtime_window.openness = 0
    @mapname_window.openness = 0
    @gold_window.openness = 0
    @status_window.open
    @playtime_window.open
    @mapname_window.open
    @gold_window.open
  end
  def pre_terminate
    @status_window.close
    @playtime_window.close
    @mapname_window.close
    @gold_window.close
    @command_window.close
    begin
    @status_window.update
    @playtime_window.update
    @mapname_window.update
    @gold_window.update
    @command_window.update
    Graphics.update
    end until @status_window.openness == 0
  end
  def terminate
    dispose_menu_background
    @command_window.dispose
    @gold_window.dispose
    @status_window.dispose
    @playtime_window.dispose
    @mapname_window.dispose
  end
  def update
    update_menu_background
    @command_window.update
    @gold_window.update
    @status_window.update
    @mapname_window.update
    @playtime_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = 'Poziom plus'
    s6 = Vocab::save
    s7 = Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
    @command_window.index = @menu_index
    @command_window.openness = 0
    @command_window.open
    if $game_party.members.size == 0           
      @command_window.draw_item(0, false)     
      @command_window.draw_item(1, false)     
      @command_window.draw_item(2, false)     
      @command_window.draw_item(3, false)   
    end
    if $game_system.save_disabled             
      @command_window.draw_item(4, false)     
    end
  end
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0
        $scene = Scene_Item.new
      when 1,2,3,4
        start_actor_selection
      when 5
        $scene = Scene_File.new(true, false, false)
      when 6
        $scene = Scene_End.new
      end
    end
  end
  def start_actor_selection
    @command_window.active = false
    @status_window.active = true
    if $game_party.last_actor_index < @status_window.item_max
      @status_window.index = $game_party.last_actor_index
    else
      @status_window.index = 0
    end
  end
  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
  end
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1
        $scene = Scene_Skill.new(@status_window.index)
      when 2
        $scene = Scene_Equip.new(@status_window.index)
      when 3
        $scene = Scene_Status.new(@status_window.index)
      when 4
        $scene = Scene_RequiemUpgrade.new(@status_window.index,true)
      end
    end
  end
end
class Scene_File < Scene_Base
  def return_scene
    if @from_title
      $scene = Scene_Title.new
    elsif @from_event
      $scene = Scene_Map.new
    else
      $scene = Scene_Menu.new(5)
    end
  end
end

#------------------------------------------------------------------------------
class Scene_End < Scene_Base
  def return_scene
    $scene = Scene_Menu.new(6)
  end
end

$mogscript = {} if $mogscript == nil
$mogscript["basic_menu_plus"] = true


krychapl - Wto 09 Lut, 2010 21:29

Przerobi ktoś ten skrypt tak żeby były razem rozdawanie pkt co poziom i dziennik misji?
Ayene - Wto 09 Lut, 2010 21:44

Sprawdź, czy działa:
Spoiler:

Kod:
##################################################
# Mog Basic Menu Plus V 1.0                      #
##################################################
# By Moghunter
# korekta SaE
##############

module Szkodnik_Sae       
Lokacja = "Lokacja"
Czas_gry = "Czas Gry"
Doswiadczenie = "EXP"     
end


class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end

class Window_Base < Window

 
  def draw_actor_level_menu(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, WLH, Vocab::level_a)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 16, y, 24, WLH, actor.level, 2)
  end
  def draw_actor_class_menu(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 85, WLH, actor.class.name)
  end   
 def exp_gauge_color1
    return text_color(30)
  end
  def exp_gauge_color2
    return text_color(31)
  end
def draw_actor_exp_meter(actor, x, y, width = 100)
  if actor.next_exp != 0
  exp = actor.now_exp
  else
  exp = 1
  end
    gw = width * exp / [actor.next_exp, 1].max
    gc1 = exp_gauge_color1
    gc2 = exp_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)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 30, WLH, Szkodnik_Sae::Doswiadczenie)   
    self.contents.font.color = normal_color
    xr = x + width
    self.contents.draw_text(xr - 60, y, 60, WLH,  actor.next_rest_exp_s, 2)   
end
end

class Window_MenuStatus < Window_Selectable
  def initialize(x, y)
    super(x, y, 384, 416)
    refresh
    self.active = false
    self.index = -1
  end
  def refresh
    self.contents.clear
    @item_max = $game_party.members.size
    for actor in $game_party.members
      draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
      x = 104
      y = actor.index * 96 + WLH / 2
      draw_actor_name(actor, x, y)
      draw_actor_class_menu(actor, x + 120, y)
      draw_actor_level_menu(actor, x + 200, y)
      draw_actor_state(actor, x, y + WLH * 2)
      draw_actor_hp(actor, x + 120, y + WLH * 1)
      draw_actor_mp(actor, x + 120, y + WLH * 2)
      draw_actor_exp_meter(actor, x , y + WLH * 1)
    end
  end
  def update_cursor
    if @index < 0               
      self.cursor_rect.empty
    elsif @index < @item_max   
      self.cursor_rect.set(0, @index * 96, contents.width, 96)
    elsif @index >= 100         
      self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
    else                     
      self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
    end
  end
end

class Game_Map
attr_reader   :map_id
def mpname
$mpname = load_data("Data/MapInfos.rvdata")
$mpname[@map_id].name
end
end

class Window_Mapname < Window_Base
  def initialize(x, y)
    super(x, y, 160, 80)
    refresh
  end
def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, -10, 120, 32, Szkodnik_Sae::Lokacja)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 20, 120, 32, $game_map.mpname.to_s, 2)
end
end

class Window_Time < Window_Base
  def initialize(x, y)
    super(x, y, 160, 56)
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
  #  self.contents.draw_text(4, -10, 120, 32, Szkodnik_Sae::Czas_gry)
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, -5, 120, 32, text, 2)
end
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end

class Scene_Menu   
  def main
    start                         
    perform_transition           
    Input.update                 
    loop do
      Graphics.update           
      Input.update             
      update                     
      break if $scene != self     
    end
    Graphics.update
    pre_terminate             
    Graphics.freeze               
    terminate                   
  end
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  def create_menu_background
    @menuback_sprite = Sprite.new
    @menuback_sprite.bitmap = $game_temp.background_bitmap
    @menuback_sprite.color.set(16, 16, 16, 128)
    update_menu_background
  end
  def create_menu_background
    @menuback_sprite = Sprite.new
    @menuback_sprite.bitmap = $game_temp.background_bitmap
    @menuback_sprite.color.set(16, 16, 16, 128)
    update_menu_background
  end
  def dispose_menu_background
    @menuback_sprite.dispose
  end
  def update_menu_background
  end
  def perform_transition
     Graphics.transition(10)
  end
  def start
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(0, 360)
    @status_window = Window_MenuStatus.new(160, 0)
    @playtime_window = Window_Time.new(0, 304)
    @mapname_window = Window_Mapname.new(0, 224)
    @status_window.openness = 0
    @playtime_window.openness = 0
    @mapname_window.openness = 0
    @gold_window.openness = 0
    @status_window.open
    @playtime_window.open
    @mapname_window.open
    @gold_window.open
  end
  def pre_terminate
    @status_window.close
    @playtime_window.close
    @mapname_window.close
    @gold_window.close
    @command_window.close
    begin
    @status_window.update
    @playtime_window.update
    @mapname_window.update
    @gold_window.update
    @command_window.update
    Graphics.update
    end until @status_window.openness == 0
  end
  def terminate
    dispose_menu_background
    @command_window.dispose
    @gold_window.dispose
    @status_window.dispose
    @playtime_window.dispose
    @mapname_window.dispose
  end
  def update
    update_menu_background
    @command_window.update
    @gold_window.update
    @status_window.update
    @mapname_window.update
    @playtime_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = 'Poziom plus'
    s6 = 'Dziennik misji'
    s7 = Vocab::save
    s8 = Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8])
    @command_window.index = @menu_index
    @command_window.openness = 0
    @command_window.open
    if $game_party.members.size == 0           
      @command_window.draw_item(0, false)     
      @command_window.draw_item(1, false)     
      @command_window.draw_item(2, false)     
      @command_window.draw_item(3, false)   
    end
    if $game_system.save_disabled             
      @command_window.draw_item(4, false)     
    end
  end
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0
        $scene = Scene_Item.new
      when 1,2,3,4
        start_actor_selection
      when 5 
        $scene = Scene_Quest.new
      when 6
        $scene = Scene_File.new(true, false, false)
      when 7
        $scene = Scene_End.new
      end
    end
  end
  def start_actor_selection
    @command_window.active = false
    @status_window.active = true
    if $game_party.last_actor_index < @status_window.item_max
      @status_window.index = $game_party.last_actor_index
    else
      @status_window.index = 0
    end
  end
  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
  end
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1
        $scene = Scene_Skill.new(@status_window.index)
      when 2
        $scene = Scene_Equip.new(@status_window.index)
      when 3
        $scene = Scene_Status.new(@status_window.index)
      when 4
        $scene = Scene_RequiemUpgrade.new(@status_window.index,true)
      end
    end
  end
end
class Scene_File < Scene_Base
  def return_scene
    if @from_title
      $scene = Scene_Title.new
    elsif @from_event
      $scene = Scene_Map.new
    else
      $scene = Scene_Menu.new(6)
    end
  end
end

#------------------------------------------------------------------------------
class Scene_End < Scene_Base
  def return_scene
    $scene = Scene_Menu.new(7)
  end
end

$mogscript = {} if $mogscript == nil
$mogscript["basic_menu_plus"] = true


krychapl - Wto 09 Lut, 2010 22:29

Gdy wychodzę z dziennika misji pojawia się błąd:


[ Dodano: Wto 09 Lut, 2010 22:42 ]
http://www.ultimateam.pl/viewtopic.php?t=2059

Ayene - Wto 09 Lut, 2010 22:42

Wejdź w skrypt Dziennika Misji i wyszukaj (linijka 935)
Kod:
$scene = Scene_Menu.new ('Quest')

i zmień na
Kod:
$scene = Scene_Menu.new (5)

krychapl - Wto 09 Lut, 2010 22:45

Teraz działa.
YukoUi - Nie 14 Lut, 2010 17:43

Przepraszam, że robię kłopot, chętnie bym sama pozmieniała to, co trzeba, ale niestety jestem zielona, jeśli chodzi o skrypty... ^^" Prosiłabym o wersję z bestiariuszem i dziennikiem misji, bez dodawania punktów co poziom. Onegaishimasu.
Ayene - Nie 14 Lut, 2010 18:12

Zamień skrypt "menu z dodatkami" na poniższy:
Spoiler:

Kod:
##################################################
# Mog Basic Menu Plus V 1.0                      #
##################################################
# By Moghunter
# korekta SaE
##############

module Szkodnik_Sae       
Lokacja = "Lokacja"
Czas_gry = "Czas Gry"
Doswiadczenie = "EXP"     
end


class Game_Actor < Game_Battler
def now_exp
return @exp - @exp_list[@level]
end
def next_exp
return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
end

class Window_Base < Window

 
  def draw_actor_level_menu(actor, x, y)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 32, WLH, Vocab::level_a)
    self.contents.font.color = normal_color
    self.contents.draw_text(x + 16, y, 24, WLH, actor.level, 2)
  end
  def draw_actor_class_menu(actor, x, y)
    self.contents.font.color = normal_color
    self.contents.draw_text(x, y, 85, WLH, actor.class.name)
  end   
 def exp_gauge_color1
    return text_color(30)
  end
  def exp_gauge_color2
    return text_color(31)
  end
def draw_actor_exp_meter(actor, x, y, width = 100)
  if actor.next_exp != 0
  exp = actor.now_exp
  else
  exp = 1
  end
    gw = width * exp / [actor.next_exp, 1].max
    gc1 = exp_gauge_color1
    gc2 = exp_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)
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 30, WLH, Szkodnik_Sae::Doswiadczenie)   
    self.contents.font.color = normal_color
    xr = x + width
    self.contents.draw_text(xr - 60, y, 60, WLH,  actor.next_rest_exp_s, 2)   
end
end

class Window_MenuStatus < Window_Selectable
  def initialize(x, y)
    super(x, y, 384, 416)
    refresh
    self.active = false
    self.index = -1
  end
  def refresh
    self.contents.clear
    @item_max = $game_party.members.size
    for actor in $game_party.members
      draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
      x = 104
      y = actor.index * 96 + WLH / 2
      draw_actor_name(actor, x, y)
      draw_actor_class_menu(actor, x + 120, y)
      draw_actor_level_menu(actor, x + 200, y)
      draw_actor_state(actor, x, y + WLH * 2)
      draw_actor_hp(actor, x + 120, y + WLH * 1)
      draw_actor_mp(actor, x + 120, y + WLH * 2)
      draw_actor_exp_meter(actor, x , y + WLH * 1)
    end
  end
  def update_cursor
    if @index < 0               
      self.cursor_rect.empty
    elsif @index < @item_max   
      self.cursor_rect.set(0, @index * 96, contents.width, 96)
    elsif @index >= 100         
      self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
    else                     
      self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
    end
  end
end

class Game_Map
attr_reader   :map_id
def mpname
$mpname = load_data("Data/MapInfos.rvdata")
$mpname[@map_id].name
end
end

class Window_Mapname < Window_Base
  def initialize(x, y)
    super(x, y, 160, WLH + 56)
    refresh
  end
def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, -5, 120, 32, Szkodnik_Sae::Lokacja)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 20, 120, 32, $game_map.mpname.to_s, 2)
end
end

class Window_Time < Window_Base
  def initialize(x, y)
    super(x, y, 160, WLH + 32)
    refresh
  end
  def refresh
    self.contents.clear
    @total_sec = Graphics.frame_count / Graphics.frame_rate
    hour = @total_sec / 60 / 60
    min = @total_sec / 60 % 60
    sec = @total_sec % 60
    text = sprintf("%02d:%02d:%02d", hour, min, sec)
    self.contents.font.color = normal_color
    self.contents.draw_text(4, -5, 120, 32, text, 2)
end
  def update
    super
    if Graphics.frame_count / Graphics.frame_rate != @total_sec
      refresh
    end
  end
end

class Scene_Menu   
  def main
    start                         
    perform_transition           
    Input.update                 
    loop do
      Graphics.update           
      Input.update             
      update                     
      break if $scene != self     
    end
    Graphics.update
    pre_terminate             
    Graphics.freeze               
    terminate                   
  end
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  def create_menu_background
    @menuback_sprite = Sprite.new
    @menuback_sprite.bitmap = $game_temp.background_bitmap
    @menuback_sprite.color.set(16, 16, 16, 128)
    update_menu_background
  end
  def create_menu_background
    @menuback_sprite = Sprite.new
    @menuback_sprite.bitmap = $game_temp.background_bitmap
    @menuback_sprite.color.set(16, 16, 16, 128)
    update_menu_background
  end
  def dispose_menu_background
    @menuback_sprite.dispose
  end
  def update_menu_background
  end
  def perform_transition
     Graphics.transition(10)
  end
  def start
    create_menu_background
    create_command_window
    @gold_window = Window_Gold.new(0, 360)
    @status_window = Window_MenuStatus.new(160, 0)
    @playtime_window = Window_Time .new(0, 304)
    @mapname_window = Window_Mapname.new(0, 224)
    @status_window.openness = 0
    @playtime_window.openness = 0
    @mapname_window.openness = 0
    @gold_window.openness = 0
    @status_window.open
    @playtime_window.open
    @mapname_window.open
    @gold_window.open
  end
  def pre_terminate
    @status_window.close
    @playtime_window.close
    @mapname_window.close
    @gold_window.close
    @command_window.close
    begin
    @status_window.update
    @playtime_window.update
    @mapname_window.update
    @gold_window.update
    @command_window.update
    Graphics.update
    end until @status_window.openness == 0
  end
  def terminate
    dispose_menu_background
    @command_window.dispose
    @gold_window.dispose
    @status_window.dispose
    @playtime_window.dispose
    @mapname_window.dispose
  end
  def update
    update_menu_background
    @command_window.update
    @gold_window.update
    @status_window.update
    @mapname_window.update
    @playtime_window.update
    if @command_window.active
      update_command_selection
    elsif @status_window.active
      update_actor_selection
    end
  end
  def create_command_window
    s1 = Vocab::item
    s2 = Vocab::skill
    s3 = Vocab::equip
    s4 = Vocab::status
    s5 = "Dziennik Misji"
    s6 = "Bestariusz"
    s7 = Vocab::save
    s8 = Vocab::game_end
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7, s8])
    @command_window.index = @menu_index
    @command_window.openness = 0
    @command_window.open
    if $game_party.members.size == 0           
      @command_window.draw_item(0, false)     
      @command_window.draw_item(1, false)     
      @command_window.draw_item(2, false)     
      @command_window.draw_item(3, false)   
    end
    if $game_system.save_disabled             
      @command_window.draw_item(4, false)     
    end
  end
  def update_command_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      $scene = Scene_Map.new
    elsif Input.trigger?(Input::C)
      if $game_party.members.size == 0 and @command_window.index < 4
        Sound.play_buzzer
        return
      elsif $game_system.save_disabled and @command_window.index == 4
        Sound.play_buzzer
        return
      end
      Sound.play_decision
      case @command_window.index
      when 0     
        $scene = Scene_Item.new
      when 1,2,3   
        start_actor_selection
      when 4       
        $scene = Scene_Quest.new 
      when 5       
        $scene = Scene_MonsterBook.new 
      when 6       
        $scene = Scene_File.new(true, false, false)
      when 7     
        $scene = Scene_End.new
      end
    end
  end
  def start_actor_selection
    @command_window.active = false
    @status_window.active = true
    if $game_party.last_actor_index < @status_window.item_max
      @status_window.index = $game_party.last_actor_index
    else
      @status_window.index = 0
    end
  end
  def end_actor_selection
    @command_window.active = true
    @status_window.active = false
    @status_window.index = -1
  end
  def update_actor_selection
    if Input.trigger?(Input::B)
      Sound.play_cancel
      end_actor_selection
    elsif Input.trigger?(Input::C)
      $game_party.last_actor_index = @status_window.index
      Sound.play_decision
      case @command_window.index
      when 1
        $scene = Scene_Skill.new(@status_window.index)
      when 2   
        $scene = Scene_Equip.new(@status_window.index)
      when 3
        $scene = Scene_Status.new(@status_window.index)
      end
    end
  end
end
$mogscript = {} if $mogscript == nil
$mogscript["basic_menu_plus"] = true

class Scene_File
  def return_scene
    if @from_title
      $scene = Scene_Title.new
    elsif @from_event
      $scene = Scene_Map.new
    else
      $scene = Scene_Menu.new(6)
    end
  end
end

class Scene_End
  def return_scene
    $scene = Scene_Menu.new(7)
  end
end


W skrypcie Dziennika Misji zmień:
Kod:
MENU_ACCESS = true

na
Kod:
MENU_ACCESS = false


wyszukaj (linijka 935)
Kod:
     if $game_system.quest_menuaccess
        $scene = Scene_Menu.new ('Quest')
      else
        $scene = Scene_Map.new
      end

i zmień na
Kod:
$scene = Scene_Menu.new (4)



W skrypcie Bestariusza zmień:
Kod:
SHOW_IN_MENU = true

na
Kod:
SHOW_IN_MENU = false


wyszukaj (linijka 350)
Kod:
 $scene = @from_menu ? Scene_Menu.new(Wora_Monbook::MENU_INDEX) :
Scene_Map.new

i zmień na
Kod:
$scene = Scene_Menu.new (5)

YukoUi - Nie 14 Lut, 2010 21:09

Yay, bardzo dziękuję ^^
peres111 - Pią 16 Kwi, 2010 18:23

witam ja skopiowałem skrypt z dziennikiem i zdawaniem punktów i zmieniłem jak pisał Ayene:
Cytat:
Wejdź w skrypt Dziennika Misji i wyszukaj (linijka 935)
Kod:
$scene = Scene_Menu.new ('Quest')

i zmień na
Kod:
$scene = Scene_Menu.new (5)


i wyskakuje mi taki błąd ;-(


Kod:
Spoiler:



Ayene - Pią 16 Kwi, 2010 18:42

Zapewne nie wkleiłeś do projektu skryptu, który był potrzebny do poprawnego działania 'Dziennika Misji' - znajdziesz go w demie jako 'Paragraph Formatter'.
peres111 - Pią 16 Kwi, 2010 18:56

Dzięki już wszystko śmiga
Angius - Sro 03 Lis, 2010 17:47

Wybaczcie, że nieco odświeżam temat, ale czy ten skrypt nie gryzie się aby ze skryptem na menu jednoosobowe?
Ayene - Sro 03 Lis, 2010 19:09

I będzie się gryzło, bo nadpisują tę samą klasę. Zresztą, gdzie Ty chcesz umieścić te dodatki w menu jednoosobowym? Nie wiem, czy znalazłoby się tam jeszcze miejsce.
MrCorniszon - Pią 11 Lut, 2011 08:46

Ayene napisał/a:
A masz w ogóle skrypt bestiariusza? Coś mi wygląda, że umieściłeś tylko powyższy skrypt, który jest jedynie z nim kompatybilny. Musisz umieścić w projekcie jeszcze ten skrypt.



Mam problem :roll: Mam ten Menu + Bestariusz (i bestariusz mi nie działa)
Jak mam skrypt Menu + Bestariusz i jeszcze ten bestariusz: ten skrypt to wtedy mam dwa ;-( nie czaje :-PP

Ayene - Pią 11 Lut, 2011 10:51

Kornel98, zacytowałeś jedynie część mojego wcześniejszego postu. A przeczytałeś go do końca? http://www.ultimateam.pl/...p?p=16903#16903
Należy w skrypcie z bestiariuszem wyłączyć opcję pokazywania w menu, gdyż polecenie to zostało ręcznie dodane do skryptu. :->

Eleanor - Nie 13 Mar, 2011 20:38

Witam
Co muszę usunąć aby pozbyć się czasu gry i lokacji?
Potrzebuję tylko i wyłącznie paska exp.

PS: Używam poziom plus i dziennik misji, ale to już mam ustawione jak należy.

Ayene - Nie 13 Mar, 2011 20:46

Znajdź i usuń poniższe fragmenty kodu:
Spoiler:

Kod:
@playtime_window = Window_Time .new(0, 270)
@mapname_window = Window_Mapname.new(0, 178)

@playtime_window.open
@mapname_window.open

@playtime_window.close
@mapname_window.close

@playtime_window.update
@mapname_window.update

@playtime_window.dispose
@mapname_window.dispose

@mapname_window.update
@playtime_window.update


Eleanor - Nie 13 Mar, 2011 20:47

Wielkie dzięki Ayene :D
Kto jak kto, ale rządzisz!

matiusz - Sob 30 Kwi, 2011 17:36

Można by było do tego menu z bestiariuszem dodać coś, żeby ten skrypt

Spoiler:

Kod:

#===============================================================================
# ** Large Party System                                                 
#------------------------------------------------------------------------------
#    by DerVVulfman (original by Fomar0153)
#    version 1.0
#    03-01-2008
#    RGSS2
#-------------------------------------------------------------------------------
#  This system allows you to break the 4 team barrier setup by RPGMaker VX.  By
#  using this code, you can have 5, 6 or even 10 member parties.
#
#  This page of the code can enhance your project  to allow parties of over four
#  members.   The controls are  very simple.   To establish  a default number of
#  party members,  edit the PARTY SIZE value in the configuration section below.
#  If you wish to alter the party size limit while the game is running,  call on
#  the $game_party.party_size value  from a map event and change it there.  But,
#  remember that you'll need to run '$game_party.refresh' for the change to take
#  effect.
#------------------------------------------------------------------------------
#
#  EDITS AND MODIFICATIONS:
#
#  This system Aliases the following methods:
#  * initialize                     (Game_Party)
#  * refresh                        (Window_MenuStatus)
#  * update_info_viewport           (Scene_Battle)
#
#  This system redefines the following methods:
#  * add_actor                      (Game_Party)
#  * initialize                     (Window_MenuStatus)
#  * update_cursor                  (Window_MenuStatus)
#  * initialize                     (Window_BattleStatus)
#  * create_info_viewport           (Scene_Battle)
#
#===============================================================================


PARTY_SIZE = 6


#==============================================================================
# ** Game_Party
#------------------------------------------------------------------------------
#  This class handles the party. It includes information on amount of gold
#  and items. Refer to "$game_party" for the instance of this class.
#==============================================================================

class Game_Party
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader   :party_size               # Current size of the party
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias fomar_init initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    fomar_init
    @party_size = PARTY_SIZE
  end
  #--------------------------------------------------------------------------
  # * Add an Actor
  #     actor_id : actor ID
  #--------------------------------------------------------------------------
  def add_actor(actor_id)
    if @actors.size < $game_party.party_size and not @actors.include?(actor_id)
      @actors.push(actor_id)
      $game_player.refresh
    end
  end
  #--------------------------------------------------------------------------
  # * Adjust the maximum party value (permits addition & keeps within range)
  #--------------------------------------------------------------------------
  def party_size=(party_size)
    # Prevent Nil values
    @party_size = 4 if party_size == nil
    # Set party size
    @party_size = party_size
    # Reset to default if an incorrect value
    @party_size = 4 if party_size < 1
  end
end



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

class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias large_refresh refresh
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(x, y)
    unless $game_party.members.size > 4
      super(x, y, 384, 416)
    else
      super(x, y, 384, 138 * $game_party.members.size)
    end
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    large_refresh
    self.height = 416
  end
  #--------------------------------------------------------------------------
  # * Update cursor
  #--------------------------------------------------------------------------
  def update_cursor
    if @index < 0
      self.cursor_rect.empty
      return
    end
    # Get top row
    row = @index  / @column_max
    if row < self.top_row
      self.top_row = row
    end
    # Reset Top Row if at bottom of list
    if row > self.top_row + (self.page_row_max - 1)
      self.top_row = row - (self.page_row_max - 1)
    end
    # Obtain cursor width   
    cursor_width = self.width / @column_max
    x = @index % @column_max * cursor_width
    y = @index / @column_max * 96 - self.oy
    # Draw the cursor
    self.cursor_rect.set(x, y, cursor_width, 96)
  end
  #--------------------------------------------------------------------------
  # * Get Top Row
  #--------------------------------------------------------------------------
  def top_row
    return self.oy / 96
  end
  #--------------------------------------------------------------------------
  # * Set Top Row
  #     row : row shown on top
  #--------------------------------------------------------------------------
  def top_row=(row)
    if row < 0
      row = 0
    end
    if row > row_max - 1
      row = row_max - 1
    end
    self.oy = row * 96
  end
  #--------------------------------------------------------------------------
  # * Get Number of Rows Displayable on 1 Page
  #--------------------------------------------------------------------------
  def page_row_max
    return 4
  end
end



#==============================================================================
# ** Window_BattleStatus
#------------------------------------------------------------------------------
#  This window displays the status of all party members on the battle screen.
#==============================================================================

class Window_BattleStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    unless $game_party.members.size > 4
      super(0, 0, 416, 128)
    else
      super(0, 0, 416, 32 * $game_party.members.size)
    end   
    refresh
    self.active = false
  end
end



#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  This class performs battle screen processing.
#==============================================================================

class Scene_Battle < Scene_Base
  #--------------------------------------------------------------------------
  # * Alias Listings
  #--------------------------------------------------------------------------
  alias fomar_update update_info_viewport
  #--------------------------------------------------------------------------
  # * Create Information Display Viewport
  #--------------------------------------------------------------------------
  def create_info_viewport
    # Change viewport to accommodate party size
    unless $game_party.members.size > 4
      @info_viewport = Viewport.new(0, 288, 544, 128)
    else
      @info_viewport = Viewport.new(0, 416 - (32 * $game_party.members.size),
                                    544, (32 * $game_party.members.size))
    end     
    @info_viewport.z = 100
    @status_window = Window_BattleStatus.new
    @party_command_window = Window_PartyCommand.new
    @actor_command_window = Window_ActorCommand.new
    @status_window.viewport = @info_viewport
    @party_command_window.viewport = @info_viewport
    @actor_command_window.viewport = @info_viewport
    @status_window.x = 128
    @actor_command_window.x = 544
    @info_viewport.visible = false   
  end
  #--------------------------------------------------------------------------
  # * Update Information Display Viewport
  #--------------------------------------------------------------------------
  def update_info_viewport
    # Obtain Battlestatus Height
    oldheight = @status_window.height.to_i / 32
    # Reset Battlestatus Height if party size increases
    if $game_party.members.size > oldheight
      dispose_info_viewport
      create_info_viewport
    end
    # Perform the original call
    fomar_update
  end
end




działał,
bo postaci można mieć więcej, ale nie da się przesunąć na dół, tylko się podświetla.

wodor - Wto 14 Cze, 2011 08:36

Fajny skrypcik :D
Dzieki


Powered by phpBB modified by Przemo © 2003 phpBB Group