RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Scene Window Opacity

0 Members and 1 Guest are viewing this topic.

*
Rep:
Level 97
2014 Best RPG Maker User - Engine2014 Most Unsung Member2013 Best RPG Maker User (Scripting)2012 Favorite Staff Member2012 Most Mature Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best RPG Maker User (Scripting)2011 Best Veteran2011 Favourite Staff Member2011 Most Mature Member2011 Best Use of Avatar and Signature Space2010 Favourite Staff Member2010 Most Mature Member
Scene Window Opacity
Version: 1.0
Author: modern algebra
Date: January 29, 2010

Version History


  • <Version 1.0> 01.29.2010 - Original Release

Description


This is a simple and perhaps a little useless script that allows you to easily alter the transparency of all the windows in any given scene. It's only really useful if you want, for instance, all of the menu scenes to be a little more transparent so you can see more of the map.

Features

  • Can set the opacity of the windows in any scene you want
  • Easy to configure

Screenshots



Instructions

Place this script into its own slot in the Script Editor (F11) below the default scripts but still above Main. If you want it to apply to any custom scripts you've added to your game, it should also be put below them.

It's not very customizable, but it is easy to use. All you need to do is set up the constants below to specify what you want the opacity of the back of the window and the window altogether to be in all of the scenes that you want this script to apply. Then, you merely need to add the name of the scene to the WT_APPLICABLE_SCENES array. See line 33, 35, and 39.

Script


Code: [Select]
#==============================================================================
#    Scene Window Opacity
#    Version: 1.0
#    Author: modern algebra (rmrk.net)
#    Date: January 29, 2010
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Description:
#
#    This is a simple and perhaps a little useless script that allows you to
#   easily alter the transparency of all the windows in any given scene. It's
#   only really useful if you want, for instance, all of the menu scenes to be
#   a little more transparent so you can see more of the map.
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Instructions:
#
#    Place this script into its own slot in the Script Editor (F11) below the
#   default scripts but still above Main. If you want it to apply to any custom
#   scripts you've added to your game, it should also be put below them.
#
#    It's not very customizable, but it is easy to use. All you need to do is
#   set up the constants below to specify what you want the opacity of the back
#   of the window and the window altogether to be in all of the scenes that you
#   want this script to apply. Then, you merely need to add the name of the
#   scene to the WT_APPLICABLE_SCENES array. See line 33, 35, and 39.
#==============================================================================

#==============================================================================
#  CONSTANTS
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Change this to whatever you want the opacity of the windowskin (excluding the
# border) to be. It can be any value from 0-255, where 0 is fully transparent
# and 255 is fully opaque
WT_ALTERED_BACK_OPACITY = 0
#  The default opacity of the entire windowskin, including the border.
WT_ALTERED_WINDOW_OPACITY = 255
#  This is an array of the scenes to which this script applies. To have the
# opacities of the windows of a scene be affected by this script, merely
# include the class name of the scene in the following array.
WT_APPLICABLE_SCENES = [Scene_Menu, Scene_Item, Scene_Skill, Scene_Equip,
  Scene_Status]
  
#==============================================================================
# ** Window_Base
#++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#  Summary of Changes:
#    aliased method - initialize
#==============================================================================

class Window_Base
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  # * Object Initialization
  #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  alias molgba_wintransprncy_inze_7jf2 initialize
  def initialize (*args)
    molgba_wintransprncy_inze_7jf2 (*args)
    if WT_APPLICABLE_SCENES.include? ($scene.class)
      self.opacity = WT_ALTERED_WINDOW_OPACITY
      self.back_opacity = WT_ALTERED_BACK_OPACITY
    end
  end
end

Credit


  • modern algebra

Support


Please post in this topic at rmrk.net for assistance. Do not PM me, as it is more beneficial to other people coming to this thread to see the problems others have had and the solutions.

Known Compatibility Issues

No currently known compatibility problems. If you do encounter any, please try putting this script below the other script in order and see if that fixes the problem before requesting assistance.

Author's Notes


Probably not a very useful script to very many people, but I remember using a script like this for RMXP and so I figure if I could have once found a use for it, someone else might be able to as well. It is a nice and easy way to alter the visual layout of the menu scenes.


Creative Commons License
This work by modern algebra is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.5 Canada License.
« Last Edit: February 11, 2010, 09:57:03 PM by Modern Algebra »