设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 2243|回复: 7
打印 上一主题 下一主题

主菜单如何拓展人物

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
100
在线时间
11 小时
注册时间
2007-7-1
帖子
327
跳转到指定楼层
1
发表于 2008-2-9 00:15:37 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
我在这里看到了一个不错的一个不错的菜单系统~~~
http://rpg.blue/viewthread.php?t ... D2%2D8+16%3A07%3A27
请问 把它改成八人的可以吗? 若不是很困难的话 请指教
若很困难 那就算了吧
我看来也回来吧~

Lv1.梦旅人

綾川司の姫様<

梦石
0
星屑
50
在线时间
796 小时
注册时间
2007-12-20
帖子
4520

贵宾第3届短篇游戏大赛R剧及RMTV组亚军

2
发表于 2008-2-9 00:18:33 | 只看该作者
捶桌子!我当初修正这套菜单的脚本Bug差点抓狂而死啊啊啊……
其实不过是图片用多了很华丽罢了= =

PS:这套脚本的注释是德文的= =||||

发上来给大家一起想办法吧……

  1. #_______________________________________________________________________________
  2. # MOG Scene Menu Itigo V1.5            
  3. #_______________________________________________________________________________
  4. # By Moghunter  
  5. # http://www.atelier-rgss.com
  6. #_______________________________________________________________________________
  7. module MOG
  8. #Tipo de fundo.
  9. # 0 = Imagens em movimento.
  10. # 1 = Mapa de fundo.
  11. MENU_BACKGROUND = 0
  12. #Transition Time.
  13. MNTT = 20
  14. #Transition Type (Name)
  15. MNTP = "006-Stripe02"
  16. end
  17. $mogscript = {} if $mogscript == nil
  18. $mogscript["menu_itigo"] = true
  19. ##############
  20. # Game_Actor #
  21. ##############
  22. class Game_Actor < Game_Battler
  23. def now_exp
  24. return @exp - @exp_list[@level]
  25. end
  26. def next_exp
  27. return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
  28. end
  29. end
  30. ############
  31. # Game_Map #
  32. ############
  33. class Game_Map
  34. attr_reader   :map_id  
  35. def mpname
  36. $mpname = load_data("Data/MapInfos.rxdata")
  37. $mpname[@map_id].name
  38. end
  39. end
  40. ###############
  41. # Window_Base #
  42. ###############
  43. class Window_Base < Window
  44. def nada
  45. face = RPG::Cache.picture("")
  46. end   
  47. def drw_face(actor,x,y)
  48. face = RPG::Cache.picture(actor.name + "_fc") rescue nada
  49. cw = face.width
  50. ch = face.height
  51. src_rect = Rect.new(0, 0, cw, ch)
  52. self.contents.blt(x , y - ch, face, src_rect)   
  53. end   
  54. def draw_maphp3(actor, x, y)
  55. back = RPG::Cache.picture("BAR0")   
  56. cw = back.width  
  57. ch = back.height
  58. src_rect = Rect.new(0, 0, cw, ch)   
  59. self.contents.blt(x + 65, y - ch + 30, back, src_rect)
  60. meter = RPG::Cache.picture("HP_Bar")   
  61. cw = meter.width  * actor.hp / actor.maxhp
  62. ch = meter.height
  63. src_rect = Rect.new(0, 0, cw, ch)
  64. self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
  65. text = RPG::Cache.picture("HP_Tx")   
  66. cw = text.width  
  67. ch = text.height
  68. src_rect = Rect.new(0, 0, cw, ch)
  69. self.contents.blt(x + 35, y - ch + 30, text, src_rect)
  70. self.contents.font.color = Color.new(0,0,0,255)
  71. self.contents.draw_text(x + 81, y - 1, 48, 32, actor.hp.to_s, 2)
  72. self.contents.font.color = Color.new(255,255,255,255)
  73. self.contents.draw_text(x + 80, y - 2, 48, 32, actor.hp.to_s, 2)   
  74. end  
  75. def draw_mapsp3(actor, x, y)
  76. back = RPG::Cache.picture("BAR0")   
  77. cw = back.width  
  78. ch = back.height
  79. src_rect = Rect.new(0, 0, cw, ch)   
  80. self.contents.blt(x + 65, y - ch + 30, back, src_rect)
  81. meter = RPG::Cache.picture("SP_Bar")   
  82. cw = meter.width  * actor.sp / actor.maxsp
  83. ch = meter.height
  84. src_rect = Rect.new(0, 0, cw, ch)
  85. self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
  86. text = RPG::Cache.picture("SP_Tx")   
  87. cw = text.width  
  88. ch = text.height
  89. src_rect = Rect.new(0, 0, cw, ch)
  90. self.contents.blt(x + 35, y - ch + 30, text, src_rect)
  91. self.contents.font.color = Color.new(0,0,0,255)
  92. self.contents.draw_text(x + 81, y - 1, 48, 32, actor.sp.to_s, 2)
  93. self.contents.font.color = Color.new(255,255,255,255)
  94. self.contents.draw_text(x + 80, y - 2, 48, 32, actor.sp.to_s, 2)   
  95. end  
  96. def draw_mexp2(actor, x, y)
  97. bitmap2 = RPG::Cache.picture("Exp_Back")
  98. cw = bitmap2.width
  99. ch = bitmap2.height
  100. src_rect = Rect.new(0, 0, cw, ch)
  101. self.contents.blt(x + 60 , y - ch + 30, bitmap2, src_rect)
  102. if actor.next_exp != 0
  103. rate = actor.now_exp.to_f / actor.next_exp
  104. else
  105. rate = 1
  106. end
  107. bitmap = RPG::Cache.picture("Exp_Meter")
  108. if actor.level < 99
  109. cw = bitmap.width * rate
  110. else
  111. cw = bitmap.width
  112. end   
  113. ch = bitmap.height
  114. src_rect = Rect.new(0, 0, cw, ch)
  115. self.contents.blt(x + 60 , y - ch + 30, bitmap, src_rect)
  116. exp_tx = RPG::Cache.picture("Exp_tx")
  117. cw = exp_tx.width
  118. ch = exp_tx.height
  119. src_rect = Rect.new(0, 0, cw, ch)
  120. self.contents.blt(x + 55 , y - ch + 30, exp_tx, src_rect)
  121. lv_tx = RPG::Cache.picture("LV_tx")
  122. cw = lv_tx.width
  123. ch = lv_tx.height
  124. src_rect = Rect.new(0, 0, cw, ch)
  125. self.contents.blt(x + 125 , y - ch + 35, lv_tx, src_rect)
  126. self.contents.font.color = Color.new(0,0,0,255)
  127. self.contents.draw_text(x + 161, y + 7, 24, 32, actor.level.to_s, 1)
  128. self.contents.font.color = Color.new(255,255,255,255)
  129. self.contents.draw_text(x + 160, y + 6, 24, 32, actor.level.to_s, 1)
  130. end
  131. def draw_actor_state2(actor, x, y, width = 80)
  132. text = make_battler_state_text(actor, width, true)
  133. self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
  134. self.contents.draw_text(x, y, width, 32, text,2)
  135. end  
  136. end
  137. ######################
  138. # Window_MenuStatus2 #
  139. ######################
  140. class Window_MenuStatus2 < Window_Selectable
  141. def initialize
  142. super(0, 0, 415, 280)
  143. self.contents = Bitmap.new(width - 32, height - 32)
  144. self.windowskin = RPG::Cache.windowskin("")
  145. self.opacity = 0
  146. self.z = 15
  147. refresh
  148. self.active = false
  149. self.index = -1
  150. end
  151. def refresh
  152. self.contents.clear
  153. @item_max = $game_party.actors.size
  154. for i in 0...$game_party.actors.size
  155. x = 20
  156. y = i * 62
  157. actor = $game_party.actors[i]
  158. self.contents.font.name = "Georgia"
  159. if $mogscript["TP_System"] == true
  160. draw_actor_tp(actor ,x + 285, y - 5,4)  
  161. draw_actor_state2(actor ,x + 190, y - 5)
  162. else  
  163. draw_actor_state2(actor ,x + 220, y - 5)
  164. end
  165. drw_face(actor,x,y + 50)
  166. draw_maphp3(actor,x + 40, y - 5)
  167. draw_mapsp3(actor,x + 40, y + 20 )
  168. draw_mexp2(actor,x + 140, y + 15 )
  169. end
  170. end
  171. def update_cursor_rect
  172. if @index < 0
  173. self.cursor_rect.empty
  174. else
  175. self.cursor_rect.set(5, @index * 62, self.width - 32, 50)
  176. end
  177. end
  178. end
  179. ################
  180. # Window_Gold2 #
  181. ################
  182. class Window_Gold2 < Window_Base
  183. def initialize
  184. super(0, 0, 160, 64)
  185. self.contents = Bitmap.new(width - 32, height - 32)
  186. self.windowskin = RPG::Cache.windowskin("")
  187. self.opacity = 0
  188. self.z = 15
  189. refresh
  190. end
  191. def refresh
  192. self.contents.clear
  193. cx = contents.text_size($data_system.words.gold).width
  194. self.contents.font.color = normal_color
  195. self.contents.draw_text(4, 0, 120-cx-2, 32, $game_party.gold.to_s, 2)
  196. self.contents.font.color = system_color
  197. self.contents.draw_text(124-cx, 0, cx, 32, $data_system.words.gold, 2)
  198. end
  199. end
  200. ####################
  201. # Window_PlayTime2 #
  202. ####################
  203. class Window_PlayTime2 < Window_Base
  204. def initialize
  205. super(0, 0, 160, 96)
  206. self.contents = Bitmap.new(width - 32, height - 32)
  207. self.windowskin = RPG::Cache.windowskin("")
  208. self.opacity = 0
  209. self.z = 15
  210. refresh
  211. end
  212. def refresh
  213. self.contents.clear
  214. @total_sec = Graphics.frame_count / Graphics.frame_rate
  215. hour = @total_sec / 60 / 60
  216. min = @total_sec / 60 % 60
  217. sec = @total_sec % 60
  218. text = sprintf("%02d:%02d:%02d", hour, min, sec)
  219. self.contents.font.color = normal_color
  220. self.contents.draw_text(4, 32, 120, 32, text, 2)
  221. end
  222. def update
  223. super
  224. if Graphics.frame_count / Graphics.frame_rate != @total_sec
  225. refresh
  226. end
  227. end
  228. end
  229. #################
  230. # Window_Steps2 #
  231. #################
  232. class Window_Steps2 < Window_Base
  233. def initialize
  234. super(0, 0, 160, 96)
  235. self.contents = Bitmap.new(width - 32, height - 32)
  236. self.windowskin = RPG::Cache.windowskin("")
  237. self.opacity = 0
  238. self.z = 15
  239. refresh
  240. end
  241. def refresh
  242. self.contents.clear
  243. self.contents.font.color = normal_color
  244. self.contents.draw_text(4, 32, 120, 32, $game_party.steps.to_s, 2)
  245. end
  246. end
  247. ###################
  248. # Window_Map_Name #
  249. ###################
  250. class Window_Map_Name < Window_Base
  251. def initialize
  252. super(0, 0, 160, 96)
  253. self.contents = Bitmap.new(width - 32, height - 32)
  254. self.windowskin = RPG::Cache.windowskin("")
  255. self.opacity = 0
  256. self.z = 15
  257. refresh
  258. end
  259. def refresh
  260. self.contents.clear
  261. self.contents.font.color = normal_color
  262. self.contents.draw_text(4, 32, 120, 32, $game_map.mpname.to_s, 1)
  263. end
  264. end
  265. ##############
  266. # Scene_Menu #
  267. ##############
  268. class Scene_Menu
  269. def initialize(menu_index = 0)
  270. @menu_index = menu_index
  271. end
  272. def main
  273. s1 = ""
  274. s2 = ""
  275. s3 = ""
  276. s4 = ""
  277. s5 = ""
  278. s6 = ""
  279. @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6])
  280. @command_window.index = @menu_index
  281. if $game_party.actors.size == 0
  282. @command_window.disable_item(0)
  283. @command_window.disable_item(1)
  284. @command_window.disable_item(2)
  285. @command_window.disable_item(3)
  286. end
  287. @command_window.visible = false
  288. @command_window.x = -640
  289. @mnlay = Sprite.new
  290. @mnlay.bitmap = RPG::Cache.picture("Mn_lay")
  291. @mnlay.z = 10
  292. @mnlay.opacity = 0
  293. @mnlay.x = -100
  294. if MOG::MENU_BACKGROUND == 0
  295. @mnback = Plane.new
  296. @mnback.bitmap = RPG::Cache.picture("Mn_back")
  297. @mnback.blend_type = 0
  298. @mnback.z = 5
  299. @mnback2 = Plane.new
  300. @mnback2.bitmap = RPG::Cache.picture("Mn_back")
  301. @mnback2.blend_type = 0
  302. @mnback2.z = 5
  303. @mnback2.opacity = 60
  304. else
  305. @spriteset = Spriteset_Map.new
  306. end
  307. @mnsel = Sprite.new
  308. @mnsel.bitmap = RPG::Cache.picture("Mn_Sel")
  309. @mnsel.z = 20
  310. @mnsel.x = 0
  311. @mnsel.y = 110
  312. @mnop = 150
  313. if $game_system.save_disabled
  314. @command_window.disable_item(4)
  315. end
  316. @playtime_window = Window_PlayTime2.new
  317. @playtime_window.x = 30
  318. @playtime_window.y = 375
  319. @playtime_window.contents_opacity = 0
  320. @mapname_window = Window_Map_Name.new
  321. @mapname_window.x = 425
  322. @mapname_window.y = 25
  323. @mapname_window.contents_opacity = 0
  324. @steps_window = Window_Steps2.new
  325. @steps_window.x = 230
  326. @steps_window.y = 375
  327. @steps_window.contents_opacity = 0
  328. @gold_window = Window_Gold2.new
  329. @gold_window.x = 455
  330. @gold_window.y = 405
  331. @gold_window.contents_opacity = 0
  332. @status_window = Window_MenuStatus2.new
  333. @status_window.x = 295
  334. @status_window.y = 110
  335. @status_window.contents_opacity = 0
  336. if MOG::MENU_BACKGROUND == 0
  337. Graphics.transition(MOG::MNTT, "Graphics/Transitions/" + MOG::MNTP)
  338. else
  339. Graphics.transition  
  340. end
  341. loop do
  342. Graphics.update
  343. Input.update
  344. update
  345. if $scene != self
  346. break
  347. end
  348. end
  349. for i in 0..10  
  350. if MOG::MENU_BACKGROUND == 0
  351. @mnback.oy += 1
  352. @mnback.ox += 1
  353. @mnback2.oy += 1
  354. @mnback2.ox -= 1
  355. end
  356. @status_window.x += 20
  357. @status_window.contents_opacity -= 25
  358. @mnsel.opacity -= 25
  359. @mnsel.zoom_x += 0.03
  360. @mnlay.x -= 10
  361. @mnlay.opacity -= 25
  362. @mapname_window.x += 5
  363. @mapname_window.contents_opacity -= 20
  364. @steps_window.contents_opacity -= 25
  365. @gold_window.contents_opacity -= 25
  366. @playtime_window.contents_opacity -= 25
  367. Graphics.update   
  368. end
  369. Graphics.freeze
  370. @command_window.dispose
  371. @playtime_window.dispose
  372. @steps_window.dispose
  373. @gold_window.dispose   
  374. @status_window.dispose
  375. @mnlay.dispose
  376. if MOG::MENU_BACKGROUND == 0
  377. @mnback.dispose
  378. @mnback2.dispose
  379. else
  380. @spriteset.dispose
  381. end
  382. @mnsel.dispose
  383. @mapname_window.dispose
  384. Graphics.update
  385. end
  386. def update
  387. if @mnsel.zoom_x <= 1.6
  388. @mnsel.zoom_x += 0.03
  389. @mnsel.opacity -= 10
  390. elsif @mnsel.zoom_x > 1.6
  391. @mnsel.zoom_x = 1.0
  392. @mnsel.opacity = 255
  393. end     
  394. if @mnlay.x < 0
  395. @mnlay.opacity += 25
  396. @mnlay.x += 10
  397. elsif @mnlay.x >= 0  
  398. @mnlay.opacity = 255
  399. @mnlay.x = 0
  400. end
  401. @command_window.update if @command_window.active
  402. @playtime_window.update
  403. @status_window.update if @status_window.active
  404. if MOG::MENU_BACKGROUND == 0
  405. @mnback.oy += 1
  406. @mnback.ox += 1
  407. @mnback2.oy += 1
  408. @mnback2.ox -= 1
  409. end
  410. @mnop += 5
  411. @mapname_window.contents_opacity += 15
  412. @playtime_window.contents_opacity += 15
  413. @gold_window.contents_opacity += 15
  414. @playtime_window.contents_opacity += 15
  415. @steps_window.contents_opacity += 15
  416. if @status_window.x > 195
  417. @status_window.x -= 10
  418. @status_window.contents_opacity += 10
  419. elsif @status_window.x <= 195
  420. @status_window.x = 195
  421. @status_window.contents_opacity = 255
  422. end
  423. if @mnop >= 255
  424. @mnop = 120
  425. end   
  426. if @command_window.active
  427. update_command
  428. return
  429. end
  430. if @status_window.active
  431. update_status
  432. return
  433. end
  434. end
  435. def update_command
  436. case @command_window.index
  437. when 0  
  438. @mnsel.x = 0
  439. @mnsel.y = 110
  440. when 1
  441. @mnsel.x = 25
  442. @mnsel.y = 155
  443. when 2
  444. @mnsel.x = 40
  445. @mnsel.y = 197
  446. when 3
  447. @mnsel.x = 45
  448. @mnsel.y = 242
  449. when 4
  450. @mnsel.x = 25
  451. @mnsel.y = 285
  452. when 5
  453. @mnsel.x = 0
  454. @mnsel.y = 325
  455. end   
  456. if Input.trigger?(Input::B)
  457. $game_system.se_play($data_system.cancel_se)
  458. $scene = Scene_Map.new
  459. return
  460. end
  461. if Input.trigger?(Input::C)
  462. if $game_party.actors.size == 0 and @command_window.index < 4
  463. $game_system.se_play($data_system.buzzer_se)
  464. return
  465. end
  466. case @command_window.index
  467. when 0
  468. $game_system.se_play($data_system.decision_se)
  469. $scene = Scene_Item.new
  470. when 1
  471. $game_system.se_play($data_system.decision_se)
  472. @command_window.active = false
  473. @status_window.active = true
  474. @status_window.index = 0
  475. when 2
  476. $game_system.se_play($data_system.decision_se)
  477. @command_window.active = false
  478. @status_window.active = true
  479. @status_window.index = 0
  480. when 3
  481. $game_system.se_play($data_system.decision_se)
  482. @command_window.active = false
  483. @status_window.active = true
  484. @status_window.index = 0
  485. when 4
  486. if $game_system.save_disabled
  487. $game_system.se_play($data_system.buzzer_se)
  488. return
  489. end
  490. $game_system.se_play($data_system.decision_se)
  491. $scene = Scene_Save.new
  492. when 5
  493. $game_system.se_play($data_system.decision_se)
  494. $scene = Scene_End.new
  495. end
  496. return
  497. end
  498. end
  499. def update_status  
  500. case @status_window.index
  501. when 0  
  502. @mnsel.x = 180
  503. @mnsel.y = 130
  504. when 1
  505. @mnsel.x = 180
  506. @mnsel.y = 195
  507. when 2
  508. @mnsel.x = 180
  509. @mnsel.y = 255
  510. when 3
  511. @mnsel.x = 180
  512. @mnsel.y = 320
  513. end  
  514. if Input.trigger?(Input::B)
  515. $game_system.se_play($data_system.cancel_se)
  516. @command_window.active = true
  517. @status_window.active = false
  518. @status_window.index = -1
  519. return
  520. end
  521. if Input.trigger?(Input::C)
  522. case @command_window.index
  523. when 1
  524. if $game_party.actors[@status_window.index].restriction >= 2
  525. $game_system.se_play($data_system.buzzer_se)
  526. return
  527. end
  528. $game_system.se_play($data_system.decision_se)
  529. $scene = Scene_Skill.new(@status_window.index)
  530. when 2  
  531. $game_system.se_play($data_system.decision_se)
  532. $scene = Scene_Equip.new(@status_window.index)
  533. when 3  
  534. $game_system.se_play($data_system.decision_se)
  535. $scene = Scene_Status.new(@status_window.index)
  536. end
  537. return
  538. end
  539. end
  540. end
