| Battle Unit Adjuster v1.0 | |
|
2010-06-02, 16:17 | Battle Unit Adjuster v1.0 |
---|
wltr3565 Senior
Posts : 870 Thanked : 28 Engine : RMVX Skill : Skilled Type : Scripter
Awards:
| Battle Unit Adjuster Versi: v1.0 Tipe: Party Related PengenalanUntuk projectku. Ya, script pengganti party. Aku bisa gunain punya Dargor ato KGC ato yang lain, tapi terlalu ruwet untuk gameku. Aku pengennya simpel aja untuk player-playerku... Ini ngeniru aja kok cara ngeswitchnya Tales of. Fitur - Plug and play kalo kamu rada males. - Control simpel. - Compatibility tinggi ama script lain, ku harap. - Limit membernya gak terbatas, tapi jangan paksain.
ScreenshotsAku bisa nipu kalo pake screenshot... Mending coba sendiri. DemoKesimpelan untuk beriin demo. Scripts- Spoiler:
- Code:
-
=begin ================================================================================ Battle Unit Adjuster v1.0 by wltr3565 ================================================================================ This is mainly for my project. Yep, it's a party changer script, alright. I can have either Dargor's or KGC's or others, but too flashy for my game. I want things just simple for my players. This just clones Tales of's party switching method. ================================================================================ Features: - Plug and play if you're lazy enough. - Simple controls for switching. Just press the assigned button, then select the member, and select the second member, and you're done! - High compatibility with other scripts, I hope. - Infinite member limit, but don't push it. ================================================================================ How it will work: This just limits the total members available for battling, and readjust the max party members available. To switch members, just press the assigned button, select a member, and select the second one, it should change their position. And the battling members are the one in the first assigned total members. So if you limit the fighters to 3, and you have 5, the first 3 will battle. Switchable in battle? Not defaultly. Do something for yourself. ================================================================================ How to Use: Just do the appropriate configurations below. But if you want to do things in a lunatic way, you can always do some script commands: - $game_system.switch_units(index1, index2) That one will switch units in position index1 to position index2 and vice versa.
- $game_party.add_unit_at(index, actor_id) This will add the actor with the assigned actor id at the assigned index. Like if the index is 0, and the actor id is 5, the actor will be the leader. - $game_party.remove_unit_at(index) This will remove the actor at the assigned index. If the index is 0, then the leader's out. ================================================================================ Install: Insert this above main, and if needed, below battle and party related scripts. Better not using other party changer scripts. ================================================================================ Terms of Use: Credit me, wltr3565 appropriately. Free to use for commercial works though as long I get the credit. And if you're kind enough to give me a free copy of the game, I appreciate it. ================================================================================ Thanks: Namco Tales Studio: Main inspiration. ================================================================================ =end #=============================================================================== # COMMENCING COMPATIBILITY FLAG #=============================================================================== $imported = {} if $imported == nil $imported["wltr3565's_Battle_Unit_Adjuster"] = true #=============================================================================== # END COMPATIBILITY FLAG #=============================================================================== module WLTR module UNIT_SWITCH_SETUP #=============================================================================== # The max battling members available. Put it in numbers. The one who will battle # are the ones at the first assigned battle members (if you let 3 to battle and # you have 5, the first 3 will battle) #=============================================================================== MAX_BATTLE_MEMBERS = 3
#=============================================================================== # The max member limit available. I don't limit the number of units available # for joining, just do it at your own risk. Suggested around 6 to 8 if you plan # a large one. #=============================================================================== MEMBER_LIMIT = 6
#=============================================================================== # The icon id to check that the first member is ready to be switched. #=============================================================================== LOCK_ICON = 1
#=============================================================================== # The switch id to make party switching impossible. Set the switch on if you # don't want your players to change units for a while. #=============================================================================== SWITCHING_LOCK_SWITCH = 2
#=============================================================================== # Switch id to make sure the leader is not switchable. Set it to true if you # want the leader changing impossible for a while. #=============================================================================== LEADER_LOCK_SWITCH = 3
#=============================================================================== # Button for switching, that's defaultly assigned for the default menu scene. # Assign the desired button here. Don't forget Input:: before the desired # button, and no "" thing. You ought to not touch this if you don't know # anything about the buttons. #=============================================================================== SWITCH_BUTTON = Input::RIGHT #=============================================================================== # Like above, but to cancel the changing process. Don't you dare to assign # the button as the same as above. You know why. #=============================================================================== SWITCH_CANCEL_BUTTON = Input::LEFT end end
"==============================================================================" " BELOW IS TOO DANGEROUS TO READ WITHOUT PROPER SCRIPTING SKILLS. THEREFOR, " " EDIT AT YOUR OWN RISK! " "=============================================================================="
class Game_System def switch_units(unit1, unit2) actor1 = $game_party.members[unit1] actor2 = $game_party.members[unit2] index1 = actor1.index index2 = actor2.index $game_party.remove_unit_at(index1) decline = 1 decline = 0 if unit1 > unit2 $game_party.remove_unit_at(index2 - decline) id2 = actor2.id id1 = actor1.id decline = 0 decline = 1 if unit1 > unit2 $game_party.add_unit_at(index1 - decline, id2) $game_party.add_unit_at(index2, id1) end end
class Game_Party < Game_Unit MAX_MEMBERS = WLTR::UNIT_SWITCH_SETUP::MEMBER_LIMIT alias wltr_battle_members members def members result = wltr_battle_members if $game_temp.in_battle and result.size > WLTR::UNIT_SWITCH_SETUP::MAX_BATTLE_MEMBERS for i in result index = result.index(i) next if index + 1 <= WLTR::UNIT_SWITCH_SETUP::MAX_BATTLE_MEMBERS result.delete_at(index) end end return result end def all_members return wltr_battle_members end def remove_unit_at(index) @actors.delete_at(index) @actors.compact! $game_player.refresh end def add_unit_at(index, actor_id) return unless @actors.size < MAX_MEMBERS and not @actors.include?(actor_id) @actors.insert(index, actor_id) @actors.compact! $game_player.refresh end end
class Scene_Menu < Scene_Base alias update_party_switch update_command_selection def update_command_selection update_party_switch if Input.trigger?(WLTR::UNIT_SWITCH_SETUP::SWITCH_BUTTON) if $game_switches[WLTR::UNIT_SWITCH_SETUP::SWITCHING_LOCK_SWITCH] == true Sound.play_buzzer return end Sound.play_cursor @command_window.active = false @status_window.active = true @party_adjusting = true @status_window.index = 0 end end alias update_party_switching update def update if @party_adjusting == true update_party_adjustment else update_party_switching end end def update_party_adjustment update_menu_background @command_window.update @gold_window.update @status_window.update if Input.trigger?(Input::C) if $game_switches[WLTR::UNIT_SWITCH_SETUP::LEADER_LOCK_SWITCH] and @status_window.index == 0 Sound.play_buzzer return end Sound.play_decision if @first_member_index == nil @first_member_index = @status_window.index @status_window.lock_actor(@first_member_index) else if @first_member_index != @status_window.index $game_system.switch_units(@first_member_index, @status_window.index) @status_window.refresh @first_member_index = nil else @first_member_index = nil @status_window.refresh end end elsif Input.trigger?(Input::B) Sound.play_cancel if @first_member_index != nil @first_member_index = nil @status_window.refresh else @status_window.active = false @command_window.active = true @party_adjusting = false end elsif Input.trigger?(WLTR::UNIT_SWITCH_SETUP::SWITCH_CANCEL_BUTTON) Sound.play_cursor @first_member_index = nil @status_window.refresh @status_window.active = false @command_window.active = true @party_adjusting = false end end end
class Window_MenuStatus < Window_Selectable def lock_actor(index) @item_max = $game_party.members.size x = 2 y = index * 96 + WLH / 2 draw_icon(WLTR::UNIT_SWITCH_SETUP::LOCK_ICON, x, y) end end #=============================================================================== # # END OF SCRIPT # #===============================================================================
Terms of UseCredit aku, wltr3565. Boleh untuk game komersil sih, tapi kalo kamu berbaik hati untuk mau beriin kopian gratis game kamu, aku hargain kok ThanksNamco Tales Studio: Inspirasi utama.
Terakhir diubah oleh wltr3565 tanggal 2010-06-02, 17:44, total 1 kali diubah (Reason for editing : Sori, scriptnya salah ketik :sembah:) |
| | |
| Battle Unit Adjuster v1.0 | |
|
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 ]
|
|
|
|