Kennt sich wer mit RPG-Maker XP Scripts aus?

    • Kennt sich wer mit RPG-Maker XP Scripts aus?

      Tut mir leid, wenn es lange lädt, aber sonst wird das Script nicht richtig angezeigt.

      Ich habe folgendes Problem:

      Für mein Zelda Spiel habe ich dieses Script im Internet gefunden:

      Quellcode

      1. SAVES_MAX = 3
      2. SAVE_PICTURE = ""
      3. STARTING_HEARTS = 3
      4. class Game_Temp
      5. attr_accessor :name_fileproc
      6. alias new_initialize initialize
      7. def initialize
      8. new_initialize
      9. @name_fileproc = ""
      10. end
      11. end
      12. class Game_System
      13. attr_accessor :newgame_switch
      14. attr_accessor :played_bgm
      15. attr_accessor :played_bgs
      16. attr_accessor :save_slot
      17. alias new_initialize initialize
      18. def initialize
      19. new_initialize
      20. @newgame_switch = false
      21. @played_bgm = ""
      22. played_bgs = ""
      23. @save_slot = ""
      24. end
      25. end
      26. #==============================================================================
      27. # ¦ Window_NameEdit
      28. #------------------------------------------------------------------------------
      29. # ???????????????????????
      30. #==============================================================================
      31. class Window_NameEdit < Window_Base
      32. def refresh
      33. self.contents.clear
      34. @charset_index = 0 if @charset_index == nil
      35. # ?????
      36. name_array = @name.split(//)
      37. for i in 0...@max_char
      38. c = name_array[i]
      39. if c == nil
      40. c = "_"
      41. end
      42. x = 840 - @max_char * 14 + i * 28
      43. self.contents.draw_text_outline(x, 32, 28, 32, c, 1)
      44. end
      45. # ?????????
      46. bitmap = RPG::Cache.character(@actor.character_name, @actor.character_hue)
      47. cw = bitmap.rect.width / 9.3
      48. ch = bitmap.rect.height / 4
      49. src_rect = Rect.new(@charset_index*120, 0, cw, ch)
      50. self.contents.blt(840 - @max_char * 14 - 40 - (cw/2), 68 - ch, bitmap, src_rect)
      51. end
      52. def charset_index(index)
      53. @charset_index = index
      54. refresh
      55. end
      56. end
      57. #==============================================================================
      58. # ¦ Scene_Name
      59. #------------------------------------------------------------------------------
      60. # ??????????????????
      61. #==============================================================================
      62. class Scene_Name
      63. #--------------------------------------------------------------------------
      64. # ? ?????
      65. #--------------------------------------------------------------------------
      66. def main
      67. #-------------------------------
      68. # Animated Background Setup
      69. #-------------------------------
      70. @back = Sprite.new
      71. #@sprite.bitmap = RPG::Cache.title($data_system.title_name)
      72. @backgroundList = ["Titlescreen1"]
      73. @backgroundGameFrameCount = 0
      74. # Number of game frames per background frame.
      75. @backgroundG_BFrameCount = 3.4
      76. @back.bitmap = RPG::Cache.title(@backgroundList[0])
      77. @sprite = Sprite.new
      78. @sprite.bitmap = RPG::Cache.title($data_system.title_name)
      79. # ???????
      80. @actor = $game_actors[$game_temp.name_actor_id]
      81. # ????????
      82. @edit_window = Window_NameEdit.new(@actor, $game_temp.name_max_char)
      83. @input_window = Window_NameInput.new
      84. # ?????????
      85. Graphics.transition
      86. # ??????
      87. loop do
      88. # ????????
      89. Graphics.update
      90. # ???????
      91. Input.update
      92. # ??????
      93. update
      94. # ????????????????
      95. if $scene != self
      96. break
      97. end
      98. end
      99. # ?????????
      100. Graphics.freeze
      101. # ????????
      102. @sprite.dispose
      103. @back.dispose
      104. @edit_window.dispose
      105. @input_window.dispose
      106. end
      107. #--------------------------------------------------------------------------
      108. # ? ??????
      109. #--------------------------------------------------------------------------
      110. def update
      111. # ????????
      112. @edit_window.update
      113. @input_window.update
      114. @backgroundGameFrameCount = @backgroundGameFrameCount + 1
      115. if @backgroundGameFrameCount >= @backgroundG_BFrameCount
      116. @backgroundGameFrameCount = 0
      117. # Add current background frame to the end
      118. @backgroundList = @backgroundList << @backgroundList[0]
      119. # and drop it from the first position
      120. @backgroundList.delete_at(0)
      121. @sprite.bitmap = RPG::Cache.title(@backgroundList[0])
      122. end
      123. # B ??????????
      124. if Input.repeat?(Input::B)
      125. # ??????? 0 ???
      126. if @edit_window.index == 0
      127. return
      128. end
      129. # ????? SE ???
      130. $game_system.se_play($data_system.cancel_se)
      131. # ?????
      132. @edit_window.back
      133. return
      134. end
      135. # C ??????????
      136. if Input.trigger?(Input::C)
      137. # ??????? [??] ???
      138. if @input_window.character == nil
      139. # ???????
      140. if @edit_window.name == ""
      141. # ???????????
      142. @edit_window.restore_default
      143. # ???????
      144. if @edit_window.name == ""
      145. # ??? SE ???
      146. $game_system.se_play($data_system.buzzer_se)
      147. return
      148. end
      149. # ?? SE ???
      150. $game_system.se_play($data_system.decision_se)
      151. return
      152. end
      153. # ??????????
      154. @actor.name = @edit_window.name
      155. # ?? SE ???
      156. $game_system.se_play($data_system.decision_se)
      157. # ??????????
      158. #--------------------------------------------------------
      159. # Things After this has been edited to fit the new system
      160. #--------------------------------------------------------
      161. $game_party.setup_starting_members
      162. $game_map.setup($data_system.start_map_id)
      163. $game_player.moveto($data_system.start_x, $data_system.start_y)
      164. $game_player.refresh
      165. $game_map.autoplay
      166. $game_map.update
      167. $game_variables[8] = STARTING_HEARTS*2
      168. $game_variables[41] = STARTING_HEARTS
      169. $game_variables[42] = 0
      170. $game_variables[50] = 0
      171. file = $game_temp.name_fileproc
      172. characters = []
      173. for i in 0...$game_party.actors.size
      174. actor = $game_party.actors[i]
      175. characters.push([actor.character_name, actor.character_hue])
      176. end
      177. Marshal.dump(Time.new, file)
      178. Marshal.dump(characters, file)
      179. Marshal.dump(Graphics.frame_count, file)
      180. $game_system.magic_number = $data_system.magic_number
      181. Marshal.dump($game_system, file)
      182. Marshal.dump($game_switches, file)
      183. Marshal.dump($game_variables, file)
      184. Marshal.dump($game_party, file)
      185. Marshal.dump($game_self_switches, file)
      186. Marshal.dump($game_screen, file)
      187. Marshal.dump($game_actors, file)
      188. Marshal.dump($game_troop, file)
      189. Marshal.dump($game_map, file)
      190. Marshal.dump($game_player, file)
      191. file.close
      192. $game_party.remove_actor(1)
      193. $scene = Scene_Map.new
      194. $game_temp.name_calling = false
      195. #--------------------------------------------------------
      196. # Edits ends here
      197. #--------------------------------------------------------
      198. return
      199. end
      200. # ????????????
      201. if @edit_window.index == $game_temp.name_max_char
      202. # ??? SE ???
      203. $game_system.se_play($data_system.buzzer_se)
      204. return
      205. end
      206. # ???????
      207. if @input_window.character == ""
      208. # ??? SE ???
      209. $game_system.se_play($data_system.buzzer_se)
      210. return
      211. end
      212. # ?? SE ???
      213. $game_system.se_play($data_system.decision_se)
      214. # ?????
      215. @edit_window.add(@input_window.character)
      216. return
      217. end
      218. @wait = 3 if @wait == nil or @wait == 0
      219. @charset_index = 0 if @charset_index == nil or @charset_index == 6
      220. @wait -= 1
      221. return if @wait > 0
      222. @charset_index += 1
      223. @edit_window.charset_index(@charset_index)
      224. end
      225. end
      226. #==============================================================================
      227. # ¦ Window_SaveFile
      228. #------------------------------------------------------------------------------
      229. # ???????????????????????????????????
      230. #==============================================================================
      231. class Window_NewLoadFile < Window_Base
      232. #--------------------------------------------------------------------------
      233. # ? ??????????
      234. #--------------------------------------------------------------------------
      235. attr_reader :filename # ?????
      236. attr_reader :selected # ????
      237. #--------------------------------------------------------------------------
      238. # ? ?????????
      239. # file_index : ?????????????? (0~3)
      240. # filename : ?????
      241. #--------------------------------------------------------------------------
      242. def initialize(file_index, filename)
      243. super(50, 64 + file_index % 4 * 104 + (12*file_index) + 12, 540, 104)
      244. self.contents = Bitmap.new(width - 32, height - 32)
      245. self.contents.font.name = $defaultfonttype # "File" (File #) window font
      246. self.contents.font.size = $defaultfontsize
      247. @charset_index = 0
      248. @file_index = file_index
      249. @filename = "Save#{@file_index + 1}.sav"
      250. @time_stamp = Time.at(0)
      251. @file_exist = FileTest.exist?(@filename)
      252. @yp = 12
      253. if @file_exist
      254. File.delete(@filename) if File.stat(@filename).size == 0
      255. @file_exist = FileTest.exist?(@filename)
      256. if @file_exist
      257. file = File.open(@filename, "rb")
      258. @time_stamp = Marshal.load(file)
      259. @characters = Marshal.load(file)
      260. @frame_count = Marshal.load(file)
      261. @game_system = Marshal.load(file)
      262. @game_switches = Marshal.load(file)
      263. @game_variables = Marshal.load(file)
      264. @game_party = Marshal.load(file)
      265. @total_sec = @frame_count / Graphics.frame_rate
      266. file.close
      267. end
      268. end
      269. refresh
      270. @selected = false
      271. end
      272. #--------------------------------------------------------------------------
      273. # ? ??????
      274. #--------------------------------------------------------------------------
      275. def refresh
      276. self.contents.clear
      277. # ?????????
      278. self.contents.font.color = normal_color
      279. if @file_index == SAVES_MAX
      280. @exit = RPG::Cache.picture("nicht")
      281. self.z = 0
      282. self.y = 390
      283. src_rect = Rect.new(0, 0, @exit.rect.width, @exit.rect.height)
      284. self.contents.blt(self.x + 8, 64 - @exit.rect.height, @exit, src_rect)
      285. self.opacity = 0
      286. end
      287. name = ""
      288. name = @game_party.actors[0].name if @file_exist
      289. self.contents.draw_text_outline(4, 0, 600, 32, name)
      290. @name_width = contents.text_size(name).width
      291. # ??????????????
      292. if @file_exist
      293. for i in 0...@characters.size
      294. bitmap = RPG::Cache.character(@characters[i][0], @characters[i][1])
      295. cw = bitmap.rect.width / 9.3
      296. ch = bitmap.rect.height / 4
      297. src_rect = Rect.new(@charset_index*120, 0, cw, ch)
      298. x = 105 - @characters.size * 120 + i * 64 - cw / 2
      299. self.contents.blt(x+35, 63 - ch, bitmap, src_rect)
      300. heart_display(x+78, 83-ch)
      301. end
      302. # ????????
      303. hour = @total_sec / 60 / 60
      304. min = @total_sec / 60 % 60
      305. sec = @total_sec % 60
      306. time_string = sprintf("%02d:%02d:%02d", hour, min, sec)
      307. self.contents.font.color = normal_color
      308. self.contents.draw_text_outline(4, 8, 600, 32, time_string, 2)
      309. # ??????????
      310. self.contents.font.color = normal_color
      311. time_string = @time_stamp.strftime("%Y / %m/ %d %H:%M")
      312. self.contents.draw_text_outline(self.width-self.contents.text_size(time_string).width-32, 40, self.contents.text_size(time_string).width, 32, time_string, 0)
      313. else
      314. @name_width = contents.text_size("Das Schicksal in die Hand nehmen").width
      315. self.contents.draw_text_outline(4, 0, 600, 32, "Das Schicksal in die Hand nehmen") if self.opacity != 0
      316. end
      317. end
      318. def heart_display(x, y)
      319. @x = x
      320. @y = y
      321. @link_heart = @game_variables[8]
      322. @link_maxheart = @game_variables[41]
      323. if @link_heart == 1
      324. insert_halfheart
      325. elsif @link_heart >= 2
      326. insert_fullheart
      327. end
      328. if @link_heart <= 2
      329. insert_emptyheart
      330. elsif @link_heart == 3
      331. insert_halfheart
      332. elsif @link_heart >= 4
      333. insert_fullheart
      334. end
      335. if @link_maxheart >= 3
      336. if @link_heart <= 4
      337. insert_emptyheart
      338. elsif @link_heart == 5
      339. insert_halfheart
      340. elsif @link_heart >= 6
      341. insert_fullheart
      342. end
      343. end
      344. if @link_maxheart >= 4
      345. if @link_heart <= 6
      346. insert_emptyheart
      347. elsif @link_heart == 7
      348. insert_halfheart
      349. elsif @link_heart >= 8
      350. insert_fullheart
      351. end
      352. end
      353. if @link_maxheart >= 5
      354. if @link_heart <= 8
      355. insert_emptyheart
      356. elsif @link_heart == 9
      357. insert_halfheart
      358. elsif @link_heart >= 10
      359. insert_fullheart
      360. end
      361. end
      362. if @link_maxheart >= 6
      363. if @link_heart <= 10
      364. insert_emptyheart
      365. elsif @link_heart == 11
      366. insert_halfheart
      367. elsif @link_heart >= 12
      368. insert_fullheart
      369. end
      370. end
      371. if @link_maxheart >= 7
      372. if @link_heart <= 12
      373. insert_emptyheart
      374. elsif @link_heart == 13
      375. insert_halfheart
      376. elsif @link_heart >= 14
      377. insert_fullheart
      378. end
      379. end
      380. if @link_maxheart >= 8
      381. if @link_heart <= 14
      382. insert_emptyheart
      383. elsif @link_heart == 15
      384. insert_halfheart
      385. elsif @link_heart >= 16
      386. insert_fullheart
      387. end
      388. end
      389. if @link_maxheart >= 9
      390. if @link_heart <= 16
      391. insert_emptyheart
      392. elsif @link_heart == 17
      393. insert_halfheart
      394. elsif @link_heart >= 18
      395. insert_fullheart
      396. end
      397. end
      398. if @link_maxheart >= 10
      399. if @link_heart <= 18
      400. insert_emptyheart
      401. elsif @link_heart == 19
      402. insert_halfheart
      403. elsif @link_heart >= 20
      404. insert_fullheart
      405. end
      406. end
      407. if @link_maxheart >= 11
      408. @y += 16
      409. @x = x
      410. if @link_heart <= 20
      411. insert_emptyheart
      412. elsif @link_heart == 21
      413. insert_halfheart
      414. elsif @link_heart >= 22
      415. insert_fullheart
      416. end
      417. end
      418. if @link_maxheart >= 12
      419. if @link_heart <= 22
      420. insert_emptyheart
      421. elsif @link_heart == 23
      422. insert_halfheart
      423. elsif @link_heart >= 24
      424. insert_fullheart
      425. end
      426. end
      427. if @link_maxheart >= 13
      428. if @link_heart <= 24
      429. insert_emptyheart
      430. elsif @link_heart == 25
      431. insert_halfheart
      432. elsif @link_heart >= 26
      433. insert_fullheart
      434. end
      435. end
      436. if @link_maxheart >= 14
      437. if @link_heart <= 26
      438. insert_emptyheart
      439. elsif @link_heart == 27
      440. insert_halfheart
      441. elsif @link_heart >= 28
      442. insert_fullheart
      443. end
      444. end
      445. if @link_maxheart >= 15
      446. if @link_heart <= 28
      447. insert_emptyheart
      448. elsif @link_heart == 29
      449. insert_halfheart
      450. elsif @link_heart >= 30
      451. insert_fullheart
      452. end
      453. end
      454. if @link_maxheart >= 16
      455. if @link_heart <= 30
      456. insert_emptyheart
      457. elsif @link_heart == 31
      458. insert_halfheart
      459. elsif @link_heart >= 32
      460. insert_fullheart
      461. end
      462. end
      463. if @link_maxheart >= 17
      464. if @link_heart <= 32
      465. insert_emptyheart
      466. elsif @link_heart == 33
      467. insert_halfheart
      468. elsif @link_heart >= 34
      469. insert_fullheart
      470. end
      471. end
      472. if @link_maxheart >= 18
      473. if @link_heart <= 34
      474. insert_emptyheart
      475. elsif @link_heart == 35
      476. insert_halfheart
      477. elsif @link_heart >= 36
      478. insert_fullheart
      479. end
      480. end
      481. if @link_maxheart >= 19
      482. if @link_heart <= 36
      483. insert_emptyheart
      484. elsif @link_heart == 37
      485. insert_halfheart
      486. elsif @link_heart >= 38
      487. insert_fullheart
      488. end
      489. end
      490. if @link_maxheart >= 20
      491. if @link_heart <= 38
      492. insert_emptyheart
      493. elsif @link_heart == 39
      494. insert_halfheart
      495. elsif @link_heart >= 40
      496. insert_fullheart
      497. end
      498. end end
      499. def insert_fullheart
      500. bitmap = RPG::Cache.picture("FullHeart")
      501. cw = bitmap.width
      502. ch = bitmap.height
      503. src_rect = Rect.new(0, 0, cw, ch)
      504. self.contents.blt(@x - cw / 2, @y - ch, bitmap, src_rect)
      505. @x += cw
      506. end
      507. def insert_halfheart
      508. bitmap = RPG::Cache.picture("halb")
      509. cw = bitmap.width
      510. ch = bitmap.height
      511. src_rect = Rect.new(0, 0, cw, ch)
      512. self.contents.blt(@x - cw / 2, @y - ch, bitmap, src_rect)
      513. @x += cw
      514. end
      515. def insert_emptyheart
      516. bitmap = RPG::Cache.picture("EmptyHeart")
      517. cw = bitmap.width
      518. ch = bitmap.height
      519. src_rect = Rect.new(0, 0, cw, ch)
      520. self.contents.blt(@x - cw / 2, @y - ch, bitmap, src_rect)
      521. @x += cw
      522. end
      523. #--------------------------------------------------------------------------
      524. # ? ???????
      525. # selected : ??????? (true=?? false=???)
      526. #--------------------------------------------------------------------------
      527. def selected=(selected)
      528. @selected = selected
      529. update_cursor_rect
      530. end
      531. def charset_index(index)
      532. @charset_index = index
      533. refresh
      534. end
      535. #--------------------------------------------------------------------------
      536. # ? ?????????
      537. #--------------------------------------------------------------------------
      538. def update_cursor_rect
      539. if @selected
      540. if @file_index == SAVES_MAX
      541. self.cursor_rect.set(self.x + 7, 63 - @exit.rect.height, @exit.rect.width+2, @exit.rect.height+2)
      542. else
      543. self.cursor_rect.set(0, 0, @name_width + 8, 32)
      544. end
      545. else
      546. self.cursor_rect.empty
      547. end
      548. end
      549. end
      550. #==============================================================================
      551. # ¦ Scene_File
      552. #------------------------------------------------------------------------------
      553. # ????????????????????????
      554. #==============================================================================
      555. class Scene_NewLoadFile
      556. #--------------------------------------------------------------------------
      557. # ? ?????????
      558. # help_text : ????????????????
      559. #--------------------------------------------------------------------------
      560. def initialize(help_text)
      561. @help_text = help_text
      562. end
      563. #--------------------------------------------------------------------------
      564. # ? ?????
      565. #--------------------------------------------------------------------------
      566. def main
      567. $game_party.setup_starting_members
      568. #-------------------------------
      569. # Animated Background Setup
      570. #-------------------------------
      571. @back = Sprite.new
      572. #@sprite.bitmap = RPG::Cache.title($data_system.title_name)
      573. @backgroundList = ["SaveScreen1","SaveScreen1","SaveScreen1",
      574. "SaveScreen1","SaveScreen1","SaveScreen1","SaveScreen1","SaveScreen1",
      575. "SaveScreen1","SaveScreen1","SaveScreen1","SaveScreen1","SaveScreen1",
      576. "SaveScreen2","SaveScreen3","SaveScreen4","SaveScreen5","SaveScreen6",
      577. "SaveScreen6","SaveScreen5","SaveScreen4","SaveScreen3","SaveScreen2",
      578. "SaveScreen1","SaveScreen1","SaveScreen1","SaveScreen1","SaveScreen1",
      579. "SaveScreen1","SaveScreen1","SaveScreen1","SaveScreen1","SaveScreen1",]
      580. @backgroundGameFrameCount = 0
      581. # Number of game frames per background frame.
      582. @backgroundG_BFrameCount = 3.4
      583. @back.bitmap = RPG::Cache.title(@backgroundList[0])
      584. @sprite = Sprite.new
      585. @sprite.bitmap = RPG::Cache.title($data_system.title_name)
      586. # ???????????
      587. @save_sprite = Sprite.new
      588. @save_sprite.bitmap = RPG::Cache.title(SAVE_PICTURE)
      589. @save_sprite.x = 0
      590. @save_sprite.y = 0
      591. # ???????????????
      592. @savefile_windows = []
      593. for i in 0..SAVES_MAX
      594. @savefile_windows.push(Window_NewLoadFile.new(i, make_filename(i)))
      595. end
      596. # ??????????????
      597. @file_index = $game_temp.last_file_index
      598. @savefile_windows[@file_index].selected = true
      599. # ?????????
      600. Graphics.transition
      601. # ??????
      602. loop do
      603. # ????????
      604. Graphics.update
      605. # ???????
      606. Input.update
      607. # ??????
      608. update
      609. # ????????????????
      610. if $scene != self
      611. break
      612. end
      613. end
      614. # ?????????
      615. Graphics.freeze
      616. # ????????
      617. @sprite.dispose
      618. @back.dispose
      619. @save_sprite.dispose
      620. for i in @savefile_windows
      621. i.dispose
      622. end
      623. end
      624. #--------------------------------------------------------------------------
      625. # ? ??????
      626. #--------------------------------------------------------------------------
      627. def update
      628. @backgroundGameFrameCount = @backgroundGameFrameCount + 1
      629. if @backgroundGameFrameCount >= @backgroundG_BFrameCount
      630. @backgroundGameFrameCount = 0
      631. # Add current background frame to the end
      632. @backgroundList = @backgroundList << @backgroundList[0]
      633. # and drop it from the first position
      634. @backgroundList.delete_at(0)
      635. @sprite.bitmap = RPG::Cache.title(@backgroundList[0])
      636. end
      637. for i in @savefile_windows
      638. i.update
      639. end
      640. # ????????
      641. @save_sprite.update
      642. # C ??????????
      643. if Input.trigger?(Input::C)
      644. if @file_index == SAVES_MAX
      645. $scene = nil
      646. else
      647. $game_system.se_play($data_system.decision_se)
      648. if FileTest.exist?(make_filename(@file_index))
      649. on_decision(make_filename(@file_index))
      650. $game_temp.last_file_index = @file_index
      651. else
      652. $game_system.save_slot = make_filename(@file_index)
      653. file = File.new(make_filename(@file_index), "wb")
      654. on_new(file)
      655. $game_temp.last_file_index = @file_index
      656. end
      657. end
      658. end
      659. # B ??????????
      660. if Input.trigger?(Input::B)
      661. # ???? on_cancel (??????) ???
      662. on_cancel
      663. return
      664. end
      665. # ??????????????
      666. if Input.repeat?(Input::DOWN)
      667. # ????????????????????????
      668. # ?????????? 3 ??????
      669. if Input.trigger?(Input::DOWN) or @file_index < 3
      670. # ???? SE ???
      671. $game_system.se_play($data_system.cursor_se)
      672. # ?????????
      673. @savefile_windows[@file_index].selected = false
      674. @file_index = (@file_index + 1) % 4
      675. @savefile_windows[@file_index].selected = true
      676. return
      677. end
      678. end
      679. # ??????????????
      680. if Input.repeat?(Input::UP)
      681. # ????????????????????????
      682. # ?????????? 0 ???????
      683. if Input.trigger?(Input::UP) or @file_index > 0
      684. # ???? SE ???
      685. $game_system.se_play($data_system.cursor_se)
      686. # ?????????
      687. @savefile_windows[@file_index].selected = false
      688. @file_index = (@file_index + 3) % 4
      689. @savefile_windows[@file_index].selected = true
      690. return
      691. end
      692. end
      693. @wait = 3 if @wait == nil or @wait == 0
      694. @charset_index = 0 if @charset_index == nil or @charset_index == 6
      695. @wait -= 1
      696. return if @wait > 0
      697. @charset_index += 1
      698. for i in 0..@savefile_windows.size-1
      699. @savefile_windows[i].charset_index(@charset_index)
      700. next
      701. end
      702. end
      703. #--------------------------------------------------------------------------
      704. # ? ????????
      705. # file_index : ?????????????? (0~3)
      706. #--------------------------------------------------------------------------
      707. def make_filename(file_index)
      708. return "Save#{file_index + 1}.sav"
      709. end
      710. end
      711. class Scene_NewLoad < Scene_NewLoadFile
      712. def initialize
      713. $game_temp.last_file_index = 0
      714. latest_time = Time.at(0)
      715. for i in 0..3
      716. filename = make_filename(i)
      717. if FileTest.exist?(filename)
      718. file = File.open(filename, "rb")
      719. if file.mtime > latest_time
      720. latest_time = file.mtime
      721. $game_temp.last_file_index = i
      722. end
      723. file.close
      724. end
      725. end
      726. super("Welche Daten sollen geladen werden?")
      727. end
      728. def on_new(file)
      729. $game_map.setup($data_system.start_map_id)
      730. $game_system.newgame_switch = true
      731. $game_temp.name_fileproc = file
      732. $game_temp.name_calling = true
      733. $game_temp.name_actor_id = 1
      734. $game_temp.name_max_char = 8
      735. $scene = Scene_Name.new
      736. end
      737. #--------------------------------------------------------------------------
      738. # ? ??????
      739. #--------------------------------------------------------------------------
      740. def on_decision(filename)
      741. unless FileTest.exist?(filename)
      742. # ??? SE ???
      743. $game_system.se_play($data_system.buzzer_se)
      744. return
      745. end
      746. # ??? SE ???
      747. $game_system.se_play($data_system.load_se)
      748. # ???????????
      749. file = File.open(filename, "rb")
      750. read_save_data(file, $game_system.newgame_switch)
      751. file.close
      752. Audio.bgm_stop
      753. $game_system.bgm_play($game_system.playing_bgm) if !$game_system.newgame_switch
      754. $game_system.bgs_play($game_system.playing_bgs) if !$game_system.newgame_switch
      755. $game_map.autoplay
      756. # ?????? (????????)
      757. $game_map.update
      758. $game_party.remove_actor(1) if $game_system.newgame_switch
      759. # ?????????
      760. $scene = Scene_Map.new
      761. end
      762. #--------------------------------------------------------------------------
      763. # ? ?????????
      764. #--------------------------------------------------------------------------
      765. def on_cancel
      766. # ????? SE ???
      767. $game_system.se_play($data_system.cancel_se)
      768. # ???????????
      769. $scene = Scene_Title.new
      770. end
      771. #--------------------------------------------------------------------------
      772. # ? ???????????
      773. # file : ??????????????? (??????)
      774. #--------------------------------------------------------------------------
      775. def read_save_data(file, newgame)
      776. if !newgame
      777. Audio.bgm_stop
      778. # ?????????????????????????
      779. time = Marshal.load(file)
      780. characters = Marshal.load(file)
      781. # ??????????????????????
      782. Graphics.frame_count = Marshal.load(file)
      783. # ????????????????
      784. $game_system = Marshal.load(file)
      785. $game_switches = Marshal.load(file)
      786. $game_variables = Marshal.load(file)
      787. $game_party = Marshal.load(file)
      788. $game_self_switches = Marshal.load(file)
      789. $game_screen = Marshal.load(file)
      790. $game_actors = Marshal.load(file)
      791. $game_troop = Marshal.load(file)
      792. $game_map = Marshal.load(file)
      793. $game_player = Marshal.load(file)
      794. if $game_system.magic_number != $data_system.magic_number
      795. $game_map.setup($game_map.map_id)
      796. $game_player.center($game_player.x, $game_player.y)
      797. $game_player.refresh
      798. end
      799. else
      800. characters = []
      801. for i in 0...$game_party.actors.size
      802. actor = $game_party.actors[i]
      803. characters.push([actor.character_name, actor.character_hue])
      804. end
      805. time = Time.new
      806. # ??????????????????????
      807. Graphics.frame_count = 0
      808. # ????????????????
      809. $game_system = Game_System.new
      810. $game_switches = Game_Switches.new
      811. $game_variables = Game_Variables.new
      812. $game_party = Game_Party.new
      813. $game_self_switches = Game_SelfSwitches.new
      814. $game_screen = Game_Screen.new
      815. $game_actors = Game_Actors.new
      816. $game_troop = Game_Troop.new
      817. $game_map = Game_Map.new
      818. $game_player = Game_Player.new
      819. #$game_party.setup_starting_members
      820. $game_map.setup($data_system.start_map_id)
      821. $game_player.moveto($data_system.start_x, $data_system.start_y)
      822. $game_player.refresh
      823. end
      824. # ???????????????????
      825. # (?????????????????)
      826. # ???????????????
      827. $game_party.refresh
      828. end
      829. end
      Alles anzeigen


      Allerdings werden die Herzen nicht in diesem Menü angezeigt:
      [Blockierte Grafik: http://img256.imageshack.us/img256/6640/problemxy.png]
      Normalerweise müssten ja neben dem Namen die Anzahl der Herzen angezeigt werden, soweit ich das Script verstanden habe.
      Ich hoffe jemand kennt sich etwas damit aus und kann mir den Fehler sagen, warum die Herzen bzw. die Bilder nicht angezeigt werden.

      MFG Tehpiecemaker
      Hört gerade: A Day To Remember - All Signs Point To Lauderdale