Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> Battle Screen Tone Change, Request by Ashvir-kun.^^
Nechi
post Mar 26 2008, 09:00 PM
Post #1


Certamen Promus
Group Icon

Group: Revolutionary
Posts: 117
Type: None
RM Skill: Beginner




Add this before Main Script or in "▼ Materials" :
[codebox]
CODE
#==============================================================================
# Battle Screen Tone Change for RMVX
#==============================================================================
# By Nechigawara Sanzenin
# WARNING!! : This script can use on RPG Maker VX Only!! (XP Not Support)
#==============================================================================
# Change Battle Screen Tone before Battle start
#==============================================================================
=begin

How to Use:

You have to add "$game_system.set_battle_color([red,green,blue,gray])"
in Call Script to change Battle Screen Tone.
You have to add "$game_system.reset_battle_color"
in Call Script to reset Battle Screen Tone.
You have to add "$game_system.battle_time = {Time}"
in Call Script to change wait time delays.

=end
#==============================================================================
class Game_System
  attr_accessor :battle_red
  attr_accessor :battle_green
  attr_accessor :battle_blue
  attr_accessor :battle_gray
  attr_accessor :battle_time
  #--------------------------------------------------------------------------
  alias inc_initialize initialize
  def initialize
    inc_initialize
    @battle_red = 0
    @battle_green = 0
    @battle_blue = 0
    @battle_gray = 0
    @battle_time = 0
  end
  #--------------------------------------------------------------------------
  def set_battle_color(color)
    return if color.is_a?(Array) == false
    @battle_red = (color[0] == nil ? 0 : color[0])
    @battle_green = (color[1] == nil ? 0 : color[1])
    @battle_blue = (color[2] == nil ? 0 : color[2])
    @battle_gray = (color[3] == nil ? 0 : color[3])
  end
  #--------------------------------------------------------------------------
  def reset_battle_color
    @battle_red = 0
    @battle_green = 0
    @battle_blue = 0
    @battle_gray = 0
  end
end
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
#  This class performs the map screen processing.
#==============================================================================
class Scene_Map < Scene_Base
  #--------------------------------------------------------------------------
  def call_battle
    @spriteset.update
    Graphics.update
    $game_player.make_encounter_count
    $game_player.straighten
    $game_temp.map_bgm = RPG::BGM.last
    $game_temp.map_bgs = RPG::BGS.last
    RPG::BGM.stop
    RPG::BGS.stop
    Sound.play_battle_start
    $game_system.battle_bgm.play
    $game_temp.next_scene = nil
    $scene = Scene_Battle.new
    red = $game_system.battle_red
    green = $game_system.battle_green
    blue = $game_system.battle_blue
    gray = $game_system.battle_gray
    color = Tone.new(red, green, blue, gray)
    time = $game_system.battle_time
    $game_troop.screen.start_tone_change(color,time)
  end
  #--------------------------------------------------------------------------
end



How to Use:

You have to add "$game_system.set_battle_color([red,green,blue,gray])"
in Call Script to change Battle Screen Tone.
You have to add "$game_system.reset_battle_color"
in Call Script to reset Battle Screen Tone.
You have to add "$game_system.battle_time = {Time}"
in Call Script to change wait time delays.

Demo : http://www.mediafire.com/?3tcd9lj9mzm

__________________________


Now, I 'm very busy.I'm work hard in the university. If you send me PM, sorry that I can't answer them at the moment.
Go to the top of the page
 
+Quote Post
   
Ashvir
post Mar 27 2008, 01:06 AM
Post #2


Level 4
Group Icon

Group: Member
Posts: 58
Type: Event Designer
RM Skill: Skilled




Thank you very much, Nechi. I appreciate it. Testing it out currently. biggrin.gif

Edit: Worked like a charm. Thanks a lot!

Do you think it's possible for the battle screen tone to just change on its own so it matches the screen tone of the map that it's on? This works just fine, but I'm just curious if there's an easier way. Thanks again. =)

This post has been edited by Ashvir: Mar 27 2008, 01:50 AM


__________________________


My current project: Lost Heaven (RPG Maker VX)
Demo: http://www.rpgrevolution.com/forums/?showtopic=12291
Go to the top of the page
 
+Quote Post
   
BizarreMonkey
post Apr 15 2009, 09:45 AM
Post #3


Gone and never coming back.
Group Icon

Group: Revolutionary
Posts: 112
Type: Developer
RM Skill: Undisclosed




This is awesome, since all the way through my game it's nighttime, this is perfect! I just have one suggestion, if it's possible I would suggest having it based off of map ID, so if map 1 is a house daytime, but if map 2 is outside at night, ake it a nightime tint, that would be awesome, but this is awesome enough biggrin.gif


__________________________

Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 24th May 2013 - 08:31 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker