Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Battle Background auto-stretcher plugin

Hello all you talented script authors I would like to place another plug-in request and this time it's for a script similar to the TDS Battleback Stretch script by 'unknown' here is the ruby script for it, if you can convert this to JavaScript that would be amazing and I would happily make a video covering it and giving you full props and credit for the creation.
RUBY version that needs converted to JavaScript:
#==============================================================================
# ** Spriteset_Map
#------------------------------------------------------------------------------
# This class brings together map screen sprites, tilemaps, etc. It's used
# within the Scene_Map class.
#==============================================================================

class Spriteset_Battle
#--------------------------------------------------------------------------
# * Create Battleback 1 (Floor)
#--------------------------------------------------------------------------
def create_battleback1
@back1_sprite = Sprite.new(@viewport1)
@back1_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height)
# Get Background Bitmap
background = battleback1_bitmap
# Get Screen Size Rect
screen = Rect.new(0, 0, Graphics.width, Graphics.height)
# Stretch Battleback
@back1_sprite.bitmap.stretch_blt(screen, background, background.rect)
#battleback1_bitmap
@back1_sprite.z = 0
center_sprite(@back1_sprite)
end
#--------------------------------------------------------------------------
# * Create Battleback 2 (Wall)
#--------------------------------------------------------------------------
def create_battleback2
@back2_sprite = Sprite.new(@viewport1)
@back2_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height)
# Get Background Bitmap
background = battleback2_bitmap
# Get Screen Size Rect
screen = Rect.new(0, 0, Graphics.width, Graphics.height)
# Stretch Battleback
@back1_sprite.bitmap.stretch_blt(screen, background, background.rect)
@back2_sprite.z = 1
center_sprite(@back2_sprite)
end
end
 
Stretches the battleback to fit the set width/height of the screen. (boxwidth and boxheight), preferably keeping aspect ratio and expanding to whichever side is the larger, to avoid black lines.
 

eivl

Local Hero
Xy$
0.00
normally Yanfly lets you disable unwanted feature, but i have not tested any of his scripts for MV, give it i try please, and if it does not work ill make a separate plugin for you over the weekend.
 
Top