Bienvenue visiteur !
|
Statistiques
Liste des membres
Contact
Mentions légales
279 connectés actuellement
30732104 visiteurs depuis l'ouverture
2082 visiteurs aujourd'hui
Partenaires
Tous nos partenaires
Devenir partenaire
|
Ephy -
posté le 14/10/2022 à 06:53:18 (30100 messages postés)
- | [BIG SHOT] | Domaine concerné: Script Logiciel utilisé: RMVXAce Yo!
J'utilise actuellement le script DT's Difficulty sur VXAce que voici:
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
| #===============================================================================
#
# DT's Difficulty
# Author: DoctorTodd
# Date (06/24/2012)
# Version: (1.0.0) (VXA)
# Level: (Medium)
# Email: Todd@beacongames.com
#
#Script Found here: https://rmrk.net/index.php/topic,46302.0.html
#
#===============================================================================
#
# NOTES: 1)This script will only work with ace.
# 2)A difficulty must be selected before the first battle or the game WILL
# CRASH.
#
#===============================================================================
#
# Description: Lets the player select the games difficulty.
#
# Credits: Me (DoctorTodd), D&P3 for saving bug fix.
#
#===============================================================================
#
# Instructions
# Paste above main.
#
#===============================================================================
#
# Free for any use as long as I'm credited.
#
#===============================================================================
#
# Editing begins 38 and ends on 71.
#
#===============================================================================
module TODDDIFFICULTY
#Easy Text.
EASYT = "Facile - Suivez l'histoire sans souci"
#Normal Text.
NORMALT = "Normal - Difficulté par défaut"
#Heroic Text.
HEROICT = "Heroïque - Pour ceux en quête de défis"
#Hard Text.
HARDT = "Hard"
#Easy enemy parameters multiplier.
EASYM = 0.5
#Heroic enemy parameters multiplier (Normal is skipped since it's what put
#you into the database).
HEROICM = 1.5
#Hard enemy parameters multiplier.
HARDM = 2
#The text above where the selection is made.
TEXT = "Choisissez la difficulté :"
#Menu command?
MENU = true
#Sound effect to play when difficulty is selected.
SE = "Darkness8"
#Switch to allow cancelling the difficulty selection.
#MUST NOT BE ON WHEN SELECTING FOR THE FIRST TIME.
SWITCH = 5
end
#==============================================================================
# ** Game_Enemy
#------------------------------------------------------------------------------
# This class handles enemies. It used within the Game_Troop class
# ($game_troop).
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# * Get Base Value of Parameter
#--------------------------------------------------------------------------
alias todd_difficulty_gmen_param_base param_base
def param_base(param_id, *args)
n1 = todd_difficulty_gmen_param_base(param_id, *args)
n2 = case $game_system.todd_difficulty
when 0 then TODDDIFFICULTY::EASYM
when 1 then 1
when 2 then TODDDIFFICULTY::HEROICM
when 3 then TODDDIFFICULTY::HARDM
end
return n1 * n2
end
end
#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
# This class handles system data. It saves the disable state of saving and
# menus. Instances of this class are referenced by $game_system.
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :todd_difficulty # save forbidden
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias todd_difficulty_gamesystem_init initialize
def initialize
@todd_difficulty = 0
todd_difficulty_gamesystem_init
end
end
#==============================================================================
# ** Window_DifficultySelection
#==============================================================================
class Window_DifficultySelection < Window_Command
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0)
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
Graphics.width/2 + 216
end
#--------------------------------------------------------------------------
# * Get Digit Count
#--------------------------------------------------------------------------
def line_max
return 3
end
#--------------------------------------------------------------------------
# * Create Command List
#--------------------------------------------------------------------------
def make_command_list
add_command(TODDDIFFICULTY::EASYT, :easy)
add_command(TODDDIFFICULTY::NORMALT, :normal)
add_command(TODDDIFFICULTY::HEROICT, :heroic)
add_command(TODDDIFFICULTY::HARDT, :hard)
end
end
#==============================================================================
# ** Window_DifficultyName
#==============================================================================
class Window_DifficultyName < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, window_width, fitting_height(1))
refresh
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
return Graphics.width/2 + 64
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
draw_text(4, 0, 400, 80, TODDDIFFICULTY::TEXT)
end
end
#==============================================================================
# ** Scene_Difficulty
#==============================================================================
class Scene_Difficulty < Scene_MenuBase
#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
def start
super
create_command_window
create_name_window
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
@command_window = Window_DifficultySelection.new
@command_window.set_handler(:easy, method(:command_easy))
@command_window.set_handler(:normal, method(:command_normal))
@command_window.set_handler(:heroic, method(:command_heroic))
@command_window.set_handler(:hard, method(:command_hard))
@command_window.set_handler(:cancel, method(:return_scene))if $game_switches[TODDDIFFICULTY::SWITCH] == true
@command_window.x = Graphics.width/2 - 252
@command_window.y = Graphics.height/2 - 50
end
#--------------------------------------------------------------------------
# * Create Difficulty Window
#--------------------------------------------------------------------------
def create_name_window
@name_window = Window_DifficultyName.new
@name_window.x = Graphics.width/2 - 176
@name_window.y = Graphics.height/2 - 97
end
#--------------------------------------------------------------------------
# * [easy] Command
#--------------------------------------------------------------------------
def command_easy
$game_system.todd_difficulty = 0
Audio.se_play("Audio/SE/" + TODDDIFFICULTY::SE, 100, 100)
return_scene
end
#--------------------------------------------------------------------------
# * [normal] Command
#--------------------------------------------------------------------------
def command_normal
$game_system.todd_difficulty = 1
Audio.se_play("Audio/SE/" + TODDDIFFICULTY::SE, 100, 100)
return_scene
end
#--------------------------------------------------------------------------
# * [heroic] Command
#--------------------------------------------------------------------------
def command_heroic
$game_system.todd_difficulty = 2
Audio.se_play("Audio/SE/" + TODDDIFFICULTY::SE, 100, 100)
return_scene
end
#--------------------------------------------------------------------------
# * [hard] Command
#--------------------------------------------------------------------------
def command_hard
$game_system.todd_difficulty = 3
Audio.se_play("Audio/SE/" + TODDDIFFICULTY::SE, 100, 100)
return_scene
end
end
if TODDDIFFICULTY::MENU == true
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
alias todd_dif_menu_add_menu_command create_command_window
def create_command_window
todd_dif_menu_add_menu_command
@command_window.set_handler(:dif, method(:command_dif))
end
end
#--------------------------------------------------------------------------
# * [Difficulty] Command
#--------------------------------------------------------------------------
def command_dif
SceneManager.call(Scene_Difficulty)
end
end
if TODDDIFFICULTY::MENU == true
#==============================================================================
# ** Window_MenuCommand
#------------------------------------------------------------------------------
# This command window appears on the menu screen.
#==============================================================================
class Window_MenuCommand < Window_Command
#--------------------------------------------------------------------------
# * Add Main Commands to List
#--------------------------------------------------------------------------
alias todd_dif_menu_command_add_to_menu add_main_commands
def add_main_commands
todd_dif_menu_command_add_to_menu
add_command("Difficulty", :dif, main_commands_enabled)
end
end
end
|
Basiquement, le script permet de choisir la difficulté en appliquant un modificateur unique aux stats des monstres (x0.5, x1 ou x1.5). Mais j'aimerais le pimper un peu pour appliquer des modificateurs spécifiques à chaque stat.
De ce que je comprend, la modif de stat se fait ici, ligne 83:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
| class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# * Get Base Value of Parameter
#--------------------------------------------------------------------------
alias todd_difficulty_gmen_param_base param_base
def param_base(param_id, *args)
n1 = todd_difficulty_gmen_param_base(param_id, *args)
n2 = case $game_system.todd_difficulty
when 0 then TODDDIFFICULTY::EASYM
when 1 then 1
when 2 then TODDDIFFICULTY::HEROICM
when 3 then TODDDIFFICULTY::HARDM
end
return n1 * n2
end
end |
Les modificateurs sont contenus dans EASYM/HEROICM (définis en haut dans le script). Ca ça va.
Mais je ne sais pas exactement quoi écrire pour avoir toutes les stats séparées plutôt que toutes les stats en bloc.
Même pas la peine de s'embêter à définir de nouvelles variables, je me contenterais très bien de modificateurs codés en dur dans cette partie du code.
|
Power Level: 1 148 355,38|Mystic Slayer (Value!+)|Le monde d'Adélaïde|Reikon no Yume|★ H-Project|Toho Danmaku Arena|Loli versus Ponies|Mes vidéos|Ma galerie|Débuter sur VX:10, 11|Tuto: Importation de ressources|Mapper avec les RTP VX|Touhou|Fan de Omenides|Fan de Estheone|Eph'ille: 14 |
cortez -
posté le 14/10/2022 à 16:42:28 (524 messages postés)
| | Je n'ai pas les compétences pour modifier ce qu'il faut dans le script. Par contre je te conseille ce script : (qui permet de tout gérer avec des %)
https://pastebin.com/raw/VB5QUann
Et je t'ai préparé un petit script de menu pour aller avec a partir de celui de DoctorTodd: (il faut le placer au dessus de main mais en dessous de celui de TheoAllen)
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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
| #===============================================================================
#
# Difficulty Menu
# Author: DoctorTodd
# Date (06/24/2012)
# Version: (1.0.0) (VXA)
# Level: (Medium)
# Email: Todd@beacongames.com
#
#Script Found here: https://rmrk.net/index.php/topic,46302.0.html
#
#===============================================================================
#
# NOTES: 1)This script will only work with ace.
#
#===============================================================================
#
# Description: Lets the player select the games difficulty.
#
# Credits: Me (DoctorTodd), D&P3 for saving bug fix.
#
#===============================================================================
#
# Instructions
# Paste above main.
#
#===============================================================================
#
# Free for any use as long as I'm credited.
#
#===============================================================================
#
# Editing begins 38 and ends on 71.
#
#===============================================================================
module TODDDIFFICULTY
#Easy Text.
EASYT = "Facile - Suivez l'histoire sans souci"
#Normal Text.
NORMALT = "Normal - Difficulté par défaut"
#Heroic Text.
HEROICT = "Heroïque - Pour ceux en quête de défis"
#Hard Text.
HARDT = "Hard"
#Easy enemy parameters multiplier.
EASYM = 0
#Heroic enemy parameters multiplier (Normal is skipped since it's what put
#you into the database).
HEROICM = 2
#Hard enemy parameters multiplier.
HARDM = 3
#The text above where the selection is made.
TEXT = "Choisissez la difficulté :"
#Menu command?
MENU = true
#Sound effect to play when difficulty is selected.
SE = "Darkness8"
#Switch to allow cancelling the difficulty selection.
#MUST NOT BE ON WHEN SELECTING FOR THE FIRST TIME.
SWITCH = 5
end
#==============================================================================
# ** Game_System
#------------------------------------------------------------------------------
# This class handles system data. It saves the disable state of saving and
# menus. Instances of this class are referenced by $game_system.
#==============================================================================
class Game_System
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :todd_difficulty # save forbidden
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias todd_difficulty_gamesystem_init initialize
def initialize
@todd_difficulty = 0
todd_difficulty_gamesystem_init
end
end
#==============================================================================
# ** Window_DifficultySelection
#==============================================================================
class Window_DifficultySelection < Window_Command
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0)
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
Graphics.width/2 + 216
end
#--------------------------------------------------------------------------
# * Get Digit Count
#--------------------------------------------------------------------------
def line_max
return 3
end
#--------------------------------------------------------------------------
# * Create Command List
#--------------------------------------------------------------------------
def make_command_list
add_command(TODDDIFFICULTY::EASYT, :easy)
add_command(TODDDIFFICULTY::NORMALT, :normal)
add_command(TODDDIFFICULTY::HEROICT, :heroic)
add_command(TODDDIFFICULTY::HARDT, :hard)
end
end
#==============================================================================
# ** Window_DifficultyName
#==============================================================================
class Window_DifficultyName < Window_Base
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0, window_width, fitting_height(1))
refresh
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
return Graphics.width/2 + 64
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
contents.clear
draw_text(4, 0, 400, 80, TODDDIFFICULTY::TEXT)
end
end
#==============================================================================
# ** Scene_Difficulty
#==============================================================================
class Scene_Difficulty < Scene_MenuBase
#--------------------------------------------------------------------------
# * Start Processing
#--------------------------------------------------------------------------
def start
super
create_command_window
create_name_window
end
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
def create_command_window
@command_window = Window_DifficultySelection.new
@command_window.set_handler(:easy, method(:command_easy))
@command_window.set_handler(:normal, method(:command_normal))
@command_window.set_handler(:heroic, method(:command_heroic))
@command_window.set_handler(:hard, method(:command_hard))
@command_window.set_handler(:cancel, method(:return_scene))if $game_switches[TODDDIFFICULTY::SWITCH] == true
@command_window.x = Graphics.width/2 - 252
@command_window.y = Graphics.height/2 - 50
end
#--------------------------------------------------------------------------
# * Create Difficulty Window
#--------------------------------------------------------------------------
def create_name_window
@name_window = Window_DifficultyName.new
@name_window.x = Graphics.width/2 - 176
@name_window.y = Graphics.height/2 - 97
end
#--------------------------------------------------------------------------
# * [easy] Command
#--------------------------------------------------------------------------
def command_easy
$game_system.todd_difficulty = 0
$game_variables[THEOLIZED::DIFFSETTING::VAR_ID] = 1
Audio.se_play("Audio/SE/" + TODDDIFFICULTY::SE, 100, 100)
return_scene
end
#--------------------------------------------------------------------------
# * [normal] Command
#--------------------------------------------------------------------------
def command_normal
$game_system.todd_difficulty = 1
$game_variables[THEOLIZED::DIFFSETTING::VAR_ID] = 2
Audio.se_play("Audio/SE/" + TODDDIFFICULTY::SE, 100, 100)
return_scene
end
#--------------------------------------------------------------------------
# * [heroic] Command
#--------------------------------------------------------------------------
def command_heroic
$game_system.todd_difficulty = 2
$game_variables[THEOLIZED::DIFFSETTING::VAR_ID] = 3
Audio.se_play("Audio/SE/" + TODDDIFFICULTY::SE, 100, 100)
return_scene
end
#--------------------------------------------------------------------------
# * [hard] Command
#--------------------------------------------------------------------------
def command_hard
$game_system.todd_difficulty = 3
$game_variables[THEOLIZED::DIFFSETTING::VAR_ID] = 4
Audio.se_play("Audio/SE/" + TODDDIFFICULTY::SE, 100, 100)
return_scene
end
end
if TODDDIFFICULTY::MENU == true
#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
# This class performs the menu screen processing.
#==============================================================================
class Scene_Menu < Scene_MenuBase
#--------------------------------------------------------------------------
# * Create Command Window
#--------------------------------------------------------------------------
alias todd_dif_menu_add_menu_command create_command_window
def create_command_window
todd_dif_menu_add_menu_command
@command_window.set_handler(:dif, method(:command_dif))
end
end
#--------------------------------------------------------------------------
# * [Difficulty] Command
#--------------------------------------------------------------------------
def command_dif
SceneManager.call(Scene_Difficulty)
end
end
if TODDDIFFICULTY::MENU == true
#==============================================================================
# ** Window_MenuCommand
#------------------------------------------------------------------------------
# This command window appears on the menu screen.
#==============================================================================
class Window_MenuCommand < Window_Command
#--------------------------------------------------------------------------
# * Add Main Commands to List
#--------------------------------------------------------------------------
alias todd_dif_menu_command_add_to_menu add_main_commands
def add_main_commands
todd_dif_menu_command_add_to_menu
add_command("Difficulty", :dif, main_commands_enabled)
end
end
end |
Vu que le menu n'affiche que 4 choix, il permet seulement d'utiliser les 4 premières valeurs du script de TheoAllen.
# value => [mhp ,mmp ,atk ,def ,mat ,mdf ,agi ,luk , exp,gold, buy,sell]
1 => [100 ,100 ,100 ,100 ,100 ,100 ,100 ,100 , 100, 100, 100, 100],
2 => [100 ,100 ,100 ,100 ,100 ,100 ,100 ,100 , 100, 100, 100, 100],
3 => [100 ,100 ,100 ,100 ,100 ,100 ,100 ,100 , 100, 100, 100, 100],
4 => [100 ,100 ,100 ,100 ,100 ,100 ,100 ,100 , 100, 100, 100, 100],
5 => [100 ,100 ,100 ,100 ,100 ,100 ,100 ,100 , 100, 100, 100, 100],
J'ai prévu le coup si tu change la variable qui gère la difficulté (var n°9 par défaut) c'est pris en compte dans le menu (pas besoin de modifier le script de menu)
|
Index du forum > Entraide > [RESOLU] [RMVXAce] Script DT's Difficulty
|
|
|