Go Back   The PokéCommunity Forums > The PokéCommunity Archives > Game Development Archive

Notices

Game Development Archive Locked games or old games, look for the old games that were in Game Development before November 20, 2005 or were locked before January 19, 2006.



 
 
Thread Tools
  #1    
Old June 13th, 2005 (09:22 AM).
Blizzy
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 24
Gender:
Nature: Relaxed
i'll be taking some little script requests.
i'm doing this to get some better in scripting.

things that i won't do:
-Battle System
-Bag
-Save
-Enter Hero Name(keyboard)
(and all the other complicated scripts)

i will do selectable windows
(since that not so hard)
big request are ignored.
please be clear what you want.
if images are included,
please post them too.

so give me a little request, and i'll do my best
(i'm not sure if it belongs here)
__________________

  #2    
Old June 13th, 2005 (09:28 AM).
Neo Genesis
The Wanderer
 
Join Date: May 2005
Location: California
Age: 22
Gender:
Nature: Naive
FINALLY! Do you think you can make a cms like in peekimons game?
__________________



New Djinn, New Heros, New Lighthouses, New Adepts, New Psynergy, The same bad guys. Coming soon Golden Sun Scars of Time! Will you journey with the heros? Or walk in the path of Saturos and Miniradi?Note game will progress very slowly and might be cancled to continue pokemon lost era.


My little brother is Sykora yay!
  #3    
Old June 13th, 2005 (09:31 AM).
Blizzy
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 24
Gender:
Nature: Relaxed
Quote originally posted by Neo Genesis:
FINALLY! Do you think you can make a cms like in peekimons game?
can you be more clear?
i don't really get it
__________________

  #4    
Old June 13th, 2005 (09:33 AM). Edited June 13th, 2005 by Neo Genesis.
Neo Genesis
The Wanderer
 
Join Date: May 2005
Location: California
Age: 22
Gender:
Nature: Naive
Yeah sure. Just really a basic pokemon cms but it has a window at the bottom that explans what that function does. Like if you hightlight Pokedex it will say "a device that stores pokemon data".
__________________



New Djinn, New Heros, New Lighthouses, New Adepts, New Psynergy, The same bad guys. Coming soon Golden Sun Scars of Time! Will you journey with the heros? Or walk in the path of Saturos and Miniradi?Note game will progress very slowly and might be cancled to continue pokemon lost era.


My little brother is Sykora yay!
  #5    
Old June 13th, 2005 (10:44 AM). Edited June 14th, 2005 by -virtual-.
Blizzy
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 24
Gender:
Nature: Relaxed
it's done
and i've learned 1 thing.
Code:
alias
just insert a new script, and put the following code in.
it includes: Scene_Menu, Scene_Save, Scene_Load and Window_Savefile.
note, i didn't test the saving very good.
when you got an error, please send a pm

Code:
class Game_Temp
  alias initialize_old initalize
  def initialize
    $menu = 1
    initialize_old
  end
end

class Window_Command < Window_Selectable
  attr_reader  :commands
end

class Scene_Menu
  #-----------------------------------------------------------------
  # initialize menu
  #-----------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  def main
    #command window options
    s1 = "Bag"
    s2 = $game_party.actors[0].name
    s3 = "Save"
    s4 = "Options"
    s5 = "Exit"
    s6 = "Pokemon"
    s7 = "Pokedex"
    if $menu == 3
      commands = [s7, s6,s1, s2, s3, s4, s5]
      y = 60
    end
    if $menu == 2
      commands = [s6, s1, s2, s3, s4, s5]
      y = 80
   end
   if $menu == 1
      commands = [s1,s2,s3,s4,s5]
      y = 100
   end
  
  if $game_system.save_disabled
    commands.delete!("Save")
  end
  @command_window = Window_Command.new(160, commands)
  @command_window.index = @menu_index
  @command_window.x = 560 - @command_window.width / 2
  @command_window.y = y
  if $game_party.actors.size == 0
    @command_window.disable_item(0)
    @command_window.disable_item(1)
    @command_window.disable_item(2)
    @command_window.disable_item(3)
  end
  #displays map on background
  @spriteset = Spriteset_Map.new
  #time window
  @time = Window_Time.new
  #time window.x and .y
  @time.x = @time.y = 40
  
  @help = Window_Help.new
  @help.x = 40
  @help.y = 340
  @help.width = 640 - 80
  @help.height = 96
  @help.z = 999
  Graphics.transition
  loop do
    Graphics.update
    Input.update
    update
    if $scene != self
      break
    end
  end 
  Graphics.freeze
  #erases command window
  @command_window.dispose
  #erases time window
  @time.dispose
  #erases background
  @spriteset.dispose
  #erases help window
  @help.dispose
end

#--------------------------------------------------------------------------
def update
  #update command window
  @command_window.update
  #updates playtime window
  @time.update
  #updates the background
  @spriteset.update
  #updates help window
  @help.update
  case @command_window.commands[@command_window.index]
  when "Bag"
    @help.set_text("A bag for storing items")
  when $game_party.actors[0].name
    @help.set_text("Check your money and other game date")
  when "Save"
    @help.set_text("Saves the game")
  when "Options"
    @help.set_text("Change various game settings")
  when "Exit"
    @help.set_text("Close the menu")
  when "Pokedex"
    @help.set_text("A device for recording Pokemon data")
  when "Pokemon"
    @help.set_text("Organize Pokemon that are in your party")
  end
  
  if @command_window.active
    update_command
    return
  end
  
end
#--------------------------------------------------------------------------
def update_command
  if Input.trigger?(Input::B)
    $game_system.se_play($data_system.cancel_se)
    $scene = Scene_Map.new
    return
  end
    if Input.trigger?(Input::C)
     if $game_party.actors.size == 0 and @command_window.index < 4
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     case @command_window.commands[@command_window.index]
     when "Bag"
       $game_system.se_play($data_system.decision_se)
       #Warp.new(1, 134, 16, -1)
       $scene = Scene_Map.new
     when $game_party.actors[0].name
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Map.new
     when "Save"
       if $game_system.save_disabled
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Save.new
     when "Options"
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Map.new
     when  "Exit"
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Map.new            
     when "Pokemon"
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Map.new
     when  "Pokedex"
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Map.new
     end # case
   end # conditional
 end # method
end # class

class Window_Time < Window_Base
 #--------------------------------------------------------------------------
 # ● initialize
 #--------------------------------------------------------------------------
 def initialize
   super(0, 0, 160, 96)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = $fontface
   self.contents.font.size = $fontsize
   self.contents
   refresh
 end
 #--------------------------------------------------------------------------
 # ● refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   self.contents.font.color = system_color
   self.contents.draw_text(16, 0, 120, 32, "Local Time")
   text = Time.new.strftime("%I:%M:%S %p ")
   self.contents.font.color = normal_color
   self.contents.draw_text(0 - 4, 32, 120, 32, text, 2)
 end
 #--------------------------------------------------------------------------
 # ● update
 #--------------------------------------------------------------------------
 def update
   super
   refresh
   end
 end

#==============================================================================
# ■ Scene_Save
#------------------------------------------------------------------------------
#  セーブ画面の処理を行うクラスです。
#==============================================================================

class Scene_Save < Scene_File
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super("Which file do you want to save to?")
  end
  #--------------------------------------------------------------------------
  # ● 決定時の処理
  #--------------------------------------------------------------------------
  def on_decision(filename)
    # セーブ SE を演奏
    $game_system.se_play($data_system.save_se)
    # セーブデータの書き込み
    file = File.open(filename, "wb")
    write_save_data(file)
    file.close
    # イベントから呼び出されている場合
    if $game_temp.save_calling
      # セーブ呼び出しフラグをクリア
      $game_temp.save_calling = false
      # マップ画面に切り替え
      $scene = Scene_Map.new
      return
    end
    # メニュー画面に切り替え
    case $menu
    when 1
      $scene = Scene_Menu.new(2)
    when 2
      $scene = Scene_Menu.new(3)
    when 3
      $scene = Scene_Menu.new(4)
    end
  end
  #--------------------------------------------------------------------------
  # ● キャンセル時の処理
  #--------------------------------------------------------------------------
  def on_cancel
    # キャンセル SE を演奏
    $game_system.se_play($data_system.cancel_se)
    # イベントから呼び出されている場合
    if $game_temp.save_calling
      # セーブ呼び出しフラグをクリア
      $game_temp.save_calling = false
      # マップ画面に切り替え
      $scene = Scene_Map.new
      return
    end
    # メニュー画面に切り替え
    case $menu
    when 1
      $scene = Scene_Menu.new(2)
    when 2
      $scene = Scene_Menu.new(3)
    when 3
      $scene = Scene_Menu.new(4)
    end
  end
  #--------------------------------------------------------------------------
  # ● セーブデータの書き込み
  #     file : 書き込み用ファイルオブジェクト (オープン済み)
  #--------------------------------------------------------------------------
  def write_save_data(file)
    # セーブファイル描画用のキャラクターデータを作成
    characters = []
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      characters.push([actor.character_name, actor.character_hue])
    end
    # セーブファイル描画用のキャラクターデータを書き込む
    Marshal.dump(characters, file)
    # プレイ時間計測用のフレームカウントを書き込む
    Marshal.dump(Graphics.frame_count, file)
    # セーブ回数を 1 増やす
    $game_system.save_count += 1
    # マジックナンバーを保存する
    # (エディタで保存するたびにランダムな値に書き換えられる)
    $game_system.magic_number = $data_system.magic_number
    # 各種ゲームオブジェクトを書き込む
    Marshal.dump($game_system, file)
    Marshal.dump($game_switches, file)
    Marshal.dump($game_variables, file)
    Marshal.dump($game_self_switches, file)
    Marshal.dump($game_screen, file)
    Marshal.dump($game_actors, file)
    Marshal.dump($game_party, file)
    Marshal.dump($game_troop, file)
    Marshal.dump($game_map, file)
    Marshal.dump($game_player, file)
    Marshal.dump($menu, file)
  end
end

#==============================================================================
# ■ Scene_Load
#------------------------------------------------------------------------------
#  ロード画面の処理を行うクラスです。
#==============================================================================

class Scene_Load < Scene_File
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    # テンポラリオブジェクトを再作成
    $game_temp = Game_Temp.new
    # タイムスタンプが最新のファイルを選択
    $game_temp.last_file_index = 0
    latest_time = Time.at(0)
    for i in 0..3
      filename = make_filename(i)
      if FileTest.exist?(filename)
        file = File.open(filename, "r")
        if file.mtime > latest_time
          latest_time = file.mtime
          $game_temp.last_file_index = i
        end
        file.close
      end
    end
    super("Which file do you wish to load from?")
  end
  #--------------------------------------------------------------------------
  # ● 決定時の処理
  #--------------------------------------------------------------------------
  def on_decision(filename)
    # ファイルが存在しない場合
    unless FileTest.exist?(filename)
      # ブザー SE を演奏
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    # ロード SE を演奏
    $game_system.se_play($data_system.load_se)
    # セーブデータの書き込み
    file = File.open(filename, "rb")
    read_save_data(file)
    file.close
    # BGM、BGS を復帰
    $game_system.bgm_play($game_system.playing_bgm)
    $game_system.bgs_play($game_system.playing_bgs)
    # マップを更新 (並列イベント実行)
    $game_map.update
    # マップ画面に切り替え
    $scene = Scene_Map.new
  end
  #--------------------------------------------------------------------------
  # ● キャンセル時の処理
  #--------------------------------------------------------------------------
  def on_cancel
    # キャンセル SE を演奏
    $game_system.se_play($data_system.cancel_se)
    # タイトル画面に切り替え
    $scene = Scene_Title.new
  end
  #--------------------------------------------------------------------------
  # ● セーブデータの読み込み
  #     file : 読み込み用ファイルオブジェクト (オープン済み)
  #--------------------------------------------------------------------------
  def read_save_data(file)
    # セーブファイル描画用のキャラクターデータを読み込む
    characters = Marshal.load(file)
    # プレイ時間計測用のフレームカウントを読み込む
    Graphics.frame_count = Marshal.load(file)
    # 各種ゲームオブジェクトを読み込む
    $game_system        = Marshal.load(file)
    $game_switches      = Marshal.load(file)
    $game_variables     = Marshal.load(file)
    $game_self_switches = Marshal.load(file)
    $game_screen        = Marshal.load(file)
    $game_actors        = Marshal.load(file)
    $game_party         = Marshal.load(file)
    $game_troop         = Marshal.load(file)
    $game_map           = Marshal.load(file)
    $game_player        = Marshal.load(file)
    $menu        = Marshal.load(file)
    # マジックナンバーがセーブ時と異なる場合
    # (エディタで編集が加えられている場合)
    if $game_system.magic_number != $data_system.magic_number
      # マップをリロード
      $game_map.setup($game_map.map_id)
      $game_player.center($game_player.x, $game_player.y)
    end
    # パーティメンバーをリフレッシュ
    $game_party.refresh
  end
end

#==============================================================================
# ■ Window_SaveFile
#------------------------------------------------------------------------------
#  セーブ画面およびロード画面で表示する、セーブファイルのウィンドウです。
#==============================================================================

class Window_SaveFile < Window_Base
  #--------------------------------------------------------------------------
  # ● 公開インスタンス変数
  #--------------------------------------------------------------------------
  attr_reader   :filename                 # ファイル名
  attr_reader   :selected                 # 選択状態
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     file_index : セーブファイルのインデックス (0~3)
  #     filename   : ファイル名
  #--------------------------------------------------------------------------
  def initialize(file_index, filename)
    super(0, 64 + file_index % 4 * 104, 640, 104)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    self.opacity = 255
    self.back_opacity = 255
    @file_index = file_index
    @filename = "Save#{@file_index + 1}.rxdata"
    @time_stamp = Time.at(0)
    @file_exist = FileTest.exist?(@filename)
    if @file_exist
      file = File.open(@filename, "r")
      @time_stamp = file.mtime
      @characters = Marshal.load(file)
      @frame_count = Marshal.load(file)
      @game_system = Marshal.load(file)
      @game_switches = Marshal.load(file)
      @game_variables = Marshal.load(file)
      @menu = Marshal.load(file)
      @total_sec = @frame_count / Graphics.frame_rate
      file.close
    end
    refresh
    @selected = false
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    # ファイル番号を描画
    self.contents.font.color = normal_color
    name = "File #{@file_index + 1}"
    self.contents.draw_text(4, 0, 600, 32, name)
    @name_width = contents.text_size(name).width
    # セーブファイルが存在する場合
    if @file_exist
      # キャラクターを描画
      for i in 0...@characters.size
        bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])
        cw = bitmap.rect.width / 4
        ch = bitmap.rect.height / 4
        src_rect = Rect.new(0, 0, cw, ch)
        x = 300 - @characters.size * 32 + i * 64 - cw / 2
        self.contents.blt(x, 68 - ch, bitmap, src_rect)
      end
      # プレイ時間を描画
      hour = @total_sec / 60 / 60
      min = @total_sec / 60 % 60
      sec = @total_sec % 60
      time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
      self.contents.font.color = normal_color
      self.contents.draw_text(4, 8, 600, 32, time_string, 2)
      # タイムスタンプを描画
      self.contents.font.color = normal_color
      time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")
      self.contents.draw_text(4, 40, 600, 32, time_string, 2)
    end
  end
  #--------------------------------------------------------------------------
  # ● 選択状態の設定
  #     selected : 新しい選択状態 (true=選択 false=非選択)
  #--------------------------------------------------------------------------
  def selected=(selected)
    @selected = selected
    update_cursor_rect
  end
  #--------------------------------------------------------------------------
  # ● カーソルの矩形更新
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @selected
      self.cursor_rect.set(0, 0, @name_width + 8, 32)
    else
      self.cursor_rect.empty
    end
  end
