Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> 


———
Before you ask! Read! ;)

You must have 30+ Posts to create a topic here!

Thanks for reading!
———

 
Reply to this topicStart new topic
> Change battle screen tone when using spell/item? [SOLVED], A bit of assistance to avoid necroposting.
Wonderjosh
post Feb 25 2012, 07:48 AM
Post #1


Level 3
Group Icon

Group: Member
Posts: 33
Type: Artist
RM Skill: Undisclosed




I did find a thread here long dead concerning changing the screen tone of the battleback (not changing the battle back, just darken it a bit) when ever a player uses a spell. However, after plugging in the script provided and making the corrected modifications later mentioned in the thread, it didn't work out. The corrections weren't crystal clear to me exactly, so maybe that's why.

The thread can be found here so you can see what I'm looking at.

The effect is similar to FF6 or Chrono Trigger and lots of other RPG's. It just makes the contrast between the environment (but not the sprites) and the spell graphics higher so you can see the spell graphics better. They don't do it for all spells, mind you, but still, it's a nice effect.

It would be cool if there was a way to specify which items and spells that this effect would be applied to, as well. For customization's sake!

In this video, Chrono uses Luminaire and the background tone changes to a dark blue for a bit. Just as a visual example.

Like everything else, there's no rush, but any help is greatly appreciated.

Thanks in advance!

PS, this might be better in Script Support? But I'm no scripter, so maybe here is good? But if it has to be moved, that's cool with me. Thanks!

This post has been edited by Wonderjosh: Feb 28 2012, 08:04 AM
Go to the top of the page
 
+Quote Post
   
Night_Runner
post Feb 27 2012, 03:22 AM
Post #2


Level 50
Group Icon

Group: +Gold Member
Posts: 1,520
Type: Scripter
RM Skill: Undisclosed




CODE
#==============================================================================
# ** XP: Night_Runner's Darkened Skill's Tone
#------------------------------------------------------------------------------
# History:
#  Date Created: 27/Feb/2012
#  Created for: LockeZ
#   @> http://www.rpgrevolution.com/forums/index.php?showtopic=55553
#
# Description:
#  This script darkens the screen whenever a skill is activated in battle.
#
# How to Install:
#  Copy this entire script. In your game editor select Tools >> Script
#  Editor. Along the left hand side scroll to the bottom, right click on
#  'Main' and select 'Insert'. Past on the right.
#
# Customization:
#  To change the tone refer to (-50, -50, -50) (red, green, blue) on line 78.
#  To change the fade to tone duration, refer to the 10 (frames) on line 78.
#  To change the fade from tone duration, refer to the 10 (frames) on line 87.
#==============================================================================



#==============================================================================
# ** Spriteset_Battle
#------------------------------------------------------------------------------
#  Edited to separate the enemes from the backdrop.
#==============================================================================

class Spriteset_Battle
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader :viewport_enemies
  #--------------------------------------------------------------------------
  # * Alias Methods
  #--------------------------------------------------------------------------
  alias nr_dbg_initialize  initialize  unless $@
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize(*args)
    # Run the original initialize
    nr_dbg_initialize(*args)
    # Create a new viewport for the enemies
    @viewport_enemies = Viewport.new(0, 0, 640, 480)
    # Remake all the enemies
    @enemy_sprites.each { |enemy| enemy.dispose }
    @enemy_sprites = []
    for enemy in $game_troop.enemies.reverse
      @enemy_sprites.push(Sprite_Battler.new(@viewport_enemies, enemy))
    end
  end
end



#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
#  Edited to chagne the tone at the appropriate time, and changed the arrow's
#  viewport to match the enemies' new viewport.
#==============================================================================

class Scene_Battle
  #--------------------------------------------------------------------------
  # * Alias Method
  #--------------------------------------------------------------------------
  alias nr_dbg_update_phase4_step2  update_phase4_step2  unless $@
  alias nr_dbg_update_phase4_step5  update_phase4_step5  unless $@
  #--------------------------------------------------------------------------
  # * Frame Update (main phase step 2 : start action)
  #--------------------------------------------------------------------------
  def update_phase4_step2(*args)
    @backup_tone = $game_screen.tone.clone
    if @active_battler.current_action.kind == 1
      $game_screen.start_tone_change(Tone.new(-50, -50, -50), 10)
    end
    # Run the original update_phase4_step2
    nr_dbg_update_phase4_step2(*args)
  end
  #--------------------------------------------------------------------------
  # * Frame Update (main phase step 5 : something)
  #--------------------------------------------------------------------------
  def update_phase4_step5(*args)
    $game_screen.start_tone_change(@backup_tone, 10)
    # Run the original update_phase4_step3
    nr_dbg_update_phase4_step5(*args)
  end
  #--------------------------------------------------------------------------
  # * Start Enemy Selection
  #--------------------------------------------------------------------------
  def start_enemy_select
    # Make enemy arrow
    @enemy_arrow = Arrow_Enemy.new(@spriteset.viewport_enemies)
    # Associate help window
    @enemy_arrow.help_window = @help_window
    # Disable actor command window
    @actor_command_window.active = false
    @actor_command_window.visible = false
  end
end



#==============================================================================
# ** End of Script.
#==============================================================================


Enjoy!


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
Wonderjosh
post Feb 28 2012, 08:04 AM
Post #3


Level 3
Group Icon

Group: Member
Posts: 33
Type: Artist
RM Skill: Undisclosed




Beautiful! Thanks again, Night_Runner! Works like a charm!
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: 20th May 2013 - 08:55 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker