❤ 0 Auteur : DoctorTodd & TDS (aide)
Logiciel : RPG Maker VX
Nombre de scripts : 2
Fonctionnalités
Permet d'avoir un menu adapté pour les jeux à une équipe avec un seul héros. Est valable pour l'affichage dans le menu principal et en combat.
Installation
A placer au-dessus de Main.
Utilisation
Dans le premier script, vous pouvez configurer le windowskin utilisé sur cette ligne (entre apostrophes, sans extension) :
Dans le second script, vous pouvez choisir d'utiliser une image, à éditer ici :
1
2
3
| GUI = ("Battle_GUI")
Vous pouvez changer son opactité sur cette ligne (0 : transparent ; 255 : opaque)
[code]OPACITY = (255) |
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
| #===============================================================================
#
# DT's One Person Menu
# Author: DoctorTodd
# Date (02/19/2012)
# Type: (Menu)
# Version: (1.1.0)
# Level: (Simple)
# Email: BeaconGames2011@gmail.com
#
#===============================================================================
#
# Description: A menu that is modified to work as if you are only using one
# actor.
#
# Credits: Me (DoctorTodd)
#
#===============================================================================
#
# Instructions
# Paste above main.
#
#===============================================================================
#
# Editing begins 30 and ends 32.
#
#===============================================================================
module DTOPM
#Window skin to use, place in system.
WINDOW = ('Window')
end
class Scene_Menu < Scene_Base
include DTOPM
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Start processing
#--------------------------------------------------------------------------
def start
super
create_menu_background
create_command_window
@status_window = Window_MenuStatus.new (200, 75)
@status_window.windowskin = Cache.system(DTOPM::WINDOW)
@gold_window = Window_Gold.new(40, 250)
@gold_window.windowskin = Cache.system(DTOPM::WINDOW)
end
#--------------------------------------------------------------------------
# * Termination Processing
#--------------------------------------------------------------------------
def terminate
super
dispose_menu_background
@command_window.dispose
@gold_window.dispose
@status_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
super
update_menu_background
@command_window.update
@gold_window.update
@status_window.update
if @command_window.active
update_command_selection
end
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
s1 = Vocab::item
s2 = Vocab::skill
s3 = Vocab::equip
s4 = Vocab::status
s5 = Vocab::save
s6 = Vocab::game_end
@command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
@command_window.index = @menu_index
@command_window.x = 40
@command_window.y = 75
@command_window.windowskin = Cache.system(DTOPM::WINDOW)
if $game_party.members.size == 0 # If number of party members is 0
@command_window.draw_item(0, false) # Disable item
@command_window.draw_item(1, false) # Disable skill
@command_window.draw_item(2, false) # Disable equipment
@command_window.draw_item(3, false) # Disable status
end
if $game_system.save_disabled # If save is forbidden
@command_window.draw_item(4, false) # Disable save
end
end
#--------------------------------------------------------------------------
# * Update Command Selection
#--------------------------------------------------------------------------
def update_command_selection
if Input.trigger?(Input::B)
Sound.play_cancel
$scene = Scene_Map.new
elsif Input.trigger?(Input::C)
if $game_party.members.size == 0 and @command_window.index < 4
Sound.play_buzzer
return
elsif $game_system.save_disabled and @command_window.index == 4
Sound.play_buzzer
return
end
Sound.play_decision
case @command_window.index
when 0 # Item
$scene = Scene_Item.new
when 1 # Skill
@actor = $game_party.members[1]
$scene = Scene_Skill.new
when 2 # Equip
@actor = $game_party.members[1]
$scene = Scene_Equip.new
when 3 # Status
@actor = $game_party.members[1]
$scene = Scene_Status.new
when 4 # Save
$scene = Scene_File.new(true, false, false)
when 5 # End Game
$scene = Scene_End.new
end
end
end
#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
# This window displays the characters status on the menu screen.
#==============================================================================
class Window_MenuStatus < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
# x : window X coordinate
# y : window Y coordinate
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, 300, 231)
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
@actor = $game_party.members[0]
draw_actor_face(@actor, 0, 0)
draw_actor_name(@actor, 110, 5)
draw_actor_level(@actor, 190, 5)
draw_actor_hp(@actor, 110 ,40)
draw_actor_mp(@actor, 110 , 65)
draw_actor_parameter(@actor, 0, 100, 0)
draw_actor_parameter(@actor, 0, 124, 1)
draw_actor_parameter(@actor, 0, 148, 2)
draw_actor_parameter(@actor, 0, 172, 3)
draw_actor_graphic(@actor, 220, 160)
draw_actor_state(@actor, 190, 180, width = 96)
end
end
end |
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
| #===============================================================================
#
# DT's One Person Battle
# Author: DoctorTodd
# Date (02/19/2012)
# Type: (Battle Plug-in)
# Version: (1.1.0)
# Level: (Simple)
# Email: BeaconGames2011@gmail.com
#
#===============================================================================
#
# Description: Modifies any battle system that use Window_BattleStatus to work as
# if there is only one actor.
#
#
# Credits: Me (DoctorTodd), TDS (Help for removing curor)
#
#===============================================================================
#
# Instructions
# Paste above main.
#
#===============================================================================
#
# Editing begins on 31 and ends on 36.
#
#===============================================================================
module DTBS
#Picture to be used if you want to use one.
GUI = ("Battle_GUI")
#Don't touch unless you use a picture or just want the window to be transparent,
#if you do set to 0 for transparent and 255 for opaque.
OPACITY = (255)
end
class Window_BattleStatus < Window_Selectable
include DTBS
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, 416, 128)
refresh
update_cursor
self.opacity = (DTBS::OPACITY)
@GUIPIC = Sprite.new
@GUIPIC.bitmap = Cache.system(DTBS::GUI)
end
#--------------------------------------------------------------------------
# * Dispose
#--------------------------------------------------------------------------
def dispose
super
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
draw_items
end
#--------------------------------------------------------------------------
# * Update cursor
#--------------------------------------------------------------------------
def update_cursor
self.cursor_rect.empty
end
#--------------------------------------------------------------------------
# * Draw Item
# index : Item number
#--------------------------------------------------------------------------
def draw_items
actor = $game_party.members[0]
draw_actor_face(actor, 0, 0, size = 96)
draw_actor_name(actor, 105, 0)
draw_actor_hp(actor, 110 ,40, width = 175)
draw_actor_mp(actor, 110 , 65, width = 175)
draw_actor_state(actor, 310, 65, width = 96)
draw_actor_graphic(actor, 220, 160)
draw_actor_level(actor, 230, 0)
draw_actor_graphic(actor, 343, 60)
end
end |
Mis à jour le 21 octobre 2020.
|