❤ 0 Auteur : Erwill (catskart)
Logiciel : RPG Maker VX Ace
Voici un script permetant de sauter l'écran titre.
Installation
Remplacez le script Scene_Title.
Au lancer du jeu, vous allez voir apparaître l'image de l'écran titre.
Pour éviter cela, faites Base de donné/Système/écran titre, et ne mettez rien.
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
| #==============================================================================
# ** Scene_Title* édité par catskart
#------------------------------------------------------------------------------
# This class performs the title screen processing.
#==============================================================================
class Scene_Title < Scene_Base
#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
def start
super
SceneManager.clear
Graphics.freeze
create_background
create_foreground
create_command_window
DataManager.setup_new_game
close_command_window
fadeout_all
$game_map.autoplay
SceneManager.goto(Scene_Map)
end
# Le reste est juste le script par défaut. mais il faut pas en retirer, sinon, le jeu buguera.
#--------------------------------------------------------------------------
# * Get Transition Speed
#--------------------------------------------------------------------------
def transition_speed
return 20
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
SceneManager.snapshot_for_background
dispose_background
dispose_foreground
end
#--------------------------------------------------------------------------
# * Create Background
#--------------------------------------------------------------------------
def create_background
@sprite1 = Sprite.new
@sprite1.bitmap = Cache.title1($data_system.title1_name)
@sprite2 = Sprite.new
@sprite2.bitmap = Cache.title2($data_system.title2_name)
center_sprite(@sprite1)
center_sprite(@sprite2)
end
#--------------------------------------------------------------------------
# * Create Foreground
#--------------------------------------------------------------------------
def create_foreground
@foreground_sprite = Sprite.new
@foreground_sprite.bitmap = Bitmap.new(Graphics.width, Graphics.height)
@foreground_sprite.z = 100
draw_game_title if $data_system.opt_draw_title
end
#--------------------------------------------------------------------------
# * Draw Game Title
#--------------------------------------------------------------------------
def draw_game_title
@foreground_sprite.bitmap.font.size = 48
rect = Rect.new(0, 0, Graphics.width, Graphics.height / 2)
@foreground_sprite.bitmap.draw_text(rect, $data_system.game_title, 1)
end
#--------------------------------------------------------------------------
# * Free Background
#--------------------------------------------------------------------------
def dispose_background
@sprite1.bitmap.dispose
@sprite1.dispose
@sprite2.bitmap.dispose
@sprite2.dispose
end
#--------------------------------------------------------------------------
# * Free Foreground
#--------------------------------------------------------------------------
def dispose_foreground
@foreground_sprite.bitmap.dispose
@foreground_sprite.dispose
end
#--------------------------------------------------------------------------
# * Move Sprite to Screen Center
#--------------------------------------------------------------------------
def center_sprite(sprite)
sprite.ox = sprite.bitmap.width / 2
sprite.oy = sprite.bitmap.height / 2
sprite.x = Graphics.width / 2
sprite.y = Graphics.height / 2
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
@command_window = Window_TitleCommand.new
@command_window.set_handler(:new_game, method(:command_new_game))
@command_window.set_handler(:continue, method(:command_continue))
@command_window.set_handler(:shutdown, method(:command_shutdown))
end
#--------------------------------------------------------------------------
# * Close Command Window
#--------------------------------------------------------------------------
def close_command_window
@command_window.close
update until @command_window.close?
end
#--------------------------------------------------------------------------
# * [New Game] Command
#--------------------------------------------------------------------------
def command_new_game
DataManager.setup_new_game
close_command_window
fadeout_all
$game_map.autoplay
SceneManager.goto(Scene_Map)
end
#--------------------------------------------------------------------------
# * [Continue] Command
#--------------------------------------------------------------------------
def command_continue
close_command_window
SceneManager.call(Scene_Load)
end
#--------------------------------------------------------------------------
# * [Shut Down] Command
#--------------------------------------------------------------------------
def command_shutdown
close_command_window
fadeout_all
SceneManager.exit
end
#--------------------------------------------------------------------------
# * Play Title Screen Music
#--------------------------------------------------------------------------
def play_title_music
$data_system.title_bgm.play
RPG::BGS.stop
RPG::ME.stop
end
end |
Mis à jour le 21 novembre 2020.
|