复制代码

生命即是责任。自己即是世界。
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
100
在线时间
11 小时
注册时间
2007-7-1
帖子
327
3
 楼主| 发表于 2008-2-9 00:21:10 | 只看该作者
...那我还是准备结贴好了
我看来也回来吧~
回复 支持 反对

使用道具 举报

Lv3.寻梦者

孤独守望

梦石
0
星屑
3132
在线时间
1535 小时
注册时间
2006-10-16
帖子
4321

开拓者贵宾

4
发表于 2008-2-9 00:25:42 | 只看该作者
我现在知道为什么要提倡写缩进空格了= =话说八人制那还有地方吗?
菩提本非树,明镜本非台。回头自望路漫漫。不求姻缘,但求再见。
本来无一物,何处惹尘埃。风打浪吹雨不来。荒庭遍野,扶摇难接。
不知道多久更新一次的博客
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-1-24
帖子
30
5
发表于 2008-2-9 00:25:46 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
100
在线时间
11 小时
注册时间
2007-7-1
帖子
327
6
 楼主| 发表于 2008-2-9 00:27:20 | 只看该作者
可以在两个窗口显示吗?我的意思是两个窗口滚动。
我看来也回来吧~
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-1-24
帖子
30
7
发表于 2008-2-9 00:52:45 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
100
在线时间
11 小时
注册时间
2007-7-1
帖子
327
8
 楼主| 发表于 2008-2-9 00:55:41 | 只看该作者
http://rpg.blue/web/htm/news251.htm
这个可以~~我去研究研究
我看来也回来吧~
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-28 10:08

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表