❤ 0 Bien le bonjour, mes ami(e)s !
En navigant sur l'océan d'internet, j'a trouvé ce script plutôt sympathique qui permet de... Changer le fond de combat ! Eh oui ! Je sais bien qu'il y a déjà un script que permet ça posté sur ce site, mais celui-là apporte plus de fonctionnalités !
Il n'est pas de moi, il est de DerVVulfman
Voilà le site où je l'ai trouvé :
http://rpgscripts.blogspot.fr/2012/12/40-battle-background-collections-and.html
Fonctionnalités
- Remplace le fond flouté des Battlebacks par défaut par un fond, défini par Map ID dans le script
- Possibilité de changer le Battlebacks en jeu via un appel de script
- Option de ranger les fichiers Battlebacks dans le dossier de votre choix (à configurer dans le script)
- Remplace le fond du test par un Battlebacks de votre choix
Conditions d'utilisation
- Vous devez créditer l'auteur (DerVVulfman)
- Vous pouvez utiliser ce script pour vos projets commerciaux
Et voilà le script :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
| #==============================================================================
# ** Battlebacks VX
#------------------------------------------------------------------------------
# by DerVVulfman
# version 1.2
# 03-29-2008
# RGSS2
#==============================================================================
#
# INTRODUCTION:
#
# This system reintroduces the use of 'Battleback' graphics into your pro-
# jects, something that was sadly lacking in tbe RPGMaker VX system.
#
#------------------------------------------------------------------------------
#
# SCRIPT CALLS:
#
# There's only one script call that you need to know.
#
# --Changing Battlebacks--
# Given that this system allows you to use 'Battlebacks, you may find a need
# to 'change' the battleback in-game. Unfortunately, this can't be done with
# a pre-rendered map event, so I had to make a script call:
#
# $game_system.battleback = "filename"
#
# The filename is whatever is stored within the folder that you have speci-
# fied in the configuration section (in the BATTLEBACK_DIR value).
#
#------------------------------------------------------------------------------
#
# SCRIPT PLACEMENT:
#
# As a core/re-insertion script, it returns the classic battle backgrounds
# that many users became used to with other RPG gaming systems.
#
# If this script is being used with any other script that alters any dis-
# played effect or any system in the battlesystem's spriteset window, then
# those scripts will most likely be placed BELOW this script as they will
# most need access to the revised battle viewport.
#
#------------------------------------------------------------------------------
#
# EDITS AND MODIFICATIONS:
#
# This system Aliases the following methods:
# * initialize (Game_System)
# * create_battleback (Spriteset_Battle)
# * create_battlefloor (Spriteset_Battle)
#
# This system adds the following methods:
# * battleback (Cache)
#
#------------------------------------------------------------------------------
#
# THANKS:
#
# To Fantasy at RPG RPG Revolution for noticing a bug when using the 'Battle
# Test' feature.
#
#------------------------------------------------------------------------------
# TERMS AND CONDITIONS:
#
# Free to use, even in commercial projects. Just note that I need some form
# of due credit... even a mere mention in some end titles.
#
#==============================================================================
#========================================================================
# ** C O N F I G U R A T I O N S Y S T E M ** #
#========================================================================
# Name of directory (used in cache)
BATTLEBACK_DIR = "Graphics/Pictures/"
# List of battlebacks by Map ID.
# MapID Filename
BATTLEBACK_LIST = {1 => "BattlebacksNamehere", }
# The name of the battleback used
# when using the Battle Test feature.
BATTLEBACK_TEST = "battlebacks17"
#==============================================================================
# ** Cache
#------------------------------------------------------------------------------
# This module loads each of graphics, creates a Bitmap object, and retains it.
# To speed up load times and conserve memory, this module holds the created
# Bitmap object in the internal hash, allowing the program to return
# preexisting objects when the same bitmap is requested again.
#==============================================================================
module Cache
#--------------------------------------------------------------------------
# * Get Battleback Graphic
# filename : Filename
#--------------------------------------------------------------------------
def self.battleback(filename)
load_bitmap(BATTLEBACK_DIR, filename)
end
end
#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
# This class handles system-related data. Also manages vehicles and BGM, etc.
# The instance of this class is referenced by $game_system.
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :battleback # filename of battleback
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias bback_initialize initialize
def initialize
bback_initialize
@battleback = nil
end
end
#==============================================================================
# ** Spriteset_Battle
#------------------------------------------------------------------------------
# This class brings together battle screen sprites. It's used within the
# Scene_Battle class.
#==============================================================================
class Spriteset_Battle
#--------------------------------------------------------------------------
# * Create Battleback Sprite
#--------------------------------------------------------------------------
alias bback_create_battleback create_battleback
def create_battleback
# Perform and exit for battletests
if $BTEST
if BATTLEBACK_TEST != nil
# Create Battleback sprite
@battleback_sprite = Sprite.new(@viewport1)
# Load image from cache
@battleback_sprite.bitmap = Cache.battleback(BATTLEBACK_TEST)
return
else
bback_create_battleback
return
end
end
# If map used 'called' battleback.
if $game_system.battleback != nil
# Create Battleback sprite
@battleback_sprite = Sprite.new(@viewport1)
# Load image from cache
@battleback_sprite.bitmap = Cache.battleback($game_system.battleback)
# If map has assigned battleback
elsif BATTLEBACK_LIST.key?($game_map.map_id)
# Create Battleback sprite
@battleback_sprite = Sprite.new(@viewport1)
# Load image from cache
@battleback_sprite.bitmap = Cache.battleback(BATTLEBACK_LIST[$game_map.map_id])
# Otherwise, as normal
else
# Perform the original call
bback_create_battleback
end
end
#--------------------------------------------------------------------------
# * Create Battlefloor Sprite
#--------------------------------------------------------------------------
alias bback_create_battlefloor create_battlefloor
def create_battlefloor
# Disable battlefloor for existing battleback maps
if BATTLEBACK_LIST.key?($game_map.map_id) or $game_system.battleback != nil
@battlefloor_sprite = Sprite.new(@viewport1)
return
end
# Disable for battletests with set battleback
if $BTEST
if BATTLEBACK_TEST != nil
@battlefloor_sprite = Sprite.new(@viewport1)
return
end
end
# Perform the original call
bback_create_battlefloor
end
end |
Pour l'utiliser, c'est très simple : écrivez à la ligne 80 l'ID de la map et le nom de l'image que vous voulez en fond de combat sur cette map ! Il faut que les images soit dans le dossier Pictures
Et pour finir : On peut changer le fond de combat in-game ! Il suffit de créer un évenement qui appel un script, et qui dit :
$game_system.battleback = "filename"
(Remplacer filename par le nom de l'image)
Voilà voilà ! J'espère que c'était claire, et que ça vous sera utile !
|