[XP] Ryex's Collapsing CMS (V2.50 is out!)

Started by Ryex, December 23, 2008, 12:35:44 am

Previous topic - Next topic

Ryex

September 02, 2009, 07:07:18 pm #60 Last Edit: September 02, 2009, 09:10:26 pm by Ryexander
I built this to rival STCMS. I didn't come very close, but I beat most of the competition ;) 8) :ninja:
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Fantasist

September 05, 2009, 03:01:21 am #61 Last Edit: September 05, 2009, 03:12:04 am by Fantasist
I've just downloaded the demo, and I've got to admit, I'm very impressed! Awe-inspiring Ryex, nothing less. I especially love your idea for equipment description in the equip scene. Seriously, why didn't I think of that? *levels up*

EDIT:
Quote from: Ryexander on September 02, 2009, 07:07:18 pm
I built this to rival STCMS. I didn't come very close, but I beat most of the competition ;) 8) :ninja:


You sure did mate, you sure did :)
But you've inspired me to make a CMS of my own! Man, it feels good to be scripting in RGSS again, it's been too long. So stay tuned for my next script. I have some ideas already, heheh...

EDIT2: Oh, I forgot. I think you're better off using the moving window code from STCMS. Mine is an alpha version because it's not really optimized. Why don't you code one yourself? It's easy and I think you'll agree.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)


The best of freeware reviews: Gizmo's Freeware Reviews




Ryex

September 05, 2009, 08:25:09 am #62 Last Edit: September 05, 2009, 08:34:13 am by Ryexander
Quote from: Fantasist on September 05, 2009, 03:01:21 am

EDIT2: Oh, I forgot. I think you're better off using the moving window code from STCMS. Mine is an alpha version because it's not really optimized. Why don't you code one yourself? It's easy and I think you'll agree.

your code may be an alpha but every time I tried to come up with I different way to move the windows I failed. besides I've yet to find any bugs in your method.
it is conceptually sound. besides I've looked at STCMS and the way Blizzard moves his windows is just different, he approaches the problem from a different angle, instead of making a method tha can move a window from any were to ant were he made a one way ticket system.


I'm going to make V3.0 soon I'm going to complete the status screen, add the ability to see status effects and elaments as icons, and edit the status bar in the main menu a bit.

also... have you checked out the code in Window_Advanced? I made so slight modifications
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Blizzard

Yes, I unified moving in one method because it's a repeating procedure.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Taiine

I have to admit this is one of my top picks for a CMS. My only quem would be the HP/SP/EXP bars.

Never been a fan of bars that have text over them, cause it makes it hard to tell if your full or how low you are. I've been using an edited version of Cogwheel's bar script to add my HP and such barsm (edited so the bars are right below the text rather then behind it), even bars for the stats.

Would there be away to remove the bars from this so I can use Cogwheel's?

Jackolas

dunno for sure but if you put Cogweels script underneath this 1 the bars get replace. (well normally that is)

Blizzard

He'll probably have to comment out the original bar code as well.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

Jackolas

October 19, 2009, 04:31:44 am #67 Last Edit: October 19, 2009, 07:27:45 am by Jackolas
tried to edit the script, fount out 2 things.
first of all cogweels bars needs to be placed above this menu script to prevent crashes.
second is that by commenting out the original bar code will remove the bars in total.
will keep testing

edit:
got the bars working.
need to remove the double text and than will post solution here

edit 2:
replace line 38 till 267 with this:
Spoiler: ShowHide
module RyexCFG
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 MENU_ICONS = []
 MENU_ICONS[1] = "Item" #Icon name for the Item option on the main menu
 MENU_ICONS[2] = "Skill" #Icon name for the Skill option on the main menu
 MENU_ICONS[3] = "Equip"#Icon name for the Equip option on the main menu
 MENU_ICONS[4] = "050-Skill07" #Icon name for the Status option on the main menu
 MENU_ICONS[5] = "Save" #Icon name for the Save option on the main menu
 MENU_ICONS[6] = "Option"
 MENU_ICONS[7] = "Door" #Icon name for the Exit option on the main menu
 DEFALT_BGM_VOULME = 100 #The defalt voulume for back ground music
 DEFALT_SFX_VOULME = 100 #The defalt voulume for sound effects
#--------------------------------
# * Custom scenes
#  If for some reason you want to use an item, equip, skill, status, save,
#  exit, or option screen fallow the instrutions below.
#--------------------------------
CUSTOM_ITEM_SCENE = nil
=begin # if you want to use deleat this line
 CUSTOM_ITEM_SCENE = Proc.new do
   $scene = <insert scene class name here>.new # complete this line
 end
=end # and deleate this line
CUSTOM_SKILL_SCENE = nil
=begin # if you want to use deleat this line
 CUSTOM_SKILL_SCENE = Proc.new do
   $scene = <insert scene class name here>.new # complete this line
 end
=end # and deleate this line
CUSTOM_EQUIP_SCENE = nil
=begin # if you want to use deleat this line
 CUSTOM_EQUIP_SCENE = Proc.new do
   $scene = <insert scene class name here>.new # complete this line
 end
=end # and deleate this line
CUSTOM_STATUS_SCENE = nil
=begin # if you want to use deleat this line
 CUSTOM_STATUS_SCENE = Proc.new do
   $scene = <insert scene class name here>.new # complete this line
 end
=end # and deleate this line
CUSTOM_SAVE_SCENE = nil
=begin # if you want to use deleat this line
 CUSTOM_SAVE_SCENE = Proc.new do
   $scene = <insert scene class name here>.new # complete this line
 end
