Go Back   The PokéCommunity Forums > The PokéCommunity Archives > Game Development Archive
Reload this Page PokeMenu Update!

Notices
For all updates, view the main page.

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 April 21st, 2005 (06:13 AM). Edited May 25th, 2005 by -virtual-.
Blizzy Blizzy is offline
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 25
Gender:
Nature: Relaxed
Posts: 492
ok, here's a update for people who are using my menu!
instead of switches, it now uses a global variable
(a variable which can be acces everywhere)
it saves 3 switches, what a relief

ok, now for the script, just overwrite it with scene menu:
Code:
#=================================
#  Scene_Menu
#------------------------------------------------------------------
#=================================
class Scene_Menu
#-----------------------------------------------------------------
#menu_index 
#-----------------------------------------------------------------
def initialize(menu_index = 0)
 @menu_index = menu_index
end

#--------------------------------------------------------------------------
def main
 s1 = "Bag"
 s2 = " "
 s3 = "Save"
 s4 = "Options"
 s5 = "Exit"
 s6 = "Pokemon"
 s7 = "Pokedex"
 commands = [s1,s2,s3,s4,s5]
 y = 100
 if $menu == 1
 commands = [s1,s2,s3,s4,s5]
 y = 100
 end
 if $menu == 2
   commands = [s6, s1, s2, s3, s4, s5]
   y = 80
 end
 if $menu == 3
  commands = [s7, s6,s1, s2, s3, s4, s5]
  y = 60
end
 if $game_system.save_disabled
   commands.delete!("Save")
 end

 @commands = Window_Command.new(160, commands)
 @commands.index = @menu_index
 @commands.x = 560 - @commands.width / 2
 @commands.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
 @spriteset = Spriteset_Map.new
 @heroname = Window_Heroname.new
 @playtime_window = Window_PlayTime.new
 @playtime_window.x = 0
 @playtime_window.y = 0
 
 Graphics.transition
 loop do
   Graphics.update
   Input.update
   update
   if $scene != self
     break
   end
 end 
 Graphics.freeze
 @heroname.dispose
 @commands.dispose
 @playtime_window.dispose
 @spriteset.dispose
end

#--------------------------------------------------------------------------
def update
 @heroname.update
 @commands.update
 @playtime_window.update
 @spriteset.update
 if @commands.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 @commands.index < 4
      $game_system.se_play($data_system.buzzer_se)
      return
    end
    case @commands.commands[@commands.index]
    when "Bag"
      $game_system.se_play($data_system.decision_se)
      $scene = Scene_Item.new
    when " "
      $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 # of case
  end # of conditional
end # of method
#--------------------------------------------------------------------------
end # of Scene_Menu class definition

class Window_Heroname < Window_Base


def initialize
  super(0, 0, 640,480)
  self.opacity = 0
  self.back_opacity = 0
  self.contents = Bitmap.new(width-32, height-32)
  self.contents.font.name = "Comic Sans MS"  
  self.contents.font.size = 28
  self.contents.font.color = text_color(8)
  refresh
end

def refresh
 for i in 0...$game_party.actors.size
   actor = $game_party.actors[i]
   x = i * 200 + 484
   if $menu == 1
     y = 132
   end
   if $menu == 2
     y = 144
   end
   if $menu == 3
     y = 156
   end
   self.contents.draw_text(x, y, 200, 32, actor.name)
 end # of for loop
end # of method

end # of class
Window_Command
Code:
#==============================================================================
# ■ Window_Command
#------------------------------------------------------------------------------
#  一般的なコマンド選択を行うウィンドウです。
#==============================================================================

class Window_Command < Window_Selectable
  attr_reader  :commands
  #--------------------------------------------------------------------------
  # ● def initialize
  #--------------------------------------------------------------------------
  def initialize(width, commands)
    # コマンドの個数からウィンドウの高さを算出
    super(0, 0, width, commands.size * 32 + 32)
    @item_max = commands.size
    @commands = commands
    self.contents = Bitmap.new(width - 32, @item_max * 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # ● refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i, normal_color)
    end
  end
  #--------------------------------------------------------------------------
  # ● draw item
  #--------------------------------------------------------------------------
  def draw_item(index, color)
    self.contents.font.color = color
    rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(rect, @commands[index])
  end
  #--------------------------------------------------------------------------
  # ● index
  #--------------------------------------------------------------------------
  def disable_item(index)
    draw_item(index, disabled_color)
  end
end
the global variables are:
$menu = 1 (small)
$menu = 2 (medium)
$menu = 3 (full menu)
(instead of $game_switches[1 or 2 or 3] = true)
enjoy...!

comments & questions are welcome
you can also pm me or add me to msn if you have any questions.

I want to know who is using my menu...
everybody who is using it, please pm me.
so i could make a list with the names.
(i know it from the folowing people: rm2k3kid, esai, peekimon)
__________________

  #2    
Old April 21st, 2005 (06:15 AM).
Peekimon's Avatar
Peekimon Peekimon is offline
Me = cat-aholic, Meowr
 
Join Date: Jan 2005
Location: Meowr
Age: 23
Gender:
Nature: Gentle
Posts: 1,671
Send a message via Windows Live Messenger to Peekimon Send a message via Yahoo to Peekimon
Cool!!! I finally saved 3 switches... whew, cool!!!
  #3    
Old April 21st, 2005 (06:34 AM).
funnybunny's Avatar
funnybunny funnybunny is offline
Advanced RM2k(3) Coder
 
Join Date: Mar 2005
Location: The Netherlands
Age: 26
Gender:
Nature: Calm
Posts: 178
Isn't this supose to be in the totorial subforum?

Anyway, cool. To bad I am not using RMXP . Else I would be using you menu.
__________________
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.
  #4    
Old April 21st, 2005 (06:37 AM).
Blizzy Blizzy is offline
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 25
Gender:
Nature: Relaxed
Posts: 492
Quote originally posted by funnybunny:
Isn't this supose to be in the totorial subforum?

Anyway, cool. To bad I am not using RMXP . Else I would be using you menu.
ummm, no...
this isn't a toturial, but a script :\
anyway, thanks for the comments
__________________

  #5    
Old April 21st, 2005 (06:39 AM).
funnybunny's Avatar
funnybunny funnybunny is offline
Advanced RM2k(3) Coder
 
Join Date: Mar 2005
Location: The Netherlands
Age: 26
Gender:
Nature: Calm
Posts: 178
Quote originally posted by -virtual-:
ummm, no...
this isn't a toturial, but a script :\
Oh okay, anyway, good job.

PS: that was a fast reply.
__________________
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.
  #6    
Old April 21st, 2005 (12:47 PM).
Jeff_PKLight's Avatar
Jeff_PKLight Jeff_PKLight is offline
RMXP User
 
Join Date: Feb 2005
Location: USA
Nature: Adamant
Posts: 536
Wait.... so if you use the global vars., wouldn't that be the same as switches? :\
__________________

~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 ::
  #7    
Old April 21st, 2005 (12:54 PM).
Esai's Avatar
Esai Esai is offline
♥♥♥ With Bubbleicious ♥♥♥
 
Join Date: Nov 2004
Location: England
Age: 22
Gender:
Nature: Gentle
Posts: 1,434
Send a message via AIM to Esai Send a message via Windows Live Messenger to Esai Send a message via Yahoo to Esai
Yes, But it doesnt waste the switches, which are used alot in Pokemon Games, oh and to change the global variable use this:

new event
Call Script:
$menu = 1, 2 or 3

thats it
__________________


~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
Paired with:: Bubbleicious! *hugs*

~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
Twinned with: Peekimon

~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
I have Adopted Maya Miyazono

~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~

|+|=|+|=|+|=|+|=Web-Sites to Visit|=|+|=|+|=|+|=|+|=|

<!! Quad-Pod !!>

< DHI Forums >

|+|=|+|=|+|=|+|=Links on PC!|+|=|+|=|+|=|+|=|+|=|+|=|

Esai's FanClub!

{[Achivements]}
Made it to the Top Ten in the Spring DCC
  #8    
Old April 21st, 2005 (10:36 PM). Edited April 22nd, 2005 by -virtual-.
Blizzy Blizzy is offline
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 25
Gender:
Nature: Relaxed
Posts: 492
esai is correct.

i choiced for a global variable, so you change it in any script!
(you could try, if you don't believe it)

and, I want to know who is using my menu...
everybody who is using it, plz pm me.
so i could make a list to remember it
i'll put this in the first post too
__________________

  #9    
Old May 19th, 2005 (04:26 PM).
rm2kdude's Avatar
rm2kdude rm2kdude is offline
Advanced Pixel-Artist
 
Join Date: Jun 2004
Location: usa
Age: 25
Gender: Male
Nature: Jolly
Posts: 355
I get this weird error what does it mean.
Attached Images
File Type: png HELP.PNG‎ (17.1 KB, 69 views) (Save to Dropbox)
__________________
Star Studios
Planet RPG Community Join a new and fresh community.
Get help quickly, and get responses to your work almost instantly. There's always someone on at any given time. Why not register and be apart of our community?
  #10    
Old May 21st, 2005 (02:18 AM).
Esai's Avatar
Esai Esai is offline
♥♥♥ With Bubbleicious ♥♥♥
 
Join Date: Nov 2004
Location: England
Age: 22
Gender:
Nature: Gentle
Posts: 1,434
Send a message via AIM to Esai Send a message via Windows Live Messenger to Esai Send a message via Yahoo to Esai
Well, Whats the code on line 154 of Scene_Menu?
__________________


~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
Paired with:: Bubbleicious! *hugs*

~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
Twinned with: Peekimon

~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~
I have Adopted Maya Miyazono

~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~`~

|+|=|+|=|+|=|+|=Web-Sites to Visit|=|+|=|+|=|+|=|+|=|

<!! Quad-Pod !!>

< DHI Forums >

|+|=|+|=|+|=|+|=Links on PC!|+|=|+|=|+|=|+|=|+|=|+|=|

Esai's FanClub!

{[Achivements]}
Made it to the Top Ten in the Spring DCC
  #11    
Old May 21st, 2005 (04:40 AM).
rm2kdude's Avatar
rm2kdude rm2kdude is offline
Advanced Pixel-Artist
 
Join Date: Jun 2004
Location: usa
Age: 25
Gender: Male
Nature: Jolly
Posts: 355
I have no I dea I somehow cannot reach it its like its not big enough to fit on my screen.
__________________
Star Studios
Planet RPG Community Join a new and fresh community.
Get help quickly, and get responses to your work almost instantly. There's always someone on at any given time. Why not register and be apart of our community?
  #12    
Old May 21st, 2005 (08:30 AM).
Blizzy Blizzy is offline
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 25
Gender:
Nature: Relaxed
Posts: 492
Quote originally posted by rm2kdude:
I have no I dea I somehow cannot reach it its like its not big enough to fit on my screen.
you can download a patch at www.dubealex.com for the resolution
"rmxp enhanched"

and for that error,
overwrite the following with Window_Command
Code:
#==============================================================================
# ■ Window_Command
#------------------------------------------------------------------------------
#  一般的なコマンド選択を行うウィンドウです。
#==============================================================================

class Window_Command < Window_Selectable
  attr_reader  :commands
  #--------------------------------------------------------------------------
  # ● def initialize
  #--------------------------------------------------------------------------
  def initialize(width, commands)
    # コマンドの個数からウィンドウの高さを算出
    super(0, 0, width, commands.size * 32 + 32)
    @item_max = commands.size
    @commands = commands
    self.contents = Bitmap.new(width - 32, @item_max * 32)
    self.contents.font.name = $fontface
    self.contents.font.size = $fontsize
    refresh
    self.index = 0
  end
  #--------------------------------------------------------------------------
  # ● refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i, normal_color)
    end
  end
  #--------------------------------------------------------------------------
  # ● draw item
  #--------------------------------------------------------------------------
  def draw_item(index, color)
    self.contents.font.color = color
    rect = Rect.new(4, 32 * index, self.contents.width - 8, 32)
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
    self.contents.draw_text(rect, @commands[index])
  end
  #--------------------------------------------------------------------------
  # ● index
  #--------------------------------------------------------------------------
  def disable_item(index)
    draw_item(index, disabled_color)
  end
end
__________________

  #13    
Old May 21st, 2005 (01:25 PM). Edited May 21st, 2005 by rm2kdude.
rm2kdude's Avatar
rm2kdude rm2kdude is offline
Advanced Pixel-Artist
 
Join Date: Jun 2004
Location: usa
Age: 25
Gender: Male
Nature: Jolly
Posts: 355
awesome I got it now can't wait for the menu to be finished.
__________________
Star Studios
Planet RPG Community Join a new and fresh community.
Get help quickly, and get responses to your work almost instantly. There's always someone on at any given time. Why not register and be apart of our community?
  #14    
Old May 25th, 2005 (08:48 AM).
Alexandre's Avatar
Alexandre Alexandre is offline
 
Join Date: Mar 2005
Age: 20
Nature: Lonely
Posts: 400
help, still when i right over window_command i still get that error that rm2kdude gets
  #15    
Old May 25th, 2005 (09:15 AM).
Blizzy Blizzy is offline
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 25
Gender:
Nature: Relaxed
Posts: 492
Quote originally posted by agentalexandre12:
help, still when i right over window_command i still get that error that rm2kdude gets
this is line 154:
self.contents.draw_text(x, y, 200, 32, actor.name)
i don't have any idea what's the prob with this.
it does work okay for me
__________________

  #16    
Old May 25th, 2005 (10:36 PM).
Alexandre's Avatar
Alexandre Alexandre is offline
 
Join Date: Mar 2005
Age: 20
Nature: Lonely
Posts: 400
i finally got it to work: i just deleted that line of code and it works fine
but i do have a nother problem no matter which menu i choose i still get Bag,Save,Options and Exit
  #17    
Old May 26th, 2005 (10:53 AM).
Blizzy Blizzy is offline
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 25
Gender:
Nature: Relaxed
Posts: 492
Quote originally posted by agentalexandre12:
i finally got it to work: i just deleted that line of code and it works fine
but i do have a nother problem no matter which menu i choose i still get Bag,Save,Options and Exit
shouldn't have removed that line :\
the problem is, you haven't set the type!
in scene_title, add above $scene = Scene_Map.new:
$menu = 1
around line 160
it will work!
__________________

  #18    
Old May 26th, 2005 (11:16 PM).
Alexandre's Avatar
Alexandre Alexandre is offline
 
Join Date: Mar 2005
Age: 20
Nature: Lonely
Posts: 400
works like a charm now, add me to ur list of using the menu
  #19    
Old May 30th, 2005 (01:59 AM).
Ravecat's Avatar
Ravecat Ravecat is offline
I'm Right.
 
Join Date: May 2005
Location: Adelaide, Australia
Gender: Male
Nature: Careful
Posts: 1,264
ADd me to the list, this menu is great... But are you going to make the Options and Save (Pokemon Saving Style) ect, Or do we have to do that? Oh, and the Trainer Card...? Thanks anyway
__________________
  #20    
Old May 30th, 2005 (06:15 AM).
Blizzy Blizzy is offline
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 25
Gender:
Nature: Relaxed
Posts: 492
Quote originally posted by Emerald Ex:
ADd me to the list, this menu is great... But are you going to make the Options and Save (Pokemon Saving Style) ect, Or do we have to do that? Oh, and the Trainer Card...? Thanks anyway
that's all up to you guys
well, you can't use my options now, because my resolution is different,
but apart from that i wouldn't give them out
__________________

  #21    
Old May 30th, 2005 (10:42 PM).
Ravecat's Avatar
Ravecat Ravecat is offline
I'm Right.
 
Join Date: May 2005
Location: Adelaide, Australia
Gender: Male
Nature: Careful
Posts: 1,264
Oh, Thats fine. I was just wondering
__________________
  #22    
Old June 3rd, 2005 (08:39 AM).
Mooshykris Mooshykris is offline
Crystal Tier
 
Join Date: Jan 2005
Posts: 565
Quote originally posted by Emerald Ex:
Oh, Thats fine. I was just wondering
I want to use it. But I get an error on Window Command line 19!
  #23    
Old June 3rd, 2005 (08:42 AM).
Blizzy Blizzy is offline
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 25
Gender:
Nature: Relaxed
Posts: 492
Quote originally posted by Mooshykris:
I want to use it. But I get an error on Window Command line 19!
strange, i'll try to make a demo, including show choices window,
and such...
do you guys want anything else in it?
like a trainercard?
__________________

  #24    
Old June 3rd, 2005 (08:44 AM).
Mooshykris Mooshykris is offline
Crystal Tier
 
Join Date: Jan 2005
Posts: 565
Quote originally posted by -virtual-:
strange, i'll try to make a demo, including show choices window,
and such...
do you guys want anything else in it?
like a trainercard?
that would be good. How do you enter your own options into it? I might have more.
 
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

Forum Jump


All times are UTC -8. The time now is 05:45 AM.