Jump to content
Sign in to follow this  
snow

Disable Map Tint in Battles

Recommended Posts

Disable Map Tint in Battles

 

Author: Snow

No credit neccessary.

I could have sworn I already posted this at this website, but after searching, I could not find it.

 

Features:

- Uses a switch to determine whether or not the map's tint should be transferred over into the battle scene.

- If no switch is set, then battles will have event tints disabled altogether without a switch required.

- When the battle ends and the player is transferred to the map, the tint will be restored automatically.

 

How To Use:

Paste under Materials and below any battle scripts.

 

 

Script:

 

 

#=================================================
# No battle Screen Tint
#--------------------------------------------

class Spriteset_Battle
 TINT_SWITCH = 0	  #<--- Switch ID

 # If switch is ON, the battle will use the map's tint
 # If switch is OFF, the battle will not use a tint
 # You can also leave the switch ID at 0 to disable battle tints altogether.

 def update_viewports
	  unless $game_switches[TINT_SWITCH]
	  @viewport1.tone.set(0, 0, 0, 0)
	  else
	  @viewport1.tone.set($game_troop.screen.tone)
	  end
	@viewport1.ox = $game_troop.screen.shake
	@viewport2.color.set($game_troop.screen.flash_color)
	@viewport3.color.set(0, 0, 0, 255 - $game_troop.screen.brightness)
	@viewport1.update
	@viewport2.update
	@viewport3.update
 end
end

 

 

Edited by snow
  • Like 4

Share this post


Link to post
Share on other sites

I tried this but is not working  :mellow:

 

Edit: Worked after using a dummy switch, the leaving the switch on 0 option is the one not working.

Edited by oriceles

Share this post


Link to post
Share on other sites

Did you try in a vanilla project with no other scripts?

Share this post


Link to post
Share on other sites

Did you try in a vanilla project with no other scripts?

 # You can also leave the switch ID at 0 to disable battle tints altogether.

This is the feature not working, I set a dummy  switch and voila.

Share this post


Link to post
Share on other sites

You should try it in a vanilla project with no other scripts. 

 

You most likely have another script which changes lighting or tints. 

Share this post


Link to post
Share on other sites

Ooo. I really need this. I have a couple very dark caves where the enemies are almost impossible to see. Thanks for sharing!  :thumbup3:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
Top ArrowTop Arrow Highlighted