Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

4 Pages V  < 1 2 3 4 >  
Closed TopicStart new topic
> Law's Custom Menu Screen, A whole new menu interface.
The Law G14
post Oct 3 2009, 11:29 AM
Post #21


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,348
Type: Scripter
RM Skill: Skilled
Rev Points: 5




Hey, thanks Zeff!

If you find any errors, please tell me smile.gif


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   
nighthawk282
post Oct 4 2009, 09:32 AM
Post #22


RRR's Resident Nocturnal Winged Raptor
Group Icon

Group: Revolutionary
Posts: 377
Type: Developer
RM Skill: Intermediate




Law, my friend, it's good to see you're getting such excellent feedback. This menu may be just what I was looking for. Yes, I'm using RMXP now. Hopefully I'll be able to do this script justice. Excellent job. smile.gif


__________________________
<div style="margin:20px; margin-top:5px"><div style="margin-bottom:2px">[Show/Hide] Random Sig. Stuff!</div><div style="margin: 0px; padding: 6px; border: 1px inset;"><div style="display: none;">








Which Final Fantasy Character Are You?
Final Fantasy 7




Click here to level up my card!



Click here to level up my license!

My Results:


Dragon: You are very powerful, kind of mean and dark. You couldn't care less about others.

I am a Demon. Join me.

</div></div></div>

Why is it so hard to find someone who cares about you, when it's easy enough to find someone who looks down on you?
Three Days Grace; "Someone Who Cares"

They say just hold onto your hope, but you know, if you swallow your pride you will choke.
Alexisonfire; "Midnight Regulations"

A sin I didn't care for, but a sin that paid my debts. A sin that fed my children, and burned my smiles in cigarettes.
Protest The Hero; "Blindfolds Aside"

It's all been a lie, I don't ever want to know why, you've mastered the art of deceiving me.
Disturbed; "Deceiver"

The sky's a brick wall, the ground's a juggernaut, each day they get a bit closer, between them I am caught.
Alexisonfire; "This Could Be Anywhere In The World"
Go to the top of the page
 
+Quote Post
   
The Law G14
post Oct 4 2009, 10:14 AM
Post #23


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,348
Type: Scripter
RM Skill: Skilled
Rev Points: 5




Cool, that's nice to here that you're using rmxp now smile.gif

If you find any problems wiht my script, please tell me biggrin.gif


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   
Zeffa
post Oct 5 2009, 06:22 AM
Post #24


Level 8
Group Icon

Group: Revolutionary
Posts: 130
Type: Artist
RM Skill: Intermediate




Right, I've got a bit of an error.

It says:
Script 'Custom_Menu' line114: TypeError Occurred.
undefined superlass 'window_base'

Here is my line 114:
class Window_Location < Window_Base

I tried popping a '>' in at the end of Window_Base, but that didn't seem to work.

I've not really messed with the Scripting part of RMXP before so I'm not sure how the code is supposed to look.
Whats wrong this line Law?

Thanks! x


__________________________
Illustrator/GraphicDesigner, if you want somert... Like an illustration or a logo? Just ask! (Nothing too crazy though) ;)
For the love, the art, the game, the metal and the sex... And thanks for the freebies.


Out Now!
Awaiting reviews and feedback.

Current Project: Exodus: Escape Fort Bullwark
Engine: RMXP
Completion: Chapter One, 100%
Release Date: Out now, Winter 2009
Download Link: Via MediaFire

Exodus Full Game Thread
Exodus Forum Topic
Exodus Screen Gallery
Go to the top of the page
 
+Quote Post
   
The Law G14
post Oct 5 2009, 01:03 PM
Post #25


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,348
Type: Scripter
RM Skill: Skilled
Rev Points: 5




Hm, it would seem that you have another script interfering with the Window_Base class. Do you happen to have any other custom scripts?


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   
Zeffa
post Oct 5 2009, 01:56 PM
Post #26


Level 8
Group Icon

Group: Revolutionary
Posts: 130
Type: Artist
RM Skill: Intermediate




No this was my first Custom Script. I've since tried the Bestiary and HP/SP image scripts but the custom menu was the first.


