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.
BattleBackground

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 83
mememememee
ok i edited the originalnal script so where you add BattleFloors They show up more fluently  Replace Your Spriteset_battle with this  and if you need battleFloors come here  http://rmrk.net/index.php/topic,33450.msg404563.html#msg404563 o i am not that good with scripts this is my 1st if someone could edit a bit to make color show more i would really appreciate it and give all credit to you

its not all that great but it sure helped me



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

class Spriteset_Battle
  #--------------------------------------------------------------------------
  # * Object Initialization
  #--------------------------------------------------------------------------
  def initialize
    create_viewports
    create_battleback
    create_battlefloor
    create_enemies
    create_actors
    create_pictures
    create_timer
    update
  end
  #--------------------------------------------------------------------------
  # * Create Viewport
  #--------------------------------------------------------------------------
  def create_viewports
    @viewport1 = Viewport.new(0, 0, 544, 416)
    @viewport2 = Viewport.new(0, 0, 544, 416)
    @viewport3 = Viewport.new(0, 0, 544, 416)
    @viewport2.z = 50
    @viewport3.z = 100
  end
  #--------------------------------------------------------------------------
  # * Create Battleback Sprite
  #--------------------------------------------------------------------------
  def create_battleback
    source = $game_temp.background_bitmap
    bitmap = Bitmap.new(640, 480)
    bitmap.stretch_blt(bitmap.rect, source, source.rect)
    bitmap.radial_blur(0, 0)
    @battleback_sprite = Sprite.new(@viewport1)
    @battleback_sprite.bitmap = bitmap
    @battleback_sprite.ox = 0
    @battleback_sprite.oy = 0
    @battleback_sprite.x = 500
    @battleback_sprite.y = 500
    @battleback_sprite.wave_amp = 2
    @battleback_sprite.wave_length = 100
    @battleback_sprite.wave_speed = 120
  end
  #--------------------------------------------------------------------------
  # * Create Battlefloor Sprite
  #--------------------------------------------------------------------------
  def create_battlefloor
    @battlefloor_sprite = Sprite.new(@viewport1)
    @battlefloor_sprite.bitmap = Cache.system("BattleFloor")
    @battlefloor_sprite.x = 0
    @battlefloor_sprite.y = 192
    @battlefloor_sprite.z = 1
    @battlefloor_sprite.opacity = 299
  end
  #--------------------------------------------------------------------------
  # * Create Enemy Sprite
  #--------------------------------------------------------------------------
  def create_enemies
    @enemy_sprites = []
    for enemy in $game_troop.members.reverse
      @enemy_sprites.push(Sprite_Battler.new(@viewport1, enemy))
    end
  end
  #--------------------------------------------------------------------------
  # * Create Actor Sprite
  #    By default, the actor image is not displayed, but a dummy sprite is
  #    created for treating enemies and allies the same, if required.
  #--------------------------------------------------------------------------
  def create_actors
    @actor_sprites = []
    @actor_sprites.push(Sprite_Battler.new(@viewport1))
    @actor_sprites.push(Sprite_Battler.new(@viewport1))
    @actor_sprites.push(Sprite_Battler.new(@viewport1))
    @actor_sprites.push(Sprite_Battler.new(@viewport1))
  end
  #--------------------------------------------------------------------------
  # * Create Picture Sprite
  #--------------------------------------------------------------------------
  def create_pictures
    @picture_sprites = []
    for i in 1..20
      @picture_sprites.push(Sprite_Picture.new(@viewport2,
        $game_troop.screen.pictures[i]))
    end
  end
  #--------------------------------------------------------------------------
  # * Create Timer Sprite
  #--------------------------------------------------------------------------
  def create_timer
    @timer_sprite = Sprite_Timer.new(@viewport2)
  end
  #--------------------------------------------------------------------------
  # * Dispose
  #--------------------------------------------------------------------------
  def dispose
    dispose_battleback_bitmap
    dispose_battleback
    dispose_battlefloor
    dispose_enemies
    dispose_actors
    dispose_pictures
    dispose_timer
    dispose_viewports
  end
  #--------------------------------------------------------------------------
  # * Dispose of Battleback Bitmap
  #--------------------------------------------------------------------------
  def dispose_battleback_bitmap
    @battleback_sprite.bitmap.dispose
  end
  #--------------------------------------------------------------------------
  # * Dispose of Battleback Sprite
  #--------------------------------------------------------------------------
  def dispose_battleback
    @battleback_sprite.dispose
  end
  #--------------------------------------------------------------------------
  # * Dispose of Battlefloor Sprite
  #--------------------------------------------------------------------------
  def dispose_battlefloor
    @battlefloor_sprite.dispose
  end
  #--------------------------------------------------------------------------
  # * Dispose of Enemy Sprite
  #--------------------------------------------------------------------------
  def dispose_enemies
    for sprite in @enemy_sprites
      sprite.dispose
    end
  end
  #--------------------------------------------------------------------------
  # * Dispose of Actor Sprite
  #--------------------------------------------------------------------------
  def dispose_actors
    for sprite in @actor_sprites
      sprite.dispose
    end
  end
  #--------------------------------------------------------------------------
  # * Dispose of Picture Sprite
  #--------------------------------------------------------------------------
  def dispose_pictures
    for sprite in @picture_sprites
      sprite.dispose
    end
  end
  #--------------------------------------------------------------------------
  # * Dispose of Timer Sprite
  #--------------------------------------------------------------------------
  def dispose_timer
    @timer_sprite.dispose
  end
  #--------------------------------------------------------------------------
  # * Dispose of Viewport
  #--------------------------------------------------------------------------
  def dispose_viewports
    @viewport1.dispose
    @viewport2.dispose
    @viewport3.dispose
  end
  #--------------------------------------------------------------------------
  # * Frame Update
  #--------------------------------------------------------------------------
  def update
    update_battleback
    update_battlefloor
    update_enemies
    update_actors
    update_pictures
    update_timer
    update_viewports
  end
  #--------------------------------------------------------------------------
  # * Update Battleback
  #--------------------------------------------------------------------------
  def update_battleback
    @battleback_sprite.update
  end
  #--------------------------------------------------------------------------
  # * Update Battlefloor
  #--------------------------------------------------------------------------
  def update_battlefloor
    @battlefloor_sprite.update
  end
  #--------------------------------------------------------------------------
  # * Update Enemy Sprite
  #--------------------------------------------------------------------------
  def update_enemies
    for sprite in @enemy_sprites
      sprite.update
    end
  end
  #--------------------------------------------------------------------------
  # * Update Actor Sprite
  #--------------------------------------------------------------------------
  def update_actors
    @actor_sprites[0].battler = $game_party.members[0]
    @actor_sprites[1].battler = $game_party.members[1]
    @actor_sprites[2].battler = $game_party.members[2]
    @actor_sprites[3].battler = $game_party.members[3]
    for sprite in @actor_sprites
      sprite.update
    end
  end
  #--------------------------------------------------------------------------
  # *Update Picture Sprite
  #--------------------------------------------------------------------------
  def update_pictures
    for sprite in @picture_sprites
      sprite.update
    end
  end
  #--------------------------------------------------------------------------
  # * Update Timer Sprite
  #--------------------------------------------------------------------------
  def update_timer
    @timer_sprite.update
  end
  #--------------------------------------------------------------------------
  # * Update Viewport
  #--------------------------------------------------------------------------
  def update_viewports
    @viewport1.tone = $game_troop.screen.tone
    @viewport1.ox = $game_troop.screen.shake
    @viewport2.color = $game_troop.screen.flash_color
    @viewport3.color.set(0, 0, 0, 255 - $game_troop.screen.brightness)
    @viewport1.update
    @viewport2.update
    @viewport3.update
  end
  #--------------------------------------------------------------------------
  # * Determine if animation is being displayed
  #--------------------------------------------------------------------------
  def animation?
    for sprite in @enemy_sprites + @actor_sprites
      return true if sprite.animation?
    end
    return false
  end
