Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

3 Pages V  < 1 2 3  
Closed TopicStart new topic
> MOG-Styled Menus (Item, Equip & Skills)
Oliverskx
post Dec 9 2010, 02:56 PM
Post #41


Level 8
Group Icon

Group: Revolutionary
Posts: 114
Type: Mapper
RM Skill: Intermediate




Um my game crashes after I select one of the empty slots in the equip menu. Is there a way to fix this?


__________________________


"I insectica, fly through dimensia you give me more than meets the eye you give me more than I can't deny." - Crystal Castles

Go to the top of the page
 
+Quote Post
   
chrismccoy
post Jun 3 2011, 10:03 AM
Post #42



Group Icon

Group: Member
Posts: 2
Type: None
RM Skill: Undisclosed




Okay, there's a very nasty glitch in this. More annoying than anything, but what it does is if I go to the Menu and then the Equip screen, the Equip Screen graphic will display briefly before the battle rather than a black screen.
Go to the top of the page
 
+Quote Post
   
Aedales
post Jun 6 2011, 07:02 PM
Post #43


Level 2
Group Icon

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




QUOTE (chrismccoy @ Jun 3 2011, 11:03 AM) *
Okay, there's a very nasty glitch in this. More annoying than anything, but what it does is if I go to the Menu and then the Equip screen, the Equip Screen graphic will display briefly before the battle rather than a black screen.


You should actually check dates before posting. This thread is long dead. In answer to your question, here you go:

In line 348 of the equipment script, replace this:

CODE
def terminate
super
@help_window.dispose
@equip_window.dispose
@status_window.dispose
dispose_item_windows
end


With this:

CODE
def terminate
super
@msk_lay.dispose
@help_window.dispose
@equip_window.dispose
@status_window.dispose
dispose_item_windows
@msk_back1.dispose
end


It will work... trust me smile.gif


__________________________
Go to the top of the page
 
+Quote Post
   
chrismccoy
post Jun 6 2011, 09:06 PM
Post #44



Group Icon

Group: Member
Posts: 2
Type: None
RM Skill: Undisclosed




QUOTE (Aedales @ Jun 6 2011, 08:02 PM) *
QUOTE (chrismccoy @ Jun 3 2011, 11:03 AM) *
Okay, there's a very nasty glitch in this. More annoying than anything, but what it does is if I go to the Menu and then the Equip screen, the Equip Screen graphic will display briefly before the battle rather than a black screen.


You should actually check dates before posting. This thread is long dead. In answer to your question, here you go:

In line 348 of the equipment script, replace this:

CODE
def terminate
super
@help_window.dispose
@equip_window.dispose
@status_window.dispose
dispose_item_windows
end


With this:

CODE
def terminate
super
@msk_lay.dispose
@help_window.dispose
@equip_window.dispose
@status_window.dispose
dispose_item_windows
@msk_back1.dispose
end


It will work... trust me smile.gif


I did check the date and I'm aware. However nobody else seemed to acknowledge the bug and I found it nowhere else on the site. Thread necromancy is usually only frowned upon if its completely irrelevant and spamming.
Anyway, thank you, I will definitely implement it.
Go to the top of the page
 
+Quote Post
   
Kread-EX
post Jun 7 2011, 12:55 AM
Post #45


(=___=)/
Group Icon

Group: +Gold Member
Posts: 4,136
Type: Scripter
RM Skill: Undisclosed




@Aedales: Please don't minimod. Use the report button. And yes in that case, necroposting is allowed.


__________________________
FRACTURE - a SMT inspired game (demo) made by Rhyme, Karsuman and me. Weep and ragequit.

My blog.

Click here for my e-peen


Go to the top of the page
 
+Quote Post
   
incarnum
post Sep 26 2011, 08:29 PM
Post #46


Level 2
Group Icon

Group: Member
Posts: 27
Type: Artist
RM Skill: Masterful




Im not sure if anyone still uses these forums but, im having an issue with the mog equip menu.

to be specific, the part of the menu where it shows the list of equipment you have in your backpack and how many of each of those things you have.

not only is there not enough space to show the full name of any of my gear, but the quantity of that gear overlaps the name of the gear.

a screen shot, and code is included.
script
#_________________________________________________________________________
______
# SEL SCENE EQUIP MENU V2.0
#_______________________________________________________________________________
# By Selacius
# Graphics by lomastul, MOGHUNTER
# Original XP Script by MOGHUNTER
#_______________________________________________________________________________

module MOG
# Set Maximum (STR,DEX,AGL,INT)
MST_ST = 999
# Set Maximum (ATK,PDEF,MDEF)
MST_STE = 999
# Set Maximum (HP, MP)
MST_HMP = 9999
end

