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.
[REQUEST] Modification to Yanfly Battleback script

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 84
Current Project: RoSL
I've been using Yanfly's Snapshot Battleback script for a while, and simply love it. However, I came to a point where I would like some events to show up on the map when it gets used for the battleback.

So, in brief, his script will take a snapshot of the current map when entering a battle and use it as the backdrop for combat without any of the map's events. I'd like to be able to add a comment or something to certain events to make them show up when the snapshot is taken, if possible.

If it can't be done, or would require a ton of work/re-writing the script, then don't worry about it. His script is shown below:

Spoiler for:
Code: [Select]
#===============================================================================
#
# Yanfly Engine Melody - Snapshot Battle Back
# Last Date Updated: 2010.04.16
# Level: Easy
#
# For a quick and easy way of getting a map-related backdrop without that
# cheesy radial blur that RPG Maker VX comes with, why not just use a snapshot
# of whatever map you're currently on instead? This script removes the radial
# blur and throws in a slightly zoomed snapshot of the current map without any
# events hindering it.
#
#===============================================================================
# Updates
# -----------------------------------------------------------------------------
# o 2010.04.16 - Started and Finished Script.
#===============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below ? Materials but above ? Main. Remember to save.
#
#===============================================================================
# Compatibility
# -----------------------------------------------------------------------------
# - Works With: Anything that doesn't modify battlebacks.
#===============================================================================

$imported = {} if $imported == nil
$imported["SnapshotBattleBack"] = true

module YEM
  module SNAP_BATTLE_BACK
   
    # These two values adjust the width and height of the zoomed in background
    # snapshot. To disallow zooming, just set the values to 544 and 416 or
    # whatever resolution you're using.
    BITMAP_WIDTH  = 640
    BITMAP_HEIGHT = 480
   
    # This is the blur intensity of the snapshot used for the background. Note
    # that placing this at higher values may result in longer loading times.
    BLUR_INTENSITY = 3
   
    # These settings adjust the battlefloor. For those who'd like to either
    # move the battlefloor higher or to change the visibility of it. To make
    # the battlefloor invisible, set FLOOR_O to 0.
    FLOOR_X = 0        # Battle floor X value. Base script default is 0.
    FLOOR_Y = 100      # Battle floor y value. Base script default is 192.
    FLOOR_O = 64       # Battle floor opacity. Base script default is 128.
   
  end # SNAP_BATTLE_BACK
end # YEM

#===============================================================================
# Editting anything past this point may potentially result in causing computer
# damage, incontinence, explosion of user's head, coma, death, and/or halitosis.
# Therefore, edit at your own risk.
#===============================================================================

#===============================================================================
# Spriteset_Battle
#===============================================================================

class Spriteset_Battle

  #--------------------------------------------------------------------------
  # overwrite method: create_battleback
  #--------------------------------------------------------------------------
  def create_battleback
    source = $game_temp.background_bitmap
    width = YEM::SNAP_BATTLE_BACK::BITMAP_WIDTH
    height = YEM::SNAP_BATTLE_BACK::BITMAP_HEIGHT
    #---
    bitmap = Bitmap.new(width, height)
    bitmap.stretch_blt(bitmap.rect, source, source.rect)
    YEM::SNAP_BATTLE_BACK::BLUR_INTENSITY.times do bitmap.blur end
    #---
    @battleback_sprite = Sprite.new(@viewport1)
    @battleback_sprite.bitmap = bitmap
    @battleback_sprite.ox = width/2
    @battleback_sprite.oy = height/2
    @battleback_sprite.x = Graphics.width/2
    @battleback_sprite.y = (Graphics.height-128)/2+64
  end
 
  #--------------------------------------------------------------------------
  # overwrite method: create_battlefloor
  #--------------------------------------------------------------------------
  def create_battlefloor
    @battlefloor_sprite = Sprite.new(@viewport1)
    @battlefloor_sprite.bitmap = Cache.system("BattleFloor")
    @battlefloor_sprite.x = YEM::SNAP_BATTLE_BACK::FLOOR_X
    @battlefloor_sprite.y = YEM::SNAP_BATTLE_BACK::FLOOR_Y
    @battlefloor_sprite.z = 1
    @battlefloor_sprite.opacity = YEM::SNAP_BATTLE_BACK::FLOOR_O
  end
 
end # Spriteset_Battle

#===============================================================================
#
# END OF FILE
#
#===============================================================================

Thanks in advance!

-Heart of Shadow-

"How can I be expected to save the world, when I can't even save myself?" --Sysolos(Return of a Shadow Lord)

**
Rep: +0/-0Level 84
Current Project: RoSL
Still looking for any kind of help with this.

-Heart of Shadow-

"How can I be expected to save the world, when I can't even save myself?" --Sysolos(Return of a Shadow Lord)