end
--edit--
fixed "Marshal" spelling error

fixed "Alias"
__________________

  #6    
Old June 13th, 2005 (10:55 AM).
Peekimon's Avatar
Peekimon
Me = cat-aholic, Meowr
 
Join Date: Jan 2005
Location: Meowr
Age: 23
Gender:
Nature: Gentle
Send a message via Windows Live Messenger to Peekimon Send a message via Yahoo to Peekimon
Haven't tested it, tho:

This might produce an error:

@menu = Mashal.load(file)

The "r" is missing.
  #7    
Old June 13th, 2005 (11:23 AM). Edited June 13th, 2005 by -virtual-.
Blizzy
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 24
Gender:
Nature: Relaxed
Quote originally posted by Peekimon:
Haven't tested it, tho:

This might produce an error:

@menu = Mashal.load(file)
The "r" is missing.
--edit--
ok, i got that one fixed now.
typo :dead:
__________________

  #8    
Old June 13th, 2005 (11:28 AM).
Neo Genesis
The Wanderer
 
Join Date: May 2005
Location: California
Age: 22
Gender:
Nature: Naive
I got an error read the pm I sent you.
__________________



New Djinn, New Heros, New Lighthouses, New Adepts, New Psynergy, The same bad guys. Coming soon Golden Sun Scars of Time! Will you journey with the heros? Or walk in the path of Saturos and Miniradi?Note game will progress very slowly and might be cancled to continue pokemon lost era.


My little brother is Sykora yay!
  #9    
Old June 13th, 2005 (11:31 AM).
Peekimon's Avatar
Peekimon
Me = cat-aholic, Meowr
 
Join Date: Jan 2005
Location: Meowr
Age: 23
Gender:
Nature: Gentle
Send a message via Windows Live Messenger to Peekimon Send a message via Yahoo to Peekimon
I meant, it's supposed to 'Marshal', not 'Mashal'.
  #10    
Old June 13th, 2005 (11:33 AM).
Neo Genesis
The Wanderer
 
Join Date: May 2005
Location: California
Age: 22
Gender:
Nature: Naive
I think it has somethong to do with this

def initialize(menu_index = 0)

-edit- on line # 9
__________________



New Djinn, New Heros, New Lighthouses, New Adepts, New Psynergy, The same bad guys. Coming soon Golden Sun Scars of Time! Will you journey with the heros? Or walk in the path of Saturos and Miniradi?Note game will progress very slowly and might be cancled to continue pokemon lost era.


My little brother is Sykora yay!
  #11    
Old June 13th, 2005 (02:46 PM).
Matt12345678's Avatar
Matt12345678
The Famous N00b
 
Join Date: Mar 2005
Location: East USA
Gender:
Nature: Careful
Send a message via AIM to Matt12345678 Send a message via Windows Live Messenger to Matt12345678 Send a message via Yahoo to Matt12345678
Quote originally posted by -virtual-:
i'll be taking some little script requests.
i'm doing this to get some better in scripting.