module Cache
def self.menu(filename)
load_bitmap("Graphics/Menus/", filename)
end
def self.icon(filename)
load_bitmap("Graphics/Icons/", filename)
end
end

#==============================================================================
# ** Window_Equip
#==============================================================================
class Window_Equip < Window_Selectable
def initialize(actor)
super(260, 70, 220, 170)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
@actor = actor
refresh
self.index = 0
end
def item
return @data[self.index]
end
def refresh
self.contents.clear
@data = []
for item in @actor.equips do @data.push(item) end
@item_max = @data.size
self.contents.font.color = system_color
self.contents.font.bold = true
self.contents.font.shadow = true
self.contents.font.size = 14
draw_item_name_menu_equip(@actor.equips[0], 0, 0)
draw_item_name_menu_equip(@actor.equips[1], 0, 24)
draw_item_name_menu_equip(@actor.equips[2], 0, 48)
draw_item_name_menu_equip(@actor.equips[3], 0, 72)
draw_item_name_menu_equip(@actor.equips[4], 0, 96)
end
def draw_item_name_menu_equip(item, x, y, enabled = true)
if item != nil
draw_icon(item.icon_index, x, y, enabled)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(x + 30, y, 150, WLH, item.name)
end
end
def item_rect(index)
rect = Rect.new(0, 0, 0, 0)
rect.width = (contents.width + @spacing) / @column_max - @spacing
rect.height = WLH
rect.x = index % @column_max * (rect.width + @spacing)
rect.y = index / @column_max * WLH
return rect
end
end

