The RPG Maker Resource Kit

RMRK RPG Maker Creation => Requests => Script Request => Topic started by: Internetakias on October 28, 2012, 04:24:29 PM

Title: [VXA]OriginalWij's Timer Plus and Sky's Room Decoration System[REQUEST]
Post by: Internetakias on October 28, 2012, 04:24:29 PM
Hey there, rmrk! I'm looking to get the following VX scripts converted to Ace!
OriginalWij's Timer Plus



Summary
This script allows broad customization of the timer. For example, you can change the timer's location, add a background window, a bar and change the visibillity of the timer.

Features Desired
  • Being able to set custom background pics for the timer.
  • The ability to change the timer's font, color and style

Script
Spoiler for:
Code: [Select]
#==============================================================================
# Timer Plus
#==============================================================================
# Author  : OriginalWij
# Version : 1.0
#==============================================================================

#==============================================================================
# NOTE: The newest version is the ONLY supported version!
#
# v1.0
# - Initial release
#==============================================================================

#==============================================================================
# Script/Script Event Command calls:
#
#   $game_system.timer_x ......... get/set X coordinate   [default = 4]
#   $game_system.timer_y ......... get/set Y coordinate   [default = 4]
#   $game_system.timer_visible ... get/set visibility     [default = true]
#   $game_system.timer_bar ....... get/set bar enable     [default = false]
#   $game_system.timer_color1 .... get/set bar color 1    [default = dark_red]
#   $game_system.timer_color2 .... get/set bar color 2    [default = lite_red]
#   $game_system.timer_window .... get/set window enable  [default = false]
#
#   NOTE1: all of the above must be set BEFORE the timer is started
#   NOTE2: all of the above DO NOT reset automatically (static unless altered)
#   NOTE3: dark_red = Color.new(128, 0, 0); lite_red = Color.new(255, 0, 0)
#==============================================================================

#==============================================================================
# Config
#==============================================================================

module OW_TP
  # Play BGS when timer is almost done?
  BGS = true
  # Time left on timer when BGS starts [in seconds] (when BGS = true)
  B_MAX = 15
  # BGS to play when timer is at or below B_MAX (when BGS = true)
  B_SOUND  = "Clock"
  B_VOLUME = 80
  B_PITCH  = 100
 
  # Change timer text color when timer is almost done?
  CLR = true
  # Time left on timer when color change starts [in seconds] (when CLR = true)
  C_MAX = 30
  # Color to change text to when timer is at or below C_MAX (when CLR = true)
  C_CLR = Color.new(255, 0, 0)
 
  # Play buzzer when timer reaches zero?
  BUZZ = true
  # SE to play when timer reaches zero? (when BUZZ = true)
  BZ_SOUND  = "Buzzer1"
  BZ_VOLUME = 100
  BZ_PITCH  = 60
 
  # Stop timer when timer reaches zero? (same as the Stop Timer event command)
  STOP = true
end

#==============================================================================
# Game_System
#==============================================================================

class Game_System
  #--------------------------------------------------------------------------
  # Public Instance Variables                                           (New)
  #--------------------------------------------------------------------------
  attr_accessor :timer_bar
  attr_accessor :timer_window
  attr_accessor :timer_max
  attr_accessor :timer_visible
  attr_accessor :timer_x
  attr_accessor :timer_y
  attr_accessor :timer_color1
  attr_accessor :timer_color2
  #--------------------------------------------------------------------------
  # Initialize                                                          (Mod)
  #--------------------------------------------------------------------------
  alias ow_timerplus_game_system_initialize initialize unless $@
  def initialize
    ow_timerplus_game_system_initialize
    @timer_bar = @timer_window = false
    @timer_visible = true
    @timer_max = 0
    @timer_x = @timer_y = 4
    @timer_color1 = Color.new(128, 0, 0)
    @timer_color2 = Color.new(255, 0, 0)
  end
  #--------------------------------------------------------------------------
  # Update                                                          (Rewrite)
  #--------------------------------------------------------------------------
  def update
    if @timer_working and @timer > 0
      @timer -= 1
      Audio.bgs_stop if OW_TP::BGS and @timer < 3
      if @timer == 0
        @timer_max = 0
        @timer_working = false if OW_TP::STOP
        $game_temp.next_scene = "map" if $game_temp.in_battle
      end
    end
  end
end

#==============================================================================
# Game_Interpreter
#==============================================================================

