The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > The PokéCommunity Archives > Game Development Archive
Register New Account FAQ/Rules Chat Blogs Mark Forums Read

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  
Unread April 21st, 2005, 02:13 PM
Blizzy
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 23
Gender:
Nature: Relaxed
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)
__________________


Last edited by -virtual-; May 25th, 2005 at 05:17 PM.
  #2  
Unread April 21st, 2005, 02:15 PM
Peekimon's Avatar
Peekimon
Me = cat-aholic, Meowr
 
Join Date: Jan 2005
Location: Meowr
Age: 21
Gender:
Nature: Gentle
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  
Unread April 21st, 2005, 02:34 PM
funnybunny's Avatar
funnybunny
Advanced RM2k(3) Coder
 
Join Date: Mar 2005
Location: The Netherlands
Age: 24
Gender:
Nature: Calm
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  
Unread April 21st, 2005, 02:37 PM
Blizzy
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 23
Gender:
Nature: Relaxed
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  
Unread April 21st, 2005, 02:39 PM
funnybunny's Avatar
funnybunny
Advanced RM2k(3) Coder
 
Join Date: Mar 2005
Location: The Netherlands
Age: 24
Gender:
Nature: Calm
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  
Unread April 21st, 2005, 08:47 PM
Jeff_PKLight's Avatar
Jeff_PKLight
RMXP User
 
Join Date: Feb 2005
Location: USA
Nature: Adamant
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  
Unread April 21st, 2005, 08:54 PM
Esai's Avatar
Esai
♥♥♥ With Bubbleicious ♥♥♥
 
Join Date: Nov 2004
Location: England
Age: 20
Gender:
Nature: Gentle
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  
Unread April 22nd, 2005, 06:36 AM
Blizzy
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 23
Gender:
Nature: Relaxed
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
__________________


Last edited by -virtual-; April 22nd, 2005 at 02:09 PM.
  #9  
Unread May 20th, 2005, 12:26 AM
rm2kdude's Avatar
rm2kdude
Advanced Pixel-Artist
 
Join Date: Jun 2004
Location: usa
Age: 24
Gender: Male
Nature: Jolly
I get this weird error what does it mean.
Attached Images
File Type: png HELP.PNG‎ (17.1 KB, 69 views)
__________________
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  
Unread May 21st, 2005, 10:18 AM
Esai's Avatar
Esai
♥♥♥ With Bubbleicious ♥♥♥
 
Join Date: Nov 2004
Location: England
Age: 20
Gender:
Nature: Gentle
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  
Unread May 21st, 2005, 12:40 PM
rm2kdude's Avatar
rm2kdude
Advanced Pixel-Artist
 
Join Date: Jun 2004
Location: usa
Age: 24
Gender: Male
Nature: Jolly
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  
Unread May 21st, 2005, 04:30 PM
Blizzy
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 23
Gender:
Nature: Relaxed
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  
Unread May 21st, 2005, 09:25 PM
rm2kdude's Avatar
rm2kdude
Advanced Pixel-Artist
 
Join Date: Jun 2004
Location: usa
Age: 24
Gender: Male
Nature: Jolly
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?

Last edited by rm2kdude; May 21st, 2005 at 09:31 PM.
  #14  
Unread May 25th, 2005, 04:48 PM
Alexandre's Avatar
Alexandre
Teh Epic Scriptor
 
Join Date: Mar 2005
Age: 18
Nature: Lonely
help, still when i right over window_command i still get that error that rm2kdude gets
  #15  
Unread May 25th, 2005, 05:15 PM
Blizzy
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 23
Gender:
Nature: Relaxed
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  
Unread May 26th, 2005, 06:36 AM
Alexandre's Avatar
Alexandre
Teh Epic Scriptor
 
Join Date: Mar 2005
Age: 18
Nature: Lonely
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  
Unread May 26th, 2005, 06:53 PM
Blizzy
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 23
Gender:
Nature: Relaxed
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  
Unread May 27th, 2005, 07:16 AM
Alexandre's Avatar
Alexandre
Teh Epic Scriptor
 
Join Date: Mar 2005
Age: 18
Nature: Lonely
works like a charm now, add me to ur list of using the menu
  #19  
Unread May 30th, 2005, 09:59 AM
Ravecat's Avatar
Ravecat
I'm Right.
 
Join Date: May 2005
Location: Adelaide, Australia
Gender: Male
Nature: Careful
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  
Unread May 30th, 2005, 02:15 PM
Blizzy
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 23
Gender:
Nature: Relaxed
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  
Unread May 31st, 2005, 06:42 AM
Ravecat's Avatar
Ravecat
I'm Right.
 
Join Date: May 2005
Location: Adelaide, Australia
Gender: Male
Nature: Careful
Oh, Thats fine. I was just wondering
__________________
  #22  
Unread June 3rd, 2005, 04:39 PM
Mooshykris
Donator Tier 5
 
Join Date: Jan 2005
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  
Unread June 3rd, 2005, 04:42 PM
Blizzy
me = Scripter.new("Noob")
 
Join Date: Jan 2005
Location: ~The Netherlands~
Age: 23
Gender:
Nature: Relaxed
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  
Unread June 3rd, 2005, 04:44 PM
Mooshykris
Donator Tier 5
 
Join Date: Jan 2005
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. The time now is 08:37 PM.


Style by Perdition Haze, artwork by Sa-Dui.
Like our Facebook Page Follow us on TwitterMessage Board Statistics | © 2002 - 2013 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2013 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User posts belong to the user.