things that i won't do:
-Battle System
-Bag
-Save
-Enter Hero Name(keyboard)
(and all the other complicated scripts)

i will do selectable windows
(since that not so hard)
big request are ignored.
please be clear what you want.
if images are included,
please post them too.

so give me a little request, and i'll do my best
(i'm not sure if it belongs here)
Can I have scripts for menus? If so, then can the first one have:
Bag
(Player Name)
Save
Options
Exit

Second one:
Bag
PokeGear
(Player Name)
Save
Options
Exit

Third one:
Pokemon
Bag
PokeGear
(Player Name)
Save
Options
Exit

Fourth one:
Pokedex
Pokemon
Bag
PokeGear
(Player Name)
Save
Options
Exit

And under each one, can it say what it does?

Pokedex-
A tool that records data on Pokemon
Pokemon-
View the Pokemon in your party
Bag-
View the Items in your bag
PokeGear-
A Device with a Cell Phone and Radio built in. Other devices
may be downloaded
(Player Name)-
View your Trainer Card
Save-
Save your game
Options-
Change the game options
Exit-
Exit the menu

OMG if you can do this, then u will pwn all!
__________________


Spoiler:
Cna yuo raed tihs? Olny 55% of plepoe can.

I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe.
Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt!
fi yuo cna raed tihs, palce it in yuor siantugre.
  #12    
Old June 13th, 2005 (02:55 PM).
Peekimon's Avatar
Peekimon
Me = cat-aholic, Meowr
 
Join Date: Jan 2005
Location: Meowr
Age: 23
Gender:
Nature: Gentle
Send a message via Windows Live Messenger to Peekimon Send a message via Yahoo to Peekimon
Matt... uh, virtual already made that one... Look up.
  #13    
Old June 13th, 2005 (03:06 PM).
Matt12345678's Avatar
Matt12345678
The Famous N00b
 
Join Date: Mar 2005
Location: East USA
Gender:
Nature: Careful
Send a message via AIM to Matt12345678 Send a message via Windows Live Messenger to Matt12345678 Send a message via Yahoo to Matt12345678
Quote originally posted by Peekimon:
Matt... uh, virtual already made that one... Look up.
I need them to say something different though....
__________________


Spoiler:
Cna yuo raed tihs? Olny 55% of plepoe can.

I cdnuolt blveiee taht I cluod aulaclty uesdnatnrd waht I was rdanieg. The phaonmneal pweor of the hmuan mnid, aoccdrnig to a rscheearch at Cmabrigde Uinervtisy, it dseno't mtaetr in waht oerdr the ltteres in a wrod are, the olny iproamtnt tihng is taht the frsit and lsat ltteer be in the rghit pclae. The rset can be a taotl mses and you can sitll raed it whotuit a pboerlm. Tihs is bcuseae the huamn mnid deos not raed ervey lteter by istlef, but the wrod as a wlohe.
Azanmig huh? yaeh and I awlyas tghuhot slpeling was ipmorantt!
fi yuo cna raed tihs, palce it in yuor siantugre.
  #14    
Old June 13th, 2005 (03:09 PM).
Peekimon's Avatar
Peekimon
Me = cat-aholic, Meowr
 
Join Date: Jan 2005
Location: Meowr
Age: 23
Gender:
Nature: Gentle
Send a message via Windows Live Messenger to Peekimon Send a message via Yahoo to Peekimon
Find this:
Code:
when "Bag"
    @help.set_text("A bag for storing items")
  when $game_party.actors[0].name
    @help.set_text("Check your money and other game date")
  when "Save"
    @help.set_text("Saves the game")
  when "Options"
    @help.set_text("Change various game settings")
  when "Exit"
    @help.set_text("Close the menu")
  when "Pokedex"
    @help.set_text("A device for recording Pokemon data")
  when "Pokemon"
    @help.set_text("Organize Pokemon that are in your party")
Edit the text in " ", that easy.
  #15    
Old June 13th, 2005 (03:28 PM).
Neo Genesis
The Wanderer
 
Join Date: May 2005
Location: California
Age: 22
Gender:
Nature: Naive
okay I got line 9 to work but now line 15 has an error.
__________________



New Djinn, New Heros, New Lighthouses, New Adepts, New Psynergy, The same bad guys. Coming soon Golden Sun Scars of Time! Will you journey with the heros? Or walk in the path of Saturos and Miniradi?Note game will progress very slowly and might be cancled to continue pokemon lost era.


My little brother is Sykora yay!
  #16    
Old June 13th, 2005 (11:56 PM). Edited June 17th, 2005 by -virtual-.
Blizzy
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 24
Gender:
Nature: Relaxed
Quote originally posted by Neo Genesis:
okay I got line 9 to work but now line 15 has an error.
i found out the problem (already pm it).
but here's the code, again.
i will put it in the script above too.
Code:
class Game_Temp
  alias initialize_old initialize
  def initialize
    $menu = 1
    initialize_old
  end
end
if you don't know how to insert it, look in the code below

and matt, here's your menu
Code:
class Game_Temp
  alias initialize_old initialize
  def initialize
    $menu = 1
    initialize_old
  end
end

class Window_Command < Window_Selectable
  attr_reader  :commands
end

class Scene_Menu
  #-----------------------------------------------------------------
  # initialize menu
  #-----------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  def main
    #command window options
    s1 = "Bag"
    s2 = $game_party.actors[0].name
    s3 = "Save"
    s4 = "Options"
    s5 = "Exit"
    s6 = "Pokemon"
    s7 = "Pokedex"
    s8 = "PokeGear"
    if $menu == 1
      commands = [s1,s2,s3,s4,s5]
      y = 80
    end
    if $menu == 2
      commands = [s1,s8,s2,s3,s4,s5]
      y = 80
    end
    if $menu == 3
      commands = [s6,s1,s8,s2,s3,s4,s5]
      y = 60
    end
    if $menu == 4
      commands = [s7,s6,s1,s8,s2,s3,s4,s5]
      y = 40
    end
    
  if $game_system.save_disabled
    commands.delete!("Save")
  end
  @command_window = Window_Command.new(160, commands)
  @command_window.index = @menu_index
  @command_window.x = 560 - @command_window.width / 2 - 20
  @command_window.y = y
  if $game_party.actors.size == 0
    @command_window.disable_item(0)
    @command_window.disable_item(1)
    @command_window.disable_item(2)
    @command_window.disable_item(3)
  end
  #displays map on background
  @spriteset = Spriteset_Map.new
  #time window
  @time = Window_Time.new
  #time window.x and .y
  @time.x = @time.y = 40
  
  @help = Window_Help.new
  @help.x = 40
  @help.y = 356
  @help.width = 640 - 80
  @help.height = 96
  @help.z = 999
  Graphics.transition
  loop do
    Graphics.update
    Input.update
    update
    if $scene != self
      break
    end
  end 
  Graphics.freeze
  #erases command window
  @command_window.dispose
  #erases time window
  @time.dispose
  #erases background
  @spriteset.dispose
  #erases help window
  @help.dispose
end

#--------------------------------------------------------------------------
def update
  #update command window
  @command_window.update
  #updates playtime window
  @time.update
  #updates the background
  @spriteset.update
  #updates help window
  @help.update
  case @command_window.commands[@command_window.index]
  when "Bag"
    @help.set_text("View the Items in your bag")
  when $game_party.actors[0].name
    @help.set_text("View your Trainer Card")
  when "Save"
    @help.set_text("Save your game")
  when "Options"
    @help.set_text("Change the game options")
  when "Exit"
    @help.set_text("Exit the menu")
  when "Pokedex"
    @help.set_text("A tool that records data on Pokemon")
  when "Pokemon"
    @help.set_text("View the Pokemon in your party")
  when "PokeGear"
    @help.set_text("A Device with a Cell Phone and Radio built in.")
  end
  
  if @command_window.active
    update_command
    return
  end
  
end
#--------------------------------------------------------------------------
def update_command
  if Input.trigger?(Input::B)
    $game_system.se_play($data_system.cancel_se)
    $scene = Scene_Map.new
    return
  end
    if Input.trigger?(Input::C)
     if $game_party.actors.size == 0 and @command_window.index < 4
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     case @command_window.commands[@command_window.index]
     when "Bag"
       $game_system.se_play($data_system.decision_se)
       #Warp.new(1, 134, 16, -1)
       $scene = Scene_Map.new
     when $game_party.actors[0].name
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Map.new
     when "Save"
       if $game_system.save_disabled
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Save.new
     when "Options"
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Map.new
     when  "Exit"
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Map.new            
     when "Pokemon"
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Map.new
     when  "Pokedex"
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Map.new
     end # case
   end # conditional
 end # method
end # class

class Window_Time < Window_Base
 #--------------------------------------------------------------------------
 # ● initialize
 #--------------------------------------------------------------------------
 def initialize
   super(0, 0, 160, 96)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = $fontface
   self.contents.font.size = $fontsize
   self.contents
   refresh
 end
 #--------------------------------------------------------------------------
 # ● refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   self.contents.font.color = system_color
   self.contents.draw_text(16, 0, 120, 32, "Local Time")
   text = Time.new.strftime("%I:%M:%S %p ")
   self.contents.font.color = normal_color
   self.contents.draw_text(0 - 4, 32, 120, 32, text, 2)
 end
 #--------------------------------------------------------------------------
 # ● update
 #--------------------------------------------------------------------------
 def update
   super
   refresh
   end
 end

#==============================================================================
# ■ Scene_Save
#------------------------------------------------------------------------------
#  セーブ画面の処理を行うクラスです。
#==============================================================================

class Scene_Save < Scene_File
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    super("Which file do you want to save to?")
  end
  #--------------------------------------------------------------------------
  # ● 決定時の処理
  #--------------------------------------------------------------------------
  def on_decision(filename)
    # セーブ SE を演奏
    $game_system.se_play($data_system.save_se)
    # セーブデータの書き込み
    file = File.open(filename, "wb")
    write_save_data(file)
    file.close
    # イベントから呼び出されている場合
    if $game_temp.save_calling
      # セーブ呼び出しフラグをクリア
      $game_temp.save_calling = false
      # マップ画面に切り替え
      $scene = Scene_Map.new
      return
    end
    # メニュー画面に切り替え
    case $menu
    when 1
      $scene = Scene_Menu.new(2)
    when 2
      $scene = Scene_Menu.new(3)
    when 3
      $scene = Scene_Menu.new(4)
    end
  end
  #--------------------------------------------------------------------------
  # ● キャンセル時の処理
  #--------------------------------------------------------------------------
  def on_cancel
    # キャンセル SE を演奏
    $game_system.se_play($data_system.cancel_se)
    # イベントから呼び出されている場合
    if $game_temp.save_calling
      # セーブ呼び出しフラグをクリア
      $game_temp.save_calling = false
      # マップ画面に切り替え
      $scene = Scene_Map.new
      return
    end
    # メニュー画面に切り替え
    case $menu
    when 1
      $scene = Scene_Menu.new(2)
    when 2
      $scene = Scene_Menu.new(3)
    when 3
      $scene = Scene_Menu.new(4)
    end
  end
  #--------------------------------------------------------------------------
  # ● セーブデータの書き込み
  #     file : 書き込み用ファイルオブジェクト (オープン済み)
  #--------------------------------------------------------------------------
  def write_save_data(file)
    # セーブファイル描画用のキャラクターデータを作成
    characters = []
    for i in 0...$game_party.actors.size
      actor = $game_party.actors[i]
      characters.push([actor.character_name, actor.character_hue])
    end
    # セーブファイル描画用のキャラクターデータを書き込む
    Marshal.dump(characters, file)
    # プレイ時間計測用のフレームカウントを書き込む
    Marshal.dump(Graphics.frame_count, file)
    # セーブ回数を 1 増やす
    $game_system.save_count += 1
    # マジックナンバーを保存する
    # (エディタで保存するたびにランダムな値に書き換えられる)
    $game_system.magic_number = $data_system.magic_number
    # 各種ゲームオブジェクトを書き込む
    Marshal.dump($game_system, file)
    Marshal.dump($game_switches, file)
    Marshal.dump($game_variables, file)
    Marshal.dump($game_self_switches, file)
    Marshal.dump($game_screen, file)
    Marshal.dump($game_actors, file)
    Marshal.dump($game_party, file)
    Marshal.dump($game_troop, file)
    Marshal.dump($game_map, file)
    Marshal.dump($game_player, file)
    Marshal.dump($menu, file)
  end
end

#==============================================================================
# ■ Scene_Load
#------------------------------------------------------------------------------
#  ロード画面の処理を行うクラスです。
#==============================================================================

class Scene_Load < Scene_File
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #--------------------------------------------------------------------------
  def initialize
    # テンポラリオブジェクトを再作成
    $game_temp = Game_Temp.new
    # タイムスタンプが最新のファイルを選択
    $game_temp.last_file_index = 0
    latest_time = Time.at(0)
    for i in 0..3
      filename = make_filename(i)
      if FileTest.exist?(filename)
        file = File.open(filename, "r")
        if file.mtime > latest_time
          latest_time = file.mtime
          $game_temp.last_file_index = i
        end
        file.close
      end
    end
    super("Which file do you wish to load from?")
  end
  #--------------------------------------------------------------------------
  # ● 決定時の処理
  #--------------------------------------------------------------------------
  def on_decision(filename)
    # ファイルが存在しない場合
    unless FileTest.exist?(filename)
      # ブザー SE を演奏
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    # ロード SE を演奏
    $game_system.se_play($data_system.load_se)
    # セーブデータの書き込み
    file = File.open(filename, "rb")
    read_save_data(file)
    file.close
    # BGM、BGS を復帰
    $game_system.bgm_play($game_system.playing_bgm)
    $game_system.bgs_play($game_system.playing_bgs)
    # マップを更新 (並列イベント実行)
    $game_map.update
    # マップ画面に切り替え
    $scene = Scene_Map.new
  end
  #--------------------------------------------------------------------------
  # ● キャンセル時の処理
  #--------------------------------------------------------------------------
  def on_cancel
    # キャンセル SE を演奏
    $game_system.se_play($data_system.cancel_se)
    # タイトル画面に切り替え
    $scene = Scene_Title.new
  end
  #--------------------------------------------------------------------------
  # ● セーブデータの読み込み
  #     file : 読み込み用ファイルオブジェクト (オープン済み)
  #--------------------------------------------------------------------------
  def read_save_data(file)
    # セーブファイル描画用のキャラクターデータを読み込む
    characters = Marshal.load(file)
    # プレイ時間計測用のフレームカウントを読み込む
    Graphics.frame_count = Marshal.load(file)
    # 各種ゲームオブジェクトを読み込む
    $game_system        = Marshal.load(file)
    $game_switches      = Marshal.load(file)
    $game_variables     = Marshal.load(file)
    $game_self_switches = Marshal.load(file)
    $game_screen        = Marshal.load(file)
    $game_actors        = Marshal.load(file)
    $game_party         = Marshal.load(file)
    $game_troop         = Marshal.load(file)
    $game_map           = Marshal.load(file)
    $game_player        = Marshal.load(file)
    $menu        = Marshal.load(file)
    # マジックナンバーがセーブ時と異なる場合
    # (エディタで編集が加えられている場合)
    if $game_system.magic_number != $data_system.magic_number
      # マップをリロード
      $game_map.setup($game_map.map_id)
      $game_player.center($game_player.x, $game_player.y)
    end
    # パーティメンバーをリフレッシュ
    $game_party.refresh
  end
end

#==============================================================================
# ■ Window_SaveFile
#------------------------------------------------------------------------------
#  セーブ画面およびロード画面で表示する、セーブファイルのウィンドウです。
#==============================================================================

class Window_SaveFile < Window_Base
  #--------------------------------------------------------------------------
  # ● 公開インスタンス変数
  #--------------------------------------------------------------------------
  attr_reader   :filename                 # ファイル名
  attr_reader   :selected                 # 選択状態
  #--------------------------------------------------------------------------
  # ● オブジェクト初期化
  #     file_index : セーブファイルのインデックス (0~3)
  #     filename   : ファイル名
  #--------------------------------------------------------------------------
  def initialize(file_index, filename)
    super(0, 64 + file_index % 4 * 104, 640, 104)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    self.opacity = 255
    self.back_opacity = 255
    @file_index = file_index
    @filename = "Save#{@file_index + 1}.rxdata"
    @time_stamp = Time.at(0)
    @file_exist = FileTest.exist?(@filename)
    if @file_exist
      file = File.open(@filename, "r")
      @time_stamp = file.mtime
      @characters = Marshal.load(file)
      @frame_count = Marshal.load(file)
      @game_system = Marshal.load(file)
      @game_switches = Marshal.load(file)
      @game_variables = Marshal.load(file)
      @menu = Marshal.load(file)
      @total_sec = @frame_count / Graphics.frame_rate
      file.close
    end
    refresh
    @selected = false
  end
  #--------------------------------------------------------------------------
  # ● リフレッシュ
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    # ファイル番号を描画
    self.contents.font.color = normal_color
    name = "File #{@file_index + 1}"
    self.contents.draw_text(4, 0, 600, 32, name)
    @name_width = contents.text_size(name).width
    # セーブファイルが存在する場合
    if @file_exist
      # キャラクターを描画
      for i in 0...@characters.size
        bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])
        cw = bitmap.rect.width / 4
        ch = bitmap.rect.height / 4
        src_rect = Rect.new(0, 0, cw, ch)
        x = 300 - @characters.size * 32 + i * 64 - cw / 2
        self.contents.blt(x, 68 - ch, bitmap, src_rect)
      end
      # プレイ時間を描画
      hour = @total_sec / 60 / 60
      min = @total_sec / 60 % 60
      sec = @total_sec % 60
      time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
      self.contents.font.color = normal_color
      self.contents.draw_text(4, 8, 600, 32, time_string, 2)
      # タイムスタンプを描画
      self.contents.font.color = normal_color
      time_string = @time_stamp.strftime("%Y/%m/%d %H:%M")
      self.contents.draw_text(4, 40, 600, 32, time_string, 2)
    end
  end
  #--------------------------------------------------------------------------
  # ● 選択状態の設定
  #     selected : 新しい選択状態 (true=選択 false=非選択)
  #--------------------------------------------------------------------------
  def selected=(selected)
    @selected = selected
    update_cursor_rect
  end
  #--------------------------------------------------------------------------
  # ● カーソルの矩形更新
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @selected
      self.cursor_rect.set(0, 0, @name_width + 8, 32)
    else
      self.cursor_rect.empty
    end
  end
