• Anmelden

Ventus

Rekrut

  • »Ventus« ist der Autor dieses Themas

Motto: 目は心の鏡。

  • Nachricht senden

1

Mittwoch, 6. Januar 2010, 01:33

Schwierigkeitsstufe vorm Spiel beginn einstellen

Hey liebe Community,

Ich suche schon lange nach einem Script,dass am Anfang eines Spiels nach dem Schwierigkeitsgrad fragt.Zum Beispiel Leicht,Normal,Schwer.Ich hatte mal eines gefunden doch es ist nicht mehr da.Falls jemand mir dabei helfen könnte und ein gutes finden würde(für den XP)dann wäre das sehr hilfreich.Ich bedanke mich schonmal vorweg.



MFG Brush

*schieb* wenn du es für den XP brauchst, warum dann bei VX Posten? ~Monsta

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »Monsta« (6. Januar 2010, 11:26)


2

Mittwoch, 6. Januar 2010, 11:14

Ich kenne nur dies hier:
Spoiler

Quellcode

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
   1. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
   2. #_/    ◆戦闘難易度 - KGC_BattleDifficulty◆
   3. #_/----------------------------------------------------------------------------
   4. #_/  æˆ¦é—˜é›£æ˜“åº¦ã®è¨­å®šæ©Ÿèƒ½ã‚’è¿½åŠ ã—ã¾ã™ã€‚
   5. #_/  (ãƒ¡ãƒ‹ãƒ¥ãƒ¼ç­‰ã«è¡¨ç¤ºã™ã‚‹å ´åˆã¯[MenuAlter][TitleOption]参照)
   6. #_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
   7.  
   8. #==============================================================================
   9. # ★ ã‚«ã‚¹ã‚¿ãƒžã‚¤ã‚ºé …ç›® ★
  10. #==============================================================================
  11.  
  12. module KGC
  13.   # ◆難易度配列
  14.   #  ≪"名称", HP, SP, 他能力値, EXP, ゴールド, トレジャー出現率≫
  15.   #  å„é …ç›®ã®å€çŽ‡ã‚’æŒ‡å®š(百分率)。
  16.   BD_DIFFICULTY_LIST = [
  17.     ["Rookie",   60,  50,  60, 100, 100, 100],
  18.     ["Easy",     80,  80,  70, 100, 100, 100],
  19.     ["Normal",  100, 100, 100, 100, 100, 100],
  20.     ["Hard",    150, 130, 120, 100, 100, 100],
  21.     ["Mania",   200, 180, 150, 100, 100, 100],
  22.     ["Unknown", 300, 260, 200, 100, 100, 100],
  23.     ["Divine",  500, 400, 300, 100, 100, 100]
  24.   ]
  25.   # ◆初期難易度
  26.   #  BD_DIFFICULTY_LIST のインデックス。
  27.   BD_INITIAL_DIFFICULTY = 2
  28. end
  29.  
  30. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
  31.  
  32. $imported = {} if $imported == nil
  33. $imported["BattleDifficulty"] = true
  34.  
  35. module Difficulty
  36.   #--------------------------------------------------------------------------
  37.   # ● 難易度設定取得
  38.   #--------------------------------------------------------------------------
  39.   def self.get
  40.     # 難易度設定を返す
  41.     return KGC::BD_DIFFICULTY_LIST[$game_system.difficulty]
  42.   end
  43.   #--------------------------------------------------------------------------
  44.   # ● 難易度設定変更
  45.   #--------------------------------------------------------------------------
  46.   def self.set(index)
  47.     # 範囲外ならば変更しない
  48.     return if index < 0 || index >= KGC::BD_DIFFICULTY_LIST.size
  49.     $game_system.difficulty = index
  50.   end
  51.   #--------------------------------------------------------------------------
  52.   # ● 能力値補正済みエネミー取得
  53.   #--------------------------------------------------------------------------
  54.   def self.get_revised_enemy(enemy)
  55.     en = enemy.clone
  56.     diff = self.get
  57.     en.maxhp = en.maxhp * diff[1] / 100
  58.     en.maxsp = en.maxsp * diff[2] / 100
  59.     en.str   = en.str   * diff[3] / 100
  60.     en.dex   = en.dex   * diff[3] / 100
  61.     en.agi   = en.agi   * diff[3] / 100
  62.     en.int   = en.int   * diff[3] / 100
  63.     en.atk   = en.atk   * diff[3] / 100
  64.     en.pdef  = en.pdef  * diff[3] / 100
  65.     en.mdef  = en.mdef  * diff[3] / 100
  66.     en.exp   = en.exp   * diff[4] / 100
  67.     en.gold  = en.gold  * diff[4] / 100
  68.     if en.treasure_prob < 100
  69.       en.treasure_prob = [en.treasure_prob * diff[5] / 100, 100].min
  70.     end
  71.     return en
  72.   end
  73. end
  74.  
  75. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
  76.  
  77. #==============================================================================
  78. # â–  Game_System
  79. #==============================================================================
  80.  
  81. class Game_System
  82.   attr_accessor :difficulty  # 難易度
  83.   #--------------------------------------------------------------------------
  84.   # ● オブジェクト初期化
  85.   #--------------------------------------------------------------------------
  86.   alias initialize_KGC_BattleDifficulty initialize
  87.   def initialize
  88.     # 元の処理を実行
  89.     initialize_KGC_BattleDifficulty
  90.  
  91.     @difficulty = KGC::BD_INITIAL_DIFFICULTY
  92.   end
  93.   #--------------------------------------------------------------------------
  94.   # ● 難易度一覧
  95.   #--------------------------------------------------------------------------
  96.   def difficulty_list
  97.     return KGC::BD_DIFFICULTY_LIST
  98.   end
  99. end
 100.  
 101. #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
 102.  
 103. #==============================================================================
 104. # â–  Game_Enemy
 105. #==============================================================================
 106.  
 107. class Game_Enemy < Game_Battler
 108.   #--------------------------------------------------------------------------
 109.   # ● 基本 MaxHP の取得
 110.   #--------------------------------------------------------------------------
 111.   alias base_maxhp_KGC_BattleDifficulty base_maxhp
 112.   def base_maxhp
 113.     n = base_maxhp_KGC_BattleDifficulty
 114.     n *= Difficulty.get[1]
 115.     return n / 100
 116.   end
 117.   #--------------------------------------------------------------------------
 118.   # ● 基本 MaxSP の取得
 119.   #--------------------------------------------------------------------------
 120.   alias base_maxsp_KGC_BattleDifficulty base_maxsp
 121.   def base_maxsp
 122.     n = base_maxsp_KGC_BattleDifficulty
 123.     n *= Difficulty.get[2]
 124.     return n / 100
 125.   end
 126.   #--------------------------------------------------------------------------
 127.   # ● 基本腕力の取得
 128.   #--------------------------------------------------------------------------
 129.   alias base_str_KGC_BattleDifficulty base_str
 130.   def base_str
 131.     n = base_str_KGC_BattleDifficulty
 132.     n *= Difficulty.get[3]
 133.     return n / 100
 134.   end
 135.   #--------------------------------------------------------------------------
 136.   # ● 基本器用さの取得
 137.   #--------------------------------------------------------------------------
 138.   alias base_dex_KGC_BattleDifficulty base_dex
 139.   def base_dex
 140.     n = base_dex_KGC_BattleDifficulty
 141.     n *= Difficulty.get[3]
 142.     return n / 100
 143.   end
 144.   #--------------------------------------------------------------------------
 145.   # ● åŸºæœ¬ç´ æ—©ã•ã®å–å¾—
 146.   #--------------------------------------------------------------------------
 147.   alias base_agi_KGC_BattleDifficulty base_agi
 148.   def base_agi
 149.     n = base_agi_KGC_BattleDifficulty
 150.     n *= Difficulty.get[3]
 151.     return n / 100
 152.   end
 153.   #--------------------------------------------------------------------------
 154.   # ● 基本魔力の取得
 155.   #--------------------------------------------------------------------------
 156.   alias base_int_KGC_BattleDifficulty base_int
 157.   def base_int
 158.     n = base_int_KGC_BattleDifficulty
 159.     n *= Difficulty.get[3]
 160.     return n / 100
 161.   end
 162.   #--------------------------------------------------------------------------
 163.   # ● 基本攻撃力の取得
 164.   #--------------------------------------------------------------------------
 165.   alias base_atk_KGC_BattleDifficulty base_atk
 166.   def base_atk
 167.     n = base_atk_KGC_BattleDifficulty
 168.     n *= Difficulty.get[3]
 169.     return n / 100
 170.   end
 171.   #--------------------------------------------------------------------------
 172.   # ● 基本物理防御の取得
 173.   #--------------------------------------------------------------------------
 174.   alias base_pdef_KGC_BattleDifficulty base_pdef
 175.   def base_pdef
 176.     n = base_pdef_KGC_BattleDifficulty
 177.     n *= Difficulty.get[3]
 178.     return n / 100
 179.   end
 180.   #--------------------------------------------------------------------------
 181.   # ● 基本魔法防御の取得
 182.   #--------------------------------------------------------------------------
 183.   alias base_mdef_KGC_BattleDifficulty base_mdef
 184.   def base_mdef
 185.     n = base_mdef_KGC_BattleDifficulty
 186.     n *= Difficulty.get[3]
 187.     return n / 100
 188.   end
 189.   #--------------------------------------------------------------------------
 190.   # ● 基本回避修正の取得
 191.   #--------------------------------------------------------------------------
 192.   alias base_eva_KGC_BattleDifficulty base_eva
 193.   def base_eva
 194.     n = base_eva_KGC_BattleDifficulty
 195.     n *= Difficulty.get[3]
 196.     return n / 100
 197.   end
 198.   #--------------------------------------------------------------------------
 199.   # ● EXP の取得
 200.   #--------------------------------------------------------------------------
 201.   alias exp_KGC_BattleDifficulty exp
 202.   def exp
 203.     n = exp_KGC_BattleDifficulty
 204.     n *= Difficulty.get[4]
 205.     return n / 100
 206.   end
 207.   #--------------------------------------------------------------------------
 208.   # ● ゴールドの取得
 209.   #--------------------------------------------------------------------------
 210.   alias gold_KGC_BattleDifficulty gold
 211.   def gold
 212.     n = gold_KGC_BattleDifficulty
 213.     n *= Difficulty.get[5]
 214.     return n / 100
 215.   end
 216.   #--------------------------------------------------------------------------
 217.   # ● トレジャー出現率の取得
 218.   #--------------------------------------------------------------------------
 219.   alias treasure_prob_KGC_BattleDifficulty treasure_prob
 220.   def treasure_prob
 221.     n = treasure_prob_KGC_BattleDifficulty
 222.     if n < 100
 223.       n *= Difficulty.get[6]
 224.       return [n / 100, 100].min
 225.     else
 226.       return n
 227.     end
 228.   end
 229. end