end

« Last Edit: June 14, 2009, 11:18:18 PM by shoushi »

***
Rep:
Level 89
... I got nothing.
Got an error:
Quote
Script 'Sprite_Picture' line 33: NoMethodError occured.
undefined method 'name' for #<Array:0x2a23608>

It even happened on a newly made game, without any other scripts that could disrupt it.

***
Rep:
Level 83
mememememee
i do not see how its working on mine and how this script goes into SpriteSet_Battle so i do not see how it could effect that othere script

***
Rep:
Level 89
... I got nothing.
I figured out the problem.

on Line 89 it says:
        $game_troop.screen.pictures))

when it should say:
        $game_troop.screen.pictures["i"]))
without the quotation marks

I think that's the problem.

Just out of curiosity, can you post a picture of what it's supposed to do?

All I managed was to remove the radial blur from the background.
« Last Edit: June 13, 2009, 08:59:53 PM by epson777341 »

***
Rep:
Level 83
mememememee
um sure ok this is it without the script its dull opacity is bad drowns out the color

***
Rep:
Level 83
mememememee
this is it with script not much difference except color is enhanced a little and opacity is greater and the black back screen makes floor pop out more

***
Rep:
Level 89
... I got nothing.
Oh, ok. I see. Sorry about hassling you.

*
Rep:
Level 97
2014 Most Unsung Member2014 Best RPG Maker User - Engine2013 Best RPG Maker User (Scripting)2012 Most Mature Member2012 Favorite Staff Member2012 Best RPG Maker User (Scripting)2012 Best MemberSecret Santa 2012 ParticipantProject of the Month winner for July 20092011 Best Use of Avatar and Signature Space2011 Best RPG Maker User (Scripting)2011 Most Mature Member2011 Favourite Staff Member2011 Best Veteran2010 Most Mature Member2010 Favourite Staff Member
Your code needs to be put in code tag or else it can get corrupted. I have put it in code tags for you.

***
Rep:
Level 83
mememememee
np man and ty i would really appreciate if some of you could comment on my battleFloors link is at the top of the first post

***
Rep:
Level 89
... I got nothing.
I took a look at them, they're pretty good.

I got a really nice one from a different site though, so I probably won't use yours, (no offense).
You don't see a lot of battlefloor resources. Kudos.

Now, if you had a script to change the battlefloor depending on the location, that would be awesome. Then I would use yours for sure.

***
Rep:
Level 83
mememememee
lol this is my 1st script im not that good but just wondering do you think you could send me that one you found

**
Rep: +0/-0Level 83
A Good Heart starts with a Good Mind.
For a first script pretty good,because scripting is very hard.

***
Rep:
Level 83
mememememee
ok hold on i edited it so the color is better im modifying the script now

**
Rep: +0/-0Level 83
A Good Heart starts with a Good Mind.
When it's modified,post the new results.

***
Rep:
Level 83
mememememee
o ok like a screen shot right











***
Rep:
Level 83
mememememee
ok here it is modified