end
Quote originally posted by Peekimon:
Matt... uh, virtual already made that one... Look up.
peekimon, please spare me your enthusiasm(good spelled?)
i made this thread so people can request it.
ps. i'm not mad at you
__________________

  #17    
Old June 14th, 2005 (08:29 AM).
Peekimon's Avatar
Peekimon
Me = cat-aholic, Meowr
 
Join Date: Jan 2005
Location: Meowr
Age: 23
Gender:
Nature: Gentle
Send a message via Windows Live Messenger to Peekimon Send a message via Yahoo to Peekimon
Quote:
peekimon, please spare me your enthusiasm(good spelled?)
i made this thread so people can request it.
ps. i'm not mad at you
Ooh, sorry ;

Although, I have nothing to request. I'd like to say, that your RGSS Coding is superb! Keep it up!
  #18    
Old June 14th, 2005 (09:58 AM).
Blizzy
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 24
Gender:
Nature: Relaxed
Quote originally posted by Peekimon:
Ooh, sorry ;

Although, I have nothing to request. I'd like to say, that your RGSS Coding is superb! Keep it up!
i'm getting better and better
if no one has any request, i'll be making a trainercard
but i don't have the resources for that one.
__________________

  #19    
Old June 14th, 2005 (10:54 AM).
Jeff_PKLight's Avatar
Jeff_PKLight
RMXP User
 