class Game_Interpreter
  #--------------------------------------------------------------------------
  # Control Timer                                                   (Rewrite)
  #--------------------------------------------------------------------------
  def command_124
    if @params[0] == 0 # Start
      $game_system.timer = (@params[1] + 1) * Graphics.frame_rate
      $game_system.timer_max = $game_system.timer
      $game_system.timer_working = true
    end
    if @params[0] == 1 # Stop
      $game_system.timer_working = false
      $game_system.timer = $game_system.timer_max = 0
    end
    return true
  end
end

#==============================================================================
# Sprite_Timer
#==============================================================================

class Sprite_Timer < Sprite
  #--------------------------------------------------------------------------
  # Initialize                                                      (Rewrite)
  #--------------------------------------------------------------------------
  def initialize(viewport)
    super(viewport)
    self.bitmap = Bitmap.new(88, 48)
    self.bitmap.font.size = 32
    offset = $game_system.timer_window ? 16 : 0
    self.x = $game_system.timer_x + offset
    self.y = $game_system.timer_y + offset
    self.y -= 12 if !$game_system.timer_bar and $game_system.timer_window
    self.z = 200
    update
  end
  #--------------------------------------------------------------------------
  # Update                                                          (Rewrite)
  #--------------------------------------------------------------------------
  def update
    super
    self.visible = ($game_system.timer_working and $game_system.timer_visible)
    return unless self.visible
    if @window != $game_system.timer_window or @bar != $game_system.timer_bar
      @window = $game_system.timer_window
      @bar = $game_system.timer_bar
      offset = $game_system.timer_window ? 16 : 0
      self.x = $game_system.timer_x + offset
      self.y = $game_system.timer_y + offset
      self.y -= 12 if !$game_system.timer_bar and $game_system.timer_window
    end
    if $game_system.timer / Graphics.frame_rate != @total_sec
      @total_sec = $game_system.timer / Graphics.frame_rate
      self.bitmap.clear
      if OW_TP::BUZZ and @total_sec / 60 == 0 and @total_sec % 60 == 0
        filename = "Audio/SE/" + OW_TP::BZ_SOUND
        Audio.se_play(filename, OW_TP::BZ_VOLUME, OW_TP::BZ_PITCH)
      end
      if OW_TP::BGS and @total_sec / 60 == 0 and @total_sec % 60 <= OW_TP::B_MAX
        if RPG::BGS.last.name != OW_TP::B_SOUND
          filename = "Audio/BGS/" + OW_TP::B_SOUND
          Audio.bgs_play(filename, OW_TP::B_VOLUME, OW_TP::B_PITCH)
          RPG::BGS.last.name = OW_TP::B_SOUND
        end
      end
      if OW_TP::CLR and @total_sec / 60 == 0 and @total_sec % 60 <= OW_TP::C_MAX
        self.bitmap.font.color = OW_TP::C_CLR
      else
        self.bitmap.font.color = Color.new(255, 255, 255)
      end
      draw_timer_gauge if $game_system.timer_bar
      if @total_sec / 60 > 0
        text = sprintf("%01d:%02d", @total_sec / 60, @total_sec % 60)
      else
        text = sprintf(":%02d", @total_sec % 60)
      end
      self.bitmap.draw_text(self.bitmap.rect, text, 1)
    end
  end
  #--------------------------------------------------------------------------
  # Draw Timer Gauge                                                    (New)
  #--------------------------------------------------------------------------
  def draw_timer_gauge
    w = self.bitmap.width
    gw = (w - 4) * $game_system.timer / $game_system.timer_max
    color1 = $game_system.timer_color1
    color2 = $game_system.timer_color2
    self.bitmap.fill_rect(0, 0, w, 10, Color.new(0, 0, 0))
    self.bitmap.fill_rect(1, 1, w - 2, 8, Color.new(255, 255, 255))
    self.bitmap.fill_rect(2, 2, w - 4, 6, Color.new(0, 0, 0))
    return if @total_sec % 60 == 0 and @total_sec / 60 == 0
    self.bitmap.gradient_fill_rect(2, 2, gw, 6, color1, color2)
  end
end

#==============================================================================
# Scene_Map
#==============================================================================

class Scene_Map < Scene_Base
  #--------------------------------------------------------------------------
  # Update                                                              (Mod)
  #--------------------------------------------------------------------------
  alias ow_timerplus_scene_map_update update unless $@
  def update
    ow_timerplus_scene_map_update
    unless @timer_window.nil?
      @timer_window.update
      @timer_window.visible = $game_system.timer_visible
    end
    unless $game_message.visible
      if $game_system.timer_window and $game_system.timer_working and
          @timer_window.nil?
        h = $game_system.timer_bar ? 68 : 58
        x = $game_system.timer_x
        y = $game_system.timer_y
        @timer_window = Window_Base.new(x, y, 120, h)
        @timer_window.z = 49
        @timer_window.visible = $game_system.timer_visible
      end
      if (!$game_system.timer_window or !$game_system.timer_working or
          @gs_bar != $game_system.timer_bar) and !@timer_window.nil?
        @gs_bar = $game_system.timer_bar
        @timer_window.dispose
        @timer_window = nil
      end
    end
  end
end



Did you search?
Yes

Where did you search?
  • Google
  • RPG Maker Web
  • RPG Maker VX ACE.net

What did you search for?
  • RPG Maker VX Ace Originalwij's Timer Plus
  • RPG Maker VX Ace Timer Plus

Sky's Room Decoration System



Summary
This script features a room editor which allows you to place or/and remove furniture with ease, you can access the edit mode by pressing A in a map that allows "decoration mode", then you can press X to bring up the script's inventory and pick a decoration item/furniture piece to place it somewhere on the room/map, with the S button you can switch from "placement mode" to "removal mode" and vice versa. The script also utilizes the following item note tags:
Decoration:event_id:, which is used to assign an item to a furniture event
<WALL>, which is used for furniture that can only be hanged on the wall
<FLOOR>, which is used for furniture that can only be placed on the floor

Features Desired
  • Comaptibillity with Falcao's Mouse System Buttons (http://rmrk.net/index.php?topic=46593.0), as the original script uses a cursor to place furniture and I'd like to be able to use the mouse to place furniture instead.

Script
The script can bee found here:
http://www.rpgmakervx.net/index.php?showtopic=33513 (http://www.rpgmakervx.net/index.php?showtopic=33513)

Requirements
  • The script requires: FlipelyFlip's Event Cloning (http://www.rpgmakervx.net/index.php?showtopic=32751).
  • This spritesheet which is used for the cursor:
    (https://rmrk.net/proxy.php?request=http%3A%2F%2Fi288.photobucket.com%2Falbums%2Fll172%2FSky00Valentine%2FModelCursor.png&hash=0d0dd2b743c438925227aaac8b27ba56bdfb050c)
  • And 2 dedicated maps, one for storing the events/furniture and another one for the wall tiles, aka tiles where items with the tag <WALL> can be placed on.



Did you search?
Yes

Where did you search?
  • Google
  • RPG Maker Web
  • RPG Maker VX ACE.net - Found 2 requests, none of them have been completed

What did you search for?
  • RPG Maker VX Ace Decoration Script
  • RPG Maker VX Ace Sky's Decoration Script
Title: Re: [VXA]OriginalWij's Timer Plus and Sky's Room Decoration System[REQUEST]
Post by: modern algebra on October 28, 2012, 04:27:58 PM
These are well-designed requests! I hope someone accepts them.
Title: Re: [VXA]OriginalWij's Timer Plus and Sky's Room Decoration System[REQUEST]
Post by: Internetakias on October 28, 2012, 07:15:42 PM
These are well-designed requests! I hope someone accepts them.
Why, thank you! I too really hope someone accepts them, 'cause I didn't have any luck on rpgmakervxace.net and rpgmakerweb.com
Title: Re: [VXA]OriginalWij's Timer Plus and Sky's Room Decoration System[REQUEST]
Post by: Internetakias on November 22, 2012, 04:20:37 PM
Bumping, I really hope someone can port these to VXA!
Title: Re: [VXA]OriginalWij's Timer Plus and Sky's Room Decoration System[REQUEST]
Post by: Internetakias on December 13, 2012, 11:06:05 AM
Oh, I forgot to mention that you don't have to do both scripts, either one is fine...
Title: Re: [VXA]OriginalWij's Timer Plus and Sky's Room Decoration System[REQUEST]
Post by: Internetakias on January 08, 2013, 07:49:49 PM
New year bump!
Title: Re: [VXA]OriginalWij's Timer Plus and Sky's Room Decoration System[REQUEST]
Post by: whitespirits on July 30, 2019, 09:36:02 AM
Does anyone still have this script?
Title: Re: [VXA]OriginalWij's Timer Plus and Sky's Room Decoration System[REQUEST]
Post by: XaXaV on October 08, 2020, 04:14:25 PM
I'm willing to accept this request in exchange for some cash.