zum Lesen den Text mit der Maus markieren

In der Liste am Anfang(Rookie, Normal, Divine, etc) kannst du die Abstufungen einstellen. Die Zahlen repräsentieren die Prozentzahlen der einzelnen Werte in folgender Reihenfolge:
HP, SP, alle Stats(Str, Agi etc), Exp, Gold und zuletzt Item-Droprate.


Und für einen Auswahlbildschirm zur Einstellung des Schwierigkeitsgrades kannst du dann noch dieses Script benutzen:

Spoiler

Quellcode

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
294
295
296
297
298
 #===================================================
 #Scene_difficult_menu by panchokoster
 #===================================================
 
 module DIFFICULT
   SPRITESET_TYPE = 1 #choose spriteset type, 1=>title screen, 2=>picture, 3+map
   PICTURE_NAME = "picture name" #choose spriteset type 2 to use, put the image in yours pictures folder
 end
 
 
 
  class Scene_Title
   alias old_command_new_game command_new_game
   def command_new_game
     old_command_new_game
     $scene = Scene_select_yes_no.new
   end
 end
 
 
 class Scene_select_yes_no
 
 
   def initialize(menu_index = 0)
    @menu_index = menu_index
   end  
 
   def main
    case DIFFICULT::SPRITESET_TYPE
      when 1
       @sprite = Sprite.new
       @sprite.bitmap = RPG::Cache.title($data_system.title_name)
      when 2
       @sprite = Sprite.new
       @sprite.bitmap = RPG::Cache.picture(DIFFICULT::PICTURE_NAME)
      when 3
        @spriteset = Spriteset_Map.new
 
    end
    @window_q=Window_question.new
    @window_q.x = 200
    @window_q.y = 220-64
 
      s1 = "yes"
      s2 = "not right now"
 
    @window_yes_no = Window_Command.new(200, [s1,s2])
    @window_yes_no.y = 220
    @window_yes_no.x = 220
    @window_yes_no.index = @menu_index
 
    Graphics.transition
    loop do
    Graphics.update
    Input.update
    update
    if $scene != self
      break
      end
    end
    Graphics.freeze
    @window_yes_no.dispose
    @window_q.dispose
     case DIFFICULT::SPRITESET_TYPE
     when 1..2
     @sprite.bitmap.dispose
     @sprite.dispose
     when 3
      @spriteset.dispose
 
 
    end
   end
 
   def update
      @window_yes_no.update
 
   if Input.trigger?(Input::C)  
    case @window_yes_no.index
   when 0
     yes
   when 1
     no
     end  
    end
   end
 
   def yes
    $game_system.se_play($data_system.decision_se)
    $scene = Scene_difficult_menu.new
   end
 
   def no
    $game_system.se_play($data_system.decision_se)
    Difficulty.set(2)
    $scene = Scene_Map.new
   end
 
 end
 
 
 
 #===================================================
 #Scene_difficult_menu
 #===================================================
 class Scene_difficult_menu
 
   def initialize(menu_index = 0)
    @menu_index = menu_index
   end  
 
   def main
 
    case DIFFICULT::SPRITESET_TYPE
      when 1
       @sprite = Sprite.new
       @sprite.bitmap = RPG::Cache.title($data_system.title_name)
      when 2
       @sprite = Sprite.new
       @sprite.bitmap = RPG::Cache.picture(DIFFICULT::PICTURE_NAME)
      when 3
        @spriteset = Spriteset_Map.new
    end
    @window_q2 = Window_question2.new
    @window_q2.x = 50
    @window_q2.y = 125-64
    @window_help = Window_Help_dif_menu.new
    @window_help.update(" ")
      s1 = "Rookie"
      s2 = "Easy"
      s3 = "Normal"
      s4 = "Hard"
      s5 = "Mania"
      s6 = "Unknown"
      s7 = "Divine"
    @window_help.x = 50
    @window_help.y = 125
    @window_command_dif = Window_Command.new(200, [s1,s2,s3,s4,s5,s6,s7])
    @window_command_dif.y = 114+75
    @window_command_dif.x = 220
    @window_command_dif.index = @menu_index
 
    Graphics.transition
    loop do
    Graphics.update
    Input.update
    update
    if $scene != self
      break
     end
   end
 
 #Execute when exiting the scene:
    Graphics.freeze
    @window_command_dif.dispose
    @window_help.dispose
    @window_q2.dispose
    case DIFFICULT::SPRITESET_TYPE
    when 1..2
     @sprite.bitmap.dispose
     @sprite.dispose
    when 3
     @spriteset.dispose
 
    end
   end
 
 #--------------------------------------------------------------------------------------------------------
 
   def update
 
           @window_command_dif.update
    case @window_command_dif.index
   when 0  
    @window_help.update("The minimal difficulty only for losers") #"Rookie"
   when 1
    @window_help.update("An easy difficult level for kids") #"Easy"
   when 2
    @window_help.update("The defaut game difficluty") #"Normal"
   when 3
     @window_help.update("Start fighting stronger monsters") #"Hard"
   when 4
    @window_help.update("Maniac difficult level, only for advanced gamers") #"Mania"
   when 5
     @window_help.update("????")#"Unknown"
   when 6
     @window_help.update("Master the game fighting the strongest monsters")#"Divine"
    end  
 
   #THIS IS FOR THE OPTION FUNCTIONS:
    if Input.trigger?(Input::C)
    case @window_command_dif.index
   when 0
     rookie
   when 1
     easy
   when 2
     normal
   when 3
     hard
   when 4
     mania
   when 5
     unknown
   when 6
     divine
     end  
    end
   end
 
   def rookie #s1
    $game_system.se_play($data_system.decision_se)
    Difficulty.set(0)
    $scene = Scene_Map.new
   end  
 
   def easy #s2
    $game_system.se_play($data_system.decision_se)
    Difficulty.set(1)
    $scene = Scene_Map.new
   end  
 
   def normal #s3
    $game_system.se_play($data_system.decision_se)
    Difficulty.set(2)
    $scene = Scene_Map.new
   end
 
   def hard #s4
    $game_system.se_play($data_system.decision_se)
    Difficulty.set(3)  
    $scene = Scene_Map.new
   end
 
   def mania #s5
    $game_system.se_play($data_system.decision_se)
    Difficulty.set(4)  
    $scene = Scene_Map.new
   end
 
   def unknown #s6
    $game_system.se_play($data_system.decision_se)
    Difficulty.set(5)
    $scene = Scene_Map.new
   end
 
   def divine #s7
    $game_system.se_play($data_system.decision_se)
    Difficulty.set(6)
    $scene = Scene_Map.new
   end
 
 
 end #of the Scene
 
 
 #===================================================
 #Window_Help_dif_menu
 #===================================================
 class Window_Help_dif_menu < Window_Base  
 
 def initialize
 super(0, 0, 540,64)
 self.contents = Bitmap.new(width-32, height-32)
 self.contents.font.name = "Tahoma"
 self.contents.font.size = 20
 end
 
 def update(help_text)
   self.contents.clear
   self.contents.draw_text(0, 0, 440, 32, help_text)
 end
 
 end
 
 class Window_question < Window_Base
 
   def initialize
    super(0, 0, 240,64)
    self.contents = Bitmap.new(width-32, height-32)
    self.contents.font.name = "Tahoma"
    self.contents.font.size = 20
    self.contents.draw_text(0, 0, 210, 32, "    Change game difficulty?")
   end
 
 end
 
 class Window_question2 < Window_Base
 
   def initialize
    super(0, 0, 240,64)
    self.contents = Bitmap.new(width-32, height-32)
    self.contents.font.name = "Tahoma"
    self.contents.font.size = 20
    self.contents.draw_text(0, 0, 210, 32, "Choose the difficult Level... ")
   end
 
 end 
zum Lesen den Text mit der Maus markieren

Social Bookmarks