Ok i'm almost done with this version- was finishing up with it when I realized that you couldnt back out of the menus I made. I added in the back-up code and everything SEEMED to work. But if you went from one item to another it would freeze up.
I know its an update issue. I've tried re-writing EVERYTHING I can think of
All the codes written... I just need a little help getting the buttons on the DQ Status menu to work properly - I would REALLY appreciate it. Once this is done I just need to do 1-2 tiny things more and this is ready for release...
Thanks in advance
grrr think the code is too long...... i'll try putting it into multiple pieces.
Just attach the next part to the bottom of this one....
I know its an update issue. I've tried re-writing EVERYTHING I can think of
All the codes written... I just need a little help getting the buttons on the DQ Status menu to work properly - I would REALLY appreciate it. Once this is done I just need to do 1-2 tiny things more and this is ready for release...
Thanks in advance
grrr think the code is too long...... i'll try putting it into multiple pieces.
Code:
#==============================================================================
# ¦ [RMVX] Dragon-Quest Style Customizable Menu System Version 1.20
#------------------------------------------------------------------------------
# by Ekras
#
# released on 04/07/2008
#
# Credit to Woratana [woratana@hotmail.com] for his LiteMenu which
# this is lightly based on (I started with his script and built this on top)
#
# Thanks to "Woratana", "kmhp", "Trihan", and
# "modern algebra" (the person) for forum help :)
#
# Updates to version 1.2
# - Script Name changed from "Dragon Quest Style Status Indicator"
# to "Dragon Quest Style Customizable Menu System"
# - Dragon Quest Style Status Screen coded
# - Main Menu now easily configurable (Change items on the menu!)
# - Refill Command on the Status Screen currently does not function (TBD)
# - Somehow the blank line never made it into 1.1, but it is definatly in 1.2
# - Added functions to the mini-boxes to show Current EXP, EXP to next level
# and Class
# - New error msgs are more descriptive, and appear in print commands instead of
# - in game. (you'll get a popup)
# - Added easy configuration of the DQ Style Status screen
# - The player able to back out of menu screens in the SQ Style Status Screen
#
# Coming soon in Version 1.3
# - Lots of optimization - Script will be faster, smarter, and smaller
# - The ability to back out of the menu screens in DQ Status Style menu
# - Sprite display in the mini-boxes (code is done, but still has many bugs)
# - The ability to use one large "mega" box in place of the mini-boxes
# - Dragon Quest Style Equip Screen + Equipment Box in DQ Style Status
# - Additional information displayed under "See All" in the DQ Status screen
# - More customization in the DQ Status menu (adjust the positions of the
# text lines!) (This ones a hopefully - cant guarentee it)
#==============================================================================
module DQ_Menu_Setup
#Configure the Main Menu here
=begin
This part of the script allows you to quickly change the display of the main menu.
You can set the number of rows and colums, as well as what items are displayed
=end
NUM_ROWS = 4 # The number of Rows in the main menu
NUM_COL = 2 # The number of columns in the main menu
#Configure the items to appear on the main menu here. Types are as follows:
# 1- Call a Scene. Place the scene name in the STRING box
# 2- ???
# 3- Call the DQ Status Screen
# 4- Call the DQ Equipment Screen (Do not use in this version)
ITEM_1_TYPE = 3
ITEM_1_NAME = 'DQ Status' #What displays on the menu
ITEM_1_STRING = '' #The window or scene name
ITEM_2_NAME = 'Moo'
ITEM_3_TYPE = 3
ITEM_3_NAME = 'I3'
ITEM_4_NAME = 'I4'
ITEM_5_NAME = 'I5'
ITEM_6_NAME = 'I6'
ITEM_7_NAME = 'I7'
ITEM_8_NAME = 'I8'
#ITEM_3_STRING
end
module DQ_Status_Setup
#This Module defines the Dragonquest Style Status Screen. If you aren't using it
#you can safely ignore this section.
#Configure the "See Stats" section of the status menu here
#Configure the right-side window here
#Each "line" is a line of text and the stat value
# For type use the following: 1 - Attack, 2 - Agility, 3 - Spirit
# 4- Class, 5 - Defense, 6- HP, 7 - MP, 8 - MaxHP, 9 - MaxMP,
# 10 - Experience, 11 - Experience to Level, #12 - Name, #13 - Level
SEP = ':' # The character to seperate the stat and its value
LINE_1_STRING = '' #Set the text to display for line one
LINE_1_ONOFF = false #true to turn the line on, false to turn it off
LINE_1_TYPE = 1 #see above for type codes
LINE_2_STRING = 'Agility' #Set the text to display for line one
LINE_2_ONOFF = true #true to turn the line on, false to turn it off
LINE_2_TYPE = 2 #see above for type codes
LINE_3_STRING = '' #Set the text to display for line one
LINE_3_ONOFF = false #true to turn the line on, false to turn it off
LINE_3_TYPE = 1 #see above for type codes
LINE_4_STRING = 'Spirit' #Set the text to display for line one
LINE_4_ONOFF = true #true to turn the line on, false to turn it off
LINE_4_TYPE = 3 #see above for type codes
LINE_5_STRING = '' #Set the text to display for line one
LINE_5_ONOFF = false #true to turn the line on, false to turn it off
LINE_5_TYPE = 1 #see above for type codes
LINE_6_STRING = 'Maximum HP' #Set the text to display for line one
LINE_6_ONOFF = true #true to turn the line on, false to turn it off
LINE_6_TYPE = 8 #see above for type codes
LINE_7_STRING = 'Maximum MP' #Set the text to display for line one
LINE_7_ONOFF = true #true to turn the line on, false to turn it off
LINE_7_TYPE = 9 #see above for type codes
LINE_8_STRING = 'Attack Power' #Set the text to display for line one
LINE_8_ONOFF = true #true to turn the line on, false to turn it off
LINE_8_TYPE = 1 #see above for type codes
LINE_9_STRING = 'Defense Power' #Set the text to display for line one
LINE_9_ONOFF = true #true to turn the line on, false to turn it off
LINE_9_TYPE = 5 #see above for type codes
LINE_10_STRING = 'EXP' #Set the text to display for line one
LINE_10_ONOFF = true #true to turn the line on, false to turn it off
LINE_10_TYPE = 10 #see above for type codes
#Configure the Upper Left window here - i'd suggest 8 characters max in the string
UL_SEP = ':' #Set the character to seperate strings from values here (HP-33 if '-')
UL_NAME_ONOFF = true #make false to have the characters name not appear
UL_NAME_DIV = true #Add or remove the divider between the name and the other info.
# The divider will not appear if name is disabled
UL_LINE_1_ONOFF = true #Turn line one on or off
UL_LINE_1_STRING = 'Class'
UL_LINE_1_TYPE = 4 #Same types as before
UL_LINE_2_ONOFF = false #Turn line one on or off
UL_LINE_2_STRING = ''
UL_LINE_2_TYPE = 1 #Same types as before
UL_LINE_3_ONOFF = true #Turn line one on or off
UL_LINE_3_STRING = 'Level'
UL_LINE_3_TYPE = 13 #Same types as before
UL_LINE_4_ONOFF = true #Turn line one on or off
UL_LINE_4_STRING = 'HP'
UL_LINE_4_TYPE = 6 #Same types as before
UL_LINE_5_ONOFF = true #Turn line one on or off
UL_LINE_5_STRING = 'MP'
UL_LINE_5_TYPE = 7 #Same types as before
end
module Wor_Litemenu
#Litemenu Setup
MENU_WINDOW_Y = 20
CHARA_WINDOW_Y = 80
CHARA_WINDOW_WIDTH = 175
SHOW_LV = false
GOLD_TEXT_X = 84
VOCAB_GOLD = "GP:"
SHOW_LOCATION_WINDOW = false
VOCAB_LOCATION = "Location:"
LOCATION_WINDOW_Y = 135
LOCATION_TEXT_X = 150
GOLD_TEXT_X = 84
end
class Scene_Menu < Scene_Base
def initialize(menu_index = 0)
@menu_index = menu_index
@LASTX = 0
@TEMPX = 0
@TEMPY = 0
@dqwhotype = 'null'
@actorarray = []
#MINI-BOX SETUP HERE
#These boxes are kinda tricky - messing with one effects the others sometimes
#You can move it anywhere, it may just take a little while to find the right
#combination of numbers.
# Main Setup
@BOX_ONOFF = true #true to turn the miniboxes on, false to turn them off
@NS_LOCATION = -70 #Move the mini-boxes to the left or right
@NS_GAP = 225 #Adjust this to make the mini-boxes closer or further apart
@BOX_W = 115 # Adjust the width of the mini-boxes
@BOX_H = 115 #Adjust the height of the mini-boxes
@BOX_Y = 280 #Adjust the Y coordinates of the mini-boxes
@BOX_LEFT_RIGHT = 2 # set to 1 for the boxes to fold out right to left
# set to 2 for the boxes to fold out left to right
# NAME SETUP
@NAME_ONOFF = true #True is on, false is off
@N_X = 0 # Set the X coordinates for the characters name
@N_Y = 0 # Set the Y coordinates for the characters name
# Setup Each line of text in the boxes. By default it supports a name line and
# up to 3 other lines of text. (With a 4th coded but disabled)
# Adjusting these changes the boxes for all characters.
# I included instructions below on how to add more as well as how to
# add new stats to the list.
# LINE 1 SETUP
@LINEONE_ONOFF = true #true to turn the box on, false to turn it off
@L1_Y = 20 # Set the y coordinates of the text
@L1_X = 0 # Set x coordinates of the stat header
@L1_X2 = 30 # set the distance of the stat from the header
@L1_HEADER = 'HP:' #Sets the text header of the stat
@L1_STAT = 1 # See Stat Guide Below
# LINE 2 SETUP
@LINETWO_ONOFF = true #true to turn the box on, false to turn it off
@L2_Y = 40 # Set the y coordinates of the text
@L2_X = 0 # Set x coordinates of the stat header
@L2_X2 = 30 # set the distance of the stat from the header
@L2_HEADER = 'MP:' #Sets the text header of the stat
@L2_STAT = 2 # See Stat Guide Below
# LINE 3 SETUP
@LINETHREE_ONOFF = true #true to turn the box on, false to turn it off
@L3_Y = 60 # Set the y coordinates of the text
@L3_X = 0 # Set x coordinates of the stat header
@L3_X2 = 30 # set the distance of the stat from the header
@L3_HEADER = 'LV:' #Sets the text header of the stat
@L3_STAT = 3 # See Stat Guide Below
# LINE 4 SETUP
@LINEFOUR_ONOFF = false #true to turn the box on, false to turn it off
@L4_Y = 80 # Set the y coordinates of the text
@L4_X = 0 # Set x coordinates of the stat header
@L4_X2 = 30 # set the distance of the stat from the header
@L4_HEADER = 'GP:' #Sets the text header of the stat
@L4_STAT = 4 # See Stat Guide Below
#STAT GUIDE
# This is the list of currently implemented stats to show in the mini-boxes
# To use input their item number in the STAT line of the line you want it to
# show up on. If you want it to show anything else it shouldn't take you
# long to get it to display it
#
# 1 : Hitpoints
# 2 : Magic-Points
# 3 : Level
# 4 : Gold - Only appears in Player 1s box!
# 5 : EXP
# 6 : EXP to Next Level
# 7 : Class
#
# ADVANCED SETUP
# -ADDING NEW LINES
# So you want to add new stats to the boxes huh? Heres how to do it. First off
# change the total number of lines to how many lines are going to be displayed.
@LCOUNT = 7 #Set the number of items here
#Now to add a new line go to EACH window box, and copy/pasting an existing line
# and modify it to display your new stat. Shouldn't be too hard.
# Dont forget to change the error code to reflect the new line number
# once you are done, go above and copy/paste a setup from a line, and change the
# varibles on the new one to reflect the new line.
#
# -ADDING NEW STATS TO BE DISPLAYED
# To add a new stat to the menus first add it to the STAT Guide Above
# Once you have a number go down into EACH Menu box below and copy/paste a stat item
# Change if @L1_STAT == X to the number of the new stat
# Now add to each box an event to get the info of the stat
# Finally edit the stat section of the new item in the list,
#
#
# Sending new STATS to the author
#
# If you feel the next release of this script should have other stats in it
# email me at strager at comcast dot net with a subject line of "MINI-BOX STAT".
# email without this subject line will not be read (my email only accepts
# pre-approved subject lines
#
# In the email change the STAT number to #
# Send only one status box's code- I'm smart enough to replicate it in the other
# boxes :)
# Please don't email other requests (use the forums to make script requests)
end
def start
blah = 0;
super
psize = ($game_party.members.size)
create_menu_background
create_command_window
create_dqs_window
@dqs_window.visible = false
create_dqwho_window
create_DQStatus_ATTACK_window
create_DQStatus_HPMP_window
for actor in $game_party.members
@actorarray[blah] = actor
blah = blah + 1;
end
lite_create_location_window if Wor_Litemenu::SHOW_LOCATION_WINDOW == true
lite_create_actor_window
if @BOX_ONOFF == true
if @BOX_LEFT_RIGHT == 1
for actor in $game_party.members
if psize == 4
@LASTX = ((@NS_GAP * 1) - @NS_LOCATION)
create_newstat_windowfour (psize)
elsif psize == 3
@LASTX = ((@NS_GAP * 2) - @NS_LOCATION)
create_newstat_windowthree (psize)
elsif psize == 2
@LASTX = ((@NS_GAP * 3) - @NS_LOCATION)
create_newstat_windowtwo (psize)
elsif psize == 1
@LASTX = ((@NS_GAP * 4) - @NS_LOCATION)
create_newstat_window (psize)
end
psize = (psize - 1)
end
end
if @BOX_LEFT_RIGHT == 2
for actor in $game_party.members
if psize == 4
@LASTX = ((@NS_GAP * 4) - @NS_LOCATION)
create_newstat_windowfour (psize)
elsif psize == 3
@LASTX = ((@NS_GAP * 3) - @NS_LOCATION)
create_newstat_windowthree (psize)
elsif psize == 2
@LASTX = ((@NS_GAP * 2) - @NS_LOCATION)
create_newstat_windowtwo (psize)
elsif psize == 1
@LASTX = ((@NS_GAP * 1) - @NS_LOCATION)
create_newstat_window (psize)
end
psize = (psize - 1)
end
end
end
end
#Create Actor (from Litemenu)
def lite_create_actor_window
member = []
@item_max = $game_party.members.size
for actor in $game_party.members
member.push ((actor.name) + " Lv." + (actor.level.to_s)) if Wor_Litemenu::SHOW_LV == true
member.push (actor.name) if Wor_Litemenu::SHOW_LV == false
end
@status_window = Window_Command.new(Wor_Litemenu::CHARA_WINDOW_WIDTH, member)
@status_window.index = @menu_index
@status_window.x = (554 /2) - (@status_window.width/2)
@status_window.y = Wor_Litemenu::CHARA_WINDOW_Y
@status_window.visible = false
end
#Reimplemented litemenu map-name script
def lite_get_map_name
mapdata = load_data("Data/MapInfos.rvdata")
map_id = $game_map.map_id
@map_name = mapdata[map_id].name
end
#Reimplemented litemenu gold
def lite_draw_currency_value(value, x, y, width)
cx = @location_window.contents.text_size(Vocab::gold).width
@location_window.contents.font.color = @location_window.normal_color
@location_window.contents.draw_text(x+53, y, @location_window.width+cx, 24, value, 0)
@location_window.contents.font.color = @location_window.system_color
@location_window.contents.draw_text(x+(($game_party.gold).to_s.size * 8)+68, y, @location_window.width, 24, Vocab::gold, 0)
end
#reimplemented location window
def lite_create_location_window
width = 300
height = 90
x = (554 /2) - (width/2)
y = Wor_Litemenu::LOCATION_WINDOW_Y
@location_window = Window_Base.new(x, y, width, height)
@location_window.create_contents
lite_get_map_name
@location_window.contents.font.color = @location_window.system_color
@location_window.contents.draw_text(0, 0, 300, 24, Wor_Litemenu::VOCAB_GOLD)
@location_window.contents.font.color = @location_window.normal_color
lite_draw_currency_value($game_party.gold, 4, 0, Wor_Litemenu::GOLD_TEXT_X)
@location_window.contents.font.color = @location_window.system_color
@location_window.contents.draw_text(0, 32, 300, 24, Wor_Litemenu::VOCAB_LOCATION)
@location_window.contents.font.color = @location_window.normal_color
@location_window.contents.draw_text(Wor_Litemenu::LOCATION_TEXT_X, 32, 300, 24, @map_name)
end
#--------------------------------------------------------------------------
# * Actor Selection
#--------------------------------------------------------------------------
def start_actor_selection
@command_window.active = false
@status_window.visible = true
@status_window.active = true
@status_window.index = 0
end
def end_actor_selection
@command_window.active = true
@status_window.visible = false
@status_window.active = false
@status_window.index = -1
end
# Party member 1's Box
def create_newstat_window (ac)
member = []
hitpoints = []
magpoints = []
lev = []
cclass = []
cexp = []
cexptolev = []
@item_max = $game_party.members.size
for actor in $game_party.members
member.push (actor.name)
hitpoints.push (actor.hp)
magpoints.push (actor.mp)
lev.push (actor.level.to_s)
cclass.push (actor.class.name)
cexp.push (actor.exp)
cexptolev.push (actor.next_rest_exp_s)
end
width = @BOX_W
height = @BOX_H
x = ((@LASTX) /2) - (width/2)
y = (@BOX_Y + 10)
@newstat_window = Window_Base.new(x, y, width, height)
@newstat_window.create_contents
#Name Line
if @NAME_ONOFF == true
@newstat_window.contents.font.color = @newstat_window.system_color
@newstat_window.contents.draw_text(@N_X, @N_Y, 300, 20, member[(ac - 1)])
end
#Line One
#Set Color
@newstat_window.contents.font.color = @newstat_window.normal_color
if @LINEONE_ONOFF == true
@newstat_window.contents.draw_text( @L1_X, @L1_Y, 300, 20,@L1_HEADER) if (@L1_STAT <= @LCOUNT)
if @L1_STAT < 0
p 'ERROR: @L1_STAT < 0 for player 1. Please set to a valid value.'
end
if @L1_STAT == 1
@newstat_window.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,hitpoints[(ac - 1)])
end
if @L1_STAT == 2
@newstat_window.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,magpoints[(ac - 1)])
end
if @L1_STAT == 3
@newstat_window.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,lev[(ac - 1)])
end
if @L1_STAT == 4
@newstat_window.contents.draw_text( (@L1_X+ @L2_X2), @L1_Y, 300, 20,$game_party.gold)
end
if @L1_STAT == 5
@newstat_window.contents.draw_text( (@L1_X+ @L2_X2), @L1_Y, 300, 20,cexp[(ac-1)])
end
if @L1_STAT == 6
@newstat_window.contents.draw_text( (@L1_X+ @L2_X2), @L1_Y, 300, 20,cexptolev[(ac-1)])
end
if @L1_STAT == 7
@newstat_window.contents.draw_text( (@L1_X+ @L2_X2), @L1_Y, 300, 20,cclass[(ac-1)])
end
if @L1_STAT > @LCOUNT
p 'L1_STAT > LCOUNT for (Player 1) - Please check your LCOUNT #.'
end
end
#Line Two
#Set Color
@newstat_window.contents.font.color = @newstat_window.normal_color
if @LINETWO_ONOFF == true
@newstat_window.contents.draw_text( @L2_X, @L2_Y, 300, 20,@L2_HEADER) if (@L2_STAT <= @LCOUNT)
if @L2_STAT < 0
p 'ERROR: @L2_STAT < 0 for player 1. Please set to a valid value.'
end
case @L2_STAT
when 1
@newstat_window.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,hitpoints[(ac - 1)])
when 2
@newstat_window.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,magpoints[(ac - 1)])
when 3
@newstat_window.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,lev[(ac - 1)])
when 4
@newstat_window.contents.draw_text( (@L2_X + @L2_X2), @L2_Y, 300, 20,$game_party.gold)
end
if @L2_STAT > @LCOUNT
p 'L2_STAT > LCOUNT for (Player 1) - Please check your LCOUNT #.'
end
end
#Line Three
#Set Color
@newstat_window.contents.font.color = @newstat_window.normal_color
if @LINETHREE_ONOFF == true
@newstat_window.contents.draw_text( @L3_X, @L3_Y, 300, 20,@L3_HEADER) if (@L3_STAT <= @LCOUNT)
if @L3_STAT < 0
p 'ERROR: @L3_STAT < 0 for player 1. Please set to a valid value.'
end
if @L3_STAT == 1
@newstat_window.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,hitpoints[(ac - 1)])
end
if @L3_STAT == 2
@newstat_window.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,magpoints[(ac - 1)])
end
if @L3_STAT == 3
@newstat_window.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,lev[(ac - 1)])
end
if @L3_STAT == 4
@newstat_window.contents.draw_text( (@L3_X + @L3_X2), @L3_Y, 300, 20,$game_party.gold)
end
if @L3_STAT > @LCOUNT
p 'L3_STAT > LCOUNT for (Player 1) - Please check your LCOUNT #.'
end
end
#Line Four (Off by default)
if @LINEFOUR_ONOFF == true
@newstat_window.contents.draw_text( @L4_X, @L4_Y, 300, 20,@L4_HEADER) if (@L4_STAT <= @LCOUNT)
if @L4_STAT < 0
p 'ERROR: @L4_STAT < 0 for player 1. Please set to a valid value.'
end
if @L4_STAT == 1
@newstat_window.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,hitpoints[(ac - 1)])
end
if @L4_STAT == 2
@newstat_window.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,magpoints[(ac - 1)])
end
if @L4_STAT == 3
@newstat_window.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,lev[(ac - 1)])
end
if @L4_STAT == 4
@newstat_window.contents.draw_text( (@L4_X + @L4_X2), @L4_Y, 300, 20,$game_party.gold)
end
if @L4_STAT > @LCOUNT
p 'L4_STAT > LCOUNT for (Player 1) - Please check your LCOUNT #.'
end
end
@LASTX = (@LASTX + @NS_LOCATION)
end
# Party Member 2's Box
def create_newstat_windowtwo (ac)
member = []
hitpoints = []
magpoints = []
lev = []
@item_max = $game_party.members.size
for actor in $game_party.members
member.push (actor.name)
hitpoints.push (actor.hp)
magpoints.push (actor.mp)
lev.push (actor.level.to_s)
end
width = @BOX_W
height = @BOX_H
x = ((@LASTX) /2) - (width/2)
y = (@BOX_Y + 10)
@newstat_windowtwo = Window_Base.new(x, y, width, height)
@newstat_windowtwo.create_contents
#Name Line
if @NAME_ONOFF == true
@newstat_windowtwo.contents.font.color = @newstat_windowtwo.system_color
@newstat_windowtwo.contents.draw_text(@N_X, @N_Y, 300, 20, member[(ac - 1)])
end
#Line One
#Set Color
@newstat_windowtwo.contents.font.color = @newstat_windowtwo.normal_color
if @LINEONE_ONOFF == true
@newstat_windowtwo.contents.draw_text( @L1_X, @L1_Y, 300, 20,@L1_HEADER) if (@L1_STAT <= @LCOUNT) and (@L1_STAT != 4)
if @L1_STAT < 0
p 'ERROR: @L1_STAT < 0 for player 2. Please set to a valid value.'
end
if @L1_STAT == 1
@newstat_windowtwo.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,hitpoints[(ac - 1)])
end
if @L1_STAT == 2
@newstat_windowtwo.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,magpoints[(ac - 1)])
end
if @L1_STAT == 3
@newstat_windowtwo.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,lev[(ac - 1)])
end
if @L1_STAT > @LCOUNT
p 'L1_STAT > LCOUNT for (Player 1) - Please check your LCOUNT #.'
end
end
#Line Two
#Set Color
@newstat_windowtwo.contents.font.color = @newstat_windowtwo.normal_color
if @LINETWO_ONOFF == true
@newstat_windowtwo.contents.draw_text( @L2_X, @L2_Y, 300, 20,@L2_HEADER) if (@L2_STAT <= @LCOUNT) and (@L2_STAT != 4)
if @L2_STAT < 0
p 'ERROR: @L2_STAT < 0 for player 2. Please set to a valid value.'
end
case @L2_STAT
when 1
@newstat_windowtwo.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,hitpoints[(ac - 1)])
when 2
@newstat_windowtwo.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,magpoints[(ac - 1)])
when 3
@newstat_windowtwo.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,lev[(ac - 1)])
end
if @L2_STAT > @LCOUNT
p 'L2_STAT > LCOUNT for (Player 2) - Please check your LCOUNT #.'
end
end
#Line Three
#Set Color
@newstat_windowtwo.contents.font.color = @newstat_windowtwo.normal_color
if @LINETHREE_ONOFF == true
@newstat_windowtwo.contents.draw_text( @L3_X, @L3_Y, 300, 20,@L3_HEADER) if (@L3_STAT <= @LCOUNT) and (@L3_STAT != 4)
if @L3_STAT < 0
p 'ERROR: @L3_STAT < 0 for player 2. Please set to a valid value.'
end
if @L3_STAT == 1
@newstat_windowtwo.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,hitpoints[(ac - 1)])
end
if @L3_STAT == 2
@newstat_windowtwo.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,magpoints[(ac - 1)])
end
if @L3_STAT == 3
@newstat_windowtwo.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,lev[(ac - 1)])
end
if @L3_STAT > @LCOUNT
p 'L3_STAT > LCOUNT for (Player 2) - Please check your LCOUNT #.'
end
end
#Line Four (Off by default)
if @LINEFOUR_ONOFF == true
@newstat_windowtwo.contents.draw_text( @L4_X, @L4_Y, 300, 20,@L4_HEADER) if (@L4_STAT <= @LCOUNT)
if @L4_STAT < 0
p 'ERROR: @L4_STAT < 0 for player 2. Please set to a valid value.'
end
if @L4_STAT == 1
@newstat_windowtwo.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,hitpoints[(ac - 1)])
end
if @L4_STAT == 2
@newstat_windowtwo.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,magpoints[(ac - 1)])
end
if @L4_STAT == 3
@newstat_windowtwo.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,lev[(ac - 1)])
end
if @L4_STAT == 4
@newstat_windowtwo.contents.draw_text( (@L4_X + @L4_X2), @L4_Y, 300, 20,$game_party.gold)
end
if @L4_STAT > @LCOUNT
p 'L4_STAT > LCOUNT for (Player 2) - Please check your LCOUNT #.'
end
end
@LASTX = (@LASTX + @NS_LOCATION)
end
# Party member 3's Box
def create_newstat_windowthree (ac)
member = []
hitpoints = []
magpoints = []
lev = []
@item_max = $game_party.members.size
for actor in $game_party.members
member.push (actor.name)
hitpoints.push (actor.hp)
magpoints.push (actor.mp)
lev.push (actor.level.to_s)
end
width = @BOX_W
height = @BOX_H
x = ((@LASTX) /2) - (width/2)
y = (@BOX_Y + 10)
@newstat_windowthree = Window_Base.new(x, y, width, height)
@newstat_windowthree.create_contents
#Name Line
if @NAME_ONOFF == true
@newstat_windowthree.contents.font.color = @newstat_windowthree.system_color
@newstat_windowthree.contents.draw_text(@N_X, @N_Y, 300, 20, member[(ac - 1)])
end
#Line One
#Set Color
@newstat_windowthree.contents.font.color = @newstat_windowthree.normal_color
if @LINEONE_ONOFF == true
@newstat_windowthree.contents.draw_text( @L1_X, @L1_Y, 300, 20,@L1_HEADER) if (@L1_STAT <= @LCOUNT) and (@L1_STAT != 4)
if @L1_STAT < 0
p 'ERROR: @L1_STAT < 0 for player 3. Please set to a valid value.'
end
if @L1_STAT == 1
@newstat_windowthree.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,hitpoints[(ac - 1)])
end
if @L1_STAT == 2
@newstat_windowthree.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,magpoints[(ac - 1)])
end
if @L1_STAT == 3
@newstat_windowthree.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,lev[(ac - 1)])
end
if @L1_STAT > @LCOUNT
p 'L1_STAT > LCOUNT for (Player 3) - Please check your LCOUNT #.'
end
end
#Line Two
#Set Color
@newstat_windowthree.contents.font.color = @newstat_windowthree.normal_color
if @LINETWO_ONOFF == true
@newstat_windowthree.contents.draw_text( @L2_X, @L2_Y, 300, 20,@L2_HEADER) if (@L2_STAT <= @LCOUNT) and (@L2_STAT != 4)
if @L2_STAT < 0
p 'ERROR: @L2_STAT < 0 for player 3. Please set to a valid value.'
end
if @L2_STAT == 1
@newstat_windowthree.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,hitpoints[(ac - 1)])
end
if @L2_STAT == 2
@newstat_windowthree.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,magpoints[(ac - 1)])
end
if @L2_STAT == 3
@newstat_windowthree.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,lev[(ac - 1)])
end
if @L2_STAT > @LCOUNT
p 'L2_STAT > LCOUNT for (Player 3) - Please check your LCOUNT #.'
end
end
#Line Three
#Set Color
@newstat_windowthree.contents.font.color = @newstat_windowthree.normal_color
if @LINETHREE_ONOFF == true
@newstat_windowthree.contents.draw_text( @L3_X, @L3_Y, 300, 20,@L3_HEADER) if (@L3_STAT <= @LCOUNT) and (@L3_STAT != 4)
if @L3_STAT < 0
p 'ERROR: @L3_STAT < 0 for player 3. Please set to a valid value.'
end
if @L3_STAT == 1
@newstat_windowthree.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,hitpoints[(ac - 1)])
end
if @L3_STAT == 2
@newstat_windowthree.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,magpoints[(ac - 1)])
end
if @L3_STAT == 3
@newstat_windowthree.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,lev[(ac - 1)])
end
if @L3_STAT > @LCOUNT
p 'L3_STAT > LCOUNT for (Player 3) - Please check your LCOUNT #.'
end
end
#Line Four (Off by default)
if @LINEFOUR_ONOFF == true
@newstat_windowthree.contents.draw_text( @L4_X, @L4_Y, 300, 20,@L4_HEADER) if (@L4_STAT <= @LCOUNT)
if @L4_STAT < 0
p 'ERROR: @L4_STAT < 0 for player 3. Please set to a valid value.'
end
if @L4_STAT == 1
@newstat_windowthree.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,hitpoints[(ac - 1)])
end
if @L4_STAT == 2
@newstat_windowthree.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,magpoints[(ac - 1)])
end
if @L4_STAT == 3
@newstat_windowthree.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,lev[(ac - 1)])
end
if @L4_STAT == 4
@newstat_windowthree.contents.draw_text( (@L4_X + @L4_X2), @L4_Y, 300, 20,$game_party.gold)
end
if @L4_STAT > @LCOUNT
p 'L4_STAT > LCOUNT for (Player 3) - Please check your LCOUNT #.'
end
end
@LASTX = (@LASTX + @NS_LOCATION)
end
#Party Member 4's box
def create_newstat_windowfour (ac)
member = []
hitpoints = []
magpoints = []
lev = []
@item_max = $game_party.members.size
for actor in $game_party.members
member.push (actor.name)
hitpoints.push (actor.hp)
magpoints.push (actor.mp)
lev.push (actor.level.to_s)
end
width = @BOX_W
height = @BOX_H
x = ((@LASTX) /2) - (width/2)
y = (@BOX_Y + 10)
@newstat_windowfour = Window_Base.new(x, y, width, height)
@newstat_windowfour.create_contents
#Name Line
if @NAME_ONOFF == true
@newstat_windowfour.contents.font.color = @newstat_windowfour.system_color
@newstat_windowfour.contents.draw_text(@N_X, @N_Y, 300, 20, member[(ac - 1)])
end
#Line One
#Set Color
@newstat_windowfour.contents.font.color = @newstat_windowfour.normal_color
if @LINEONE_ONOFF == true
@newstat_windowfour.contents.draw_text( @L1_X, @L1_Y, 300, 20,@L1_HEADER) if (@L1_STAT <= @LCOUNT) and (@L1_STAT != 4)
if @L1_STAT < 0
p 'ERROR: @L1_STAT < 0 for player 4. Please set to a valid value.'
end
if @L1_STAT == 1
@newstat_windowfour.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,hitpoints[(ac - 1)])
end
if @L1_STAT == 2
@newstat_windowfour.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,magpoints[(ac - 1)])
end
if @L1_STAT == 3
@newstat_windowfour.contents.draw_text( (@L1_X + @L1_X2) , @L1_Y, 300, 20,lev[(ac - 1)])
end
if @L1_STAT > @LCOUNT
p 'L1_STAT > LCOUNT for (Player 4) - Please check your LCOUNT #.'
end
end
#Line Two
#Set Color
@newstat_windowfour.contents.font.color = @newstat_windowfour.normal_color
if @LINETWO_ONOFF == true
@newstat_windowfour.contents.draw_text( @L2_X, @L2_Y, 300, 20,@L2_HEADER) if (@L2_STAT <= @LCOUNT) and (@L2_STAT != 4)
if @L2_STAT < 0
p 'ERROR: @L2_STAT < 0 for player 4. Please set to a valid value.'
end
if @L2_STAT == 1
@newstat_windowfour.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,hitpoints[(ac - 1)])
end
if @L2_STAT == 2
@newstat_windowfour.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,magpoints[(ac - 1)])
end
if @L2_STAT == 3
@newstat_windowfour.contents.draw_text( (@L2_X + @L2_X2) , @L2_Y, 300, 20,lev[(ac - 1)])
end
if @L2_STAT > @LCOUNT
p 'L2_STAT > LCOUNT for (Player 4) - Please check your LCOUNT #.'
end
end
#Line Three
#Set Color
@newstat_windowfour.contents.font.color = @newstat_windowfour.normal_color
if @LINETHREE_ONOFF == true
@newstat_windowfour.contents.draw_text( @L3_X, @L3_Y, 300, 20,@L3_HEADER) if (@L3_STAT <= @LCOUNT) and (@L3_STAT != 4)
if @L3_STAT < 0
p 'ERROR: @L3_STAT < 0 for player 4. Please set to a valid value.'
end
if @L3_STAT == 1
@newstat_windowfour.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,hitpoints[(ac - 1)])
end
if @L3_STAT == 2
@newstat_windowfour.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,magpoints[(ac - 1)])
end
if @L3_STAT == 3
@newstat_windowfour.contents.draw_text( (@L3_X + @L3_X2) , @L3_Y, 300, 20,lev[(ac - 1)])
end
if @L3_STAT > @LCOUNT
p 'L3_STAT > LCOUNT for (Player 4) - Please check your LCOUNT #.'
end
end
#Line Four (Off by default)
if @LINEFOUR_ONOFF == true
@newstat_windowfour.contents.draw_text( @L4_X, @L4_Y, 300, 20,@L4_HEADER) if (@L4_STAT <= @LCOUNT)
if @L4_STAT < 0
p 'ERROR: @L4_STAT < 0 for player 4. Please set to a valid value.'
end
if @L4_STAT == 1
@newstat_windowfour.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,hitpoints[(ac - 1)])
end
if @L4_STAT == 2
@newstat_windowfour.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,magpoints[(ac - 1)])
end
if @L4_STAT == 3
@newstat_windowfour.contents.draw_text( (@L4_X + @L4_X2) , @L4_Y, 300, 20,lev[(ac - 1)])
end
if @L4_STAT == 4
@newstat_windowfour.contents.draw_text( (@L4_X + @L4_X2), @L4_Y, 300, 20,$game_party.gold)
end
if @L4_STAT > @LCOUNT
p 'L4_STAT > LCOUNT for (Player 4) - Please check your LCOUNT #.'
end
end
@LASTX = (@LASTX + @NS_LOCATION)
end
# End Character Boxes
def create_command_window
s1 = DQ_Menu_Setup::ITEM_1_NAME
s2 = DQ_Menu_Setup::ITEM_2_NAME
s3 = DQ_Menu_Setup::ITEM_3_NAME
s4 = DQ_Menu_Setup::ITEM_4_NAME
s5 = DQ_Menu_Setup::ITEM_5_NAME
s6 = DQ_Menu_Setup::ITEM_6_NAME
s7 = DQ_Menu_Setup::ITEM_7_NAME
s8 = DQ_Menu_Setup::ITEM_8_NAME
@command_window = Window_Command.new(200, [s1, s2, s3, s4, s5, s6, s7,s8],DQ_Menu_Setup::NUM_COL,DQ_Menu_Setup::NUM_ROWS)
@command_window.index = @menu_index
@command_window.x = (230 /2) - (@command_window.width/2) #167
@command_window.y = Wor_Litemenu::MENU_WINDOW_Y
if $game_party.members.size == 0
p 'error - 0 party members. Lock the menu here.'
end
if $game_system.save_disabled
@command_window.draw_item(4, false)
end
end
# Command Selection Re-Write
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
p 'command'
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index
when 0 # Item 1 on the menu
$scene = DQ_Menu_Setup::ITEM_1_STRING if DQ_Menu_Setup::ITEM_1_TYPE == 1
start_DQStatus_selection if DQ_Menu_Setup::ITEM_1_TYPE == 3
when 1
@dqwhotype = 'equip'
start_DQWho_selection
when 2 # Skill, equipment, status
create_dqs_window
when 4 # Save
$scene = Scene_File.new(true, true, false)
when 5 # End Game
$scene = Scene_End.new
when 6 # test
$scene = Scene_Item.new
end
end
end
Just attach the next part to the bottom of this one....