Per 2016, RMID pindah ke RMID Discord (Invite link dihapus untuk mencegah spambot -Theo @ 2019). Posting sudah tidak bisa dilakukan lagi.
Mohon maaf atas ketidaknyamanannya dan mohon kerjasamanya.
|
|
| [ask] weapon, shield & armor's endurance | |
| 2012-02-27, 16:04 | [ask] weapon, shield & armor's endurance |
---|
barlieuy Novice
Posts : 139 Thanked : 1 Engine : RMVX Ace Skill : Beginner Type : Jack of All Trades
| to the point aja deh.. jadi gini, ceritanya setiap senjata, tameng ama armor (aksesoris jg boleh) tuh punya daya tahan masing2 (endurance). nah kalo endurance nya udah nol barang tersebut bakal ancur. trus ada tempat bengkel / servis untuk recover endurance nya. ada jg actor yang jago nempa ( forger class) yg bisa recover endurance. action attack dan escape pada saat battle membutuhkan stamina tertentu. jd belum tentu bisa menyerang 2 kali berturut-turut pada giliran berikutnya atau kabur dari battle sehingga kadang memaksa kita untuk bertahan selagi menunggu stamina cukup untuk melakukan penyerangan atau kabur. endurance bakal berkurang setiap dipake battle. weapon : berkurang kalo dipake nyerang, bertahan ato keserang. maksudnya bertahan, di project yang mau sy bikin ini pas battle tuh ada 3 tipe bertahan, pake senjata ( weapon shield), pake armor ( stand guard) dan pake tameng ( shield defence). tp defend point dari senjata pastinya ga sebesar armor / shield. armor : berkurang kalo kena serangan sama pas bertahan aja (soalnya aneh klo nyerang pake armor ). shield : berkurang kalo dipake bertahan, keserang atau nyerang. maksudnya nyerang, sama kaya senjata yang bisa dijadiin pertahanan, tameng juga bisa dipake buat nyerang ( shield attack) tp damagenya kecil. ada yang bisa dilempar ada jg yg dipake ngegetok. kalo kena critical, endurancenya berkurang cukup lumayan. yang ingin ditanyakan: 1.) gmn caranya bikin sistem endurance kaya gini? apa scripting ato bisa pake event? 2.) cara nampilin endurance bar pada scene battle sama menu. 3.) pendapat kk kk kalo aja sistem ini kurang bagus. oiya ini rencananya pake Active/Wait Battle System. mohon saran dan apapun yang bisa membangun saya meneruskan project ini. terima kasih sebelumnya.
Terakhir diubah oleh barlieuy tanggal 2012-02-28, 11:25, total 1 kali diubah |
| | | 2012-02-27, 16:22 | Re: [ask] weapon, shield & armor's endurance |
---|
shikami Member 1000 Konsep
Posts : 3744 Thanked : 31 Engine : Multi-Engine User Skill : Beginner Type : Developer
Awards:
| - Quote :
- 1.) gmn caranya bikin sistem endurance kaya gini? apa scripting ato bisa pake event?
script, coba cari dibagian script rmvx. bikinan drdhoom. weapon endurance CMIIW - Quote :
- 2.) cara nampilin endurance bar pada scene battle sama menu.
wah kalo ini banyak rombak script. tergantung battlenya sih. apalagi menu. - Quote :
- 3.) pendapat kk kk kalo aja sistem ini kurang bagus.
ini sistem biasa aja pada WRPG type. so..itu tergantung makenya aja pada database. kalo ada yg imba pasti ya kacau. cheers. |
| | | 2012-02-27, 16:27 | Re: [ask] weapon, shield & armor's endurance |
---|
EmperorAlan Senior
Posts : 622 Thanked : 5 Engine : RMVX Ace Skill : Very Beginner Type : Developer
| Hmmm.. Coba pakai sistem variable aja, terus digabungin sama Conditional Branch/Fork. Kalo mau di servis ya tambahin lagi variable-nya. Terus nampilinnya, wah, saya tak tahu kalau itu. Saya rasa system-nya udah oke, asal bisa lebih dikembangkan lagi, itu aja. |
| | | 2012-02-27, 16:36 | Re: [ask] weapon, shield & armor's endurance |
---|
barlieuy Novice
Posts : 139 Thanked : 1 Engine : RMVX Ace Skill : Beginner Type : Jack of All Trades
| @shikami : oke kk ntar coba nyari deh. soalnya mbah google kok ga berkutik ya? saya emang belum ngulik rgss lbh dalem sih. woah, kayanya bakal lama bgt nih beresin projectnya. btw, thank you atas tanggapannya. @alan: kalo pake variabel berarti harus bikin element baru ya? aduh belum terlalu nguasain sih. oke oke makasih MERGED Ada sih nemu tp kaya begini : - Code:
-
#======================================================================= # [SPG] Equipment Durability # by: sparkyg13 #------------------------------------------------------------------------------- # a script that adds durability to armor and weapons. #------------------------------------------------------------------------------- # to set an item's maximum durability place: # "<durability_max = n>" (without quotes) # where n is equal to the maximum value #======================================================================= module SPG module EquipDura #======================================================================= # CONFIG #=======================================================================
# cost to repair 1 durability point. COST_PER_DURABILITY_POINT = 1
VOCAB = {
:repair => "Repair", :repair_all => "Repair All", :repair_all_help => "Repairs all items",
}
#======================================================================= # END CONFIG #======================================================================= end end #======================================================================= # RPG::BaseItem #======================================================================= class RPG::BaseItem
def durability=(n) return if unbreakable? @durability = [[n, 0].max, max_durability].min end
def durability @durability = @durability.nil? ? max_durability : @durability.to_i return @durability end
def max_durability self.note.scan(/<durability_max[ ]=(.*)>/i) return $1.nil? ? -1 : $1.to_i end
def broken?; return @durability == 0; end def unbreakable?; return max_durability == -1; end
end #======================================================================= # RPG::Weapon #======================================================================= class RPG::Weapon
def atk; return broken? ? 0 : @atk; end def def; return broken? ? 0 : @def; end def spi; return broken? ? 0 : @spi; end def agi; return broken? ? 0 : @agi; end def fast_attack; return broken? ? false : @fast_attack; end def dual_attack; return broken? ? false : @dual_attack; end def critical_bonus; return broken? ? false : @critical_bonus; end def element_set; return broken? ? [] : @element_set; end def state_set; return broken? ? [] : @state_set; end
def price return ((@price * durability) / max_durability) end
end #======================================================================= # RPG::Armor #======================================================================= class RPG::Armor
def atk; return broken? ? 0 : @atk; end def def; return broken? ? 0 : @def; end def spi; return broken? ? 0 : @spi; end def agi; return broken? ? 0 : @agi; end def prevent_critical; return broken? ? false : @prevent_critical; end def half_mp_cost; return broken? ? false : @half_mp_cost; end def double_exp_gain; return broken? ? false : @double_exp_gain; end def auto_hp_recover; return broken? ? false : @auto_hp_recover; end def element_set; return broken? ? [] : @element_set; end def state_set; return broken? ? [] : @state_set; end
def price return ((@price * durability) / max_durability) end
end #======================================================================= # Scene_Battle #======================================================================= class Scene_Battle
alias spg_equip_durability_scene_battle_dhd display_hp_damage unless $@
def display_hp_damage(target, obj = nil) spg_equip_durability_scene_battle_dhd(target, obj) if target.hp_damage > 0 act = target.actor? ? target : @active_battler ene = target.actor? ? @active_battler : target act.do_dura_loss(target.actor?, ene) end end
end #======================================================================= # Game_Battler #======================================================================= class Game_Battler
def do_dura_loss(actor, obj) if actor # actor is target : armor durability loss damage = obj.atk * 4 base = [damage, 1].max for armor in armors next if armor.nil? || armor.unbreakable? d = rand(base / 4) armor.durability -= (d / armors.compact.size) end else # enemy is target : weapon durablity loss damage = self.atk * 4 base = [obj.maxhp - damage, 1].max for weapon in weapons next if weapon.nil? || weapon.unbreakable? d = rand(base / 4) weapon.durability -= (d / weapons.compact.size) end end end
end #======================================================================= # Window_Base #======================================================================= class Window_Base
alias spg_equip_durability_window_base_din draw_item_name unless $@
def draw_item_name(item, x, y, enabled = true) spg_equip_durability_window_base_din(item, x, y, enabled) return if item.nil? unless self.is_a?(Window_ShopBuy) || self.is_a?(Window_ShopNumber) draw_item_dura_gauge(x, y, item) if !item.unbreakable? && !item.unsigned? end end
def draw_item_dura_gauge(x, y, item) gw = 20 * item.durability / item.max_durability gc1 = Color.new(0, 55, 0) gc2 = Color.new(255, 30, 0) self.contents.fill_rect(x+2, y+20, 20, 3, gc2) self.contents.fill_rect(x+2, y+20, gw, 3, gc1) end
end #======================================================================= # Scene_Shop #======================================================================= class Scene_Shop
alias spg_equip_durability_scene_shop_sta start unless $@ alias spg_equip_durability_scene_shop_upd update unless $@ alias spg_equip_durability_scene_shop_ucs update_command_selection unless $@
def start @can_repair = $game_temp.shop_repair spg_equip_durability_scene_shop_sta @repair_window = Window_ShopRepair.new(0, 112, 544, 304) @repair_window.active = false @repair_window.visible = false @repairing_window = Window_ShopRepairing.new(0, 112) @repairing_window.active = false @repairing_window.visible = false $game_temp.shop_repair = true end
def create_command_window s1 = Vocab::ShopBuy s2 = Vocab::ShopSell s3 = SPG::EquipDura::VOCAB[:repair] s4 = Vocab::ShopCancel @command_window = Window_Command.new(384, [s1, s2, s3, s4], 4, 0, 8) @command_window.y = 56 if $game_temp.shop_purchase_only @command_window.draw_item(1, false) end if !@can_repair @command_window.draw_item(2, false) end end
def update spg_equip_durability_scene_shop_upd if @repair_window.active @repair_window.update update_repair elsif @repairing_window.active @repairing_window.update update_repairing end end
def update_command_selection if Input.trigger?(Input::C) case @command_window.index when 2 Input.update if !@can_repair Sound.play_buzzer else Sound.play_decision @command_window.active = false @dummy_window.visible = false @repair_window.active = true @repair_window.visible = true @repair_window.refresh @repair_window.help_window = @help_window end return when 3 Sound.play_decision $scene = Scene_Map.new return end end spg_equip_durability_scene_shop_ucs end
def update_repair if @repair_window.repair_all? @help_window.set_text(SPG::EquipDura::VOCAB[:repair_all_help]) end if Input.trigger?(Input::cool.gif Sound.play_cancel @repair_window.active = false @repair_window.visible = false @dummy_window.visible = true @command_window.active = true @help_window.set_text("") return elsif Input.trigger?(Input::C) @item = @repair_window.item return Sound.play_buzzer unless @repair_window.enable?(@item) @repairing_window.item = @item @repairing_window.refresh Input.update Sound.play_decision @repair_window.visible = false @repair_window.active = false @repairing_window.active = true @repairing_window.visible = true end
end
def update_repairing if Input.trigger?(Input::cool.gif Sound.play_cancel @repairing_window.active = false @repairing_window.visible = false @repair_window.visible = true @repair_window.active = true elsif Input.trigger?(Input::C) Input.update case @repairing_window.i when 0 # yes return Sound.play_buzzer if $game_party.gold < @repairing_window.repair_cost $game_party.lose_gold(@repairing_window.repair_cost) if @item.nil? for item in $game_party.items item.durability = item.max_durability end else @item.durability = @item.max_durability end Sound.play_shop when 1 Sound.play_cancel end @repairing_window.active = false @repairing_window.visible = false @repair_window.visible = true @repair_window.active = true @repair_window.refresh @gold_window.refresh end end
end #======================================================================= # Window_ShopRepair #======================================================================= class Window_ShopRepair < Window_ShopSell
def include?(item) return true if item.nil? return (item.is_a?(RPG::Weapon) or item.is_a?(RPG::Armor)) end
def enable?(item) return need_repair_items.compact.size > 0 if item.nil? return (item.durability < item.max_durability) end
def repair_all? return self.index == @data.size - 1 end
def draw_item(i) super(i) rect = item_rect(@data.size - 1) rect.width -= 4 default_alpha = self.contents.font.color.alpha enabled = enable?(nil) self.contents.font.color.alpha = enabled ? 255 : 128 ra = SPG::EquipDura::VOCAB[:repair_all] self.contents.draw_text(rect, ra, 1) self.contents.font.color.alpha = default_alpha end
def need_repair_items result = [] for item in @data next if item.nil? result << item if item.durability < item.max_durability end return result end
end #======================================================================= # Window_ShopRepairing #======================================================================= class Window_ShopRepairing < Window_Base
attr_accessor :item attr_reader :i
def initialize(x, y) super(x, y, 544, 304) @item = nil @i = 0 refresh end
def update super if self.active if Input.trigger?(Input::RIGHT) and @i != 1 Sound.play_cursor @i = 1 refresh elsif Input.trigger?(Input::LEFT) and @i != 0 Sound.play_cursor @i = 0 refresh end else @i = 0 end end
def repair_cost cost = 0 cpd = SPG::EquipDura::COST_PER_DURABILITY_POINT if @item.nil? for item in $game_party.items if item.durability < item.max_durability cost += (cpd*(item.max_durability - item.durability)) end end else if @item.durability < @item.max_durability cost = (cpd*(@item.max_durability - @item.durability)) end end return cost end
def refresh y = 96 self.contents.clear text = @item.nil? ? "all equipment" : @item.name self.contents.draw_text(0, 0, 544, WLH, "Repair #{text}?") draw_currency_value(repair_cost, 4, y + WLH * 2, 264) y_rect = Rect.new(self.width/2 * 0, y, self.width/2 - 32, WLH) n_rect = Rect.new(self.width/2 * 1, y, self.width/2 - 32, WLH) self.contents.font.color = normal_color self.contents.draw_text(y_rect, "Yes", 1) self.contents.draw_text(n_rect, "No", 1) self.cursor_rect.set(self.width/2 * @i, y, self.width/2 - 32, WLH) end
end #======================================================================= # Game_Temp #======================================================================= class Game_Temp
def shop_repair return @shop_repair.nil? ? true : @shop_repair end
def shop_repair=(bool) @shop_repair = bool end
end #======================================================================= # END #======================================================================= belum nemu yang buat ngurangin endurance pas lagi nyerangnya terus itu juga ga ada yang buat shieldnya. weapon sama armor doang. tulung. |
| | | 2012-02-27, 17:48 | Re: [ask] weapon, shield & armor's endurance |
---|
LowlingLife Administrator
Posts : 2000 Thanked : 25 Engine : Multi-Engine User
Awards:
| @ om barlieuy : Yang om pake itu kan Custom Battle System, nah harus disesuaikan. 1. Bisa Scripting (mudah.) atau Event (Banyak) Kalo scripting, cari aja Weapon Durability RMVX Script gitu.. Kalo eventing, caranya, om pakai script yang bakal eksekusi common event sebelum menyerang. Contoh : http://www.rpgmakervx.net/index.php?showtopic=30202 Lalu, pakai deh common eventnya buat ngecek condition weapon dll... 2. Harus synchronisasi sama scriptnya atau sama eventnya. 3. Tergantung pemakaiannya.. |
| | | 2012-02-27, 21:09 | Re: [ask] weapon, shield & armor's endurance |
---|
ashm Veteran
Posts : 1131 Thanked : 8 Engine : RMVX Ace Skill : Intermediate Type : Event Designer
Awards:
| Pake Omega equip custom script ja (OECS) Ada durability, crafting, ama slot. System kek gini keren sih, tapi biasanya suka nabrak (pas equipment rusak di tgh battle, method nya incompatible). |
| | | 2012-02-28, 10:22 | Re: [ask] weapon, shield & armor's endurance |
---|
barlieuy Novice
Posts : 139 Thanked : 1 Engine : RMVX Ace Skill : Beginner Type : Jack of All Trades
| @ kk lowling : wah iya itu dia, 'Event on Weapon Attack'. jadi kombinasi script sama event gitu ya. oke, ini ngebantu bgt.. makasih makasih @ kk ashm : o iya itu bagus juga, lumayan lengkap. tp belum ada script yang bisa pake shield untuk nyerang. gpp deh segini juga ngebantu bgt. klo untuk equip yang rusak di tengah battle, saya akalinnya misalnya weapon yang rusak itu masuk inventory sebagai equip yang rusak ( broken), terus auto-replace pake weapon cadangan ( reserve weapon). kalo shield rusak bakal auto masuk inventory juga trus jadi empty (ga pake shield). kalo armor jg sama kaya shield. untuk shield sama armor daya tahannya pasti lebih lama drpd weapon. jd jarang lah ada armor/shield yg ancur di tengah battle. hehe btw, thanks a bunch |
| | | | Re: [ask] weapon, shield & armor's endurance |
---|
Sponsored content
| | | | | [ask] weapon, shield & armor's endurance | |
|
Similar topics | |
|
Similar topics | |
| |
Halaman 1 dari 1 | |
| Permissions in this forum: | Anda tidak dapat menjawab topik
| |
| |
Latest 10 Topics | [Web Novel] Gloria Infidelis 2016-11-17, 21:27 by LightNightKnight
[Announcement] Forum baru untuk RMID 2016-08-25, 16:39 by TheoAllen
Where I'm Wrong ? 2016-07-24, 16:10 by ReydVires
flakeheartnet's Resources part III 2016-07-08, 14:30 by flakeheartnet
Keira's Art Warehouse 2016-06-28, 19:27 by KeiraBlaze
Theo Core Time System + Bingung 2016-06-27, 16:24 by Lockin
Error Script, Maybe ? 2016-06-27, 16:20 by Lockin
Nusaimoe @ RMID Lounge 2016-06-21, 05:02 by Jihad Bagas
Call Random Battle 2016-06-15, 17:04 by Lockin
Flakeheartnet Resources Part II [come back gift] 2016-06-07, 15:51 by flakeheartnet
|
Statistics
|
Members: [ 4947 ]
Topics: [ 8258 ]
Posts: [ 112606 ]
Newest member: [ https://rmid.forumotion.net/u4968 ]
|
|
|
|
|
|