Join Date: Feb 2005
Location: USA
Nature: Adamant
Well... there is one thing I would like to ask. Like many pokemon games, how do you make the options thing, like right after the press start screen at the beginning of the game?
__________________

~The River~

Current project

Pokemon Light Progress:

Light is starting over! I'll update this once I progress more in Light again.


:: Pokemon Light Links ::
:: Site :: :: Forums :: :: Thread ::
  #20    
Old June 14th, 2005 (04:56 PM).
Neo Genesis
The Wanderer
 
Join Date: May 2005
Location: California
Age: 22
Gender:
Nature: Naive
do you have the dbs and cms script you made for esai's game?
__________________



New Djinn, New Heros, New Lighthouses, New Adepts, New Psynergy, The same bad guys. Coming soon Golden Sun Scars of Time! Will you journey with the heros? Or walk in the path of Saturos and Miniradi?Note game will progress very slowly and might be cancled to continue pokemon lost era.


My little brother is Sykora yay!
  #21    
Old June 15th, 2005 (05:37 AM).
Alexandre's Avatar
Alexandre
 
Join Date: Mar 2005
Age: 20
Nature: Lonely
here are the resources for the trainer card:
Attached Images
File Type: png idcard.png‎ (25.0 KB, 45 views) (Save to Dropbox)
  #22    