__________________________
Illustrator/GraphicDesigner, if you want somert... Like an illustration or a logo? Just ask! (Nothing too crazy though) ;)
For the love, the art, the game, the metal and the sex... And thanks for the freebies.


Out Now!
Awaiting reviews and feedback.

Current Project: Exodus: Escape Fort Bullwark
Engine: RMXP
Completion: Chapter One, 100%
Release Date: Out now, Winter 2009
Download Link: Via MediaFire

Exodus Full Game Thread
Exodus Forum Topic
Exodus Screen Gallery
Go to the top of the page
 
+Quote Post
   
The Law G14
post Oct 5 2009, 02:02 PM
Post #27


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,348
Type: Scripter
RM Skill: Skilled
Rev Points: 5




First of all, copy the script into a blank rmxp proect and see if it works. If that doesn't help, change line 114 to line 137 with this:

CODE
class Window_Location < Window_Base
  #-----------------------------------------------------------------------------
  # * Object Initialization
  #-----------------------------------------------------------------------------
  alias law_init initialize
  def initialize
    law_init
    super(0, 0, 160, 96)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #-----------------------------------------------------------------------------
  # * Refresh
  #-----------------------------------------------------------------------------
  alias law_ref refresh
  def refresh
    law_ref
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, "Location")
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 32, 120, 32, $game_map.name, 2)
  end
end


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   
thatbennyguy
post Oct 5 2009, 02:50 PM
Post #28


Aspiring Indie Game Dev
Group Icon

Group: Revolutionary
Posts: 197
Type: Developer
RM Skill: Undisclosed
Rev Points: 40




Hi Law... great scrip'!
But whenever I try to load it, it can't find my mapXYZ.rxdata file where my starting position is...
If you could help me out that'd be fantastic! smile.gif


__________________________



.

Completed Games:


Games Under Devlopment:
(Recruiting testers, PM me)

I Support:


My Award:
Go to the top of the page
 
+Quote Post
   
The Law G14
post Oct 5 2009, 02:53 PM
Post #29


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,348
Type: Scripter
RM Skill: Skilled
Rev Points: 5




Hey thatbennyguy, glad you like my script smile.gif

However, I'm not too sure what you mean by this:

QUOTE
But whenever I try to load it, it can't find my mapXYZ.rxdata file


When you say that you're trying to load it, do you mean load your game, or put in my script?


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   
Zeffa
post Oct 6 2009, 06:00 AM
Post #30


Level 8
Group Icon

Group: Revolutionary
Posts: 130
Type: Artist
RM Skill: Intermediate




Hmmm...

Sorry to be a pain in the arse but it's working-ish. I just tried it all again after testing it on a blank project and... Voila! It worked.
So yeah, it looks all nice.

But then... When I run my game, I get another error.
This time it is because I have the Save option in the main menu disabled. This seems to be conflicting with the script.

The error:
line234: NoMethodError Occurred
undefined method 'disable_item' for
#<Window_Command_New:0x2c03600>

Here are my lines (234 in bold):
# If save is forbidden
if $game_system.save_disabled
# Disable save
@command_window.disable_item(4)
end

Again... Not sure how the script should look here.

Also, I have a quick question for you.

If I wanted to keep the same actor but change their face image in the menu through out the game, how would I go about this?

Would I have to call upon the script to change which image it reads...?
Or is there a way to do this using events?

Thanks again, it looks all sassy. wink.gif x

This post has been edited by Zeffa: Oct 6 2009, 06:39 AM


__________________________
Illustrator/GraphicDesigner, if you want somert... Like an illustration or a logo? Just ask! (Nothing too crazy though) ;)
For the love, the art, the game, the metal and the sex... And thanks for the freebies.


Out Now!
Awaiting reviews and feedback.

Current Project: Exodus: Escape Fort Bullwark
Engine: RMXP
Completion: Chapter One, 100%
Release Date: Out now, Winter 2009
Download Link: Via MediaFire

Exodus Full Game Thread
Exodus Forum Topic
Exodus Screen Gallery
Go to the top of the page
 
+Quote Post
   
The Law G14
post Oct 6 2009, 12:39 PM
Post #31


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,348
Type: Scripter
RM Skill: Skilled
Rev Points: 5




QUOTE
But then... When I run my game, I get another error.
This time it is because I have the Save option in the main menu disabled. This seems to be conflicting with the script.

The error:
line234: NoMethodError Occurred
undefined method 'disable_item' for
#<Window_Command_New:0x2c03600>

Here are my lines (234 in bold):
# If save is forbidden
if $game_system.save_disabled
# Disable save
@command_window.disable_item(4)
end

Again... Not sure how the script should look here.


Yeah, I've been getting that error also but I just deleted those lines since they seemed to be useless but then I realized that the save option in the menu isn't grey anymore when you disabled it, so I've finally found out how to fix it smile.gif

After line 452 of my script, add these couple of lines:

CODE
#--------------------------------------------------------------------------
  # * Disable Item
  #     index : item number
  #--------------------------------------------------------------------------
  def disable_item(index)
    draw_item(index, disabled_color)
  end


Now you should be set smile.gif


QUOTE
Also, I have a quick question for you.

If I wanted to keep the same actor but change their face image in the menu through out the game, how would I go about this?

Would I have to call upon the script to change which image it reads...?
Or is there a way to do this using events?


One way you could do this is by making several actors in the database that are the same character. Then when you want to change the face of the actor, use the 'change actor graphic' event command and then click actor and choose the new actor. This will not change how your character will look since all the actors in the actors tab of the database are the same character. But, when you set it to the different actor, the face graphic would be changed since it went to a different actor.

Hope I explained that okay smile.gif


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   
Zeffa
post Oct 7 2009, 02:46 AM
Post #32


Level 8
Group Icon

Group: Revolutionary
Posts: 130
Type: Artist
RM Skill: Intermediate




Cheers mate, that is awesome!

Yeah you explained the bottom part sound. Will give this a try.

>> Yep it's all working fine! Thanks again!

This post has been edited by Zeffa: Oct 7 2009, 05:05 AM


__________________________
Illustrator/GraphicDesigner, if you want somert... Like an illustration or a logo? Just ask! (Nothing too crazy though) ;)
For the love, the art, the game, the metal and the sex... And thanks for the freebies.


Out Now!
Awaiting reviews and feedback.

Current Project: Exodus: Escape Fort Bullwark
Engine: RMXP
Completion: Chapter One, 100%
Release Date: Out now, Winter 2009
Download Link: Via MediaFire

Exodus Full Game Thread
Exodus Forum Topic
Exodus Screen Gallery
Go to the top of the page
 
+Quote Post
   
The Law G14
post Oct 7 2009, 01:38 PM
Post #33


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,348
Type: Scripter
RM Skill: Skilled
Rev Points: 5




Great, glad it all worked out biggrin.gif

Please post back if you have anymore questions!


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   
coinology
post Oct 23 2009, 06:00 PM
Post #34



Group Icon

Group: Member
Posts: 4
Type: Developer
RM Skill: Skilled




Hey Law,

I really like your script and the layout of the menu is excellent. Except one little request I have. I recently found Amaranth's 'Super Simple Journal Script' and the idea of this journal used to keep track of quest entries is also something I really would like to use. The problem is that when these 2 scripts are combined (working together) get an error code on line 283 @location_window.update so I up'd the number of instances (items, steps, etc..) from 5 to 6 and it still error'd. So I deleted that line and it seems to work fine. But the location ability obviously doesn't work now. If you could please assist me with this I would appreciate this.


Thanks for reading this.

Go to the top of the page
 
+Quote Post
   
coinology
post Oct 23 2009, 06:15 PM
Post #35



Group Icon

Group: Member
Posts: 4
Type: Developer
RM Skill: Skilled




Sorry bout that, I got side tracked.

The journal script is this;

CODE
#======================================================================
========
# ** Journal
#------------------------------------------------------------------------------
# This window displays a journal.
#==============================================================================

class Window_Journal < Window_Selectable
# ------------------------
def initialize
super(0, 32, 460, 330)
@column_max = 1
refresh
self.index = 0
end


#--------------------------------------------------------------------------
# * Draw the contents of the item window
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end