=end # and deleate this line
CUSTOM_OPTION_SCENE = nil
=begin # if you want to use deleat this line
 CUSTOM_OPTION_SCENE = Proc.new do
   $scene = <insert scene class name here>.new # complete this line
 end
=end # and deleate this line
CUSTOM_EXIT_SCENE = nil
=begin # if you want to use deleat this line
 CUSTOM_EXIT_SCENE = Proc.new do
   $scene = <insert scene class name here>.new # complete this line
 end
=end # and deleate this line

#CUSTOM BAR EDIT
CUSTOM_BARS = true #set to true if you want to use custom bars
CUSTOM_BARS_XHP_OFFSET = 0 #The X offset of the custom HP bars
CUSTOM_BARS_YHP_OFFSET = -10 #The Y offset of the Custom HP bars
CUSTOM_BARS_WHP_OFFSET = 0 # The W offset of the Custom HP bars

CUSTOM_BARS_XSP_OFFSET = 0 #The X offset of the custom SP bars
CUSTOM_BARS_YSP_OFFSET = -10 #The Y offset of the Custom SP Bars
CUSTOM_BARS_WSP_OFFSET = 0 # The W offset of the Custom SP Bars

CUSTOM_BARS_XEXP_OFFSET = 0 #The X offset of the custom EXP bars
CUSTOM_BARS_YEXP_OFFSET = -10 #The Y offset of the Custom EXP Bars
CUSTOM_BARS_WEXP_OFFSET = 0 # The W offset of the Custom EXP Bars


#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 PLUGINS = []
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Do you have a scene or menu that you want to link to the option menu?
# A plug-in perhaps? To add an option on the option menu that
# will call your scene simply use this format.
=begin
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if $RyexCOLCMS
 desc = '<insert description of the plugin to be displayed in the help window here>'
 RyexCFG::PLUGINS.push(RyexCMS::Plugin.new('<name of plugin>', desc) do
   $Scene = <scene you want to call>.new
 end
 )  #don't forget this line
end
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=end
# its that simple
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 class PlugIn
   # read/write-able
   attr_accessor :name, :action, :description

   def initialize( name = '', desc = '')
     # @name is the name which will show up in the menu,
     # @reqs is the Proc that will be called to see if the option should
     # be activated (optional),
     # and @action is the proc that will be called when
     # the option is selected.
     @name, @action, @description = name, Proc.new, desc
   end

   def call
     @action.call
   end
 end

end

#==============================================================================
#  New methods added to Bitmap
#==============================================================================
class Bitmap
 def draw_bar_ryex(x, y, w, h, p, c)
   gray = Color.new(100, 100, 100)
   fill_rect(x, y, w, h, Color.new(0, 0, 0))
   for i in 0...(h / 2 - 1)
     gr = gray.red * i / (h / 2 - 1)
     gg = gray.green * i / (h / 2 - 1)
     gb = gray.blue * i / (h / 2 - 1)
     fill_rect(x + 1, y + i + 1, w - 2, 1, Color.new(gr, gg, gb))
   end
   fill_rect(x + 1, y + (h / 2), w - 2, 2, gray)
   for i in 0...(h / 2 - 1)
     gr = gray.red * i / (h / 2 - 1)
     gg = gray.green * i / (h / 2 - 1)
     gb = gray.blue * i / (h / 2 - 1)
     fill_rect(x + 1, y + h - i - 1, w - 2, 1, Color.new(gr, gg, gb))
   end
   for i in 0...(h / 2 - 1)
     r = c.red * i / (h / 2 - 1)
     g = c.green * i / (h / 2 - 1)
     b = c.blue * i / (h / 2 - 1)
     fill_rect(x + 1, y + i + 1, p * (w - 2), 1, Color.new(r, g, b))
   end
   fill_rect(x + 1, y + (h / 2), p * (w - 2), 2, c)
   for i in 0...(h / 2 - 1)
     r = c.red * i / (h / 2 - 1)
     g = c.green * i / (h / 2 - 1)
     b = c.blue * i / (h / 2 - 1)
     fill_rect(x + 1, y + h - i - 1, p * (w - 2), 1, Color.new(r, g, b))
   end
 end
end

#==============================================================================
#  New methods added to Window_Base
#==============================================================================
class Window_Base < Window
 #----------------------------------------------------------------------------
 # * Draws a gradiant bar fo the actor's HP
 #----------------------------------------------------------------------------