Old June 15th, 2005 (06:16 AM).
Blizzy
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 24
Gender:
Nature: Relaxed
Quote originally posted by agentalexandre12:
here are the resources for the trainer card:
thanks! i really needed that.
i'll add the ruby trainersprites with it.
__________________

  #23    
Old June 15th, 2005 (07:24 AM).
funnybunny's Avatar
funnybunny
Advanced RM2k(3) Coder
 
Join Date: Mar 2005
Location: The Netherlands
Age: 26
Gender:
Nature: Calm
I don't have a request, more a question.

Is it posible to have the text(in the messagebox) in RMXP the same "pixel size" as in RM2k(3)? I really hate this "nice" looking text.

=EDIT=
Hmmmm maybe not very clear, I want the text the same height but double the pixels in the text so that it looks like RM2k(3)
__________________
Skills:
- RM2k(3) coding, example: Pokemon Champion - demo.
- HTML Coding, example Tiger dust Games - newsletter 2.
- RM2k(3) Mapping, example: Ultimatum; Inner War(WIP)
- Drawing.
- Small spriter, example: Tiger Dust Games - forum skin.
- Small Story writing, example: Ultimatum; Inner War(WIP) - story.
  #24    
Old June 15th, 2005 (08:33 AM).
Blizzy
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 24
Gender:
Nature: Relaxed
Quote originally posted by funnybunny:
I don't have a request, more a question.

Is it posible to have the text(in the messagebox) in RMXP the same "pixel size" as in RM2k(3)? I really hate this "nice" looking text.

=EDIT=
Hmmmm maybe not very clear, I want the text the same height but double the pixels in the text so that it looks like RM2k(3)
yeah sure, just go to main, and change $fontsize
__________________

  #25    
Old June 15th, 2005 (08:35 AM).
Alexandre's Avatar
Alexandre
 
Join Date: Mar 2005
Age: 20
Nature: Lonely
if u are making a trainer could u do one with hiro as the trainer?
 
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 04:41 PM.