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.
Deity Random Fadein [XP-style transitions]

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
Random Fadein
Version: 0.9
Author: Deity
Date: January 11, 2010

Description


This script allows you to use transition files for regular teleports instead of default fade, similar to the battle transitions. it selects from them randomly  

Features

  • Can use pretty transitions for regular teleport events.
  • Can use as many transitions as you like and the script will automatically select randomly from them
  • Very easy configuration options

Instructions

Place this script into its own slot in the Script Editor (F11), above Main and below the default scripts. I would recommend that you put this script ABOVE all other custom scripts you are using.

For setting the script up: first, you need to create a new folder in Graphics named Fadein. Now, add all of the transition files you want to use  into that new folder. Then, all you need to do is configure the settings below and you're all set.

Script


It is recommended that you get the script from the demo, so you can see where to put the transition files (in a new Fadein folder)

Code: [Select]
#????????????????????????????????????????????????????????????????#
# Script:  Deity's Random Fadein                                 #
# by Deity [translated to English by modern algebra (rmrk.net)]  #
#????????????????????????????????????????????????????????????????#
#  Description:                                                 #
#    This script allows you to use transition files for regular  #
#   teleports instead of default fade, similar to the battle     #
#   transitions                                                  #
#????????????????????????????????????????????????????????????????#
#  Instructions:                                                 #
#    First, you need to create a new folder in Graphics named    #
#   Fadein. Now, add all of the transition files you want to use #
#   into that new folder. Then, all you need to do is configure  #
#   the settings below and you're all set.                       #
#????????????????????????? Settings ?????????????????????????????#
module RandomFadein
  DURATION = 100 # Duration of the Fadein
  B_W = 100      # Intensity of the black colours
  SWITCH_ID = 1  # The ID of the switch that toggles whether this
                 # effect is active. When the switch is ON, the
                 # effect wil be active. When OFF, it will
                 # default to the regular fade
end
# Do not touch anything after this point unless you are a       #
# scripter and know what you're doing.                          #
#???????????????????????????????????????????????????????????????#
include RandomFadein
class Scene_Title
  alias create_game_objects_fade create_game_objects
  def create_game_objects
    create_game_objects_fade
    $game_switches[SWITCH_ID] = true
  end
end
class Scene_Map
  def fadein_deity
    transitions = Dir.entries("Graphics/Fadein/")
    unless transitions.size > 2
      fadein (30)
      return
    end
    effekt = rand (transitions.size - 2)
    Graphics.transition(DURATION,"Graphics/Fadein/"+transitions[effekt + 2], B_W)
  end
  def perform_transition
    if Graphics.brightness == 0   # After battle or loading, etc.
      if $game_switches[SWITCH_ID] == true
        fadein_deity
      else
        fadein(30)
      end
    else                              # Restoration from menu, etc.
      Graphics.transition(15)
    end
  end
  def update_transfer_player
    return unless $game_player.transfer?
    @spriteset.dispose
    @spriteset = Spriteset_Map.new
    $scene = Scene_Map.new
    fade = (Graphics.brightness > 0)
    fadeout(30) if fade
    @spriteset.dispose              # Dispose of sprite set
    $game_player.perform_transfer   # Execute player transfer
    $game_map.autoplay              # Automatically switch BGM and BGS
    $game_map.update
    Graphics.wait(15)
    @spriteset = Spriteset_Map.new  # Recreate sprite set
    Input.update
  end
end

Credit


  • Deity

Support


Please post in this topic at rmrk.net and I will either answer the question myself or refer your question to the script author. You could also go to rpgvx.net and ask Deity directly.

Known Compatibility Issues

The script apparently overwrites a couple methods, so it may interfere with other scripts that deal with transitions or with player transfers. You should put this script above Main and below the other default scripts, but you should probably put it ABOVE any other custom scripts you are using.

Demo


Demo is attached. It is recommended that you get it from the demo so you can see where to put the transition graphics.

Translator's Notes


All of the credit goes to Deity. I made only one minor edit to the script.

« Last Edit: January 12, 2010, 07:47:42 PM by modern algebra »