def draw_actor_hp_bar_ryex(x, y, m, actor)
   h = 12
   p = actor.hp.to_f / actor.maxhp
   c = Color.new(255, 0, 0)
   if RyexCFG::CUSTOM_BARS
     xo = RyexCFG::CUSTOM_BARS_XHP_OFFSET
     yo = RyexCFG::CUSTOM_BARS_YHP_OFFSET
     mo = RyexCFG::CUSTOM_BARS_WHP_OFFSET
     draw_actor_hp(actor, x+xo, y+yo, m+mo)
   else
     self.contents.draw_bar_ryex(x, y, m, h, p, c)
   end
 end
 #----------------------------------------------------------------------------
 # * Draws a gradiant bar fo the actor's SP
 #----------------------------------------------------------------------------
 def draw_actor_sp_bar_ryex(x, y, m, actor)
   h = 12
   p = actor.sp.to_f / actor.maxsp
   c = Color.new(0, 0, 255)
   if RyexCFG::CUSTOM_BARS
     xo = RyexCFG::CUSTOM_BARS_XSP_OFFSET
     yo = RyexCFG::CUSTOM_BARS_YSP_OFFSET
     mo = RyexCFG::CUSTOM_BARS_WSP_OFFSET
     draw_actor_sp(actor, x+xo, y+yo, m+mo)
   else
     self.contents.draw_bar_ryex(x, y, m, h, p, c)
   end
 end
 #----------------------------------------------------------------------------
 # * Draws a gradiant bar fo the actor's EXP
 #----------------------------------------------------------------------------
 def draw_actor_exp_bar_ryex(x, y, m, actor)
   h = 12
   p = (actor.next_exp != 0 ? actor.now_exp.to_f / actor.next_exp : 1)
   c = Color.new(255, 255, 0)
   if RyexCFG::CUSTOM_BARS
     xo = RyexCFG::CUSTOM_BARS_XEXP_OFFSET
     yo = RyexCFG::CUSTOM_BARS_YEXP_OFFSET
     mo = RyexCFG::CUSTOM_BARS_WEXP_OFFSET
     draw_actor_exp(actor, x+xo, y+yo, m+mo)
   else
     self.contents.draw_bar_ryex(x, y, m, h, p, c)
   end
 end

 #--------------------------------------------------------------------------
 # * Draw HP
 #     actor : actor
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #     width : draw spot width
 #--------------------------------------------------------------------------
 def draw_actor_hp_Ryex(actor, x, y, width = 144)
   if not RyexCFG::CUSTOM_BARS
     # Draw "HP" text string
     self.contents.font.color = system_color
     self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
     hp_x = x + width - 108
     # Draw HP
     self.contents.font.color = actor.hp == 0 ? knockout_color :
       actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
     self.contents.draw_text(hp_x + 60, y, 48, 32, actor.hp.to_s, 2)
   end
 end
 #--------------------------------------------------------------------------
 # * Draw SP
 #     actor : actor
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #     width : draw spot width
 #--------------------------------------------------------------------------
 def draw_actor_sp_Ryex(actor, x, y, width = 144)
   if not RyexCFG::CUSTOM_BARS  
     # Draw "SP" text string
     self.contents.font.color = system_color
     self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
     sp_x = x + width - 108
     # Draw SP
     self.contents.font.color = actor.sp == 0 ? knockout_color :
       actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
     self.contents.draw_text(sp_x + 60, y, 48, 32, actor.sp.to_s, 2)
   end
 end
 #--------------------------------------------------------------------------
 # * Get Up Text Color
 #--------------------------------------------------------------------------
 def up_color
   return Color.new(0, 255, 0 )
 end
 #--------------------------------------------------------------------------
 # * Get Down Text Color
 #--------------------------------------------------------------------------
 def down_color
   return Color.new(255, 0, 0)
 end

 alias draw_actor_parameter_col_cms_later draw_actor_parameter
 def draw_actor_parameter(actor, x, y, type)
   if type == 7
     self.contents.font.color = system_color
     self.contents.draw_text(x, y, 120, 32, 'Evasion')
     self.contents.font.color = normal_color
     self.contents.draw_text(x + 120, y, 36, 32, actor.eva.to_s, 2)
   else
     draw_actor_parameter_col_cms_later(actor, x, y, type)
   end
 end
end

that will remove the Bars from this CMS and will replace them with cogweel (ore your custom)
to put it on/off edit line 101: CUSTOM_BARS = true
the lines below can be used to put the bars to the right position (they are correct now for Cogweel)

Taiine

Thanks Jack! That works just fine :)
However one little thing, when you pull down the first menu that shows the partys health at the top, the text still over laps, and I noticed that the 4th party member, the exp text gets cut off. Like Ev   1   12/[rest is cut off]

While it's normally not hard for me to poke a script, find where the text size is controled or text is drawn and change the size/placement/yada myself. I can't seem to find it in this. Where I thought it was (around line 247 and down) nothing I do seems to effect anything, so I wonder if it's controled elsewhere that I am overlooking or if it's somewhere else and what I'm poking is to something else :P

Jackolas

October 20, 2009, 02:56:37 am #69 Last Edit: October 20, 2009, 02:57:42 am by Jackolas
when you turn this edit on it won't be using the health etc of the menu script
its only putting down the bars from cogweels script

so if you want to change size etc you need to do it in cogweels script.
anyway. if you gief me your modified cogweel script i can take a look at it.

Taiine

Nono I don't mean the bar size, I mean the text side to the CMS, when you first pull down the menu the text for HP/SP/EV along with their values are large and over lap the bars and the text for the 4th party member get cut off cause it's to fare to the right.

I want to know where you control the text size at in the CMS.

Jackolas

October 20, 2009, 03:49:41 am #71 Last Edit: October 20, 2009, 06:32:49 am by Jackolas
like i sayed... its no longer controled by the CMS. its just a link from cogweel.
if you can gief me the cogweel script i can see what i can do

Here is btw an edit with the font size. Same lines to be replace (38 till 267)
Spoiler: ShowHide
module RyexCFG
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# START Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 MENU_ICONS = []
 MENU_ICONS[1] = "Item" #Icon name for the Item option on the main menu
 MENU_ICONS[2] = "Skill" #Icon name for the Skill option on the main menu
 MENU_ICONS[3] = "Equip"#Icon name for the Equip option on the main menu
 MENU_ICONS[4] = "050-Skill07" #Icon name for the Status option on the main menu
 MENU_ICONS[5] = "Save" #Icon name for the Save option on the main menu
 MENU_ICONS[6] = "Option"
 MENU_ICONS[7] = "Door" #Icon name for the Exit option on the main menu
 DEFALT_BGM_VOULME = 100 #The defalt voulume for back ground music
 DEFALT_SFX_VOULME = 100 #The defalt voulume for sound effects
#--------------------------------
# * Custom scenes
#  If for some reason you want to use an item, equip, skill, status, save,
#  exit, or option screen fallow the instrutions below.
#--------------------------------
CUSTOM_ITEM_SCENE = nil
=begin # if you want to use deleat this line
 CUSTOM_ITEM_SCENE = Proc.new do
   $scene = <insert scene class name here>.new # complete this line
 end
=end # and deleate this line
CUSTOM_SKILL_SCENE = nil
=begin # if you want to use deleat this line
 CUSTOM_SKILL_SCENE = Proc.new do
   $scene = <insert scene class name here>.new # complete this line
 end
=end # and deleate this line
CUSTOM_EQUIP_SCENE = nil
=begin # if you want to use deleat this line
 CUSTOM_EQUIP_SCENE = Proc.new do
   $scene = <insert scene class name here>.new # complete this line
 end
=end # and deleate this line
CUSTOM_STATUS_SCENE = nil
=begin # if you want to use deleat this line
 CUSTOM_STATUS_SCENE = Proc.new do
   $scene = <insert scene class name here>.new # complete this line
 end
=end # and deleate this line
CUSTOM_SAVE_SCENE = nil
=begin # if you want to use deleat this line
 CUSTOM_SAVE_SCENE = Proc.new do
   $scene = <insert scene class name here>.new # complete this line
 end
=end # and deleate this line
CUSTOM_OPTION_SCENE = nil
=begin # if you want to use deleat this line
 CUSTOM_OPTION_SCENE = Proc.new do
   $scene = <insert scene class name here>.new # complete this line
 end
=end # and deleate this line
CUSTOM_EXIT_SCENE = nil
=begin # if you want to use deleat this line
 CUSTOM_EXIT_SCENE = Proc.new do
   $scene = <insert scene class name here>.new # complete this line
 end
=end # and deleate this line

#CUSTOM BAR EDIT
CUSTOM_BARS = true #set to true if you want to use custom bars
CUSTOM_BARS_XHP_OFFSET = 0 #The X offset of the custom HP bars
CUSTOM_BARS_YHP_OFFSET = -10 #The Y offset of the Custom HP bars
CUSTOM_BARS_WHP_OFFSET = 0 # The W offset of the Custom HP bars
CUSTOM_BARS_HP_fontsize = 24 #Change the font size of the HP text

CUSTOM_BARS_XSP_OFFSET = 0 #The X offset of the custom SP bars
CUSTOM_BARS_YSP_OFFSET = -10 #The Y offset of the Custom SP Bars
CUSTOM_BARS_WSP_OFFSET = 0 # The W offset of the Custom SP Bars
CUSTOM_BARS_SP_fontsize = 24 #Change the font size of the SP text

CUSTOM_BARS_XEXP_OFFSET = 0 #The X offset of the custom EXP bars
CUSTOM_BARS_YEXP_OFFSET = -10 #The Y offset of the Custom EXP Bars
CUSTOM_BARS_WEXP_OFFSET = 0 # The W offset of the Custom EXP Bars
CUSTOM_BARS_EXP_fontsize = 24 #Change the font size of the EXP text


#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
# END Configuration
#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 PLUGINS = []
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Do you have a scene or menu that you want to link to the option menu?
# A plug-in perhaps? To add an option on the option menu that
# will call your scene simply use this format.
=begin
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if $RyexCOLCMS
 desc = '<insert description of the plugin to be displayed in the help window here>'
 RyexCFG::PLUGINS.push(RyexCMS::Plugin.new('<name of plugin>', desc) do
   $Scene = <scene you want to call>.new
 end
 )  #don't forget this line
end
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=end
# its that simple
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 class PlugIn
   # read/write-able
   attr_accessor :name, :action, :description

   def initialize( name = '', desc = '')
     # @name is the name which will show up in the menu,
     # @reqs is the Proc that will be called to see if the option should
     # be activated (optional),
     # and @action is the proc that will be called when
     # the option is selected.
     @name, @action, @description = name, Proc.new, desc
   end

   def call
     @action.call
   end
 end

end

#==============================================================================
#  New methods added to Bitmap
#==============================================================================
class Bitmap
 def draw_bar_ryex(x, y, w, h, p, c)
   gray = Color.new(100, 100, 100)
   fill_rect(x, y, w, h, Color.new(0, 0, 0))
   for i in 0...(h / 2 - 1)
     gr = gray.red * i / (h / 2 - 1)
     gg = gray.green * i / (h / 2 - 1)
     gb = gray.blue * i / (h / 2 - 1)
     fill_rect(x + 1, y + i + 1, w - 2, 1, Color.new(gr, gg, gb))
   end
   fill_rect(x + 1, y + (h / 2), w - 2, 2, gray)
   for i in 0...(h / 2 - 1)
     gr = gray.red * i / (h / 2 - 1)
     gg = gray.green * i / (h / 2 - 1)
     gb = gray.blue * i / (h / 2 - 1)
     fill_rect(x + 1, y + h - i - 1, w - 2, 1, Color.new(gr, gg, gb))
   end
   for i in 0...(h / 2 - 1)
     r = c.red * i / (h / 2 - 1)
     g = c.green * i / (h / 2 - 1)
     b = c.blue * i / (h / 2 - 1)
     fill_rect(x + 1, y + i + 1, p * (w - 2), 1, Color.new(r, g, b))
   end
   fill_rect(x + 1, y + (h / 2), p * (w - 2), 2, c)
   for i in 0...(h / 2 - 1)
     r = c.red * i / (h / 2 - 1)
     g = c.green * i / (h / 2 - 1)
     b = c.blue * i / (h / 2 - 1)
     fill_rect(x + 1, y + h - i - 1, p * (w - 2), 1, Color.new(r, g, b))
   end
 end