#==============================================================================
# ** Window_EquipStatus
#------------------------------------------------------------------------------
class Window_EquipStatus < Window_Base
def initialize(x, y, actor)
super(x, y, 270, 390)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
self.contents.font.bold = true
self.contents.font.shadow = true
self.contents.font.size = 14
@actor = actor
refresh
end
def refresh
self.contents.clear
drw_equist(0,390)
draw_actor_face(@actor, 4, 30)
draw_actor_name(@actor, 4, 10)
self.contents.draw_text(4, 130, 36, 24, @actor.level.to_s, 2)
self.contents.draw_text(25, 145, 90, 24, @actor.class.name, 2)
draw_actor_parameter2(@actor, 0, 162 , 4, 10)
draw_actor_parameter2(@actor, 0, 185 , 5, 10)
draw_actor_parameter2(@actor, 0, 208 , 0)
draw_actor_parameter2(@actor, 0, 231 , 1)
draw_actor_parameter2(@actor, 0, 256 , 3)
draw_actor_parameter2(@actor, 0, 279 , 2)
if @new_hp != nil
self.contents.font.color = system_color
if @new_hp < @actor.hp
drw_eqpup(140,185,2)
self.contents.font.color = Color.new(255,50,50,255)
elsif @new_hp > @actor.hp
drw_eqpup(140,185,1)
self.contents.font.color = Color.new(50,250,150,255)
else
drw_eqpup(140,188,0)
self.contents.font.color = Color.new(255,255,255,255)
end
self.contents.draw_text(165, 164, 36, 24, @new_hp.to_s, 2)
end
if @new_mp != nil
self.contents.font.color = system_color
if @new_mp < @actor.mp
drw_eqpup(140,207,2)
self.contents.font.color = Color.new(255,50,50,255)
elsif @new_mp > @actor.mp
drw_eqpup(140,207,1)
self.contents.font.color = Color.new(50,250,150,255)
else
drw_eqpup(140,210,0)
self.contents.font.color = Color.new(255,255,255,255)
end
self.contents.draw_text(165, 187, 36, 24, @new_mp.to_s, 2)
end
if @new_atk != nil
self.contents.font.color = system_color
if @new_atk < @actor.atk
drw_eqpup(140,230,2)
self.contents.font.color = Color.new(255,50,50,255)
elsif @new_atk > @actor.atk
drw_eqpup(140,230,1)
self.contents.font.color = Color.new(50,250,150,255)
else
drw_eqpup(140,234,0)
self.contents.font.color = Color.new(255,255,255,255)
end
self.contents.draw_text(165, 210, 36, 24, @new_atk.to_s, 2)
end
if @new_def != nil
if @new_def < @actor.def
drw_eqpup(140,254,2)
self.contents.font.color = Color.new(255,50,50,255)
elsif @new_def > @actor.def
drw_eqpup(140,254,1)
self.contents.font.color = Color.new(50,250,150,255)
else
drw_eqpup(140,257,0)
self.contents.font.color = Color.new(255,255,255,255)
end
self.contents.draw_text(165, 232, 36, 24, @new_def.to_s, 2)
end
if @new_agi != nil
if @new_agi < @actor.agi
drw_eqpup(140,279,2)
self.contents.font.color = Color.new(255,50,50,255)
elsif @new_agi > @actor.agi
drw_eqpup(140,279,1)
self.contents.font.color = Color.new(50,250,150,255)
else
drw_eqpup(140,282,0)
self.contents.font.color = Color.new(255,255,255,255)
end
self.contents.draw_text(165, 258, 36, 24, @new_agi.to_s, 2)
end
if @new_spi != nil
if @new_spi < @actor.spi
drw_eqpup(140,302,2)
self.contents.font.color = Color.new(255,50,50,255)
elsif @new_spi > @actor.spi
drw_eqpup(140,302,1)
self.contents.font.color = Color.new(50,250,150,255)
else
drw_eqpup(140,305,0)
self.contents.font.color = Color.new(255,255,255,255)
end
self.contents.draw_text(165, 281, 36, 24, @new_spi.to_s, 2)
end
end
def set_new_parameters(new_hp, new_mp, new_atk, new_def, new_spi, new_agi)
if @new_hp != new_hp or @new_mp != new_mp or
@new_atk != new_atk or @new_def != new_def or
@new_spi != new_spi or @new_agi != new_agi
@new_hp = new_hp
@new_mp = new_mp
@new_atk = new_atk
@new_def = new_def
@new_spi = new_spi
@new_agi = new_agi
refresh
end
end
def drw_equist(x,y)
equist = Cache.menu("Equip_St")
cw = equist.width
ch = equist.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y - ch, equist, src_rect)
end
def drw_eqpup(x,y,type)
case type
when 0
est = Cache.icon("ST_EQU")
when 1
est = Cache.icon("ST_UP")
when 2
est = Cache.icon("ST_DOWN")
end
cw = est.width
ch = est.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y - ch, est, src_rect)
end
def draw_actor_parameter2(actor, x, y, type, z = 0)
back = Cache.menu("Parameter_Bar_Back")
cw = back.width
ch = back.height
src_rect = Rect.new(0, 0, cw - 106 - z, ch)
self.contents.blt(x + 40 , y - ch + 18, back, src_rect)
meter = Cache.menu("Parameter_Bar")
case type
when 0
parameter_value = actor.atk
cw = (meter.width - 106) * actor.atk / MOG::MST_STE
when 1
parameter_value = actor.def
cw = (meter.width - 106) * actor.def / MOG::MST_STE
when 2
parameter_value = actor.spi
cw = (meter.width - 106) * actor.spi / MOG::MST_ST
when 3
parameter_value = actor.agi
cw = (meter.width - 106) * actor.agi / MOG::MST_ST
when 4
parameter_value = actor.hp
cw = (meter.width - 106 - z) * actor.hp / MOG::MST_HMP
when 5
parameter_value = actor.mp
cw = (meter.width - 106 - z) * actor.mp / MOG::MST_HMP
end
self.contents.font.color = normal_color
self.contents.draw_text(x + 100, y - 2, 36, 32, parameter_value.to_s, 2)
ch = meter.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x + 40 , y - ch + 18, meter, src_rect)
end
end
#==============================================================================
# ** Window_EquipItem
#==============================================================================
class Window_EquipItem < Window_Item
def initialize(x, y, width, height, actor, equip_type)
@actor = actor
if equip_type == 1 and actor.two_swords_style
equip_type = 0 # Change shield to weapon
end
@equip_type = equip_type
@column_max = 1
super(x, y, width, height)
refresh
end
def include?(item)
return true if item == nil
if @equip_type == 0
return false unless item.is_a?(RPG::Weapon)
else
return false unless item.is_a?(RPG::Armor)
return false unless item.kind == @equip_type - 1
end
return @actor.equippable?(item)
end
def enable?(item)
return true
end
end

