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.
Moving/Animated Battle backgrounds?

0 Members and 1 Guest are viewing this topic.

**
Rep: +0/-0Level 89
I was wondering if its possible to have an animated battle background in the form of an avi file or even a multi layered scrolling backdrop like in RM2K3?
Does anybody have a script for this or know where i can get a script?

**
Rep: +0/-0Level 89
never mind
got one :D

Quote from: kokirichild87
never mind
got one :D


Can you post it? I need it too.

**
Rep: +0/-0Level 89
ok the credit goes to SephirothSpawn
replace Spriteset_Battle with this


Code: [Select]
#==============================================================================
# ** Spriteset_Battle
#------------------------------------------------------------------------------
# This class brings together battle screen sprites. It's used within
# the Scene_Battle class.
#==============================================================================

class Spriteset_Battle
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :viewport1 # enemy viewport
attr_reader :viewport2 # actor viewport
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Make viewports
@viewport1 = Viewport.new(0, 0, 640, 320)
@viewport2 = Viewport.new(0, 0, 640, 480)
@viewport3 = Viewport.new(0, 0, 640, 480)
@viewport4 = Viewport.new(0, 0, 640, 480)
@viewport2.z = 101
@viewport3.z = 200
@viewport4.z = 5000
# Make battleback sprite
@battleback_sprite = Sprite.new(@viewport1)
# Make enemy sprites
@enemy_sprites = []
for enemy in $game_troop.enemies.reverse
@enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
end
# Make actor sprites
@actor_sprites = []
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
@actor_sprites.push(Sprite_Battler.new(@viewport2))
# Make weather
@weather = RPG::Weather.new(@viewport1)
# Make picture sprites
@picture_sprites = []
for i in 51..100
@picture_sprites.push(Sprite_Picture.new(@viewport3,
$game_screen.pictures[i]))
end
# Make timer sprite
@timer_sprite = Sprite_Timer.new
# Frame Counters (For Animated Background)
@frame, @counter = 1, 1
# Frame update
update
end
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
def dispose
# If battleback bit map exists, dispose of it
if @battleback_sprite.bitmap != nil
@battleback_sprite.bitmap.dispose
end
# Dispose of battleback sprite
@battleback_sprite.dispose
# Dispose of enemy sprites and actor sprites
for sprite in @enemy_sprites + @actor_sprites
sprite.dispose
end
# Dispose of weather
@weather.dispose
# Dispose of picture sprites
for sprite in @picture_sprites
sprite.dispose
end
# Dispose of timer sprite
@timer_sprite.dispose
# Dispose of viewports
@viewport1.dispose
@viewport2.dispose
@viewport3.dispose
@viewport4.dispose
end
#--------------------------------------------------------------------------
# * Determine if Effects are Displayed
#--------------------------------------------------------------------------
def effect?
# Return true if even 1 effect is being displayed
for sprite in @enemy_sprites + @actor_sprites
return true if sprite.effect?
end
return false
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update actor sprite contents (corresponds with actor switching)
@actor_sprites[0].battler = $game_party.actors[0]
@actor_sprites[1].battler = $game_party.actors[1]
@actor_sprites[2].battler = $game_party.actors[2]
@actor_sprites[3].battler = $game_party.actors[3]
# If battleback file name is different from current one
unless @battleback_name == $game_temp.battleback_name
unless $game_temp.battleback_name.include?('~')
@battleback_name = $game_temp.battleback_name
@battleback_sprite.bitmap.dispose unless @battleback_sprite.bitmap == nil
else
@counter += 1
if @counter == 6
# Resets Counter
@counter = 0
# Checks Frame
@frame == 5 ? @frame = 1 : @frame += 1
end
@battleback_name = "#{$game_temp.battleback_name.dup.delete!('~')}_#{@frame}"
@battleback_sprite.bitmap = RPG::Cache.battleback(@battleback_name)
@battleback_sprite.src_rect.set(0, 0, 640, 320)
end
end
# Update battler sprites
for sprite in @enemy_sprites + @actor_sprites
sprite.update
end
# Update weather graphic
@weather.type = $game_screen.weather_type
@weather.max = $game_screen.weather_max
@weather.update
# Update picture sprites
for sprite in @picture_sprites
sprite.update
end
# Update timer sprite
@timer_sprite.update
# Set screen color tone and shake position
@viewport1.tone = $game_screen.tone
@viewport1.ox = $game_screen.shake
# Set screen flash color
@viewport4.color = $game_screen.flash_color
# Update viewports
@viewport1.update
@viewport2.update
@viewport4.update
end
end


And Add these File into your Battleback Folder http://www.invisionplus.net/forums/index.php?mforum=rmxp&act=Attach&type=post&id=1805

To make more of these, make a 1*1 blank png file with the name of the animated background you want + ~. (IE: Volcano~).

Then, make X number of Frame of animation, and label them

Volcano_1
Volcano_2
Volcano_3
...
Volcano_X

You can make it however many frames you want, just go into the above script, and change the 5 in "@frame == 5" to however many frames there are.

If you want to test this, Open up your Tilesets in the Database, and make whatever defaults battleback be "Volcano~". Then, battle on that map.

**
Rep: +0/-0Level 89
Quote from: kokirichild87
I was wondering if its possible to have an animated battle background in the form of an avi file or even a multi layered scrolling backdrop like in RM2K3?
Does anybody have a script for this or know where i can get a script?


That sounds cool, is it very memory intensive?
Project: Grail
Maps: 3%
Events: 1%
Miniquests: 20%
Characters: 100%
Story Line: 100%
Chipsets/Tilesets: 100%
Inventory: 30%
Enemies: 100%
Demo (beta): 100%
Demo (1.0): 80%

**
Rep: +0/-0Level 89
Quote from: Axra
Quote from: kokirichild87
I was wondering if its possible to have an animated battle background in the form of an avi file or even a multi layered scrolling backdrop like in RM2K3?
Does anybody have a script for this or know where i can get a script?


That sounds cool, is it very memory intensive?


I dont quite get what u mean

*
Full Metal Mod - He will pillage your women!
Rep:
Level 93
The RGSS Dude
Quote from: kokirichild87
Quote from: Axra
Quote from: kokirichild87
I was wondering if its possible to have an animated battle background in the form of an avi file or even a multi layered scrolling backdrop like in RM2K3?
Does anybody have a script for this or know where i can get a script?


That sounds cool, is it very memory intensive?


I dont quite get what u mean


He means 'Does it lag'?
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They’re bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I’m the only one, I’m the only one."

**
Rep: +0/-0Level 89
Oh ok
ummm yeah it lags a bit when you cast spells and stuff but not too bad

***
Rep: +0/-0Level 89
I dont know how to use scripts... shall I copy the text you wrote and paste it somewhere?  :?

**
Rep: +0/-0Level 89
go to the script editor and past it over spiteset_battle