end

#==============================================================================
#  New methods added to Window_Base
#==============================================================================
class Window_Base < Window
 #----------------------------------------------------------------------------
 # * Draws a gradiant bar fo the actor's HP
 #----------------------------------------------------------------------------
def draw_actor_hp_bar_ryex(x, y, m, actor)
   h = 12
   p = actor.hp.to_f / actor.maxhp
   c = Color.new(255, 0, 0)
   if RyexCFG::CUSTOM_BARS
     self.contents.font.size = RyexCFG::CUSTOM_BARS_HP_fontsize
     xo = RyexCFG::CUSTOM_BARS_XHP_OFFSET
     yo = RyexCFG::CUSTOM_BARS_YHP_OFFSET
     mo = RyexCFG::CUSTOM_BARS_WHP_OFFSET
     draw_actor_hp(actor, x+xo, y+yo, m+mo)
   else
     self.contents.draw_bar_ryex(x, y, m, h, p, c)
   end
 end
 #----------------------------------------------------------------------------
 # * Draws a gradiant bar fo the actor's SP
 #----------------------------------------------------------------------------
 def draw_actor_sp_bar_ryex(x, y, m, actor)
   h = 12
   p = actor.sp.to_f / actor.maxsp
   c = Color.new(0, 0, 255)
   if RyexCFG::CUSTOM_BARS
     self.contents.font.size = RyexCFG::CUSTOM_BARS_SP_fontsize
     xo = RyexCFG::CUSTOM_BARS_XSP_OFFSET
     yo = RyexCFG::CUSTOM_BARS_YSP_OFFSET
     mo = RyexCFG::CUSTOM_BARS_WSP_OFFSET
     draw_actor_sp(actor, x+xo, y+yo, m+mo)
   else
     self.contents.draw_bar_ryex(x, y, m, h, p, c)
   end
 end
 #----------------------------------------------------------------------------
 # * Draws a gradiant bar fo the actor's EXP
 #----------------------------------------------------------------------------
 def draw_actor_exp_bar_ryex(x, y, m, actor)
   h = 12
   p = (actor.next_exp != 0 ? actor.now_exp.to_f / actor.next_exp : 1)
   c = Color.new(255, 255, 0)
   if RyexCFG::CUSTOM_BARS
     self.contents.font.size = RyexCFG::CUSTOM_BARS_EXP_fontsize
     xo = RyexCFG::CUSTOM_BARS_XEXP_OFFSET
     yo = RyexCFG::CUSTOM_BARS_YEXP_OFFSET
     mo = RyexCFG::CUSTOM_BARS_WEXP_OFFSET
     draw_actor_exp(actor, x+xo, y+yo, m+mo)
   else
     self.contents.draw_bar_ryex(x, y, m, h, p, c)
   end
 end

 #--------------------------------------------------------------------------
 # * Draw HP
 #     actor : actor
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #     width : draw spot width
 #--------------------------------------------------------------------------
 def draw_actor_hp_Ryex(actor, x, y, width = 144)
   if not RyexCFG::CUSTOM_BARS
     # Draw "HP" text string
     self.contents.font.color = system_color
     self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
     hp_x = x + width - 108
     # Draw HP
     self.contents.font.color = actor.hp == 0 ? knockout_color :
       actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
     self.contents.draw_text(hp_x + 60, y, 48, 32, actor.hp.to_s, 2)
   end
 end
 #--------------------------------------------------------------------------
 # * Draw SP
 #     actor : actor
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #     width : draw spot width
 #--------------------------------------------------------------------------
 def draw_actor_sp_Ryex(actor, x, y, width = 144)
   if not RyexCFG::CUSTOM_BARS  
     # Draw "SP" text string
     self.contents.font.color = system_color
     self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
     sp_x = x + width - 108
     # Draw SP
     self.contents.font.color = actor.sp == 0 ? knockout_color :
       actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
     self.contents.draw_text(sp_x + 60, y, 48, 32, actor.sp.to_s, 2)
   end
 end
 #--------------------------------------------------------------------------
 # * Get Up Text Color
 #--------------------------------------------------------------------------
 def up_color
   return Color.new(0, 255, 0 )
 end
 #--------------------------------------------------------------------------
 # * Get Down Text Color
 #--------------------------------------------------------------------------
 def down_color
   return Color.new(255, 0, 0)
 end

 alias draw_actor_parameter_col_cms_later draw_actor_parameter
 def draw_actor_parameter(actor, x, y, type)
   if type == 7
     self.contents.font.color = system_color
     self.contents.draw_text(x, y, 120, 32, 'Evasion')
     self.contents.font.color = normal_color
     self.contents.draw_text(x + 120, y, 36, 32, actor.eva.to_s, 2)
   else
     draw_actor_parameter_col_cms_later(actor, x, y, type)
   end
 end
end


also found some solutions to move the text etc. but before i do make an edit i want to know something.
in the menu. you want to have the exp numbers seen on top of the exp bar or don't
the reason why the exp text is not fitting atm is because in the default Ryex's Collapsing CMS the EXP is never drawn. (4th pic in the first post, no exp text)
there is simple no space to put big exp numbers.

Taiine

Here is the cogweel script, only thing I changed would be how tall the HP/SP/EXP bars are and lower them so they are directly below the text.
But yeah I don't want the exp/hp/sp text or such over any of the bars. It just makes it to hard to see at times where the bar is when text is blocking it. Thats why I edited the below script to move the bars below the text.


Spoiler: ShowHide
#==============================================================================
# ** COGWHEEL Plug 'n' Play Menu Bars (based on Syvkal's revisions)
#-------------------------------------------------------------------------------
# by DerVVulfman
# Version 1.1
# 06-28-06
#------------------------------------------------------------------------------
# This is a revision of Cogwheel's famous bargraph system, now set as an inser-
# table script to display bargraphs behind values in the menus.
#
# To prevent conflict with Cogwheel's RTAB system, two key definitions have been
# renamed: "gauge_rect" to "cw_gauge" & "gradation_rect" to "cw_grad_rect."
#
#
# Affected Systems:  Main Menu
#                    Skill Menu
#                    Status Menu
#                    Hero Select Menu (for Items & Skills)
#                    Equipment Menu
#                    BattleStatus Menu
#                   
# The system uses a series of CONSTANTS that can be edited here.  They control
# the basic gauge colors and the manner the gauge is filled:

# Gauge Border Colors
   COG_COLOR1 = Color.new(0, 0, 0, 192)         # Outer Border
   COG_COLOR2 = Color.new(255, 255, 192, 192)   # Inner Border
# Gauge Empty filler
   COG_COLOR3 = Color.new(0, 0, 0, 192)         # Half of Inner Shading
   COG_COLOR4 = Color.new(64, 0, 0, 192)        # Half of Inner Shading
# Alignment
   COG_ALIGN1 = 1    # Type 1: (0: Left / 1: Center / 2: Right Justify)
   COG_ALIGN2 = 0    # Type 2: (0: Upper / 1: Central / 2: Lower)
   COG_ALIGN3 = 0    # FILL ALIGNMENT (0: Left Justify / 1: Right Justify)
# Gauge Settings
   COG_GRADE1 = 1    # EMPTY  gauge (0: Side / 1: Vertical / 2: Slanted)
   COG_GRADE2 = 0    # FILLER gauge (0: Side / 1: Vertical / 2: Slanted)


#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles the actor. It's used within the Game_Actors class
#  ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================

class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# * Get EXP - numeric for calculations
#-------------------------------------------------------------------------- 
def now_exp
  return @exp - @exp_list[@level]
end
#--------------------------------------------------------------------------
# * Get Next Level EXP - numeric for calculations
#--------------------------------------------------------------------------
def next_exp
  return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
end
#--------------------------------------------------------------------------
# * End of Class
#--------------------------------------------------------------------------
end


#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This class is for all in-game windows.
#==============================================================================

class Window_Base < Window


#--------------------------------------------------------------------------
# * Draw EXP w/ Bars
#     actor : actor
#     x     : draw spot x-coordinate
#     y     : draw spot y-coordinate
#--------------------------------------------------------------------------
alias draw_actor_exp_original draw_actor_exp
def draw_actor_exp(actor, x, y, width = 150)
   if actor.next_exp != 0
     rate = actor.now_exp.to_f / actor.next_exp
   else
     rate = 1
   end
   # Calculate Bar Gradiation
   if actor.next_exp != 0
     rate = actor.now_exp.to_f / actor.next_exp
   else
     rate = 1
   end
   # Adjust Bar Color based on Gradiation
   color1 = Color.new(80 * rate, 80 - 80 * rate ** 2, 80 - 80 * rate, 192)
   color2 = Color.new(240 * rate, 240 - 240 * rate ** 2, 240 - 240 * rate, 192)
   # Calculate Bar Width
   if actor.next_exp != 0
     exp = width * actor.now_exp / actor.next_exp
   else
     exp = width
   end
   # Draw Bar Graph
   cw_gauge(x, y + 25, width, 7, exp, color1, color2)
   # Call original EXP               
   draw_actor_exp_original(actor, x, y)
end 

#--------------------------------------------------------------------------
# * Draw HP w/ Bars
#     actor : actor
#     x     : draw spot x-coordinate
#     y     : draw spot y-coordinate
#     width : draw spot width
#--------------------------------------------------------------------------
alias draw_actor_hp_original draw_actor_hp
def draw_actor_hp(actor, x, y, width = 144)
   # Calculate Bar Gradiation
   if actor.maxhp != 0
     rate = actor.hp.to_f / actor.maxhp
   else
     rate = 0
   end
   # Adjust Bar Color based on Gradiation
   color1 = Color.new(80 - 24 * rate, 80 * rate, 14 * rate, 192)
   color2 = Color.new(240 - 72 * rate, 240 * rate, 62 * rate, 192)
   # Calculate Bar Width
   if actor.maxhp != 0
     hp = width * actor.hp / actor.maxhp
   else
     hp = 0
   end
   # Draw Bar Graph
   cw_gauge(x, y + 25, width, 7, hp, color1, color2)
   # Call original HP
   draw_actor_hp_original(actor, x, y, width)
end

