Chaos Project

RPG Maker => RPG Maker Scripts => RMXP Script Database => Topic started by: LiTTleDRAgo on November 28, 2010, 03:23:31 am

Title: [XP] Blizz ABS Custom PreMenu
Post by: LiTTleDRAgo on November 28, 2010, 03:23:31 am
Blizz ABS Custom PreMenu
Authors: LiTTleDRAgo
Version: 1.02
Type: Blizz ABS Menu
Key Term: Blizz-ABS Plugin



Introduction

This script modified the original Blizz ABS menu screen


Features




Screenshots

Spoiler: ShowHide
(http://img600.imageshack.us/img600/2334/xrhze0vql17bdqil5kwa.jpg)



Script

Spoiler: ShowHide
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=
# Custom Blizz ABS PreMenu
# Version: 1.02
# Author : LiTTleDRAgo
#:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=:=

module LiTTleDRAgo

 PAUSEMENU       = false # If you want the game to pause when in the menu.
 DISABLE_PREMENU = false # If you want to dispose the Blizz ABS Premenu
 
 TEXT1, TEXT2, TEXT3 = 'Location', 'Steps', 'Money'
 CommandsPreMenu  = ['Menu', 'Hotkeys', 'AI Behavior', 'AI Triggers', 'Cancel']
 FontFacePreMenu = 'Calibri'
 FontSizePreMenu  =  19
end

module SetFont
 def initialize
   super(0, 0, 450, 96)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.contents.font.name = LiTTleDRAgo::FontFacePreMenu
   self.contents.font.size = LiTTleDRAgo::FontSizePreMenu
   refresh
 end
 def update
   super
   refresh if Graphics.frame_count / Graphics.frame_rate != @total_sec
 end
end

class Game_Map
 def name
   load_data('Data/MapInfos.rxdata')[@map_id].name
 end  
end

if !LiTTleDRAgo::DISABLE_PREMENU
class Window_Location < Window_Base
 include SetFont
 def refresh
   self.contents.clear
   self.contents.font.color = system_color
   self.contents.draw_text(4, 0, 120, 32, LiTTleDRAgo::TEXT1)
   self.contents.font.color = normal_color
   self.contents.draw_text(4, 32, 120, 32, $game_map.name.to_s, 2)
 end
end

class Window_Steps < Window_Base
 alias pre_menu_refresh refresh
 def refresh
   original = pre_menu_refresh
   self.contents.clear
   self.contents.font.color = system_color
   self.contents.draw_text(4, 0, 120, 32, LiTTleDRAgo::TEXT2)
   self.contents.font.color = normal_color
   self.contents.draw_text(4, 32, 120, 32, $game_party.steps.to_s, 2)
 end
end

if $BlizzABS && BlizzABS::VERSION <= 2.84
 class Map_Battler < Game_Character
   def increase_steps
     if @battler.is_a?(Game_Actor) && @battler.id == $game_party.actors[0].id
       $game_party.steps = [$game_party.steps + 1, 9999999999999999].min
     end
   end
 end
end

class Window_NewGold < Window_Base
 include SetFont
 def refresh
   self.contents.clear
   self.contents.font.color = system_color
   self.contents.draw_text(4, 0, 120, 32, LiTTleDRAgo::TEXT3)
   self.contents.font.color = normal_color
   self.contents.draw_text(4, 32, 120, 32, $game_party.gold.to_s+" "+$data_system.words.gold, 2)
 end
end

class Window_Clock < Window_Base
 if $ccts != nil
   include SetFont
   def refresh
     self.contents.clear
     self.contents.font.color = system_color
     x = $game_system.time.month - 1
     min, hour = $game_system.time.minute, $game_system.time.hour
     day, day_name = $game_system.time.day.to_s, $game_system.time.day_name
     month = $ccts < 1.2 ? CCTS::Months[x] : CCTS::MONTHS[x]
     year = $game_system.time.year.to_s
     date = "#{day} #{month}, #{year}"  
     self.contents.draw_text(0, 0, 200, 32, day_name+", "+date,2)
     self.contents.draw_text(0, 32, 200, 32, sprintf('%2d:%02d', hour, min),2)
     self.contents.font.color = normal_color
   end
 end
end
end

class Scene_Menu
 alias drago_blizzabs_later main_blizzabs_later
 def main
   if @index_flag == nil && !LiTTleDRAgo::DISABLE_PREMENU
     $game_temp.in_battle = true
     @hud     = Hud.new  if BlizzABS::Config::HUD_ENABLED && $game_system.hud
     @hotkeys = Hotkey_Assignment.new if
       BlizzABS::Config::HOTKEYS && $game_system.hotkeys
     @window  = Window_Command.new(192, LiTTleDRAgo::CommandsPreMenu)
     if $game_party.actors.size == 0
       @window.disable_item(1)
       @window.disable_item(2)
       @window.disable_item(3)
     end
     @window.x, @window.y = 320 - @window.width/2, 240 - @window.height/2
     @window.z = 21000
     #-------------------------------------------------------------------------
     @steps_w, @gold_w        = Window_Steps.new, Window_NewGold.new
     @location_w, @playtime_w = Window_Location.new, Window_PlayTime.new
     @clock                   = Window_Clock.new   if $ccts != nil
     #-------------------------------------------------------------------------
     @steps_w.x   , @steps_w.y          = 0  , 394
     @gold_w.x    , @gold_w.y           = 0  , 345
     @location_w.x, @location_w.y       = 480, 394
     @playtime_w.x, @playtime_w.y       = 480, $ccts != nil ?  49 : 0
     @clock.x, @clock.y, @clock.opacity = 400, 0,0 if $ccts != nil
     #-------------------------------------------------------------------------
     @gold_w.opacity, @window.back_opacity, @steps_w.opacity,
     @location_w.opacity, @playtime_w.opacity = 0,0,0,0,0      
     #-------------------------------------------------------------------------
     @spriteset, @view = Spriteset_Map.new, Viewport.new(0, 0, 640, 480)
     x = BlizzABS::Config::MENU_COLOR_TINT
     tint = x > 0 ? BlizzABS::Config::MENU_COLOR_TINT : rand(8) + 1
     case tint
     when 1 then @view.tone = Tone.new(-40, -40, -40, 255)
     when 2 then @view.tone = Tone.new(-255, -255, 0, 255)
     when 3 then @view.tone = Tone.new(-255, 0, -255, 255)
     when 4 then @view.tone = Tone.new(0, -255, -255, 255)
     when 5 then @view.tone = Tone.new(0, 0, -255, 255)
     when 6 then @view.tone = Tone.new(0, -255, 0, 255)
     when 7 then @view.tone = Tone.new(-255, 0, 0, 255)
     when 8 then @view.tone = Tone.new(-60, -60, -60, 0)
     end
     Graphics.transition
     loop do
       [Graphics, Input].each {|s| s.update if s != nil}
       break if update_before_main
     end
     Graphics.freeze
     [@hud, @hotkeys, @spriteset, @window, @playtime_w, @steps_w, @gold_w,
     @location_w, @clock].each {|s| s.dispose if s != nil}
     @view.dispose if $scene.is_a?(Scene_Menu) || $scene.is_a?(Scene_Map)
     @window = @spriteset = @view = nil
   end
   drago_blizzabs_later if $scene.is_a?(Scene_Menu)
 end
 #----------------------------------------------------------------------------
 #  Processes the pre-menu.
 #----------------------------------------------------------------------------
 alias drago_update_before update_before_main
 def update_before_main
   return drago_update_before if LiTTleDRAgo::DISABLE_PREMENU
   [@spriteset, $game_map, $game_system.map_interpreter, $game_system,
   $game_screen].each {|s| s.update if s != nil} if !LiTTleDRAgo::PAUSEMENU
   $BlizzABS.AI.update
   [@playtime_w, @steps_w, @gold_w, @location_w,
   @clock].each {|s| s.update if s != nil}
   drago_update_before
 end
end



Instructions

Put Below Blizz ABS


Compatibility

Require Blizz ABS


Credits and Thanks




Author's Notes

This is my first time scripting, it's only modified from Blizz ABS version though
Title: Re: [XP] Custom Blizz ABS Menu
Post by: Shining Riku on November 30, 2010, 04:40:05 pm
There aren't any screenshots included. I don't know if they were left out or forgotten, but screenshots are a great help for people looking around.
Title: Re: [XP] Custom Blizz ABS Menu
Post by: Ryex on November 30, 2010, 04:48:25 pm
the image is there but it seem to be hot link protected. try using imageshack or photobucket
Title: Re: [XP] Custom Blizz ABS Menu
Post by: LiTTleDRAgo on December 01, 2010, 01:37:15 am
Quote from: Ryexander on November 30, 2010, 04:48:25 pm
the image is there but it seem to be hot link protected. try using imageshack or photobucket


fixed
Title: Re: [XP] Custom Blizz ABS Menu
Post by: [Luke] on December 02, 2010, 10:02:33 am
That's really awesome, but the Blizz-ABS Menu (no allies -> no AI) is useless in RMX-OS and there a non-pausing menu is really neccessary. Could you help me developing an on-map version of Ryex's Collapsing Menu (http://"http://forum.chaos-project.com/index.php?topic=1133.0")? I've tried already inserting somewhere this part of the code
[@spriteset, $game_map, $game_system.map_interpreter, $game_system, 
$game_screen].each {|s| s.update if s != nil}
$BlizzABS.AI.update

but it didn't work in the places I had put it into.
Any ideas?
Title: Re: [XP] Custom Blizz ABS Menu
Post by: Ryex on December 02, 2010, 02:06:49 pm
Quote from: [Luke] on December 02, 2010, 10:02:33 am
That's really awesome, but the Blizz-ABS Menu (no allies -> no AI) is useless in RMX-OS and there a non-pausing menu is really neccessary. Could you help me developing an on-map version of Ryex's Collapsing Menu (http://"http://forum.chaos-project.com/index.php?topic=1133.0")? I've tried already inserting somewhere this part of the code
[@spriteset, $game_map, $game_system.map_interpreter, $game_system, 
$game_screen].each {|s| s.update if s != nil}
$BlizzABS.AI.update

but it didn't work in the places I had put it into.
Any ideas?


making such a menu is done much easier if you simply build the menu on the map and not in a new scene, using the moue window API can help with this.
Title: Re: [XP] Custom Blizz ABS Menu
Post by: [Luke] on December 03, 2010, 06:49:20 am
Since the Blizz-ABS part of the Mouse Controller doesn't seem to be updated soon, I'd rather stay with the arcade keyboard-only controls. But if you say so... I'll try to rewrite your CMS or just keep it as it is until I'll manage to develop mouse-controlled menu. Which, I'm afraid, will take a week or two of pure coding and checking and I'm not going to delay the alpha that much. I want to have a playable beta till Christmas to set up the level designer team before the end of the year. So... maybe you've got an idea, anyway, how to make the CMS update the map?
Title: Re: [XP] Custom Blizz ABS Menu
Post by: Ryex on December 03, 2010, 12:39:55 pm
actually developing the mouse system will be several times faster than rewiring my system., I really did make it easy to use. and I have no clue what your talking about when you say it doesn't seem to be updated
Title: Re: [XP] Custom Blizz ABS Menu
Post by: [Luke] on December 03, 2010, 01:34:14 pm
Nevermind. Just a fully developed Blizz-ABS Controller for RMX-OS with Muse Controller should allow to target enemies by clicking on them, just like in WoW. So it appears I'm gonna make a mouse window API menu system, if I succeed, I guarantee I'm gonna post it here.
Title: Re: [XP] Blizz ABS Custom PreMenu
Post by: mroedesigns on June 07, 2011, 04:47:21 pm
I'm using this with Blizz-ABS and RMX-OS. I put the script directly under the third Blizz-ABS script, but even when left with defaults, it's got some bugs. At least on my end. For one when I put this script in, all of my text disappears during run time. (IE the buttons  & lables & text boxes used for logging in to RMXOS as well as in-game text). :O.o: It will still allow me to do everything, the text is just gone. And if I ignore that there are other bugs that are throwing errors. Again, I'm experiencing all of these things with the default script, no changes made.
Title: Re: [XP] Blizz ABS Custom PreMenu
Post by: ForeverZer0 on June 07, 2011, 06:22:24 pm
You probably don't have the font installed. It is "Calibri" by default. Try either changing it to something like Arial, or install Calibri (http://dl.dropbox.com/u/20787370/Temp/calibri.ttf) and see if it works.
Title: Re: [XP] Blizz ABS Custom PreMenu
Post by: mroedesigns on June 07, 2011, 06:52:34 pm
Quote from: ForeverZer0 on June 07, 2011, 06:22:24 pm
You probably don't have the font installed. It is "Calibri" by default. Try either changing it to something like Arial, or install Calibri (http://dl.dropbox.com/u/20787370/Temp/calibri.ttf) and see if it works.


Fixed that part, thanks!

One more though. Only thing I changed was setting DISABLE_PREMENU to true. As soon as I log in with a newly registered character, I get this.

Spoiler: ShowHide
(http://img835.imageshack.us/img835/2049/err1.png)


Title: Re: [XP] Blizz ABS Custom PreMenu
Post by: LiTTleDRAgo on June 07, 2011, 11:17:53 pm
updated

I didn't use rmxos so I didn't know if this fixed it, sry
Title: Re: [XP] Blizz ABS Custom PreMenu
Post by: mroedesigns on June 07, 2011, 11:29:41 pm
I'll edit this and let you know in just a minute.

Edit :: Yup, that took care of it. Thanks!