Troop ID based Battlebacks
Tpasmall
Features
Allows you to set battle backgrounds based on troop ID.
How to Use
Pretty self explanatory, just make sure you go to "game_troop" line 29 and insert "attr_accessor :troop_id" or the script won't work. Let me know if there are any bugs (I don't use VX anymore, but I thought this might be useful for those of you that do). Put your battle backgrounds (in .png format) in the 'Pictures' folder (Graphics/Pictures). The rest of the instructions are in the script. (If there is any confusion, just ask here).
Script
Credit and Thanks
- None needed, it you want to though, credit tpasmall
Tpasmall
Features
Allows you to set battle backgrounds based on troop ID.
How to Use
Pretty self explanatory, just make sure you go to "game_troop" line 29 and insert "attr_accessor :troop_id" or the script won't work. Let me know if there are any bugs (I don't use VX anymore, but I thought this might be useful for those of you that do). Put your battle backgrounds (in .png format) in the 'Pictures' folder (Graphics/Pictures). The rest of the instructions are in the script. (If there is any confusion, just ask here).
Script
Code:
#--------------------------------------------------------------------------------
# Battle backgrounds go in the 'Pictures' folder (Graphics/Pictures)
# in the script "game_troop" go to line 29 and insert "attr_accessor :troop_id"
# Script written by tpasmall
#--------------------------------------------------------------------------------
module TroopBB
#------------------------------------------------------------------------------
# To set the background put the troop ID number followed by the file name
# ex. Slime x 2 is troop 001
# 1 => "grassland" will make grassland.png as the battleback for slime x2 troop
# make sure to put a "," after each battleback name
#------------------------------------------------------------------------------
BattleBackground =
{
1 => "grassland",
2 => "forest",
}
#-----------------------------------------------------------------------------
# Create the battlefloor?
#-----------------------------------------------------------------------------
Create_battlefloor = true
end
#-------------------------------------------------------------------------------
# Spriteset_Battle
#-------------------------------------------------------------------------------
class Spriteset_Battle
alias crbattlefloor create_battlefloor
#-----------------------------------------------------------------------------
# Create Battleback
#-----------------------------------------------------------------------------
def create_battleback
image = TroopBB::BattleBackground[$game_troop.troop_id]
@battleback_sprite = Sprite.new(@viewport1)
@battleback_sprite.bitmap = Cache.picture(image)
end
def create_battlefloor
@battlefloor_sprite = Sprite.new(@viewport1)
crbattlefloor if TroopBB::Create_battlefloor == true
end
end
- None needed, it you want to though, credit tpasmall