The RPG Maker Resource Kit

RMRK RPG Maker Creation => RPG Maker General => General Scripting => Topic started by: Tsunokiette on May 07, 2008, 02:18:16 AM

Title: ACW VX <Work in Progress>
Post by: Tsunokiette on May 07, 2008, 02:18:16 AM
Advanced Command Windows VX

Planned features include the basic types:


The features from the last edition of ACW will be included as well.

Please request any features you would like in this script.




[spoiler=Advanced Command Windows VX version 0]#==============================================================================
# ** Window_Command
#------------------------------------------------------------------------------
#  This window deals with general command choices.
#==============================================================================

class Window_Command < Window_Selectable
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader   :commands                 # command
#--------------------------------------------------------------------------
# * Object Initialization
#     width      : window width
#     commands   : command string array
#     column_max : digit count (if 2 or more, horizontal selection)
#     row_max    : row count (0: match command count)
#     spacing    : blank space when items are arrange horizontally
#--------------------------------------------------------------------------
def initialize(width, commands, column_max = 1, row_max = 0, spacing = 32)
if !yield.nil?
@attributes = yield
case @attributes['type']
when 'vertical'
if row_max == 0
row_max = (commands.size + column_max - 1) / column_max
end
super(0, 0, width, row_max * WLH + 32, spacing)
@commands = commands
@item_max = commands.size
@column_max = column_max
when 'horizontal'
super(0,0,width,WLH +32, spacing)
@commands = commands
@item_max = commands.size
@row_max = 1
@column_max = @item_max
when 'grid'
#code
when 'ring'
#code
when 'slide_v'
#code
when 'slide_h'
#code
end
else
if row_max == 0
row_max = (commands.size + column_max - 1) / column_max
end
super(0, 0, width, row_max * WLH + 32, spacing)
@commands = commands
@item_max = commands.size
@column_max = column_max
end
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i)
end
end
#--------------------------------------------------------------------------
# * Draw Item
#     index   : item number
#     enabled : enabled flag. When false, draw semi-transparently.
#--------------------------------------------------------------------------
def draw_item(index, enabled = true)
rect = item_rect(index)
rect.x += 4
rect.width -= 8
self.contents.clear_rect(rect)
self.contents.font.color = normal_color
self.contents.font.color.alpha = enabled ? 255 : 128
self.contents.draw_text(rect, @commands[index])
end
end
[/spoiler]
Title: Re: ACW VX <Work in Progress>
Post by: Demonic Blade on May 07, 2008, 03:57:56 PM
Sounds nice! Hope it would be possible to use simple call script commands when eventing!
Title: Re: ACW VX <Work in Progress>
Post by: modern algebra on May 08, 2008, 01:33:26 AM
Looking good Tsuno. Good luck.
Title: Re: ACW VX <Work in Progress>
Post by: Restaurant Sackboy on May 09, 2008, 08:43:01 AM
Could you please make a description, for the people who do not know what this is?
Personally I don't understand the crap out of it.
Title: Re: ACW VX <Work in Progress>
Post by: Tsunokiette on May 10, 2008, 01:37:26 AM
This script (when completed) will allow you to create a number of different command window types with high-levels of customizability, all while keeping it simple.

I did this for XP (http://rmrk.net/index.php/topic,25167.0.html) but you were limited to two command window types, this version for VX will allow for 6 command window types.

The customizability, will include everything from the XP version as well as anything you guys suggest (that is possible :P  ).
Title: Re: ACW VX <Work in Progress>
Post by: Demonic Blade on May 10, 2008, 06:49:37 AM
Could you post some screens of what it'd look like? I can't wait to see the ring!
Title: Re: ACW VX <Work in Progress>
Post by: Restaurant Sackboy on May 10, 2008, 11:21:30 AM
Quote from: Tsunokiette on May 10, 2008, 01:37:26 AM
This script (when completed) will allow you to create a number of different command window types with high-levels of customizability, all while keeping it simple.

I did this for XP (http://rmrk.net/index.php/topic,25167.0.html) but you were limited to two command window types, this version for VX will allow for 6 command window types.

The customizability, will include everything from the XP version as well as anything you guys suggest (that is possible :P  ).
Thank you, I look forward to it.