#==============================================================================
# ** Scene_Equip
#==============================================================================
class Scene_Equip < Scene_Base
EQUIP_TYPE_MAX = 5 # Number of equip region
def initialize(actor_index = 0, equip_index = 0)
@actor_index = actor_index
@equip_index = equip_index
end
def start
super
@actor = $game_party.members[@actor_index]
@msk_back1 = Plane.new
@msk_back1.bitmap = Cache.menu("Background")
@msk_lay = Sprite.new
if @actor.two_swords_style
@msk_lay.bitmap = Cache.menu("Equip_Lay2")
else
@msk_lay.bitmap = Cache.menu("Equip_Lay")
end
@help_window = Window_Help.new(42,362)
@help_window.opacity = 0
create_item_windows
@equip_window = Window_Equip.new(@actor)
@equip_window.help_window = @help_window
@equip_window.index = @equip_index
@status_window = Window_EquipStatus.new(0, 30, @actor)
end
def update
@help_window.update
@equip_window.update
update_status_window
update_item_windows
@msk_back1.ox += 1
if @equip_window.active
update_equip_selection
elsif @item_window.active
update_item_selection
end
end
def create_item_windows
@item_windows = []
for i in 0...EQUIP_TYPE_MAX
@item_windows[i] = Window_EquipItem.new(240, 208, 300, 170, @actor, i)
@item_windows[i].opacity = 0
@item_windows[i].help_window = @help_window
@item_windows[i].visible = (@equip_index == i)
@item_windows[i].active = false
@item_windows[i].index = -1
end
end
def update_status_window
if @equip_window.active
@status_window.set_new_parameters(nil, nil, nil, nil, nil, nil)
elsif @item_window.active
temp_actor = @actor.clone
temp_actor.change_equip(@equip_window.index, @item_window.item, true)
new_hp = temp_actor.hp
new_mp = temp_actor.mp
new_atk = temp_actor.atk
new_def = temp_actor.def
new_spi = temp_actor.spi
new_agi = temp_actor.agi
@status_window.set_new_parameters(new_hp, new_mp,new_atk, new_def, new_spi, new_agi)
end
@status_window.update
end
def terminate
super
@msk_lay.dispose
@help_window.dispose
@equip_window.dispose
@status_window.dispose
dispose_item_windows
end
def update_equip_selection
if Input.trigger?(Input::cool.gif
Sound.play_cancel
return_scene
elsif Input.trigger?(Input::RIGHT)
Sound.play_cursor
next_actor
elsif Input.trigger?(Input::LEFT)
Sound.play_cursor
prev_actor
elsif Input.trigger?(Input::C)
if @actor.fix_equipment
Sound.play_buzzer
else
Sound.play_decision
@equip_window.active = false
@item_window.active = true
@item_window.index = 0
end
end
end
end

Attached File(s)
Attached File  script_issue.png ( 195.89K ) Number of downloads: 30
 


__________________________
Go to the top of the page
 
+Quote Post
   
incarnum
post Sep 29 2011, 08:37 PM
Post #47


Level 2
Group Icon

Group: Member
Posts: 27
Type: Artist
RM Skill: Masterful




QUOTE (incarnum @ Sep 26 2011, 08:29 PM) *
Im not sure if anyone still uses these forums but, im having an issue with the mog equip menu.

to be specific, the part of the menu where it shows the list of equipment you have in your backpack and how many of each of those things you have.

not only is there not enough space to show the full name of any of my gear, but the quantity of that gear overlaps the name of the gear.


So I appologize for necro posting but i solved the problem myself.

the problem was not in the mog code at all, but in order to make the mog equip menu work properly, you need to make an adjustment to the rpgmaker vx "window_Item" script.

you need to make it so that your items only show up in a single column, wrather then 2 columns, otherwise they either overlap the inventory count, in mog equip, or the names of your equipment go off screen.

so go to "window_item" script and change line 17 "@column_max = 2"

simply change that 2 to a 1 so that it reads "@column_max = 1"

and wala! the formatting of your equip screen will work now.

if this was useful, please pm me! I had fun solving this very elusive yet seemingly simple puzzle, as i thought it was a problem with the mog script.

(keep in mind that this will alter item menu used in the game so if you need 2 columns in your item menu, the mog menu isnt compatible for you without an overhaul)


__________________________
Go to the top of the page
 
+Quote Post
   
Toonbob20
post Nov 4 2011, 04:03 PM
Post #48



Group Icon

Group: Member
Posts: 1
Type: None
RM Skill: Undisclosed




Sry, I'm a little new to Rpg Maker, and I'm using your menu script. I'm pretty sure I installed it correctly. But when I go into battle and choose "Skills" It gives me the error Script 'Skill Shop' line 133: NoMethodError undefined method 'each' for nil:NilClass
ummm help plz?
Go to the top of the page
 
+Quote Post
   
hit268
post Dec 20 2011, 03:58 PM
Post #49


Level 5
Group Icon

Group: Member
Posts: 61
Type: None
RM Skill: Undisclosed





Can someone please help me? I keep getting these errors when I put the script in my rpg.


__________________________

Top 5 awesome characters

Go to the top of the page
 
+Quote Post
   
lightspeed15
post Jul 10 2012, 05:52 PM
Post #50



Group Icon

Group: Member
Posts: 1
Type: Developer
RM Skill: Intermediate




Can someone reupload this? Sorry for the necro :/
Go to the top of the page
 
+Quote Post
   

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

 

Lo-Fi Version Time is now: 25th May 2013 - 07:51 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker