RPGMaker 板


LINE

※ 引述《snake0214 (蛇)》之銘言: : xp内建只能裝備一種裝飾品 感覺自由度跟搭配度頗低 : 所以想要做出可裝備兩種到三種的組合可能 成果預覽 http://imgur.com/viU1V.jpg
http://imgur.com/BMr9f.jpg
Game_Actor類別,在attr_reader :armor4_id後加上 attr_reader :armor5_id Game_Actor >> setup方法,在@armor4_id = actor.armor4_id後加上 @armor5_id = 0 Game_Actor >> element_rate方法,把 for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id] 改成 for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id, @armor5_id] Game_Actor >> state_guard?方法,改法同上 Game_Actor >> base_str方法,在armor4 = $data_armors[@armor4_id]後加上 armor5 = $data_armors[@armor5_id] 在n += armor4 != nil ? armor4.str_plus : 0後加上 n += armor5 != nil ? armor5.str_plus : 0 Game_Actor >> base_dex方法,改法同上,但str_plus改成dex_plus Game_Actor >> base_agi和base_int方法,改法依此類推 Game_Actor >> base_pdef方法,在armor4 = $data_armors[@armor4_id]後加上 armor5 = $data_armors[@armor5_id] 在pdef5 = armor4 != nil ? armor4.pdef : 0後加上 pdef6 = armor5 != nil ? armor5.pdef : 0 將return pdef1 + pdef2 + pdef3 + pdef4 + pdef5改成 return pdef1 + pdef2 + pdef3 + pdef4 + pdef5 + pdef6 Game_Actor >> base_mdef方法,改法依此類推 Game_Actor >> base_eva方法,在armor4 = $data_armors[@armor4_id]後加上 armor5 = $data_armors[@armor5_id] 在eva4 = armor4 != nil ? armor4.eva : 0後加上 eva5 = armor5 != nil ? armor5.eva : 0 將return eva1 + eva2 + eva3 + eva4改成 return eva1 + eva2 + eva3 + eva4 + eva5 Game_Actor >> equip_fix?方法,在 return $data_actors[@actor_id].armor4_fix後加上 when 5 return $data_actors[@actor_id].armor4_fix Game_Actor >> equip方法,在 when 4 if id == 0 or $game_party.armor_number(id) > 0 ... ... end 後加上 when 5 if id == 0 or $game_party.armor_number(id) > 0 update_auto_state($data_armors[@armor5_id], $data_armors[id]) $game_party.gain_armor(@armor5_id, 1) @armor5_id = id $game_party.lose_armor(id, 1) end Game_Actor >> class_id=方法,在 unless equippable?($data_armors[@armor4_id]) equip(4, 0) end 後加上 unless equippable?($data_armors[@armor5_id]) equip(5, 0) end Window_EquipRight >> initialize方法,將 self.contents = Bitmap.new(width - 32, height - 32) 改成 self.contents = Bitmap.new(width - 32, height) Window_EquipRight >> refresh方法,在 @data.push($data_armors[@actor.armor4_id]) 後加上 @data.push($data_armors[@actor.armor5_id]) 在 self.contents.draw_text(5, 32 * 4, 92, 32, $data_system.words.armor4) 後加上 self.contents.draw_text(5, 32 * 5, 92, 32, $data_system.words.armor4) 在draw_item_name(@data[4], 92, 32 * 4)後加上 draw_item_name(@data[5], 92, 32 * 5) Window_Status >> refresh方法,在 draw_item_name($data_armors[@actor.armor4_id], 320 + 16, 400) 後加上 draw_item_name($data_armors[@actor.armor5_id], 320 + 16 + 144, 400) Scene_Equip >> refresh方法,將 @item_window5.visible = (@right_window.index == 4) 改成 @item_window5.visible = (@right_window.index == 4 or @right_window.index == 5) 在 when 4 @item_window = @item_window5 後加上 when 5 @item_window = @item_window5 到此大功告成! : 本人還初學,所以關於RGSS的部分多是使用他人所公開的程式碼 : 但這兩天的爬文結果下來,沒找到相關的RGSS寫法分享 : 所以來這邊不恥厚問 希望能有好心高手幫解答 : THX 嗯...好像沒有「不恥厚問」這句成語 如果你要說的是「不恥下問」的話 請參閱教育部重編國語辭典修訂本 http://dict.revised.moe.edu.tw/index.html 這句通常拿來恭維別人 很少用在自己身上 --



※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.124.97.33
1F:推 snake0214:囧 對不起我國文程度很差 不過還是很感謝解答 08/13 09:46
2F:→ snake0214:順帶一提 網址好像失效了.. 08/13 09:46
※ 編輯: bill 來自: 122.124.102.162 (08/13 18:47)
3F:→ bill:已修正連結 08/13 18:47







like.gif 您可能會有興趣的文章
icon.png[問題/行為] 貓晚上進房間會不會有憋尿問題
icon.pngRe: [閒聊] 選了錯誤的女孩成為魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一張
icon.png[心得] EMS高領長版毛衣.墨小樓MC1002
icon.png[分享] 丹龍隔熱紙GE55+33+22
icon.png[問題] 清洗洗衣機
icon.png[尋物] 窗台下的空間
icon.png[閒聊] 双極の女神1 木魔爵
icon.png[售車] 新竹 1997 march 1297cc 白色 四門
icon.png[討論] 能從照片感受到攝影者心情嗎
icon.png[狂賀] 賀賀賀賀 賀!島村卯月!總選舉NO.1
icon.png[難過] 羨慕白皮膚的女生
icon.png閱讀文章
icon.png[黑特]
icon.png[問題] SBK S1安裝於安全帽位置
icon.png[分享] 舊woo100絕版開箱!!
icon.pngRe: [無言] 關於小包衛生紙
icon.png[開箱] E5-2683V3 RX480Strix 快睿C1 簡單測試
icon.png[心得] 蒼の海賊龍 地獄 執行者16PT
icon.png[售車] 1999年Virage iO 1.8EXi
icon.png[心得] 挑戰33 LV10 獅子座pt solo
icon.png[閒聊] 手把手教你不被桶之新手主購教學
icon.png[分享] Civic Type R 量產版官方照無預警流出
icon.png[售車] Golf 4 2.0 銀色 自排
icon.png[出售] Graco提籃汽座(有底座)2000元誠可議
icon.png[問題] 請問補牙材質掉了還能再補嗎?(台中半年內
icon.png[問題] 44th 單曲 生寫竟然都給重複的啊啊!
icon.png[心得] 華南紅卡/icash 核卡
icon.png[問題] 拔牙矯正這樣正常嗎
icon.png[贈送] 老莫高業 初業 102年版
icon.png[情報] 三大行動支付 本季掀戰火
icon.png[寶寶] 博客來Amos水蠟筆5/1特價五折
icon.pngRe: [心得] 新鮮人一些面試分享
icon.png[心得] 蒼の海賊龍 地獄 麒麟25PT
icon.pngRe: [閒聊] (君の名は。雷慎入) 君名二創漫畫翻譯
icon.pngRe: [閒聊] OGN中場影片:失蹤人口局 (英文字幕)
icon.png[問題] 台灣大哥大4G訊號差
icon.png[出售] [全國]全新千尋侘草LED燈, 水草

請輸入看板名稱,例如:Tech_Job站內搜尋

TOP