#--------------------------------------------------------------------------
# * Draw SP w/ Bars
#     actor : actor
#     x     : draw spot x-coordinate
#     y     : draw spot y-coordinate
#     width : draw spot width
#--------------------------------------------------------------------------
alias draw_actor_sp_original draw_actor_sp
def draw_actor_sp(actor, x, y, width = 144)
   # Calculate Bar Gradiation
   if actor.maxsp != 0
     rate = actor.sp.to_f / actor.maxsp
   else
     rate = 1
   end 
   # Adjust Bar Color based on Gradiation
   color1 = Color.new(14 * rate, 80 - 24 * rate, 80 * rate, 192)
   color2 = Color.new(62 * rate, 240 - 72 * rate, 240 * rate, 192)
   # Calculate Bar Width
   if actor.maxsp != 0
     sp = width * actor.sp / actor.maxsp
   else
     sp = width 
   end
   # Draw Bar Graph
   cw_gauge(x + width * 0 / 100, y + 25, width, 7, sp, color1, color2)
   # Call original SP               
   draw_actor_sp_original(actor, x, y, width)
end

#--------------------------------------------------------------------------
# * Draw Parameter w/ Bars
#     actor : actor
#     x     : draw spot x-coordinate
#     y     : draw spot y-coordinate
#     type  : parameter type (0-6)
#--------------------------------------------------------------------------
alias draw_actor_parameter_original draw_actor_parameter
def draw_actor_parameter(actor, x, y, type)
   # Choose Color & Parameter Type
   case type
   when 0
     e1 = actor.atk
     c6 = Color.new(253, 53, 56, 192)
     c5 = Color.new(242, 2, 6, 192)
   when 1
     e1 = actor.pdef
     c6 = Color.new(238, 254, 124, 192)
     c5 = Color.new(228, 253, 48, 192)
   when 2
     e1 = actor.mdef
     c6 = Color.new(150, 37, 184, 192)
     c5 = Color.new(170, 57, 204, 192)
   when 3
     e1 = actor.str
     c6 = Color.new(253, 163, 33, 192)
     c5 = Color.new(254, 209, 154, 192)
   when 4
     e1 = actor.dex
     c6 = Color.new(255, 255, 255, 192)
     c5 = Color.new(222, 222, 222, 192)
   when 5
     e1 = actor.agi
     c6 = Color.new(124, 254, 155, 192)
     c5 = Color.new(33, 253, 86, 192)
   when 6
     e1 = actor.int
     c6 = Color.new(119, 203, 254, 192)
     c5 = Color.new(8, 160, 253, 192)
   end
   # Calculate Bar Gradiation
   e2 = 999
   if e1.to_f != 0
     rate = e1.to_f / e2.to_f
   else
     rate = 1
   end
   # Adjust Bar Color based on Gradiation & Parameter Type
   for i in 0..7
     r = c6.red * rate
     g = (c6.green - 10) * rate
     b = c6.blue  * rate
     a = c6.alpha
   end
   # Calculate Bar Width
   width = 168
   if e1.to_f != 0
     par = width * e1.to_f / e2.to_f
   else
     par = width
   end
   # Equipment Calc Fix   
   case type
   when 0
     if e1 == 0
       par = 0
     end
   when 1
     if e1 == 0
       par = 0
     end
   when 2
     if e1 == 0
       par = 0
     end
   end
   # Draw Bar Graph
   cw_gauge(x , y + 25, width, 7, par, c5, Color.new(r, g, b, a))
   # Call Original Parameter           
   draw_actor_parameter_original(actor, x, y, type)
end

#--------------------------------------------------------------------------
# * Gauge Rectangle (New to Class)
#--------------------------------------------------------------------------
def cw_gauge(x, y, width, height, gauge, color1, color2)

   # Use Cogwheel PRESETS
   color3 = COG_COLOR1
   color4 = COG_COLOR2
   color5 = COG_COLOR3
   color6 = COG_COLOR4
   align1 = COG_ALIGN1
   align2 = COG_ALIGN2
   align3 = COG_ALIGN3
   grade1 = COG_GRADE1
   grade2 = COG_GRADE2
   
   # Create Rectangle Width based on gauge max.
   rect_width = width
   
   case align1
   when 1
     x += (rect_width - width) / 2
   when 2
     x += rect_width - width
   end
   case align2
   when 1
     y -= height / 2
   when 2
     y -= height
   end
   self.contents.fill_rect(x, y, width, height, color3)
   self.contents.fill_rect(x + 1, y + 1, width - 2, height - 2, color4)
   if align3 == 0
     if grade1 == 2
       grade1 = 3
     end
     if grade2 == 2
       grade2 = 3
     end
   end
   if (align3 == 1 and grade1 == 0) or grade1 > 0
     color = color5
     color5 = color6
     color6 = color
   end
   if (align3 == 1 and grade2 == 0) or grade2 > 0
     color = color1
     color1 = color2
     color2 = color
   end
   self.contents.cw_grad_rect(x + 2, y + 2, width - 4, height - 4, color5, color6, grade1)
   if align3 == 1
     x += width - gauge
   end
   self.contents.cw_grad_rect(x + 2, y + 2, gauge - 4, height - 4, color1, color2, grade2)
end

#--------------------------------------------------------------------------
# * End of Class
#--------------------------------------------------------------------------
end


#==============================================================================
# ** Bitmap
#==============================================================================
class Bitmap

#--------------------------------------------------------------------------
# * Gradation Rectangle
#--------------------------------------------------------------------------
def cw_grad_rect(x, y, width, height, color3, color4, align = 0)
  if align == 0
    for i in x...x + width
      red   = color3.red + (color4.red - color3.red) * (i - x) / (width - 1)
      green = color3.green +
              (color4.green - color3.green) * (i - x) / (width - 1)
      blue  = color3.blue +
              (color4.blue - color3.blue) * (i - x) / (width - 1)
      alpha = color3.alpha +
              (color4.alpha - color3.alpha) * (i - x) / (width - 1)
      color = Color.new(red, green, blue, alpha)
      fill_rect(i, y, 1, height, color)
    end
  elsif align == 1
    for i in y...y + height
      red   = color3.red +
              (color4.red - color3.red) * (i - y) / (height - 1)
      green = color3.green +
              (color4.green - color3.green) * (i - y) / (height - 1)
      blue  = color3.blue +
              (color4.blue - color3.blue) * (i - y) / (height - 1)
      alpha = color3.alpha +
              (color4.alpha - color3.alpha) * (i - y) / (height - 1)
      color = Color.new(red, green, blue, alpha)
      fill_rect(x, i, width, 1, color)
    end
  elsif align == 2
    for i in x...x + width
      for j in y...y + height
        red   = color3.red + (color4.red - color3.red) *
                ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
        green = color3.green + (color4.green - color3.green) *
                ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
        blue  = color3.blue + (color4.blue - color3.blue) *
                ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
        alpha = color3.alpha + (color4.alpha - color3.alpha) *
                ((i - x) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
        color = Color.new(red, green, blue, alpha)
        set_pixel(i, j, color)
      end
    end
  elsif align == 3
    for i in x...x + width
      for j in y...y + height
        red   = color3.red + (color4.red - color3.red) *
              ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
        green = color3.green + (color4.green - color3.green) *
              ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
        blue  = color3.blue + (color4.blue - color3.blue) *
              ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
        alpha = color3.alpha + (color4.alpha - color3.alpha) *
              ((x + width - i) / (width - 1.0) + (j - y) / (height - 1.0)) / 2
        color = Color.new(red, green, blue, alpha)
        set_pixel(i, j, color)
      end
    end
  end
end

#--------------------------------------------------------------------------
# * End of Class
#--------------------------------------------------------------------------
end

Djeff

October 24, 2009, 04:19:04 am #73 Last Edit: October 24, 2009, 05:24:25 am by Blizzard
hi ryex
its Djeff from rmrk with my question.
im a total noob at scripting so i only know what youtube learns me.

i want to add 2 more new menu tabs in the right bellow.
Iwant to add an icon that opens Zeriab's questbook : $scene = Scene_Questbook.new($scene)
and a load screen : $scene = Scene_Load2.new

i think a must add these near the plugin part ?

how do i do that ?

what must i fill in exeactly here :

#::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
 PLUGINS = []
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Do you have a scene or menu that you want to link to the option menu?
# A plug-in perhaps? To add an option on the option menu that
# will call your scene simply use this format.
=begin
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if $RyexCOLCMS
 desc = '<insert description of the plugin to be displayed in the help window here>'
 RyexCFG::PLUGINS.push(RyexCMS::Plugin.new('<name of plugin>', desc) do
   $Scene = <scene you want to call>.new
 end
 )  #don't forget this line
end
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=end
# its that simple
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 class PlugIn
   # read/write-able
   attr_accessor :name, :action, :description

   def initialize( name = '', desc = '')
     # @name is the name which will show up in the menu,
     # @reqs is the Proc that will be called to see if the option should
     # be activated (optional),
     # and @action is the proc that will be called when
     # the option is selected.
     @name, @action, @description = name, Proc.new, desc
   end

   def call
     @action.call
   end
 end
 
end


Please help me
     already thanks ! DJeff

Please use code tags for code. ~Blizz

Ryex



if $RyexCOLCMS

  desc = '<insert Quest book description of be displayed in the help window here>'
  RyexCFG::PLUGINS.push(RyexCMS::Plugin.new('<name of quest book plugin>', desc) do
    $Scene = Scene_Questbook.new($Scene)
  end
  )  #don't forget this line

  desc = '<insert load scene description of the plugin to be displayed in the help window here>'
  RyexCFG::PLUGINS.push(RyexCMS::Plugin.new('<name of load plugin>', desc) do
    $scene = Scene_Load2.new
  end
  )  #don't forget this line

end



add that in a new script above main and it should work if you still get problems tell me.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Djeff

what excectly do i have to type near :
 
RyexCFG::PLUGINS.push(RyexCMS::Plugin.new('< HERE ? >', desc) do


and dont i need to add a icon somewhere ?
so you have a icon like a Q from quest in the right bottom

Ryex

October 25, 2009, 09:40:32 am #76 Last Edit: October 25, 2009, 09:45:16 am by Ryexander
the name of the plugin is the name that appears in the menu ie if you put Quest there you would have a quest button. and there are no icons in the options menu
ie.

desc = '<insert Quest book description of be displayed in the help window here>'
RyexCFG::PLUGINS.push(RyexCMS::Plugin.new('Quest', desc) do
 #Scene = Scene_Questbook.new($Scene)
end
)
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Djeff

options menu ?
i need 2 more icons in the general menu.
near the item,equip,save,skills,and end game icons.
i want to add 2 more icons which will open 2 new windows.
The questbook window and a load window.

Ryex

oh well the plugin system only adds options the the options menu if you want to add an option the the main menu you have to do some thing else.

first tell me this do you want the scene to pop up immediately after pressing the button? or do you want the menu to animate out first? the edits are different and the animation is a bit more complex.
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.<br /><br />DropBox, the best free file syncing service there is.<br />

Djeff

Wont need to be animated.
Just a new screen poping up