# variables
@journal_height = (2)*32 # y coord of entire journal (# of entries - 1) * 32
@n = 0 # y coord for each entry
@item_max = 0 # max items to dispaly

# draw the bitmap. the text will appear on this bitmap
self.contents = Bitmap.new(width - 32, height+@journal_height)

# populate your journal with entries. Each entry must match its switch number!
@data = []
@data[1] = "Task 1"
@data[2] = "Task 2"
@data[3] = "Task 3"

for i in 1..3
if $game_switches[i] == true
draw_item(i)
@item_max += 1
end
end

end

#--------------------------------------------------------------------------
# * Draw an individual item in the window
# index : Index of the item to be drawn
#--------------------------------------------------------------------------

def draw_item(index)
item = @data[index]
rect = Rect.new(10, @n, 640, 32)
self.contents.fill_rect(rect, Color.new(0,0,0,0))
self.contents.draw_text(10, @n, 640, 32, "●", 0)
self.contents.draw_text(25, @n, 640, 32, item, 0)
@n += 32

end

end


Thanx
Go to the top of the page
 
+Quote Post
   
The Law G14
post Oct 23 2009, 06:18 PM
Post #36


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,348
Type: Scripter
RM Skill: Skilled
Rev Points: 5




Alright, I'll try to get to this tomorrow since it's late where I am and I'm glad you like my script smile.gif

EDIT: Here's the new version of my script:

[Show/Hide] Menu Script

CODE
#------------------------------------------------------------------------------
#==============================================================================
#==============================================================================
#====================*Law's Custom Menu Screen*================================
#=========================Author: The Law G14==================================
#============================Version 1.0=======================================
#==============================================================================
#------------------------------------------------------------------------------
#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
#  This class handles the map. It includes scrolling and passable determining
#  functions. Refer to "$game_map" for the instance of this class.
#==============================================================================

class Game_Map
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_accessor :tileset_name             # tileset file name
  attr_accessor :autotile_names           # autotile file name
  attr_accessor :panorama_name            # panorama file name
  attr_accessor :panorama_hue             # panorama hue
  attr_accessor :fog_name                 # fog file name
  attr_accessor :fog_hue                  # fog hue
  attr_accessor :fog_opacity              # fog opacity level
  attr_accessor :fog_blend_type           # fog blending method
  attr_accessor :fog_zoom                 # fog zoom rate
  attr_accessor :fog_sx                   # fog sx
  attr_accessor :fog_sy                   # fog sy
  attr_accessor :battleback_name          # battleback file name
  attr_accessor :display_x                # display x-coordinate * 128
  attr_accessor :display_y                # display y-coordinate * 128
  attr_accessor :need_refresh             # refresh request flag
  attr_reader   :passages                 # passage table
  attr_reader   :priorities               # prioroty table
  attr_reader   :terrain_tags             # terrain tag table
  attr_reader   :events                   # events
  attr_reader   :fog_ox                   # fog x-coordinate starting point
  attr_reader   :fog_oy                   # fog y-coordinate starting point
  attr_reader   :fog_tone                 # fog color tone
  attr_reader   :name
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    @map_id = 0
    @display_x = 0
    @display_y = 0
  end
  #--------------------------------------------------------------------------
  # * Setup
  #     map_id : map ID
  #--------------------------------------------------------------------------
  def setup(map_id)
    # Put map ID in @map_id memory
    @map_id = map_id
    # Load map from file and set @map
    @map = load_data(sprintf("Data/Map%03d.rxdata", @map_id))
    # set tile set information in opening instance variables
    tileset = $data_tilesets[@map.tileset_id]
    @tileset_name = tileset.tileset_name
    @autotile_names = tileset.autotile_names
    @panorama_name = tileset.panorama_name
    @panorama_hue = tileset.panorama_hue
    @fog_name = tileset.fog_name
    @fog_hue = tileset.fog_hue
    @fog_opacity = tileset.fog_opacity
    @fog_blend_type = tileset.fog_blend_type
    @fog_zoom = tileset.fog_zoom
    @fog_sx = tileset.fog_sx
    @fog_sy = tileset.fog_sy
    @battleback_name = tileset.battleback_name
    @passages = tileset.passages
    @priorities = tileset.priorities
    @terrain_tags = tileset.terrain_tags
    # Initialize displayed coordinates
    @display_x = 0
    @display_y = 0
    # Clear refresh request flag
    @need_refresh = false
    # Set map event data
    @events = {}
    for i in @map.events.keys
      @events[i] = Game_Event.new(@map_id, @map.events[i])
    end
    # Set common event data
    @common_events = {}
    for i in 1...$data_common_events.size
      @common_events[i] = Game_CommonEvent.new(i)
    end
    # Initialize all fog information
    @fog_ox = 0
    @fog_oy = 0
    @fog_tone = Tone.new(0, 0, 0, 0)
    @fog_tone_target = Tone.new(0, 0, 0, 0)
    @fog_tone_duration = 0
    @fog_opacity_duration = 0
    @fog_opacity_target = 0
    # Initialize scroll information
    @scroll_direction = 2
    @scroll_rest = 0
    @scroll_speed = 4
    @name = load_data("Data/MapInfos.rxdata")[@map_id].name
  end
end

#==============================================================================
# ** Window_Location
#-----------------------------------------------------------------------------
# A window that shows your current Location.
#==============================================================================

class Window_Location < Window_Base
  #-----------------------------------------------------------------------------
  # * Object Initialization
  #-----------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 91)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #-----------------------------------------------------------------------------
  # * Refresh
  #-----------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.color = system_color
    self.contents.draw_text(4, 0, 120, 32, "Location")
    self.contents.font.color = normal_color
    self.contents.draw_text(4, 25, 120, 32, $game_map.name, 2)
  end
end

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

class Window_MenuStatus < Window_Selectable
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 480, 480)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
    self.active = false
    self.index = -1
  end
  #--------------------------------------------------------------------------
  # * Draw Face Graphic
  #     actor : actor
  #     x : draw spot x-coordinate
  #     y : draw spot y-coordinate
  #--------------------------------------------------------------------------
  def draw_actor_face_graphic(actor, x, y)
     bitmap = RPG::Cache.picture(actor.id.to_s)
     self.contents.blt(x, y, bitmap, Rect.new(0, 0, bitmap.width, bitmap.height))
   end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    @item_max = $game_party.actors.size
    for i in 0...$game_party.actors.size
      x = 64
      y = i * 116
      actor = $game_party.actors[i]
      draw_actor_face_graphic(actor, x - 64, y)
      draw_actor_name(actor, x + 93, y)
      draw_actor_class(actor, x + 135, y + 32)
      draw_actor_level(actor, x + 40, y + 32)
      draw_actor_state(actor, x + 270, y)
      draw_actor_exp(actor, x + 40, y + 64)
      draw_actor_hp(actor, x + 236, y + 32)
      draw_actor_sp(actor, x + 236, y + 64)
    end
  end
  #--------------------------------------------------------------------------
  # * Cursor Rectangle Update
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
    else
      self.cursor_rect.set(0, @index * 116, self.width - 32, 96)
    end
  end
end

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs menu screen processing.
#==============================================================================

class Scene_Menu
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     menu_index : command cursor's initial position
  #--------------------------------------------------------------------------
  def initialize(menu_index = 0)
    @menu_index = menu_index
  end
  #--------------------------------------------------------------------------
  # * Main Processing
  #--------------------------------------------------------------------------
  def main
    # Make command window
    s1 = $data_system.words.item
    s2 = $data_system.words.skill
    s3 = $data_system.words.equip
    s4 = "Status"
    s5 = "Journal"
    s6 = "Save"
    s7 = "End Game"
    @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
    @command_window.index = @menu_index
    # If number of party members is 0
    if $game_party.actors.size == 0
      # Disable items, skills, equipment, and status
      @command_window.disable_item(0)
      @command_window.disable_item(1)
      @command_window.disable_item(2)
      @command_window.disable_item(3)
      end
    # If save is forbidden
    if $game_system.save_disabled
      # Disable save
      @command_window.disable_item(4)
    end
    @command_window.x = 480
    # Make play time window
    @playtime_window = Window_PlayTime.new
    @playtime_window.x = 480
    @playtime_window.y = 256
    # Make location window
    @location_window = Window_Location.new
    @location_window.x = 480
    @location_window.y = 326
    # Make gold window
    @gold_window = Window_Gold.new
    @gold_window.x = 480
    @gold_window.y = 416
    # Make status window
    @status_window = Window_MenuStatus.new
    @status_window.x = 0
    @status_window.y = 0
    # Execute transition
    Graphics.transition
    # Main loop
    loop do
      # Update game screen
      Graphics.update
      # Update input information
      Input.update
      # Frame update
      update
      # Abort loop if screen is changed
      if $scene != self
        break
      end
    end
    # Prepare for transition
    Graphics.freeze
    # Dispose of windows
    @command_window.dispose
    @playtime_window.dispose
    @location_window.dispose
    @gold_window.dispose
    @status_window.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    # Update windows
    @command_window.update
    @playtime_window.update
    @location_window.update
    @gold_window.update
    @status_window.update
    # If command window is active: call update_command
    if @command_window.active
      update_command
      return
    end
    # If status window is active: call update_status
    if @status_window.active
      update_status
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when command window is active)
  #--------------------------------------------------------------------------
  def update_command
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Switch to map screen
      $scene = Scene_Map.new
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # If command other than save or end game, and party members = 0
      if $game_party.actors.size == 0 and @command_window.index < 4
        # Play buzzer SE
        $game_system.se_play($data_system.buzzer_se)
        return
      end
      # Branch by command window cursor position
      case @command_window.index
      when 0  # item
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to item screen
        $scene = Scene_Item.new
      when 1  # skill
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Make status window active
        @command_window.active = false
        @status_window.active = true
        @status_window.index = 0
      when 4  # journal
          # Play decision SE
          $game_system.se_play($data_system.decision_se)
          # Switch to journal scene
          $scene = Scene_Journal.new  
      when 5  # save
        # If saving is forbidden
        if $game_system.save_disabled
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to save screen
        $scene = Scene_Save.new
      when 6  # end game
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to end game screen
        $scene = Scene_End.new
      end
      return
    end
  end
  #--------------------------------------------------------------------------
  # * Frame Update (when status window is active)
  #--------------------------------------------------------------------------
  def update_status
    # If B button was pressed
    if Input.trigger?(Input::B)
      # Play cancel SE
      $game_system.se_play($data_system.cancel_se)
      # Make command window active
      @command_window.active = true
      @status_window.active = false
      @status_window.index = -1
      return
    end
    # If C button was pressed
    if Input.trigger?(Input::C)
      # Branch by command window cursor position
      case @command_window.index
      when 1  # skill
        # If this actor's action limit is 2 or more
        if $game_party.actors[@status_window.index].restriction >= 2
          # Play buzzer SE
          $game_system.se_play($data_system.buzzer_se)
          return
        end
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to skill screen
        $scene = Scene_Skill.new(@status_window.index)
      when 2  # equipment
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to equipment screen
        $scene = Scene_Equip.new(@status_window.index)
      when 3  # status
        # Play decision SE
        $game_system.se_play($data_system.decision_se)
        # Switch to status screen
        $scene = Scene_Status.new(@status_window.index)
      end
      return
    end
  end
end
#===============================================================================
# ** Window_Command_New
#-------------------------------------------------------------------------------
# This code allows the command window in the menu to display icons.
#===============================================================================

class Window_Command_New < Window_Selectable
  #-----------------------------------------------------------------------------
  # * Public Instance Variables
  #-----------------------------------------------------------------------------
  attr_reader :continue
  #-----------------------------------------------------------------------------
  # * Object Initialization
  #-----------------------------------------------------------------------------
  def initialize(index, continue)
    commands = [$data_system.words.item, $data_system.words.skill, $data_system.words.equip,
        'Status', 'Save', 'End Game']
    super(0, 0, 160, commands.size * 32 + 32)
    @item_max = commands.size
    @commands = commands
    self.contents = Bitmap.new(width - 32, @item_max * 32)
    refresh
    self.index = 0
  end
  #-----------------------------------------------------------------------------
  # * Draw Item
  #-----------------------------------------------------------------------------
  def draw_item(i, color)
    self.contents.fill_rect(0, i*32, 148, 32, Color.new(0, 0, 0, 0))
    bitmap = RPG::Cache.icon("Menu#{i}")
    opacity = (color == normal_color ? 255 : 128)
    self.contents.blt(4, 4 + i*32, bitmap, Rect.new(0, 0, 24, 24), opacity)
    self.contents.font.color = color
    self.contents.draw_text(28, i*32, 148, 32, @commands[i])
  end
  #-----------------------------------------------------------------------------
  # * Refresh
  #-----------------------------------------------------------------------------
  def refresh
    self.contents.clear
    for i in 0...@item_max
      draw_item(i, normal_color)
    end
  end
end
#==============================================================================
# ** Window_Gold
#------------------------------------------------------------------------------
#  This window displays amount of gold.
#==============================================================================

class Window_Gold < Window_Base
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    super(0, 0, 160, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  #--------------------------------------------------------------------------
  # * Draw Picture
  #--------------------------------------------------------------------------  
  def draw_picture(x, y)
    bitmap = RPG::Cache.picture("Coin")
    cw = bitmap.width
    ch = bitmap.height
    src_rect = Rect.new(0, 0, cw, ch)
    self.contents.blt(x, y, bitmap, src_rect)
  end
  #--------------------------------------------------------------------------
  # * Refresh
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    draw_picture(105, 4)
    cx = contents.text_size($data_system.words.gold).width
    self.contents.font.color = normal_color
    self.contents.draw_text(0, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
  end
end



And here's the new version of the Journal Script:

[Show/Hide] Journal Script

CODE
#==========================================================================
# Window_Journal
#------------------------------------------------------------------------------
#  This window displays a journal.
#==========================================================================
    
class Window_Journal < Window_Selectable
    # ------------------------
    def initialize
       super(0, 32, 460, 330)
      
    #----------------------------------------------------------
    # populate your journal with entries.
       @data = []
       @data[1] = "Help Man"
       @data[2] = "Kill Chicken"
       @data[3] = "Make cow eat"
       @data[4] = "Sniff the Glove"
       @data[5] = "Jump off a bridge after your friends"
      
    # this is the offset for your switches. If you start with switch 100, set
    # @offset = 99
    
    @offset = 0
      
    ### to change the windowskin for the journal
    #   self.windowskin = RPG::Cache.windowskin("RMXP4life_Wood.png")
    
    
    #----------------------------------------------------------
    
       @column_max = 1
       refresh
       self.index = 0
     end
    
    
    #--------------------------------------------------------------------------
    # * Draw the contents of the item window
    #--------------------------------------------------------------------------
     def refresh
       if self.contents != nil
         self.contents.dispose
         self.contents = nil
       end
      
       # variables
       @journal_height = (@data.size - 1)*32   # y coord of entire journal (# of entries - 1) * 32
       @n = 0                     # y coord for each entry
       @item_max = 0              # max items to display
      
       # draw the bitmap. the text will appear on this bitmap
       self.contents = Bitmap.new(width - 32, @journal_height)
          
       for i in 1..@data.size
         if $game_switches[i + @offset] == true
           draw_item(i)
           @item_max += 1
         end
       end        
      
     end
      
    #--------------------------------------------------------------------------
    # * Draw an individual item in the window
    #     index : Index of the item to be drawn
    #--------------------------------------------------------------------------
    
     def draw_item(index)
          item = @data[index]
          rect = Rect.new(10, @n, 640, 32)
          self.contents.fill_rect(rect, Color.new(0,0,0,0))        
          self.contents.draw_text(10, @n, 640, 32, "●", 0)
          self.contents.draw_text(25, @n, 640, 32, item, 0)
          @n += 32
          
     end
    
    end
#==============================================================================
    # ■ Scene_Status
    #------------------------------------------------------------------------------
    #  This class contains the windows for the character status menu that can be
    #   accessed from the main menu.
#==========================================================================
    
    class Scene_Journal
      #--------------------------------------------------------------------------
      # ● Initialize the Status menu
      #--------------------------------------------------------------------------
      def initialize(callback = 0)  #callback from menu
        @callback = callback
      end
      
      def main
    
        @journal_window = Window_Journal.new
        @journal_window.x = 90
        @journal_window.y = 70
        
        Graphics.transition
    
        loop do
          Graphics.update
          Input.update
          update
          if $scene != self
            break
          end  
        end
    
        Graphics.freeze
        @journal_window.dispose
    
      end
      #--------------------------------------------------------------------------
      # ● Draw the Status menu
      #--------------------------------------------------------------------------
      def update
        @journal_window.update
        if @journal_window.active
          update_item
          return
        end
      end
    
      #--------------------------------------------------------------------------
      # ● Update menu after player makes a selection
      #--------------------------------------------------------------------------
      def update_item
      
        # Cancel key pressed (go to menu)
        if Input.trigger?(Input::B) or Input.trigger?(Input::L)
          $game_system.se_play($data_system.cancel_se)
          if @callback == 0
            $scene = Scene_Menu.new(4)
          else
            $scene = Scene_Map.new
          end
          return
        end
        
      end
      
    end
class Scene_Map
      alias journal_update update
      
      def update
        journal_update
        if Input.trigger?(Input::L)
          $scene = Scene_Journal.new(1)
        end
      end
    end



This post has been edited by The Law G14: Dec 6 2009, 05:59 PM


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   
coinology
post Oct 24 2009, 12:30 PM
Post #37



Group Icon

Group: Member
Posts: 4
Type: Developer
RM Skill: Skilled




Sorry Law but when I put those newly edited scripts in it now gives me an error sad.gif of

Script 'Window_Journal' Line 150: SystemStackError occured. Stack level too deep.

That error is given as soon as the game is opened. Not just when I try to open the Menu.

Any Ideas???
Go to the top of the page
 
+Quote Post
   
The Law G14
post Oct 24 2009, 12:33 PM
Post #38


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,348
Type: Scripter
RM Skill: Skilled
Rev Points: 5




First of all, make sure the journal script is below my menu script, also are you using any other scripts?


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   
Yusshin
post Dec 6 2009, 05:45 PM
Post #39


In'shallah !
Group Icon

Group: Revolutionary
Posts: 282
Type: Writer
RM Skill: Beginner




Sorry to bump, but...

Where does this go? Does it need a specific name?

I tried to put this script in and it didn't change nei my current saves or new games;

also, does this work with your other scripts:

http://www.rpgrevolution.com/forums/index....t=0&start=0

http://www.rpgrevolution.com/forums/index....showtopic=35665

?

My current scripts are SDK, RGSS.Map, RGSS.Window.Movable, Map Name HUD < all of these basically allow me to have a pop-up displaying the name of the map(s) I walk onto.

I also have Window_Message to allow facesets to be displayed.


__________________________
Go to the top of the page
 
+Quote Post
   
The Law G14
post Dec 6 2009, 05:53 PM
Post #40


Scripter FTW
Group Icon

Group: Local Mod
Posts: 1,348
Type: Scripter
RM Skill: Skilled
Rev Points: 5




It should be under all your custom scripts (Including the SDK) and yes, it is compatible with my equipment screen and skill screen. Also, it's supposed to be changing the screen that opens once you open up the menu. And thanks for using my scripts smile.gif

This post has been edited by The Law G14: Dec 6 2009, 05:54 PM


__________________________

To put in sig, copy this link:
CODE
[url="http://www.rpgrevolution.com/forums/index.php?showtopic=51540"][img]http://img40.imageshack.us/img40/6504/conceptthelawbanner.png[/img][/url]


Sig Stuff


"When you first come, no one knows you. When help them out, they all know you. When you leave, they all love you. When you come back, they've already forgotten you." -- copy into your sig if you think this quote speaks true!

If you are one of the very few teenagers that know what real rap is and don't blindly listen to the hate statements (rap is crap), then put this in your sig. I say this in the name of Common, Mos Def, Lupe Fiasco, 2Pac, Nas, Talib Kweli, Eminem, and many others. -Exiled One

My Project Thread: Gai's Hunters


Go to the top of the page
 
+Quote Post
   

4 Pages V  < 1 2 3 4 >
Closed TopicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th June 2013 - 11:37 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker