bastian 2 Posted May 16, 2012 (edited) Name: ziifee's Spin Command Description: Within battles, changes the usual Attack/Skill/Guard/Item vertical menu into a spinning ring menu Original VX script: # * ziifee's Spin Command (http://neomemo.web.fc2.com/) # Changes the Party and Actor Command Windows in battle. # â–² Spin40.png is required in Graphics/System #============================================================================== # â– Ziifee #============================================================================== module Zii # â–¼ Spin Command/Icon Index Number FIGHT = 132 # Fight ESCAPE = 143 # Escape ATTACK = 1 # Attack (Default) GUARD = 52 # Guard SKILL = 128 # Skill ITEM = 144 # Item # â–¼ Spin Command/Direction of Rotation ( "normal" or "reverse" ) # Determines how Spin Command rotates according to left/right key press. TURN = "normal" # â–¼ Face Graphics (true: Use battle face graphic / false: don't use faces) STATUS_FACE = true # â–¼ Actor Names (true: Show actor names / false: Don't show ) STATUS_LINE = true # â–¼ Actor Name Text Size ( VX default size: 20 ) LINE_SIZE = 14 #-------------------------------------------------------------------------- # ◠通常回転 ã®åˆ¤å®š #-------------------------------------------------------------------------- def self.turn_normal? return false if TURN == "reverse" return true if TURN == "normal" return true end #-------------------------------------------------------------------------- # â— ãƒãƒˆãƒ«ã‚ªãƒ—ション [顔グラフィック] ã®åˆ¤å®š #-------------------------------------------------------------------------- def self.battle_face? return true if STATUS_FACE return false end #-------------------------------------------------------------------------- # â— ãƒãƒˆãƒ«ã‚¹ãƒ†ãƒ¼ãƒˆã‚ªãƒ—ション [åå‰] ã®åˆ¤å®š #-------------------------------------------------------------------------- def self.line_name? return true if STATUS_LINE return false end end #============================================================================== # â– Window_Base #============================================================================== class Window_Base #-------------------------------------------------------------------------- # â— é¡”ã‚°ãƒ©ãƒ•ã‚£ãƒƒã‚¯ã®æç”» 改 # opacity : ä¸é€æ˜Žåº¦ #-------------------------------------------------------------------------- def draw_face(face_name, face_index, x, y, size = 96, opacity = 255) bitmap = Cache.face(face_name) rect = Rect.new(0, 0, 0, 0) rect.x = face_index % 4 * 96 + (96 - size) / 2 rect.y = face_index / 4 * 96 + (96 - size) / 2 rect.width = size rect.height = size self.contents.blt(x, y, bitmap, rect, opacity) bitmap.dispose end #-------------------------------------------------------------------------- # ◠アクターã®é¡”グラフィックæç”» 改 # opacity : ä¸é€æ˜Žåº¦ #-------------------------------------------------------------------------- def draw_actor_face(actor, x, y, size = 96, opacity = 255) draw_face(actor.face_name, actor.face_index, x, y, size, opacity) end end #============================================================================== # â– Window_SpinCommand #------------------------------------------------------------------------------ # ã€€å›žè»¢ç”¨ã‚³ãƒžãƒ³ãƒ‰é¸æŠžã‚’è¡Œã†ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ã™ã€‚ #============================================================================== class Window_SpinCommand < Window_Base #-------------------------------------------------------------------------- # ◠公開インスタンス変数 #-------------------------------------------------------------------------- attr_reader :index # カーソルä½ç½® attr_reader :help_window # ヘルプウィンドウ #-------------------------------------------------------------------------- # â— ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆåˆæœŸåŒ– # cx / cy : ä¸å¿ƒã® X座標 / Y座標 # commands : コマンドé…列 (内容 㯠[name, kind, pull, enabled?]) # setting : è¨å®šãƒãƒƒã‚·ãƒ¥ ("R"=>åŠå¾„ "S"=>速㕠"G"=>背景 "L"=>æ–‡å—) #-------------------------------------------------------------------------- def initialize(cx, cy, commands, setting = {}) @radius = setting.has_key?("R") ? setting["R"] : 40 # æç”»åŠå¾„ @speed = setting.has_key?("S") ? setting["S"] : 36 # 回転速㕠@spin_back = setting.has_key?("G") ? setting["G"] : "" # èƒŒæ™¯ç”»åƒ @spin_line = setting.has_key?("L") ? setting["L"] : nil # æ–‡å—ä½ç½® x, y = cx - @radius - 28, cy - @radius - 28 width = height = @radius * 2 + 56 super(x, y, width, height) self.opacity = 0 @index = 0 @commands = commands # コマンド @spin_right = true @spin_count = 0 update_cursor end #-------------------------------------------------------------------------- # â–½ スピン画åƒã‚’æç”»ã™ã‚‹ (æç”»å†…容 強化用) # i : インデックス # cx : 表示 ä¸å¿ƒä½ç½® X座標 # cy : 表示 ä¸å¿ƒä½ç½® Y座標 #-------------------------------------------------------------------------- def draw_spin_graphic(i, cx, cy) case command_kind(i) when "icon" draw_icon(command_pull(i), cx - 12, cy - 12, command_enabled?(i)) end end #-------------------------------------------------------------------------- # ★ リフレッシュ ãƒã‚°å›žé¿ç”¨ #-------------------------------------------------------------------------- def refresh set_spin end #-------------------------------------------------------------------------- # ★ é …ç›®ã®æç”» ãƒã‚°å›žé¿ç”¨ #-------------------------------------------------------------------------- def draw_item(index, enabled = true) @commands[index][3] = enabled set_spin end #-------------------------------------------------------------------------- # â— ç¾åœ¨ã®ã‚³ãƒžãƒ³ãƒ‰åã‚’å–å¾—ã™ã‚‹ #-------------------------------------------------------------------------- def command_name(index = @index) return "" if index < 0 name = @commands[index][0] return name != nil ? name : "" end #-------------------------------------------------------------------------- # ◠コマンドã®ç¨®é¡žã‚’å–å¾— #-------------------------------------------------------------------------- def command_kind(index) result = @commands[index][1] return result != nil ? result : "" end #-------------------------------------------------------------------------- # ◠コマンドã®å¼•æ•° ã‚’å–å¾— #-------------------------------------------------------------------------- def command_pull(index) result = @commands[index][2] return result != nil ? result : "" end #-------------------------------------------------------------------------- # â— ã‚³ãƒžãƒ³ãƒ‰ã®æœ‰åŠ¹ãƒ•ãƒ©ã‚°ã‚’å–å¾— #-------------------------------------------------------------------------- def command_enabled?(index) result = @commands[index][3] return result != nil ? result : true end #-------------------------------------------------------------------------- # â— åå‰ã®ä½ç½®ã« index ã‚’è¨å®šã™ã‚‹ #-------------------------------------------------------------------------- def set_index(name) n = -1 for i in 0...@commands.size n = i if @commands[0] == name end @index = n if n >= 0 update_cursor call_update_help set_spin end #-------------------------------------------------------------------------- # ◠カーソルä½ç½®ã®è¨å®š # index : æ–°ã—ã„カーソルä½ç½® #-------------------------------------------------------------------------- def index=(index) @index = index update_cursor call_update_help set_spin end #-------------------------------------------------------------------------- # â— ä¸å¿ƒã®X座標をå–å¾— #-------------------------------------------------------------------------- def center_x return contents.width / 2 end #-------------------------------------------------------------------------- # â— ä¸å¿ƒã®Y座標をå–å¾— #-------------------------------------------------------------------------- def center_y return contents.height / 2 end #-------------------------------------------------------------------------- # â— é …ç›®æ•°ã®å–å¾— #-------------------------------------------------------------------------- def item_max return @commands.size end #-------------------------------------------------------------------------- # ◠背景ã®è¨å®š (å†å®šç¾© å‘ã) #-------------------------------------------------------------------------- def set_background return if @spin_back == "" bitmap = Cache.system(@spin_back) rect = Rect.new(0, 0, bitmap.width, bitmap.height) self.contents.blt(12, 12, bitmap, rect) end #-------------------------------------------------------------------------- # â— æ–‡ç« ã®è¨å®š (å†å®šç¾© å‘ã) #-------------------------------------------------------------------------- def set_text return if @spin_line == nil y = center_y - WLH / 2 + @spin_line self.contents.draw_text(center_x - 48, y, 96, WLH, command_name, 1) end #-------------------------------------------------------------------------- # ◠スピンアイコンã®è§’度ã®å·®ã‚’å–å¾—ã™ã‚‹ #-------------------------------------------------------------------------- def angle_size return (Math::PI * 2 / item_max) end #-------------------------------------------------------------------------- # ◠スピンアイコン回転時ã®ã‚«ã‚¦ãƒ³ãƒˆ ã‚’è¨å®šã™ã‚‹ #-------------------------------------------------------------------------- def set_spin_count @spin_count = angle_size * 360 / @speed set_spin(true) end #-------------------------------------------------------------------------- # ◠スピンè¨å®š ã®å®Ÿè¡Œ # spin : 回転フラグ (true ã®æ™‚回転ä¸) #-------------------------------------------------------------------------- def set_spin(spin = false) self.contents.clear set_background angle = spin ? @speed * @spin_count / 360 : 0 angle = @spin_right ? angle : -angle for i in 0...item_max n = (i - @index) * angle_size + angle cx = @radius * Math.sin(n) + center_x cy = - @radius * Math.cos(n) + center_y draw_spin_graphic(i, cx, cy) end set_text end #-------------------------------------------------------------------------- # ◠フレーム更新 #-------------------------------------------------------------------------- def update super update_cursor if @spin_count > 0 @spin_count -= 1 set_spin(@spin_count >= 1) return end update_command end #-------------------------------------------------------------------------- # ◠コマンドã®ç§»å‹•å¯èƒ½åˆ¤å®š #-------------------------------------------------------------------------- def command_movable? return false if @spin_count > 0 return false if (not visible or not active) return false if (index < 0 or index > item_max or item_max == 0) return false if (@opening or @closing) return true end #-------------------------------------------------------------------------- # ◠コマンドをå³ã«ç§»å‹• #-------------------------------------------------------------------------- def command_right @index = (@index + 1) % item_max @spin_right = true set_spin_count end #-------------------------------------------------------------------------- # ◠コマンドを左ã«ç§»å‹• #-------------------------------------------------------------------------- def command_left @index = (@index - 1 + item_max) % item_max @spin_right = false set_spin_count end #-------------------------------------------------------------------------- # â— ã‚³ãƒžãƒ³ãƒ‰é¸æŠžã®æ›´æ–° #-------------------------------------------------------------------------- def update_command if command_movable? if Input.press?(Input::RIGHT) Sound.play_cursor Zii.turn_normal? ? command_right : command_left end if Input.press?(Input::LEFT) Sound.play_cursor Zii.turn_normal? ? command_left : command_right end end call_update_help end #-------------------------------------------------------------------------- # â— ã‚«ãƒ¼ã‚½ãƒ«ã®æ›´æ–° #-------------------------------------------------------------------------- def update_cursor if @index < 0 self.cursor_rect.empty else rect = Rect.new(0, 0, 24, 24) rect.x = center_x - rect.width / 2 rect.y = center_y - rect.height / 2 - @radius self.cursor_rect = rect end end #-------------------------------------------------------------------------- # ◠ヘルプウィンドウã®è¨å®š # help_window : æ–°ã—ã„ヘルプウィンドウ #-------------------------------------------------------------------------- def help_window=(help_window) @help_window = help_window call_update_help end #-------------------------------------------------------------------------- # ◠ヘルプウィンドウ更新メソッドã®å‘¼ã³å‡ºã— #-------------------------------------------------------------------------- def call_update_help if self.active and @help_window != nil update_help end end #-------------------------------------------------------------------------- # â— ãƒ˜ãƒ«ãƒ—ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã®æ›´æ–° (内容ã¯ç¶™æ‰¿å…ˆã§å®šç¾©ã™ã‚‹) #-------------------------------------------------------------------------- def update_help end end #============================================================================== # â– Window_LineHelp #------------------------------------------------------------------------------ #  スã‚ルやアイテムã®èª¬æ˜Žã€ã‚¢ã‚¯ã‚¿ãƒ¼ã®ã‚¹ãƒ†ãƒ¼ã‚¿ã‚¹ãªã©ã‚’表示ã™ã‚‹ã‚¦ã‚£ãƒ³ãƒ‰ã‚¦ã§ã™ã€‚ #============================================================================== class Window_LineHelp < Window_Base #-------------------------------------------------------------------------- # â— ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆåˆæœŸåŒ– #-------------------------------------------------------------------------- def initialize super(-16, 0, 576, WLH + 32) self.opacity = 0 end #-------------------------------------------------------------------------- # ◠テã‚ストè¨å®š # text : ウィンドウã«è¡¨ç¤ºã™ã‚‹æ–‡å—列 # align : アラインメント (0..å·¦æƒãˆã€1..ä¸å¤®æƒãˆã€2..峿ƒãˆ) #-------------------------------------------------------------------------- def set_text(text, align = 0) if text != @text or align != @align self.contents.clear back_color = Color.new(0, 0, 0, 80) self.contents.fill_rect(0, y = 12, contents.width, WLH - y, back_color) self.contents.font.color = normal_color self.contents.draw_text(20, 0, self.width - 72, WLH, text, align) @text = text @align = align end end end #============================================================================== # â– Window_PartyCommand #============================================================================== class Window_PartyCommand < Window_SpinCommand #-------------------------------------------------------------------------- # â— ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆåˆæœŸåŒ– #-------------------------------------------------------------------------- def initialize s1 = [Vocab::fight, "icon", Zii::FIGHT, true] s2 = [Vocab::escape, "icon", Zii::ESCAPE, $game_troop.can_escape] setting = {"R"=>40, "S"=>52, "G"=>"Spin40", "L"=>-12} super(72, 356, [s1, s2], setting) self.active = false set_spin end end #============================================================================== # â– Window_ActorCommand #============================================================================== class Window_ActorCommand < Window_SpinCommand #-------------------------------------------------------------------------- # â— ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆåˆæœŸåŒ– #-------------------------------------------------------------------------- def initialize s1 = [Vocab::attack, "icon", Zii::ATTACK, true] s2 = [Vocab::skill, "icon", Zii::SKILL, true] s3 = [Vocab::guard, "icon", Zii::GUARD, true] s4 = [Vocab::item, "icon", Zii::ITEM, true] setting = {"R"=>40, "S"=>52, "G"=>"Spin40", "L"=>-12} super(72, 356, [s1, s2, s3, s4], setting) self.active = false set_spin end #-------------------------------------------------------------------------- # ◠セットアップ # actor : アクター #-------------------------------------------------------------------------- def setup(actor) @commands[0][2] = Zii::ATTACK @commands[1][0] = Vocab::skill if actor.weapons[0] != nil n = actor.weapons[0].icon_index @commands[0][2] = n if n > 0 end @commands[1][0] = actor.class.skill_name if actor.class.skill_name_valid self.index = 0 set_spin end end #============================================================================== # â– Window_BattleStatus #============================================================================== class Window_BattleStatus < Window_Selectable #-------------------------------------------------------------------------- # â— ã‚ªãƒ–ã‚¸ã‚§ã‚¯ãƒˆåˆæœŸåŒ– 改 #-------------------------------------------------------------------------- def initialize super(128, 288, 416, 128) @column_max = 4 refresh self.active = false self.opacity = 0 end #-------------------------------------------------------------------------- # â— ã‚¹ãƒ†ãƒ¼ãƒˆã®æ›´æ–° ã®ä¸‹åœ°æç”» #-------------------------------------------------------------------------- def draw_neomemo7_back @neomemo7_clear = false for index in 0...@item_max x = index * 96 self.contents.clear_rect(x + 72, WLH * 3, 24, 24) next unless Zii.battle_face? actor = $game_party.members[index] next if actor.hp <= 0 bitmap = Cache.face(actor.face_name) rect = Rect.new(0, 0, 22, 22) rect.x = actor.face_index % 4 * 96 + 72 rect.y = actor.face_index / 4 * 96 + 72 self.contents.blt(x + 72, WLH * 3, bitmap, rect, 192) end end #-------------------------------------------------------------------------- # â— é …ç›®ã®æç”» 改 #-------------------------------------------------------------------------- def draw_item(index) x = index * 96 rect = Rect.new(x, 0, 96, 96) self.contents.clear_rect(rect) self.contents.font.color = normal_color actor = $game_party.members[index] draw_actor_face(actor, x + 2, 2, 92, 192) if actor.hp > 0 and Zii.battle_face? draw_actor_state(actor, x + 72, WLH * 3) if Zii.line_name? self.contents.font.color = hp_color(actor) size = Zii::LINE_SIZE self.contents.font.size = size self.contents.draw_text(x, WLH * 1 + 20 - size, 80, WLH, actor.name) self.contents.font.size = 20 end draw_actor_hp(actor, x, WLH * 2, 80) draw_actor_mp(actor, x, WLH * 3, 70) end #-------------------------------------------------------------------------- # â— ã‚«ãƒ¼ã‚½ãƒ«ã®æ›´æ–° #-------------------------------------------------------------------------- def update_cursor if @index < 0 # カーソルä½ç½®ãŒ 0 未満ã®å ´åˆ self.cursor_rect.empty # カーソルを無効ã¨ã™ã‚‹ else # カーソルä½ç½®ãŒ 0 以上ã®å ´åˆ rect = Rect.new(index * 96, 0, 96, 96) self.cursor_rect = rect # カーソルã®çŸ©å½¢ã‚’æ›´æ–° end end end #============================================================================== # â– Scene_Battle #------------------------------------------------------------------------------ #  ãƒãƒˆãƒ«ç”»é¢ã®å‡¦ç†ã‚’行ã†ã‚¯ãƒ©ã‚¹ã§ã™ã€‚ #============================================================================== class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # â— æƒ…å ±è¡¨ç¤ºãƒ“ãƒ¥ãƒ¼ãƒãƒ¼ãƒˆã®ä½œæˆ #-------------------------------------------------------------------------- alias :neomemo13_create_info_viewport :create_info_viewport def create_info_viewport neomemo13_create_info_viewport @info_viewport.rect.set(0, 0, 544, 416) @status_window.x = 128 @actor_command_window.x = 4 end #-------------------------------------------------------------------------- # â— æƒ…å ±è¡¨ç¤ºãƒ“ãƒ¥ãƒ¼ãƒãƒ¼ãƒˆã®æ›´æ–° #-------------------------------------------------------------------------- alias :neomemo13_update_info_viewport :update_info_viewport def update_info_viewport ox = @info_viewport.ox neomemo13_update_info_viewport @info_viewport.ox = ox end #-------------------------------------------------------------------------- # â— ãƒ‘ãƒ¼ãƒ†ã‚£ã‚³ãƒžãƒ³ãƒ‰é¸æŠžã®é–‹å§‹ #-------------------------------------------------------------------------- alias :neomemo13_start_party_command_selection :start_party_command_selection def start_party_command_selection if $game_temp.in_battle @party_command_window.visible = true @actor_command_window.visible = false end neomemo13_start_party_command_selection end #-------------------------------------------------------------------------- # â— ãƒ‘ãƒ¼ãƒ†ã‚£ã‚³ãƒžãƒ³ãƒ‰é¸æŠžã®æ›´æ–° #-------------------------------------------------------------------------- alias :neomemo13_update_party_command_selection :update_party_command_selection def update_party_command_selection return unless @party_command_window.command_movable? neomemo13_update_party_command_selection end #-------------------------------------------------------------------------- # â— ã‚¢ã‚¯ã‚¿ãƒ¼ã‚³ãƒžãƒ³ãƒ‰é¸æŠžã®é–‹å§‹ #-------------------------------------------------------------------------- alias :neomemo13_start_actor_command_selection :start_actor_command_selection def start_actor_command_selection neomemo13_start_actor_command_selection @party_command_window.visible = false @actor_command_window.visible = true end #-------------------------------------------------------------------------- # â— ã‚¢ã‚¯ã‚¿ãƒ¼ã‚³ãƒžãƒ³ãƒ‰é¸æŠžã®æ›´æ–° #-------------------------------------------------------------------------- alias :neomemo13_update_actor_command_selection :update_actor_command_selection def update_actor_command_selection return unless @actor_command_window.command_movable? neomemo13_update_actor_command_selection end #-------------------------------------------------------------------------- # ◠対象敵ã‚ãƒ£ãƒ©é¸æŠžã®é–‹å§‹ #-------------------------------------------------------------------------- alias :neomemo13_start_target_enemy_selection :start_target_enemy_selection def start_target_enemy_selection x = @info_viewport.rect.x ox = @info_viewport.ox neomemo13_start_target_enemy_selection @info_viewport.rect.x = x @info_viewport.ox = ox @target_enemy_window.x = 544 - @target_enemy_window.width @target_enemy_window.y = 288 @info_viewport.rect.width -= @target_enemy_window.width end #-------------------------------------------------------------------------- # ◠対象敵ã‚ãƒ£ãƒ©é¸æŠžã®çµ‚了 #-------------------------------------------------------------------------- alias :neomemo13_end_target_enemy_selection :end_target_enemy_selection def end_target_enemy_selection x = @info_viewport.rect.x ox = @info_viewport.ox @info_viewport.rect.width += @target_enemy_window.width neomemo13_end_target_enemy_selection @info_viewport.rect.x = x @info_viewport.ox = ox end #-------------------------------------------------------------------------- # â— å¯¾è±¡ã‚¢ã‚¯ã‚¿ãƒ¼å¯¾è±¡é¸æŠžã®é–‹å§‹ #-------------------------------------------------------------------------- alias :neomemo13_start_target_actor_selection :start_target_actor_selection def start_target_actor_selection x = @info_viewport.rect.x ox = @info_viewport.ox neomemo13_start_target_actor_selection @target_actor_window.y = 288 @info_viewport.rect.x = x @info_viewport.ox = ox @info_viewport.rect.width -= @target_actor_window.width end #-------------------------------------------------------------------------- # â— å¯¾è±¡ã‚¢ã‚¯ã‚¿ãƒ¼é¸æŠžã®çµ‚了 #-------------------------------------------------------------------------- alias :neomemo13_end_target_actor_selection :end_target_actor_selection def end_target_actor_selection x = @info_viewport.rect.x ox = @info_viewport.ox @info_viewport.rect.width += @target_actor_window.width neomemo13_end_target_actor_selection @info_viewport.rect.x = x @info_viewport.ox = ox end end It requires this image to work: Screen of it in action: I'd really, really appreciate this conversion! Thanks for reading! Edited October 29, 2012 by bastian Share this post Link to post Share on other sites
bastian 2 Posted May 19, 2012 [bump] Please? I'll make you cookies. Share this post Link to post Share on other sites
bastian 2 Posted May 25, 2012 [bump] If I can't bribe you with cookies, I'm happy to bribe you with something else. I can make you a custom song for your game. Or a pretty decent title screen. Or... um... cake. Share this post Link to post Share on other sites
XIX 30 Posted May 25, 2012 There's already a script like this somewhere on the RMRK forum, it doesn't seem like you tried looking for one at all Http://www. RMRK.net Share this post Link to post Share on other sites
bastian 2 Posted May 25, 2012 (edited) There's already a script like this somewhere on the RMRK forum, it doesn't seem like you tried looking for one at all Http://www. RMRK.net Hm. First of all, I've googled the heck out of "Spin Command VX Ace" and various iterations, and looked on several sites similar to this one (including RMRK) and found zilch, so your assumption that I didn't try looking is erroneous. But more to the point: I just looked again, wondering how I could possibly have missed it, and I'm still not finding it at rmrk.net. I've looked through their complete scripts section for VXAce as well as their requests board. I've also searched there under "Ziifee" and also "spin command" and none of the results point to a VXA conversion. Are you sure such a conversion has already happened? Edited May 25, 2012 by bastian Share this post Link to post Share on other sites
XIX 30 Posted May 25, 2012 probably, and it's in English too, if not then it's a very similar script, that i saw on RMRK Share this post Link to post Share on other sites
bastian 2 Posted May 25, 2012 Well, I just spent about a a half skimming through various boards on their site, and came up with nothing. So I'm pretty sure you're wrong, and thus my request still stands. Share this post Link to post Share on other sites
bastian 2 Posted May 27, 2012 *bump* (I've since done many, many more searches and I'm convinced that no such script has been made for VXA. Not sure what the other poster was talking about. :/ ) Share this post Link to post Share on other sites
Wyrelade 15 Posted September 6, 2012 I had while ago a conversed version on my game project. I don't know where it's lost now, but I am pretty sure I can still find it... if I'll find it, Ill send it on a PM to you. Share this post Link to post Share on other sites
bastian 2 Posted October 11, 2012 That would be awesome! Share this post Link to post Share on other sites
+ AdamSakuru 43 Posted October 13, 2012 Could you send it my way as well? That would be totally rad. Share this post Link to post Share on other sites
bastian 2 Posted October 15, 2012 It turns out that Wyrelade could not find it after all. Likely for the very good reason that it doesn't seem to exist. Could someone please convert this once and for all? Thanks! Share this post Link to post Share on other sites
bastian 2 Posted October 29, 2012 *BUMP* I'd really, really, really appreciate it if someone could please do this request. Share this post Link to post Share on other sites
bastian 2 Posted November 8, 2012 Bump. I'm honestly super surprised no one has picked up on this. There are tons of people who want this and we'd all be so appreciative. It was a big part (aesthetically) of my full-sized RPG and I'd really like it to be in the sequel I'm working on. Share this post Link to post Share on other sites
Xzeph 2 Posted November 8, 2012 I wanted this script too! (T_T) Share this post Link to post Share on other sites
Angius 0 Posted November 10, 2012 Bumping, because ME WANT THIS Share this post Link to post Share on other sites
BigDog 0 Posted February 23, 2013 As much as I hate Necroing a post, this isn't so bad because it was just november. I have been looking for the spin command conversion too... has this been solved already? Share this post Link to post Share on other sites
BigDog 0 Posted February 23, 2013 (edited) *Update* I actually found the site where the conversion has been done @ http://neomemo.web.fc2.com/rgss3.html It is not in english, but it can be used (A translated verion would be awesome). I am still trying to get it to work with my particular setup, but in order to get it to work you have to have these 2 pictures in your graphics/system folder: Then you have to have these 2 scripts in order: =begin ************************************************************************ Ÿ ‰æ‘œƒRÆ’}ƒ“ƒhÆ’XÆ’NÆ’Å Æ’vÆ’g (Æ’x[Æ’XÆ’XÆ’NÆ’Å Æ’vÆ’g) Ver.1.81 --------------------------------------------------------------------------- ‰æ‘œƒRÆ’}ƒ“ƒh‚̃x[Æ’XÆ’XÆ’NÆ’Å Æ’vÆ’g‚Å‚·B‰ñ“]Æ’AÆ’CÆ’Rƒ“ƒRÆ’}ƒ“ƒh‚ªŽg‚¦‚Ü‚·B=end # ************************************************************************ #-information------------------------------------------------------------------$ziifee ||= {}$ziifee[:SpriteCommand] = true#------------------------------------------------------------------------------#-memo-------------------------------------------------------------------------# [•K—v‰æ‘œ] ˆÈ‰º‚̉摜‚ð Graphics/System ‚ɃCƒ“ƒ|[Æ’g‚µ‚¾‚³‚¢B# ‰ñ“]Æ’RÆ’}ƒ“ƒh—pÆ’J[Æ’\ƒ‹‰æ‘œ ( Æ’tÆ’@Æ’Cƒ‹–¼ : RollIconCursor )# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# ‚±‚̃XÆ’NÆ’Å Æ’vÆ’g‚ÉÂâ€\‚ÈŒÀ‚è‘fÞ‚Ì’†‚Åã•â€â€šÃ‰â€œÂ±â€œÃ¼â€šÂµâ€šÃ„‚‚¾‚³‚¢B# ‰ñ“]Æ’AÆ’CÆ’Rƒ“ƒRÆ’}ƒ“ƒh‘I‘ð‚ðs‚¢‚½‚¢ƒNƒ‰ƒX‚Ɉȉº‚ð‹Lq‚µ‚Ü‚·B# include ZiifSpriteCommand_RollIcon # ‰ñ“]Æ’AÆ’CÆ’Rƒ“ƒRÆ’}ƒ“ƒh‘I‘ð#------------------------------------------------------------------------------ #==============================================================================# ¡ ZiifManager#============================================================================== module ZiifManager #-------------------------------------------------------------------------- # Â¥ ’è†(Æ’AÆ’CÆ’Rƒ“â€Ã”†) #-memo--------------------------------------------------------------------- # ‰ñ“]Æ’RÆ’}ƒ“ƒhã‚É•\ަ‚·‚éƒAÆ’CÆ’Rƒ“‚±‚±‚ÅÃ’肵‚Ü‚·B # ˆÈ‰º‚Ì’è‹`‚Ì symbol ‚ª‚±‚±‚ÅÃ’è‚·‚éƒVƒ“ƒ{ƒ‹‚ɂȂè‚Ü‚·B # add_command(name, symbol, enabled, ext) # Æ’RÆ’}ƒ“ƒh‚̒ljà # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # IconSet[Æ’Vƒ“ƒ{ƒ‹] = Hash.new(Æ’AÆ’CÆ’Rƒ“â€Ã”†) # IconSet[:skill][Æ’XÆ’Lƒ‹ƒ^Æ’CÆ’vâ€Ã”†] = Æ’AÆ’CÆ’Rƒ“â€Ã”†# Æ’XÆ’Lƒ‹ƒ^Æ’CÆ’v #-------------------------------------------------------------------------- IconSet ||= Hash.new(Hash.new(16)) # Æ’fÆ’tÆ’Hƒ‹ƒg IconSet[:fight] = Hash.new(147) # ¤ (Æ’oÆ’gƒ‹) IconSet[:escape] = Hash.new(467) # “¦‚°‚é (Æ’oÆ’gƒ‹) IconSet[:attack] = Hash.new(175) # UŒ‚ (Æ’oÆ’gƒ‹) IconSet[:guard] = Hash.new(506) # –hΊ (Æ’oÆ’gƒ‹) IconSet[:item] = Hash.new(260) # Æ’AÆ’CÆ’eƒ€ IconSet[:skill] = Hash.new(112) # Æ’XÆ’Lƒ‹ IconSet[:skill][1] = 115 # Æ’XÆ’Lƒ‹ƒ^Æ’CÆ’v ID:01 IconSet[:skill][2] = 117 # Æ’XÆ’Lƒ‹ƒ^Æ’CÆ’v ID:02 IconSet[:equip] = Hash.new(436) # ‘•â€Ãµ IconSet[:weapon] = Hash.new(147) # •Šà IconSet[:armor] = Hash.new(506) # –h‹ï IconSet[:key_item] = Hash.new(243) # Æ’L[Æ’AÆ’CÆ’eƒ€ IconSet[:optimize] = Hash.new(437) # ŋ‘•â€Ãµ IconSet[:clear] = Hash.new(143) # Å O‚· IconSet[:status] = Hash.new(121) # Æ’XÆ’e[Æ’^Æ’X IconSet[:formation] = Hash.new(183) # •À‚ёւ¦ IconSet[:save] = Hash.new(224) # Æ’Z[Æ’u IconSet[:buy] = Hash.new(270) # w“ü IconSet[:sell] = Hash.new(262) # â€â€žâ€¹p IconSet[:cancel] = Hash.new(12) # Æ’Lƒƒƒ“ƒZƒ‹ IconSet[:new_game] = Hash.new(234) # Æ’jƒ…[Æ’Q[ƒ€ IconSet[:continue] = Hash.new(224) # Æ’Rƒ“ƒeÆ’BÆ’jƒ…[ IconSet[:game_end] = Hash.new(257) # Æ’Q[ƒ€I—¹ IconSet[:to_title] = Hash.new(257) # Æ’^Æ’CÆ’gƒ‹‚Ö IconSet[:shutdown] = Hash.new(143) # Æ’VÆ’Æ’Æ’bÆ’gÆ’_Æ’Eƒ“ #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’AÆ’CÆ’Rƒ“â€Ã”†‚̎擾 # command : Æ’EÆ’Bƒ“ƒhÆ’E‚̃RÆ’}ƒ“ƒh #-------------------------------------------------------------------------- def self.command_icon_index(command) IconSet[command[:symbol]][command[:ext]] endend #==============================================================================# ¡ Game_System#============================================================================== class Game_System #-------------------------------------------------------------------------- # Å“ ŒöŠJÆ’Cƒ“ƒXÆ’^ƒ“ƒX•Æ(Æ’IÆ’vÆ’Vƒ‡ƒ“Šg’£—p) #-------------------------------------------------------------------------- attr_writer :ziifop_reverse_roll # ‹t‰ñ“] ( true / false ) attr_writer :ziifop_roll_input_type # ‰ñ“]Žž Æ’L[â€œÃ¼â€”ÃÆ’^Æ’CÆ’v (0`2) attr_writer :ziifop_roll_speed # ‰ñ“]Žž ‘¬“x (0`4) #-------------------------------------------------------------------------- # Â¥ ‹t‰ñ“]‚̎擾 #-------------------------------------------------------------------------- def ziifop_reverse_roll return false end #-------------------------------------------------------------------------- # Â¥ ‰ñ“]Æ’L[â€œÃ¼â€”ÃÆ’^Æ’CÆ’v‚̎擾 (0:Æ’vÆ’Å’Æ’X, 1:Æ’gÆ’Å Æ’K[, 2:Æ’Å Æ’s[Æ’g) #-------------------------------------------------------------------------- def ziifop_roll_input_type return 0 end #-------------------------------------------------------------------------- # Â¥ ‰ñ“]‘¬“x‚̎擾 (0:’x‚¢ ` 4:‘¬‚¢) #-------------------------------------------------------------------------- def ziifop_roll_speed return 1 endend #******************************************************************************# Â¥ ‰æ‘œƒRÆ’}ƒ“ƒhŠî–{•â€#****************************************************************************** #==============================================================================# ¡ Sprite_ZiifCommandSprite#------------------------------------------------------------------------------# @Æ’RÆ’}ƒ“ƒh‰æ‘œEâ€wÅ’iEÆ’J[Æ’\ƒ‹•\ަ—pÆ’XÆ’vƒ‰ƒCÆ’g‚̃X[Æ’p[Æ’Nƒ‰ƒX‚Å‚·B#============================================================================== class Sprite_ZiifCommandSprite < Sprite #-------------------------------------------------------------------------- # Å“ Æ’IÆ’uÆ’WÆ’FÆ’NÆ’g‰Šú‰» #-------------------------------------------------------------------------- def initialize(command_set) super(command_set.viewport) @command_set = command_set init_basic_values create_bitmap update end #-------------------------------------------------------------------------- # Å“ Šî–{•Ãâ€â€šÃŒâ€°Å ú‰» #-------------------------------------------------------------------------- def init_basic_values end #-------------------------------------------------------------------------- # Å“ Æ’rÆ’bÆ’gÆ’}Æ’bÆ’v‚Ìì¬ #-------------------------------------------------------------------------- def create_bitmap end #-------------------------------------------------------------------------- # Å“ “à —e‚Ìì¬ #-------------------------------------------------------------------------- def create_contents end #-------------------------------------------------------------------------- # Å“ “à —e‚ÌÃÅ“ #-------------------------------------------------------------------------- def clear_contents end #-------------------------------------------------------------------------- # Å“ Æ’XÆ’vƒ‰ƒCÆ’gÆ’RÆ’}ƒ“ƒh‚̎擾 #-------------------------------------------------------------------------- def command_set return @command_set end #-------------------------------------------------------------------------- # Å“ ˆÊ’u‚̎擾 #-------------------------------------------------------------------------- def index return command_set.sprite_index(self) end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚̃rƒ…[Æ’|[Æ’g‚̎擾 #-------------------------------------------------------------------------- def command_set_viewport return command_set.viewport end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚̉Ž‹ó‘Ԃ̎擾 #-------------------------------------------------------------------------- def command_set_visible return command_set.visible && !command_set.close? end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚Ì“§–¾“x‚̎擾 #-------------------------------------------------------------------------- def command_set_opacity return command_set.contents_opacity end #-------------------------------------------------------------------------- # Å“ ˆÊ’uî•ñ‚ÌXV #-------------------------------------------------------------------------- def update_position self.viewport = command_set_viewport self.visible = command_set_visible self.opacity = command_set_opacity endend #==============================================================================# ¡ ZiifSpriteCommand#------------------------------------------------------------------------------# @‰æ‘œƒRÆ’}ƒ“ƒh‘I‘ð‚ðs‚¤‚½‚߂̃‚ƒWƒ…[ƒ‹‚Å‚·BMix-In‚É‚æ‚èŽg—p‚µ‚Ü‚·B#============================================================================== module ZiifSpriteCommand #-------------------------------------------------------------------------- # Å“ ŒöŠJÆ’Cƒ“ƒXÆ’^ƒ“ƒX•Æ#-------------------------------------------------------------------------- attr_reader :windowskin # Æ’EÆ’Bƒ“ƒhÆ’EÆ’XÆ’Lƒ“ attr_reader :viewport # Æ’rƒ…[Æ’|[Æ’g attr_reader :active # ‘I‘ðó‘Ô attr_reader :visible # ‰ÂŽ‹ó‘Ô attr_reader :x # XÀ•W attr_reader :y # YÀ•W attr_reader :width # • attr_reader :height # ‚‚³ attr_reader :z # ZÀ•W attr_reader :ox # “]‘—Œ³Œ´“_ XÀ•W attr_reader :oy # “]‘—Œ³Œ´“_ YÀ•W attr_reader :padding # —]â€â€™â€šÃŒâ€˜Ã¥â€šÂ«â€šÂ³ attr_reader :padding_bottom # ‰ºü—]â€â€™â€šÃŒâ€˜Ã¥â€šÂ«â€šÂ³ attr_reader :opacity # •s“§–¾“x attr_reader :back_opacity # â€wÅ’i‚Ì•s“§–¾“x attr_reader :contents_opacity # Æ’RÆ’}ƒ“ƒh‚Ì•s“§–¾“x attr_reader :openness # Æ’I[Æ’vƒ““x attr_reader :tone # â€wÅ’i‚ÌF’² attr_reader :index # Æ’J[Æ’\ƒ‹ˆÊ’u attr_reader :help_window # Æ’wƒ‹ƒvÆ’EÆ’Bƒ“ƒhÆ’E attr_accessor :cursor_fix # Æ’J[Æ’\ƒ‹ŒÅ’èƒtƒ‰ƒO attr_accessor :cursor_all # Æ’J[Æ’\ƒ‹‘S‘I‘ðƒtƒ‰ƒO #-------------------------------------------------------------------------- # Å“ Æ’IÆ’uÆ’WÆ’FÆ’NÆ’g‰Šú‰» #-------------------------------------------------------------------------- def initialize(*args) init_basic_values(*args) init_sprite_command update_tone refresh select(0) activate end #-------------------------------------------------------------------------- # Å“ Šî–{•Ãâ€â€šÃŒâ€°Å ú‰» #-------------------------------------------------------------------------- def init_basic_values(x, y, width = window_width, height = window_height) @windowskin = Cache.system("Window") @viewport = nil @active = true @visible = true @x = x @y = y @width = width @height = height @z = 100 @ox = 0 @oy = 0 @padding = 12 @padding_bottom = 12 @opacity = 255 @back_opacity = 255 @contents_opacity = 255 @openness = 255 @tone = Tone.new @index = -1 @handler = {} @cursor_fix = false @cursor_all = false @opening = false @closing = false end #-------------------------------------------------------------------------- # Å“ Æ’XÆ’vƒ‰ƒCÆ’gÆ’RÆ’}ƒ“ƒh•Ãâ€â€šÃŒâ€°Å ú‰» #-------------------------------------------------------------------------- def init_sprite_command @command_sprites = [] @object_sprites = {} create_dummy_bitmap end #-------------------------------------------------------------------------- # Å“ ‰ð•ú #-------------------------------------------------------------------------- def dispose dispose_dummy_bitmap dispose_object_sprites dispose_command_sprites end #-------------------------------------------------------------------------- # Å“ Æ’EÆ’Bƒ“ƒhÆ’E•‚̎擾 #-------------------------------------------------------------------------- def window_width return 96 end #-------------------------------------------------------------------------- # Å“ Æ’EÆ’Bƒ“ƒhÆ’E‚‚³‚̎擾 #-------------------------------------------------------------------------- def window_height return 88 end #-------------------------------------------------------------------------- # Å“ €–Úâ€â€šÃŒÅ½Ã¦â€œÂ¾ #-------------------------------------------------------------------------- def item_max @list.size end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’Å Æ’XÆ’g‚̃NÆ’Å Æ’A #-------------------------------------------------------------------------- def clear_command_list @list = [] end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’Å Æ’XÆ’g‚Ìì¬ #-------------------------------------------------------------------------- def make_command_list end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚̒ljà # name : Æ’RÆ’}ƒ“ƒh–¼ # symbol : ‘Ήž‚·‚éƒVƒ“ƒ{ƒ‹ # enabled : —LŒøó‘Ôƒtƒ‰ƒO # ext : â€CˆÓ‚ÌŠg’£ƒf[Æ’^ #-------------------------------------------------------------------------- def add_command(name, symbol, enabled = true, ext = nil) @list.push({:name=>name, :symbol=>symbol, :enabled=>enabled, :ext=>ext}) end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh–¼‚̎擾 #-------------------------------------------------------------------------- def command(index) @list[index] end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh–¼‚̎擾 #-------------------------------------------------------------------------- def command_name(index) @list[index][:name] end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚Ì—LŒøó‘Ô‚ðŽæ“¾ #-------------------------------------------------------------------------- def command_enabled?(index) @list[index][:enabled] end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’Vƒ“ƒ{ƒ‹‚̎擾 #-------------------------------------------------------------------------- def command_symbol(index) @list[index][:symbol] end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚ÌŠg’£ƒf[Æ’^‚̎擾 #-------------------------------------------------------------------------- def command_ext(index) @list[index][:ext] end #-------------------------------------------------------------------------- # Å“ ‘I‘ð€–ڂ̃RÆ’}ƒ“ƒhÆ’f[Æ’^‚ðŽæ“¾ #-------------------------------------------------------------------------- def current_data index >= 0 ? @list[index] : nil end #-------------------------------------------------------------------------- # Å“ ‘I‘ð€–ڂ̃RÆ’}ƒ“ƒh–¼‚ðŽæ“¾ #-------------------------------------------------------------------------- def current_item_name current_data ? current_data[:name] : "" end #-------------------------------------------------------------------------- # Å“ ‘I‘ð€–Ú‚Ì—LŒøó‘Ô‚ðŽæ“¾ #-------------------------------------------------------------------------- def current_item_enabled? current_data ? current_data[:enabled] : false end #-------------------------------------------------------------------------- # Å“ ‘I‘ð€–ڂ̃Vƒ“ƒ{ƒ‹‚ðŽæ“¾ #-------------------------------------------------------------------------- def current_symbol current_data ? current_data[:symbol] : nil end #-------------------------------------------------------------------------- # Å“ ‘I‘ð€–Ú‚ÌŠg’£ƒf[Æ’^‚ðŽæ“¾ #-------------------------------------------------------------------------- def current_ext current_data ? current_data[:ext] : nil end #-------------------------------------------------------------------------- # Å“ Žw’肳‚ꂽƒVƒ“ƒ{ƒ‹‚ðŽ‚ÂƒRÆ’}ƒ“ƒh‚ɃJ[Æ’\ƒ‹‚ðˆÚ“® #-------------------------------------------------------------------------- def select_symbol(symbol) @list.each_index {|i| select(i) if @list[:symbol] == symbol } end #-------------------------------------------------------------------------- # Å“ Žw’肳‚ꂽŠg’£ƒf[Æ’^‚ðŽ‚ÂƒRÆ’}ƒ“ƒh‚ɃJ[Æ’\ƒ‹‚ðˆÚ“® #-------------------------------------------------------------------------- def select_ext(ext) @list.each_index {|i| select(i) if @list[:ext] == ext } end #-------------------------------------------------------------------------- # Å“ Æ’XÆ’vƒ‰ƒCÆ’gÆ’RÆ’}ƒ“ƒhÆ’Nƒ‰ƒX‚̎擾 #-------------------------------------------------------------------------- def sprite_command_class return Sprite_ZiifCommandSprite end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhâ€wÅ’iÆ’Nƒ‰ƒX‚̎擾 #-------------------------------------------------------------------------- def sprite_background_class return Sprite_ZiifCommandSprite end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’J[Æ’\ƒ‹ƒNƒ‰ƒX‚̎擾 #-------------------------------------------------------------------------- def sprite_cursor_class return Sprite_ZiifCommandSprite end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’XÆ’vƒ‰ƒCÆ’g‚̈ʒu‚ðŽæ“¾ #-------------------------------------------------------------------------- def sprite_index(sprite) @command_sprites.index(sprite) end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’XÆ’vƒ‰ƒCÆ’g‚Ìì¬ #-------------------------------------------------------------------------- def make_command_sprites item_max.times {|i| @command_sprites = sprite_command_class.new(self) } end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’XÆ’vƒ‰ƒCÆ’g‚̉ð•ú #-------------------------------------------------------------------------- def dispose_command_sprites @command_sprites.each {|sprite| sprite.dispose } @command_sprites.clear end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’XÆ’vƒ‰ƒCÆ’g‚ÌXV #-------------------------------------------------------------------------- def update_command_sprites @command_sprites.each {|sprite| sprite.update } end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’XÆ’vƒ‰ƒCÆ’g‚̈ʒuî•ñ‚ðXV #-------------------------------------------------------------------------- def update_command_sprites_position @command_sprites.each {|sprite| sprite.update_position } end #-------------------------------------------------------------------------- # Å“ Æ’IÆ’uÆ’WÆ’FÆ’NÆ’gÆ’XÆ’vƒ‰ƒCÆ’g‚Ìì¬ #-------------------------------------------------------------------------- def make_object_sprites @object_sprites[:background] = sprite_background_class.new(self) @object_sprites[:cursor] = sprite_cursor_class.new(self) end #-------------------------------------------------------------------------- # Å“ Æ’IÆ’uÆ’WÆ’FÆ’NÆ’gÆ’XÆ’vƒ‰ƒCÆ’g‚̉ð•ú #-------------------------------------------------------------------------- def dispose_object_sprites @object_sprites.each_value {|sprite| sprite.dispose } @object_sprites.clear end #-------------------------------------------------------------------------- # Å“ Æ’IÆ’uÆ’WÆ’FÆ’NÆ’gÆ’XÆ’vƒ‰ƒCÆ’g‚ÌXV #-------------------------------------------------------------------------- def update_object_sprites @object_sprites.each_value {|sprite| sprite.update } end #-------------------------------------------------------------------------- # Å“ Æ’IÆ’uÆ’WÆ’FÆ’NÆ’gÆ’XÆ’vƒ‰ƒCÆ’g‚̈ʒuî•ñ‚ðXV #-------------------------------------------------------------------------- def update_object_sprites_position @object_sprites.each_value {|sprite| sprite.update_position } end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh“à —e‚Ìì¬ #-------------------------------------------------------------------------- def create_contents dispose_object_sprites dispose_command_sprites make_command_sprites make_object_sprites end #-------------------------------------------------------------------------- # Å“ Æ’tÆ’Å’[ƒ€XV #-------------------------------------------------------------------------- def update update_tone update_open if @opening update_close if @closing update_move update_command_sprites update_object_sprites process_cursor_move process_handling end #-------------------------------------------------------------------------- # Å“ ˆÊ’uî•ñ‚ÌXV #-------------------------------------------------------------------------- def update_position update_command_sprites_position update_object_sprites_position end #-------------------------------------------------------------------------- # Å“ XÀ•W‚Ì•ÃX #-------------------------------------------------------------------------- def x=(x) @x = x update_position end #-------------------------------------------------------------------------- # Å“ YÀ•W‚Ì•ÃX #-------------------------------------------------------------------------- def y=(y) @y = y update_position end #-------------------------------------------------------------------------- # Å“ •‚Ì•ÃX #-------------------------------------------------------------------------- def width=(width) @width = width update_position end #-------------------------------------------------------------------------- # Å“ ‚‚³‚Ì•ÃX #-------------------------------------------------------------------------- def height=(height) @height = height update_position end #-------------------------------------------------------------------------- # Å“ ZÀ•W‚Ì•ÃX #-------------------------------------------------------------------------- def z=(z) @z = z update_position end #-------------------------------------------------------------------------- # Å“ XÀ•WAYÀ•WA•A‚‚³‚ð‚܂Ƃ߂ĕÃX #-------------------------------------------------------------------------- def move(x, y, width, height) @x = x @y = y @width = width @height = height update_position end #-------------------------------------------------------------------------- # Å“ “]‘—Œ³Œ´“_ XÀ•W‚Ì•ÃX #-------------------------------------------------------------------------- def ox=(ox) @ox = ox update_position end #-------------------------------------------------------------------------- # Å“ “]‘—Œ³Œ´“_ YÀ•W‚Ì•ÃX #-------------------------------------------------------------------------- def oy=(oy) @oy = oy update_position end #-------------------------------------------------------------------------- # Å“ —]â€â€™â€šÃŒâ€˜Ã¥â€šÂ«â€šÂ³â€šÃŒâ€¢ÃX #-------------------------------------------------------------------------- def padding=(padding) @padding = padding @padding_bottom = padding_bottom update_position end #-------------------------------------------------------------------------- # Å“ ‰ºü—]â€â€™â€šÃŒâ€˜Ã¥â€šÂ«â€šÂ³â€šÃŒâ€¢ÃX #-------------------------------------------------------------------------- def padding_bottom=(padding_bottom) @padding_bottom = padding_bottom update_position end #-------------------------------------------------------------------------- # Å“ Æ’EÆ’Bƒ“ƒhÆ’EÆ’XÆ’Lƒ“‚Ì•ÃX #-------------------------------------------------------------------------- def windowskin=(windowskin) @windowskin = windowskin update_position end #-------------------------------------------------------------------------- # Å“ Æ’rƒ…[Æ’|[Æ’g‚Ì•ÃX #-------------------------------------------------------------------------- def viewport=(viewport) @viewport = viewport update_position end #-------------------------------------------------------------------------- # Å“ ‰ÂŽ‹ó‘Ô‚Ì•ÃX #-------------------------------------------------------------------------- def visible=(visible) @visible = visible update_position end #-------------------------------------------------------------------------- # Å“ •\ަ #-------------------------------------------------------------------------- def show self.visible = true self end #-------------------------------------------------------------------------- # Å“ â€Ã±â€¢\ަ #-------------------------------------------------------------------------- def hide self.visible = false self end #-------------------------------------------------------------------------- # Å“ Æ’AÆ’NÆ’eÆ’BÆ’uó‘Ô‚Ì•ÃX #-------------------------------------------------------------------------- def active=(active) @active = active update_cursor call_update_help end #-------------------------------------------------------------------------- # Å“ Æ’AÆ’NÆ’eÆ’BÆ’u‰» #-------------------------------------------------------------------------- def activate self.active = true self end #-------------------------------------------------------------------------- # Å“ â€Ã±Æ’AÆ’NÆ’eÆ’BÆ’u‰» #-------------------------------------------------------------------------- def deactivate self.active = false self end #-------------------------------------------------------------------------- # Å“ •s“§–¾“x‚Ì•ÃX #-------------------------------------------------------------------------- def opacity=(opacity) @opacity = [[opacity, 255].min, 0].max update_position end #-------------------------------------------------------------------------- # Å“ â€wÅ’i‚Ì•s“§–¾“x‚Ì•ÃX #-------------------------------------------------------------------------- def back_opacity=(opacity) @back_opacity = [[opacity, 255].min, 0].max update_position end #-------------------------------------------------------------------------- # Å“ “à —e‚Ì•s“§–¾“x‚Ì•ÃX #-------------------------------------------------------------------------- def contents_opacity=(opacity) @contents_opacity = [[opacity, 255].min, 0].max update_position end #-------------------------------------------------------------------------- # Å“ Æ’I[Æ’vƒ““x‚Ì•ÃX #-------------------------------------------------------------------------- def openness=(openness) @openness = [[openness, 255].min, 0].max update_position end #-------------------------------------------------------------------------- # Å“ Š®‘S‚ÉŠJ‚¢‚½ó‘Ô‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def open? (@openness == 255) end #-------------------------------------------------------------------------- # Å“ Š®‘S‚ɕ‚¶‚½ó‘Ô‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def close? (@openness == 0) end #-------------------------------------------------------------------------- # Å“ Å J‚ˆ—’l‚̎擾 #-------------------------------------------------------------------------- def opening_value return 48 end #-------------------------------------------------------------------------- # Å“ •‚¶‚鈗’l‚̎擾 #-------------------------------------------------------------------------- def closing_value return 48 end #-------------------------------------------------------------------------- # Å“ Å J‚ˆ—‚ÌXV #-------------------------------------------------------------------------- def update_open self.openness += opening_value @opening = false if open? end #-------------------------------------------------------------------------- # Å“ •‚¶‚鈗‚ÌXV #-------------------------------------------------------------------------- def update_close self.openness -= closing_value @closing = false if close? end #-------------------------------------------------------------------------- # Å“ Å J‚ #-------------------------------------------------------------------------- def open @opening = true unless open? @closing = false self end #-------------------------------------------------------------------------- # Å“ •‚¶‚é #-------------------------------------------------------------------------- def close @closing = true unless close? @opening = false self end #-------------------------------------------------------------------------- # Å“ F’²‚ÌXV #-------------------------------------------------------------------------- def update_tone end #-------------------------------------------------------------------------- # Å“ ˆÚ“®’†‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def move? return false end #-------------------------------------------------------------------------- # Å“ ’âŽ~’†‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def stop? return true end #-------------------------------------------------------------------------- # Å“ ˆÊ’uˆÚ“®‚ÌXV #-------------------------------------------------------------------------- def update_move end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹ˆÊ’u‚ÌÃ’è #-------------------------------------------------------------------------- def index=(index) @index = index update_cursor call_update_help end #-------------------------------------------------------------------------- # Å“ €–Ú‚Ì‘I‘ð #-------------------------------------------------------------------------- def select(index) self.index = index if index end #-------------------------------------------------------------------------- # Å“ €–Ú‚Ì‘I‘ð‰ðœ #-------------------------------------------------------------------------- def unselect self.index = -1 end #-------------------------------------------------------------------------- # Å“ “®ì‚ɑΉž‚·‚éƒnƒ“ƒhƒ‰‚ÌÃ’è # method : Æ’nƒ“ƒhƒ‰‚Æ‚µ‚ÄÃ’è‚·‚郃\Æ’bÆ’h (Method Æ’IÆ’uÆ’WÆ’FÆ’NÆ’g) #-------------------------------------------------------------------------- def set_handler(symbol, method) @handler[symbol] = method end #-------------------------------------------------------------------------- # Å“ Æ’nƒ“ƒhƒ‰‚Ì‘¶ÃÅ mâ€F #-------------------------------------------------------------------------- def handle?(symbol) @handler.include?(symbol) end #-------------------------------------------------------------------------- # Å“ Æ’nƒ“ƒhƒ‰‚̌ĂÑo‚µ #-------------------------------------------------------------------------- def call_handler(symbol) @handler[symbol].call if handle?(symbol) end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚̈ړ®‰Ââ€\â€Â»â€™Ã¨ #-------------------------------------------------------------------------- def cursor_movable? stop? && active && open? && !@cursor_fix && !@cursor_all && item_max > 0 end #-------------------------------------------------------------------------- # Å“ ‰ºƒL[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def input_down? Input.repeat?(:DOWN) end #-------------------------------------------------------------------------- # Å“ ãƒL[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def input_up? Input.repeat?(:UP) end #-------------------------------------------------------------------------- # Å“ ‰EÆ’L[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def input_right? Input.repeat?(:RIGHT) end #-------------------------------------------------------------------------- # Å“ ¶ƒL[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def input_left? Input.repeat?(:LEFT) end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚ð‰º‚ÉˆÚ“® #-------------------------------------------------------------------------- def cursor_down(wrap = false) end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚ðã‚Ɉړ® #-------------------------------------------------------------------------- def cursor_up(wrap = false) end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚ð‰E‚Ɉړ® #-------------------------------------------------------------------------- def cursor_right(wrap = false) end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚ð¶‚Ɉړ® #-------------------------------------------------------------------------- def cursor_left(wrap = false) end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚̈ړ®‘Oˆ— #-------------------------------------------------------------------------- def process_before_cursor_move @cursor_sound_value = @index end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚̈ړ®Œãˆ— #-------------------------------------------------------------------------- def process_after_cursor_move Sound.play_cursor if @index != @cursor_sound_value end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚̈ړ®ˆ— #-------------------------------------------------------------------------- def process_cursor_move return unless cursor_movable? process_before_cursor_move cursor_down (Input.trigger?(:DOWN)) if input_down? cursor_up (Input.trigger?(:UP)) if input_up? cursor_right(Input.trigger?(:RIGHT)) if input_right? cursor_left (Input.trigger?(:LEFT)) if input_left? process_after_cursor_move end #-------------------------------------------------------------------------- # Å“ Œˆ’è‚âƒLƒƒƒ“ƒZƒ‹‚Ȃǂ̃nƒ“ƒhƒŠƒ“ƒOˆ— #-------------------------------------------------------------------------- def process_handling return unless open? && active && stop? return process_ok if ok_enabled? && Input.trigger?(:C) return process_cancel if cancel_enabled? && Input.trigger?(: return process_pagedown if handle?(:pagedown) && Input.trigger?(:R) return process_pageup if handle?(:pageup) && Input.trigger?(:L) end #-------------------------------------------------------------------------- # Å“ Œˆ’舗‚Ì—LŒøó‘Ô‚ðŽæ“¾ #-------------------------------------------------------------------------- def ok_enabled? return true end #-------------------------------------------------------------------------- # Å“ Æ’Lƒƒƒ“ƒZƒ‹ˆ—‚Ì—LŒøó‘Ô‚ðŽæ“¾ #-------------------------------------------------------------------------- def cancel_enabled? handle?(:cancel) end #-------------------------------------------------------------------------- # Å“ Œˆ’èƒ{Æ’^ƒ“‚ª‰Ÿ‚³‚ꂽ‚Æ‚«‚̈— #-------------------------------------------------------------------------- def process_ok if current_item_enabled? Sound.play_ok Input.update deactivate call_ok_handler else Sound.play_buzzer end end #-------------------------------------------------------------------------- # Å“ Œˆ’èƒnƒ“ƒhƒ‰‚̌ĂÑo‚µ #-------------------------------------------------------------------------- def call_ok_handler if handle?(current_symbol) call_handler(current_symbol) elsif handle?(:ok) call_ok_handler_default else activate end end #-------------------------------------------------------------------------- # Å“ Œˆ’èƒnƒ“ƒhƒ‰‚̌ĂÑo‚µ (Æ’fÆ’tÆ’Hƒ‹ƒg) #-------------------------------------------------------------------------- def call_ok_handler_default call_handler(:ok) end #-------------------------------------------------------------------------- # Å“ Æ’Lƒƒƒ“ƒZƒ‹ƒ{Æ’^ƒ“‚ª‰Ÿ‚³‚ꂽ‚Æ‚«‚̈— #-------------------------------------------------------------------------- def process_cancel Sound.play_cancel Input.update deactivate call_cancel_handler end #-------------------------------------------------------------------------- # Å“ Æ’Lƒƒƒ“ƒZƒ‹ƒnƒ“ƒhƒ‰‚̌ĂÑo‚µ #-------------------------------------------------------------------------- def call_cancel_handler call_handler(:cancel) end #-------------------------------------------------------------------------- # Å“ L Æ’{Æ’^ƒ“iPageUpj‚ª‰Ÿ‚³‚ꂽ‚Æ‚«‚̈— #-------------------------------------------------------------------------- def process_pageup Sound.play_cursor Input.update deactivate call_handler(:pageup) end #-------------------------------------------------------------------------- # Å“ R Æ’{Æ’^ƒ“iPageDownj‚ª‰Ÿ‚³‚ꂽ‚Æ‚«‚̈— #-------------------------------------------------------------------------- def process_pagedown Sound.play_cursor Input.update deactivate call_handler(:pagedown) end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚ÌXV #-------------------------------------------------------------------------- def update_cursor update_position end #-------------------------------------------------------------------------- # Å“ Æ’wƒ‹ƒvÆ’EÆ’Bƒ“ƒhÆ’E‚ÌÃ’è #-------------------------------------------------------------------------- def help_window=(help_window) @help_window = help_window call_update_help end #-------------------------------------------------------------------------- # Å“ Æ’wƒ‹ƒvÆ’EÆ’Bƒ“ƒhÆ’EXVÆ’Æ’\Æ’bÆ’h‚̌ĂÑo‚µ #-------------------------------------------------------------------------- def call_update_help update_help if active && @help_window end #-------------------------------------------------------------------------- # Å“ Æ’wƒ‹ƒvÆ’EÆ’Bƒ“ƒhÆ’E‚ÌXV #-------------------------------------------------------------------------- def update_help @help_window.clear end #-------------------------------------------------------------------------- # Å“ ‘S€–Ú‚Ì•`‰æ #-------------------------------------------------------------------------- def draw_all_items item_max.times {|i| draw_item(i) } end #-------------------------------------------------------------------------- # Å“ €–Ú‚Ì•`‰æ #-------------------------------------------------------------------------- def draw_item(index) @command_sprites[index].create_contents end #-------------------------------------------------------------------------- # Å“ €–Ú‚ÌÃ‹Ž #-------------------------------------------------------------------------- def clear_item(index) @command_sprites[index].clear_contents end #-------------------------------------------------------------------------- # Å“ €–Ú‚ÌÄ•`‰æ #-------------------------------------------------------------------------- def redraw_item(index) clear_item(index) if index >= 0 draw_item(index) if index >= 0 end #-------------------------------------------------------------------------- # Å“ ‘I‘ð€–Ú‚ÌÄ•`‰æ #-------------------------------------------------------------------------- def redraw_current_item redraw_item(@index) end #-------------------------------------------------------------------------- # Å“ Æ’Å Æ’tÆ’Å’Æ’bÆ’Vƒ… #-------------------------------------------------------------------------- def refresh clear_command_list make_command_list create_contents draw_all_items update_position end #-------------------------------------------------------------------------- # › Æ’_Æ’~[Æ’rÆ’bÆ’gÆ’}Æ’bÆ’v‚Ìì¬ (Æ’EÆ’Bƒ“ƒhÆ’EŒÊ·—p) #-------------------------------------------------------------------------- def create_dummy_bitmap @dummy_bitmap = Bitmap.new(32, 32) end #-------------------------------------------------------------------------- # › Æ’_Æ’~[Æ’rÆ’bÆ’gÆ’}Æ’bÆ’v‚̉ð•ú (Æ’EÆ’Bƒ“ƒhÆ’EŒÊ·—p) #-------------------------------------------------------------------------- def dispose_dummy_bitmap @dummy_bitmap.dispose end #-------------------------------------------------------------------------- # › Æ’EÆ’Bƒ“ƒhÆ’E“à —e‚̎擾 (Æ’EÆ’Bƒ“ƒhÆ’EŒÊ·—p) #-------------------------------------------------------------------------- def contents @dummy_bitmap end #-------------------------------------------------------------------------- # › Æ’J[Æ’\ƒ‹‚Ì‹éŒ` (Æ’EÆ’Bƒ“ƒhÆ’EŒÊ·—p) #-------------------------------------------------------------------------- def cursor_rect Rect.new(self.x, self.y, self.width, self.height) end #-------------------------------------------------------------------------- # › Æ’XÆ’NÆ’[ƒ‹—p–îˆó‚̉Ž‹ó‘Ô (Æ’EÆ’Bƒ“ƒhÆ’EŒÊ·—p) #-------------------------------------------------------------------------- def arrows_visible return true end #-------------------------------------------------------------------------- # › Æ’XÆ’NÆ’[ƒ‹—p–îˆó‚̉Ž‹ó‘Ô‚Ì•ÃX (Æ’EÆ’Bƒ“ƒhÆ’EŒÊ·—p) #-------------------------------------------------------------------------- def arrows_visible=(arrows_visible) end #-------------------------------------------------------------------------- # › Æ’|[Æ’Y‚̉Ž‹ó‘Ô (Æ’EÆ’Bƒ“ƒhÆ’EŒÊ·—p) #-------------------------------------------------------------------------- def pause return false end #-------------------------------------------------------------------------- # › Æ’|[Æ’Y‚̉Ž‹ó‘Ô‚Ì•ÃX (Æ’EÆ’Bƒ“ƒhÆ’EŒÊ·—p) #-------------------------------------------------------------------------- def pause=(pause) endend #******************************************************************************# Â¥ ‰ñ“]Æ’AÆ’CÆ’Rƒ“ƒRÆ’}ƒ“ƒh•â€#****************************************************************************** #==============================================================================# ¡ Sprite_ZiifRollIconCommand#------------------------------------------------------------------------------# @‰ñ“]Æ’RÆ’}ƒ“ƒhÆ’AÆ’CÆ’Rƒ“•\ަ—p‚̃XÆ’vƒ‰ƒCÆ’g‚Å‚·B#============================================================================== class Sprite_ZiifRollIconCommand < Sprite_ZiifCommandSprite #-------------------------------------------------------------------------- # Å“ ‰ð•ú #-------------------------------------------------------------------------- def dispose self.bitmap.dispose super end #-------------------------------------------------------------------------- # Å“ Æ’rÆ’bÆ’gÆ’}Æ’bÆ’v‚Ìì¬ #-------------------------------------------------------------------------- def create_bitmap self.bitmap = Bitmap.new(24, 24) self.ox = self.bitmap.width / 2 self.oy = self.bitmap.height / 2 end #-------------------------------------------------------------------------- # Å“ Æ’AÆ’CÆ’Rƒ“â€Ã”†‚̎擾 #-------------------------------------------------------------------------- def icon_index ZiifManager.command_icon_index(command_set.command(self.index)) end #-------------------------------------------------------------------------- # Å“ Æ’AÆ’CÆ’Rƒ“â€Ã”†‚̎擾 #-------------------------------------------------------------------------- def enabled command_set.command_enabled?(self.index) end #-------------------------------------------------------------------------- # Å“ â€Â¼â€œÂ§â€“¾•`‰æ—p‚̃Aƒ‹ƒtÆ’@’l‚ðŽæ“¾ #-------------------------------------------------------------------------- def translucent_alpha return 160 end #-------------------------------------------------------------------------- # Å“ “à —e‚Ìì¬ #-------------------------------------------------------------------------- def create_contents draw_icon end #-------------------------------------------------------------------------- # Å“ Æ’AÆ’CÆ’Rƒ“‚ð•`‰æ #-------------------------------------------------------------------------- def draw_icon bitmap = Cache.system("Iconset") icon_index = self.icon_index rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24) self.bitmap.blt(0, 0, bitmap, rect, enabled ? 255 : translucent_alpha) end #-------------------------------------------------------------------------- # Å“ “à —e‚ÌÃÅ“ #-------------------------------------------------------------------------- def clear_contents self.bitmap.clear end #-------------------------------------------------------------------------- # Å“ ˆÊ’uî•ñ‚ÌXV #-------------------------------------------------------------------------- def update_position super update_roll end #-------------------------------------------------------------------------- # Å“ ‰ñ“]•‚̎擾 #-------------------------------------------------------------------------- def roll_width command_set.width * command_set.openness / 510 end #-------------------------------------------------------------------------- # Å“ ‰ñ“]‚‚³‚̎擾 #-------------------------------------------------------------------------- def roll_height command_set.height * command_set.openness / 510 end #-------------------------------------------------------------------------- # Å“ ‰ñ“]Å p“x‚̎擾 #-------------------------------------------------------------------------- def roll_angle angle = (self.index - command_set.index) * command_set.move_size angle += command_set.roll_angle end #-------------------------------------------------------------------------- # Å“ ‰ñ“]ˆÊ’u‚ÌXV #-------------------------------------------------------------------------- def update_roll angle = roll_angle self.x = roll_width * Math.sin(angle) + command_set.x self.y = roll_height * (-Math.cos(angle)) + command_set.y self.z = command_set.z endend #==============================================================================# ¡ Sprite_ZiifRollIconBackground#------------------------------------------------------------------------------# @‰æ‘œƒRÆ’}ƒ“ƒhâ€wÅ’i‚̃XÆ’vƒ‰ƒCÆ’g‚Å‚·B#============================================================================== class Sprite_ZiifRollIconBackground < Sprite_ZiifCommandSprite #-------------------------------------------------------------------------- # Å“ ‰ð•ú #-------------------------------------------------------------------------- def dispose self.bitmap.dispose if command_set.background_filename.empty? super end #-------------------------------------------------------------------------- # Å“ Æ’rÆ’bÆ’gÆ’}Æ’bÆ’v‚Ìì¬ #-------------------------------------------------------------------------- def create_bitmap self.bitmap = Cache.system(command_set.background_filename) self.ox = self.bitmap.width / 2 self.oy = self.bitmap.height / 2 end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚Ì“§–¾“x‚̎擾 #-------------------------------------------------------------------------- def command_set_opacity opacity = command_set.opacity opacity *= command_set.back_opacity opacity *= command_set.openness opacity /= 65025 end #-------------------------------------------------------------------------- # Å“ ˆÊ’uî•ñ‚ÌXV #-------------------------------------------------------------------------- def update_position super self.x = command_set.x self.y = command_set.y self.z = command_set.z - 10 endend #==============================================================================# ¡ Sprite_ZiifRollIconCursor#------------------------------------------------------------------------------# @‰æ‘œƒRÆ’}ƒ“ƒhÆ’J[Æ’\ƒ‹‚̃XÆ’vƒ‰ƒCÆ’g‚Å‚·B#============================================================================== class Sprite_ZiifRollIconCursor < Sprite_ZiifCommandSprite #-------------------------------------------------------------------------- # Å“ ‰ð•ú #-------------------------------------------------------------------------- def dispose self.bitmap.dispose if command_set.cursor_filename.empty? super end #-------------------------------------------------------------------------- # Å“ Æ’rÆ’bÆ’gÆ’}Æ’bÆ’v‚Ìì¬ #-------------------------------------------------------------------------- def create_bitmap self.bitmap = Cache.system(command_set.cursor_filename) self.ox = self.bitmap.width / 2 self.oy = self.bitmap.height / 2 @effect_count = 0 end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚Ì“§–¾“x‚̎擾 #-------------------------------------------------------------------------- def command_set_opacity if @effect_count < 32 value = 176 + @effect_count * 4 else value = 432 - @effect_count * 4 end return (value * command_set.contents_opacity / 255) end #-------------------------------------------------------------------------- # Å“ Æ’tÆ’Å’[ƒ€XV #-------------------------------------------------------------------------- def update super update_effect end #-------------------------------------------------------------------------- # Å“ ‰‰oŒø‰Ê‚ÌXV #-------------------------------------------------------------------------- def update_effect self.opacity = command_set_opacity @effect_count = 0 if @effect_count == 64 @effect_count += 1 end #-------------------------------------------------------------------------- # Å“ ‰ñ“]•‚̎擾 #-------------------------------------------------------------------------- def roll_width return 0 end #-------------------------------------------------------------------------- # Å“ ‰ñ“]‚‚³‚̎擾 #-------------------------------------------------------------------------- def roll_height (- command_set.height * command_set.openness / 510) end #-------------------------------------------------------------------------- # Å“ ˆÊ’uî•ñ‚ÌXV #-------------------------------------------------------------------------- def update_position super self.x = command_set.x + roll_width self.y = command_set.y + roll_height self.z = command_set.z - 5 endend #==============================================================================# ¡ Window_ZiifRollIconCommandName#------------------------------------------------------------------------------# @‰ñ“]Æ’AÆ’CÆ’Rƒ“ƒRÆ’}ƒ“ƒh‚Ì‘I‘ðƒRÆ’}ƒ“ƒh–¼‚ð•\ަ‚·‚éƒEÆ’Bƒ“ƒhÆ’E‚Å‚·B#============================================================================== class Window_ZiifRollIconCommandName < Window_Base #-------------------------------------------------------------------------- # Å“ Æ’IÆ’uÆ’WÆ’FÆ’NÆ’g‰Šú‰» #-------------------------------------------------------------------------- def initialize(command_set) super(0, 0, command_set.width, fitting_height(1)) @command_set = command_set self.opacity = 0 end #-------------------------------------------------------------------------- # Å“ Æ’XÆ’vƒ‰ƒCÆ’gÆ’RÆ’}ƒ“ƒh‚̎擾 #-------------------------------------------------------------------------- def command_set return @command_set end #-------------------------------------------------------------------------- # Å“ XÀ•W‚̎擾 #-------------------------------------------------------------------------- def window_x (command_set.x - self.width / 2) end #-------------------------------------------------------------------------- # Å“ YÀ•W‚̎擾 #-------------------------------------------------------------------------- def window_y (command_set.y - self.height / 2) end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚̃rƒ…[Æ’|[Æ’g‚̎擾 #-------------------------------------------------------------------------- def command_set_viewport return command_set.viewport end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚̉Ž‹ó‘Ԃ̎擾 #-------------------------------------------------------------------------- def command_set_visible return command_set.visible && command_set.open? end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚Ì“§–¾“x‚̎擾 #-------------------------------------------------------------------------- def command_set_opacity return command_set.contents_opacity end #-------------------------------------------------------------------------- # Å“ ˆÊ’uî•ñ‚ÌXV #-------------------------------------------------------------------------- def update_position set_information update_base_position end #-------------------------------------------------------------------------- # Å“ Šî–{‚̈ʒuî•ñ‚ÌXV #-------------------------------------------------------------------------- def update_base_position self.viewport = command_set_viewport self.visible = command_set_visible self.contents_opacity = command_set_opacity self.x = window_x + command_set.info_window_offset_x self.y = window_y + command_set.info_window_offset_y self.z = command_set.z + 10 end #-------------------------------------------------------------------------- # Å“ •\ަî•ñ‚ÌÃ’è #-------------------------------------------------------------------------- def set_information return if command_set.current_item_name == @name @name = command_set.current_item_name refresh end #-------------------------------------------------------------------------- # Å“ Æ’Å Æ’tÆ’Å’Æ’bÆ’Vƒ… #-------------------------------------------------------------------------- def refresh contents.clear texts = command_set.info_text_separate? ? @name.scan(/\S+/) : [@name] texts.push("") if texts.empty? self.width = texts.collect {|text| text_size(text).width + 8 }.max self.width += standard_padding * 2 self.height = fitting_height(texts.size) create_contents texts.each_with_index do |text, line| draw_text(0, line_height * line, contents.width, line_height, text, 1) end endend #==============================================================================# ¡ ZiifSpriteCommand_RollIcon#------------------------------------------------------------------------------# @‰ñ“]Æ’AÆ’CÆ’Rƒ“ƒRÆ’}ƒ“ƒh‘I‘ð‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·BMix-In‚É‚æ‚èŽg—p‚µ‚Ü‚·B#============================================================================== module ZiifSpriteCommand_RollIcon #-------------------------------------------------------------------------- # Å“ Mix-In #-------------------------------------------------------------------------- include ZiifSpriteCommand # ‰æ‘œƒRÆ’}ƒ“ƒh‘I‘ðƒ‚ƒWƒ…[ƒ‹ #-------------------------------------------------------------------------- # Å“ ŒöŠJÆ’Cƒ“ƒXÆ’^ƒ“ƒX•Æ#-------------------------------------------------------------------------- attr_reader :move_size # ˆÚ“®ƒTÆ’CÆ’Y attr_reader :move_speed # ˆÚ“®‘¬“x attr_reader :move_count # ˆÚ“®ƒJÆ’Eƒ“ƒg attr_reader :move_type # ˆÚ“®ƒ^Æ’CÆ’v #-------------------------------------------------------------------------- # Å“ Æ’XÆ’vƒ‰ƒCÆ’gÆ’RÆ’}ƒ“ƒh•Ãâ€â€šÃŒâ€°Å ú‰» #-------------------------------------------------------------------------- def init_sprite_command super @move_size = 0 @move_speed = 64 @move_count = 0 @move_type = nil end #-------------------------------------------------------------------------- # Å“ ‹t‰ñ“]‚Ìâ€Â»â€™Ã¨ #-------------------------------------------------------------------------- def reverse_roll? return $game_system.ziifop_reverse_roll end #-------------------------------------------------------------------------- # Å“ Å p“x‚Ì·‚̎擾 #-------------------------------------------------------------------------- def angle_difference (item_max > 0 ? Math::PI * 2 / item_max : 0) end #-------------------------------------------------------------------------- # Å“ ‰ñ“]‘¬“x‚̎擾 #-------------------------------------------------------------------------- def roll_speed ([64 - item_max * 3, 16].max * correct_roll_speed) end #-------------------------------------------------------------------------- # Å“ ‰ñ“]‘¬“x‚̕Ⳓl‚̎擾 #-------------------------------------------------------------------------- def correct_roll_speed case $game_system.ziifop_roll_speed when 0; return 0.6 # ’x‚¢ when 1; return 0.8 # ‚â‚â’x‚¢ when 2; return 1 # •’Ê when 3; return 1.2 # ‚â‚⑬‚¢ when 4; return 1.4 # ‘¬‚¢ end end #-------------------------------------------------------------------------- # Å“ ‰ñ“]“®ìŽž‚ÌŠp“x‚̎擾 #-------------------------------------------------------------------------- def roll_angle (move? ? move_count * move_speed * correct_roll_angle / 360 : 0) end #-------------------------------------------------------------------------- # Å“ ‰ñ“]•ûŒü‚̕Ⳓl‚̎擾 #-------------------------------------------------------------------------- def correct_roll_angle case @move_type when :right ; return 1 # ‰E‰ñ“] when :left ; return -1 # ¶‰ñ“] else ; return 0 end end #-------------------------------------------------------------------------- # Å“ ‰ñ“]Æ’JÆ’Eƒ“ƒg’l‚ÌÃ’è #-------------------------------------------------------------------------- def roll_count (move_size * 360 / move_speed) end #-------------------------------------------------------------------------- # Å“ â€wÅ’i‰æ‘œ‚̃tÆ’@Æ’Cƒ‹–¼‚ðŽæ“¾ #-------------------------------------------------------------------------- def background_filename return "" end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‰æ‘œ‚̃tÆ’@Æ’Cƒ‹–¼‚ðŽæ“¾ #-------------------------------------------------------------------------- def cursor_filename return "RollIconCursor" end #-------------------------------------------------------------------------- # Å“ î•ñƒEÆ’Bƒ“ƒhÆ’E‚Ì‹óâ€â€™â€¢Â¶Å½Å¡â€šÃ…‚̉üsâ€Â»â€™Ã¨ #-------------------------------------------------------------------------- def info_text_separate? return false end #-------------------------------------------------------------------------- # Å“ î•ñƒEÆ’Bƒ“ƒhÆ’E‚ÌXÀ•W’²® #-------------------------------------------------------------------------- def info_window_offset_x return 0 end #-------------------------------------------------------------------------- # Å“ î•ñƒEÆ’Bƒ“ƒhÆ’E‚ÌYÀ•W’²® #-------------------------------------------------------------------------- def info_window_offset_y return 0 end #-------------------------------------------------------------------------- # Å“ Æ’XÆ’vƒ‰ƒCÆ’gÆ’RÆ’}ƒ“ƒhÆ’Nƒ‰ƒX‚̎擾 #-------------------------------------------------------------------------- def sprite_command_class return Sprite_ZiifRollIconCommand end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhâ€wÅ’iÆ’Nƒ‰ƒX‚̎擾 #-------------------------------------------------------------------------- def sprite_background_class return Sprite_ZiifRollIconBackground end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’J[Æ’\ƒ‹ƒNƒ‰ƒX‚̎擾 #-------------------------------------------------------------------------- def sprite_cursor_class return Sprite_ZiifRollIconCursor end #-------------------------------------------------------------------------- # Å“ î•ñƒEÆ’Bƒ“ƒhÆ’EÆ’Nƒ‰ƒX‚̎擾 #-------------------------------------------------------------------------- def info_window_class return Window_ZiifRollIconCommandName end #-------------------------------------------------------------------------- # Å“ Æ’IÆ’uÆ’WÆ’FÆ’NÆ’gÆ’XÆ’vƒ‰ƒCÆ’g‚Ìì¬ #-------------------------------------------------------------------------- def make_object_sprites @object_sprites[:info_window] = info_window_class.new(self) super end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh“à —e‚Ìì¬ #-------------------------------------------------------------------------- def create_contents super set_roll_value end #-------------------------------------------------------------------------- # Å“ ‰ñ“]’l‚ÌÃ’è #-------------------------------------------------------------------------- def set_roll_value @move_size = angle_difference @move_speed = roll_speed end #-------------------------------------------------------------------------- # Å“ “®ì’†‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def move? @move_type end #-------------------------------------------------------------------------- # Å“ ’âŽ~’†‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def stop? !@move_type end #-------------------------------------------------------------------------- # Å“ ˆÊ’uˆÚ“®‚ÌXV #-------------------------------------------------------------------------- def update_move if move? @move_count -= 1 @move_type = nil if @move_count <= 0 update_cursor end end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚ð‰E‚ɉñ“] #-------------------------------------------------------------------------- def roll_right @index = (@index + 1) % item_max @move_type = :right @move_count = roll_count end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚ð¶‚ɉñ“] #-------------------------------------------------------------------------- def roll_left @index = (@index - 1 + item_max) % item_max @move_type = :left @move_count = roll_count end #-------------------------------------------------------------------------- # Å“ ‰ñ“]Æ’L[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def input_roll?(symbol) case $game_system.ziifop_roll_input_type when 0; return Input.press?(symbol) # Æ’vÆ’Å’Æ’X when 1; return Input.trigger?(symbol) # Æ’gÆ’Å Æ’K[ when 2; return Input.repeat?(symbol) # Æ’Å Æ’s[Æ’g else ; return Input.repeat?(symbol) end end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚̈ړ®‘Oˆ— #-------------------------------------------------------------------------- def process_before_cursor_move @cursor_sound_value = false end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚̈ړ®Œãˆ— #-------------------------------------------------------------------------- def process_after_cursor_move Sound.play_cursor if @cursor_sound_value end #-------------------------------------------------------------------------- # Å“ ‰EÆ’L[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def input_right? input_roll?(:RIGHT) end #-------------------------------------------------------------------------- # Å“ ¶ƒL[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def input_left? input_roll?(:LEFT) end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚ð‰E‚Ɉړ® #-------------------------------------------------------------------------- def cursor_right(wrap = false) reverse_roll? ? roll_left : roll_right @cursor_sound_value = true end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚ð¶‚Ɉړ® #-------------------------------------------------------------------------- def cursor_left(wrap = false) reverse_roll? ? roll_right : roll_left @cursor_sound_value = true endend =begin ************************************************************************ Ÿ ‰ñ“]Ž®ƒoÆ’gƒ‹ƒRÆ’}ƒ“ƒh Ver.1.11 --------------------------------------------------------------------------- Æ’oÆ’gƒ‹ƒRÆ’}ƒ“ƒh‚ð‰ñ“]Ž®ƒAÆ’CÆ’Rƒ“ƒRÆ’}ƒ“ƒh‚É•ÃX‚µ‚Ü‚·B=end # ************************************************************************ #-information------------------------------------------------------------------$ziifee ||= {}$ziifee[:RollBattleCommand] = true#------------------------------------------------------------------------------#-memo-------------------------------------------------------------------------# [•K—vÆ’XÆ’NÆ’Å Æ’vÆ’g]# ‰æ‘œƒRÆ’}ƒ“ƒhÆ’XÆ’NÆ’Å Æ’vÆ’g (Ver.1.50ˆÈã)# [•K—v‰æ‘œ] ˆÈ‰º‚̉摜‚ð Graphics/System ‚ɃCƒ“ƒ|[Æ’g‚µ‚¾‚³‚¢B# Æ’oÆ’gƒ‹ƒRÆ’}ƒ“ƒh—pâ€wÅ’i‰æ‘œ ( Æ’tÆ’@Æ’Cƒ‹–¼ : Ring96x88 )# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# ‚±‚̃XÆ’NÆ’Å Æ’vÆ’g‚ÃA‰æ‘œƒRÆ’}ƒ“ƒhÆ’XÆ’NÆ’Å Æ’vÆ’g‚̉º‚É“ü‚ꂾ‚³‚¢B# Æ’AÆ’CÆ’Rƒ“‚Ì•ÃX‚ÃA‰æ‘œƒRÆ’}ƒ“ƒhÆ’XÆ’NÆ’Å Æ’vÆ’g‚Ì’†‚Ås‚¦‚Ü‚·B#------------------------------------------------------------------------------ module ZiifRollBattleCommand # Â¥ Æ’RÆ’}ƒ“ƒh•\ަŒã‚É•\ަˆÊ’u‚ð’²®‚·‚é ( true / false ) AdjustPartyWindow = true # Æ’p[Æ’eÆ’BÆ’EÆ’Bƒ“ƒhÆ’E AdjustActorWindow = true # Æ’AÆ’NÆ’^[Æ’EÆ’Bƒ“ƒhÆ’Eend #******************************************************************************# Â¥ ‰ñ“]Ž®ƒRÆ’}ƒ“ƒh“±“ü•â€#****************************************************************************** class Window_PartyCommand; include ZiifSpriteCommand_RollIcon; endclass Window_ActorCommand; include ZiifSpriteCommand_RollIcon; end #******************************************************************************# Â¥ Æ’Å’Æ’CÆ’AÆ’EÆ’g•â€#****************************************************************************** #==============================================================================# ¡ Sprite_ZiifRollIconActorBattleCommand#============================================================================== class Sprite_ZiifRollIconActorBattleCommand < Sprite_ZiifRollIconCommand #-------------------------------------------------------------------------- # Å“ Æ’AÆ’CÆ’Rƒ“â€Ã”†‚̎擾 #-------------------------------------------------------------------------- def icon_index if command_set.command_symbol(self.index) == :attack return command_set.attack_icon_index end return super endend #==============================================================================# ¡ Window_PartyCommand#============================================================================== class Window_PartyCommand #-------------------------------------------------------------------------- # Å“ •‚̎擾 #-------------------------------------------------------------------------- def window_width return 96 end #-------------------------------------------------------------------------- # Å“ ‚‚³‚̎擾 #-------------------------------------------------------------------------- def window_height return 88 end #-------------------------------------------------------------------------- # Å“ â€wÅ’i‰æ‘œ‚̃tÆ’@Æ’Cƒ‹–¼‚ðŽæ“¾ #-------------------------------------------------------------------------- def background_filename return "Ring96x88" endend #==============================================================================# ¡ Window_ActorCommand#============================================================================== class Window_ActorCommand #-------------------------------------------------------------------------- # Å“ •‚̎擾 #-------------------------------------------------------------------------- def window_width return 96 end #-------------------------------------------------------------------------- # Å“ ‚‚³‚̎擾 #-------------------------------------------------------------------------- def window_height return 88 end #-------------------------------------------------------------------------- # Å“ â€wÅ’i‰æ‘œ‚̃tÆ’@Æ’Cƒ‹–¼‚ðŽæ“¾ #-------------------------------------------------------------------------- def background_filename return "Ring96x88" end #-------------------------------------------------------------------------- # Å“ Æ’XÆ’vƒ‰ƒCÆ’gÆ’RÆ’}ƒ“ƒhÆ’Nƒ‰ƒX‚̎擾 #-------------------------------------------------------------------------- def sprite_command_class return Sprite_ZiifRollIconActorBattleCommand end #-------------------------------------------------------------------------- # Å“ UŒ‚ƒAÆ’CÆ’Rƒ“â€Ã”†‚ðŽæ“¾ #-------------------------------------------------------------------------- def attack_icon_index if @actor && !@actor.weapons.compact.empty? return @actor.weapons.compact.first.icon_index end ZiifManager::IconSet[:attack][nil] endend #==============================================================================# ¡ Scene_Battle#============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # Å“ Æ’p[Æ’eÆ’BÆ’RÆ’}ƒ“ƒhÆ’EÆ’Bƒ“ƒhÆ’E‚Ìì¬ #-------------------------------------------------------------------------- alias :ziif_roll_battle_command_create_party_command_window :create_party_command_window def create_party_command_window ziif_roll_battle_command_create_party_command_window if ZiifRollBattleCommand::AdjustPartyWindow @party_command_window.x += 64 @party_command_window.y += 60 end end #-------------------------------------------------------------------------- # Å“ Æ’AÆ’NÆ’^[Æ’RÆ’}ƒ“ƒhÆ’EÆ’Bƒ“ƒhÆ’E‚Ìì¬ #-------------------------------------------------------------------------- alias :ziif_roll_battle_command_create_actor_command_window :create_actor_command_window def create_actor_command_window ziif_roll_battle_command_create_actor_command_window if ZiifRollBattleCommand::AdjustActorWindow @actor_command_window.x += 64 @actor_command_window.y += 60 end endend ***NEW UPDATE I got it to work with my software, here is a screenshot (Note, I made some personal changes so mine will look a bit different) Edited February 23, 2013 by BigDog Share this post Link to post Share on other sites
Galv 1,386 Posted February 23, 2013 @ BigDog - please don't double post within 72 hours, use the edit link (located near the quote button of your posts) Please don't necropost either, but this isn't too long for that so I don't believe it is. Do you have permission to repost those scripts? Share this post Link to post Share on other sites
BigDog 0 Posted February 24, 2013 No, I did not get permission to post those. They are public already on his website (which I made sure to link first). I was just trying to help the person who asked if the script had been converted, which it had. Share this post Link to post Share on other sites
Lionheart_84 3 Posted November 2, 2013 (edited) *Update* I actually found the site where the conversion has been done @ http://neomemo.web.fc2.com/rgss3.html It is not in english, but it can be used (A translated verion would be awesome). I am still trying to get it to work with my particular setup, but in order to get it to work you have to have these 2 pictures in your graphics/system folder: Then you have to have these 2 scripts in order: =begin ************************************************************************ Ÿ ‰æ‘œƒRÆ’}ƒ“ƒhÆ’XÆ’NÆ’Å Æ’vÆ’g (Æ’x[Æ’XÆ’XÆ’NÆ’Å Æ’vÆ’g) Ver.1.81 --------------------------------------------------------------------------- ‰æ‘œƒRÆ’}ƒ“ƒh‚̃x[Æ’XÆ’XÆ’NÆ’Å Æ’vÆ’g‚Å‚·B‰ñ“]Æ’AÆ’CÆ’Rƒ“ƒRÆ’}ƒ“ƒh‚ªŽg‚¦‚Ü‚·B =end # ************************************************************************ #-information------------------------------------------------------------------ $ziifee ||= {} $ziifee[:SpriteCommand] = true #------------------------------------------------------------------------------ #-memo------------------------------------------------------------------------- # [•K—v‰æ‘œ] ˆÈ‰º‚̉摜‚ð Graphics/System ‚ɃCƒ“ƒ|[Æ’g‚µ‚¾‚³‚¢B # ‰ñ“]Æ’RÆ’}ƒ“ƒh—pÆ’J[Æ’\ƒ‹‰æ‘œ ( Æ’tÆ’@Æ’Cƒ‹–¼ : RollIconCursor ) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # ‚±‚̃XÆ’NÆ’Å Æ’vÆ’g‚ÉÂâ€\‚ÈŒÀ‚è‘fÞ‚Ì’†‚Åã•â€â€šÃ‰â€œÂ±â€œÃ¼â€šÂµâ€šÃ„‚‚¾‚³‚¢B # ‰ñ“]Æ’AÆ’CÆ’Rƒ“ƒRÆ’}ƒ“ƒh‘I‘ð‚ðs‚¢‚½‚¢ƒNƒ‰ƒX‚Ɉȉº‚ð‹Lq‚µ‚Ü‚·B # include ZiifSpriteCommand_RollIcon # ‰ñ“]Æ’AÆ’CÆ’Rƒ“ƒRÆ’}ƒ“ƒh‘I‘ð #------------------------------------------------------------------------------ #============================================================================== # ¡ ZiifManager #============================================================================== module ZiifManager #-------------------------------------------------------------------------- # Â¥ ’è†(Æ’AÆ’CÆ’Rƒ“â€Ã”†) #-memo--------------------------------------------------------------------- # ‰ñ“]Æ’RÆ’}ƒ“ƒhã‚É•\ަ‚·‚éƒAÆ’CÆ’Rƒ“‚±‚±‚ÅÃ’肵‚Ü‚·B # ˆÈ‰º‚Ì’è‹`‚Ì symbol ‚ª‚±‚±‚ÅÃ’è‚·‚éƒVƒ“ƒ{ƒ‹‚ɂȂè‚Ü‚·B # add_command(name, symbol, enabled, ext) # Æ’RÆ’}ƒ“ƒh‚̒ljà # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # IconSet[Æ’Vƒ“ƒ{ƒ‹] = Hash.new(Æ’AÆ’CÆ’Rƒ“â€Ã”†) # IconSet[:skill][Æ’XÆ’Lƒ‹ƒ^Æ’CÆ’vâ€Ã”†] = Æ’AÆ’CÆ’Rƒ“â€Ã”†# Æ’XÆ’Lƒ‹ƒ^Æ’CÆ’v #-------------------------------------------------------------------------- IconSet ||= Hash.new(Hash.new(16)) # Æ’fÆ’tÆ’Hƒ‹ƒg IconSet[:fight] = Hash.new(147) # ¤ (Æ’oÆ’gƒ‹) IconSet[:escape] = Hash.new(467) # “¦‚°‚é (Æ’oÆ’gƒ‹) IconSet[:attack] = Hash.new(175) # UŒ‚ (Æ’oÆ’gƒ‹) IconSet[:guard] = Hash.new(506) # –hΊ (Æ’oÆ’gƒ‹) IconSet[:item] = Hash.new(260) # Æ’AÆ’CÆ’eƒ€ IconSet[:skill] = Hash.new(112) # Æ’XÆ’Lƒ‹ IconSet[:skill][1] = 115 # Æ’XÆ’Lƒ‹ƒ^Æ’CÆ’v ID:01 IconSet[:skill][2] = 117 # Æ’XÆ’Lƒ‹ƒ^Æ’CÆ’v ID:02 IconSet[:equip] = Hash.new(436) # ‘•â€Ãµ IconSet[:weapon] = Hash.new(147) # •Šà IconSet[:armor] = Hash.new(506) # –h‹ï IconSet[:key_item] = Hash.new(243) # Æ’L[Æ’AÆ’CÆ’eƒ€ IconSet[:optimize] = Hash.new(437) # ŋ‘•â€Ãµ IconSet[:clear] = Hash.new(143) # Å O‚· IconSet[:status] = Hash.new(121) # Æ’XÆ’e[Æ’^Æ’X IconSet[:formation] = Hash.new(183) # •À‚ёւ¦ IconSet[:save] = Hash.new(224) # Æ’Z[Æ’u IconSet[:buy] = Hash.new(270) # w“ü IconSet[:sell] = Hash.new(262) # â€â€žâ€¹p IconSet[:cancel] = Hash.new(12) # Æ’Lƒƒƒ“ƒZƒ‹ IconSet[:new_game] = Hash.new(234) # Æ’jƒ…[Æ’Q[ƒ€ IconSet[:continue] = Hash.new(224) # Æ’Rƒ“ƒeÆ’BÆ’jƒ…[ IconSet[:game_end] = Hash.new(257) # Æ’Q[ƒ€I—¹ IconSet[:to_title] = Hash.new(257) # Æ’^Æ’CÆ’gƒ‹‚Ö IconSet[:shutdown] = Hash.new(143) # Æ’VÆ’Æ’Æ’bÆ’gÆ’_Æ’Eƒ“ #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’AÆ’CÆ’Rƒ“â€Ã”†‚̎擾 # command : Æ’EÆ’Bƒ“ƒhÆ’E‚̃RÆ’}ƒ“ƒh #-------------------------------------------------------------------------- def self.command_icon_index(command) IconSet[command[:symbol]][command[:ext]] end end #============================================================================== # ¡ Game_System #============================================================================== class Game_System #-------------------------------------------------------------------------- # Å“ ŒöŠJÆ’Cƒ“ƒXÆ’^ƒ“ƒX•Æ(Æ’IÆ’vÆ’Vƒ‡ƒ“Šg’£—p) #-------------------------------------------------------------------------- attr_writer :ziifop_reverse_roll # ‹t‰ñ“] ( true / false ) attr_writer :ziifop_roll_input_type # ‰ñ“]Žž Æ’L[â€œÃ¼â€”ÃÆ’^Æ’CÆ’v (0`2) attr_writer :ziifop_roll_speed # ‰ñ“]Žž ‘¬“x (0`4) #-------------------------------------------------------------------------- # Â¥ ‹t‰ñ“]‚̎擾 #-------------------------------------------------------------------------- def ziifop_reverse_roll return false end #-------------------------------------------------------------------------- # Â¥ ‰ñ“]Æ’L[â€œÃ¼â€”ÃÆ’^Æ’CÆ’v‚̎擾 (0:Æ’vÆ’Å’Æ’X, 1:Æ’gÆ’Å Æ’K[, 2:Æ’Å Æ’s[Æ’g) #-------------------------------------------------------------------------- def ziifop_roll_input_type return 0 end #-------------------------------------------------------------------------- # Â¥ ‰ñ“]‘¬“x‚̎擾 (0:’x‚¢ ` 4:‘¬‚¢) #-------------------------------------------------------------------------- def ziifop_roll_speed return 1 end end #****************************************************************************** # Â¥ ‰æ‘œƒRÆ’}ƒ“ƒhŠî–{•†#****************************************************************************** #============================================================================== # ¡ Sprite_ZiifCommandSprite #------------------------------------------------------------------------------ # @Æ’RÆ’}ƒ“ƒh‰æ‘œEâ€wÅ’iEÆ’J[Æ’\ƒ‹•\ަ—pÆ’XÆ’vƒ‰ƒCÆ’g‚̃X[Æ’p[Æ’Nƒ‰ƒX‚Å‚·B #============================================================================== class Sprite_ZiifCommandSprite < Sprite #-------------------------------------------------------------------------- # Å“ Æ’IÆ’uÆ’WÆ’FÆ’NÆ’g‰Šú‰» #-------------------------------------------------------------------------- def initialize(command_set) super(command_set.viewport) @command_set = command_set init_basic_values create_bitmap update end #-------------------------------------------------------------------------- # Å“ Šî–{•Ãâ€â€šÃŒâ€°Å ú‰» #-------------------------------------------------------------------------- def init_basic_values end #-------------------------------------------------------------------------- # Å“ Æ’rÆ’bÆ’gÆ’}Æ’bÆ’v‚Ìì¬ #-------------------------------------------------------------------------- def create_bitmap end #-------------------------------------------------------------------------- # Å“ “à —e‚Ìì¬ #-------------------------------------------------------------------------- def create_contents end #-------------------------------------------------------------------------- # Å“ “à —e‚ÌÃÅ“ #-------------------------------------------------------------------------- def clear_contents end #-------------------------------------------------------------------------- # Å“ Æ’XÆ’vƒ‰ƒCÆ’gÆ’RÆ’}ƒ“ƒh‚̎擾 #-------------------------------------------------------------------------- def command_set return @command_set end #-------------------------------------------------------------------------- # Å“ ˆÊ’u‚̎擾 #-------------------------------------------------------------------------- def index return command_set.sprite_index(self) end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚̃rƒ…[Æ’|[Æ’g‚̎擾 #-------------------------------------------------------------------------- def command_set_viewport return command_set.viewport end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚̉Ž‹ó‘Ԃ̎擾 #-------------------------------------------------------------------------- def command_set_visible return command_set.visible && !command_set.close? end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚Ì“§–¾“x‚̎擾 #-------------------------------------------------------------------------- def command_set_opacity return command_set.contents_opacity end #-------------------------------------------------------------------------- # Å“ ˆÊ’uî•ñ‚ÌXV #-------------------------------------------------------------------------- def update_position self.viewport = command_set_viewport self.visible = command_set_visible self.opacity = command_set_opacity end end #============================================================================== # ¡ ZiifSpriteCommand #------------------------------------------------------------------------------ # @‰æ‘œƒRÆ’}ƒ“ƒh‘I‘ð‚ðs‚¤‚½‚߂̃‚ƒWƒ…[ƒ‹‚Å‚·BMix-In‚É‚æ‚èŽg—p‚µ‚Ü‚·B #============================================================================== module ZiifSpriteCommand #-------------------------------------------------------------------------- # Å“ ŒöŠJÆ’Cƒ“ƒXÆ’^ƒ“ƒX•Æ#-------------------------------------------------------------------------- attr_reader :windowskin # Æ’EÆ’Bƒ“ƒhÆ’EÆ’XÆ’Lƒ“ attr_reader :viewport # Æ’rƒ…[Æ’|[Æ’g attr_reader :active # ‘I‘ðó‘Ô attr_reader :visible # ‰ÂŽ‹ó‘Ô attr_reader :x # XÀ•W attr_reader :y # YÀ•W attr_reader :width # • attr_reader :height # ‚‚³ attr_reader :z # ZÀ•W attr_reader :ox # “]‘—Œ³Œ´“_ XÀ•W attr_reader :oy # “]‘—Œ³Œ´“_ YÀ•W attr_reader :padding # —]â€â€™â€šÃŒâ€˜Ã¥â€šÂ«â€šÂ³ attr_reader :padding_bottom # ‰ºü—]â€â€™â€šÃŒâ€˜Ã¥â€šÂ«â€šÂ³ attr_reader :opacity # •s“§–¾“x attr_reader :back_opacity # â€wÅ’i‚Ì•s“§–¾“x attr_reader :contents_opacity # Æ’RÆ’}ƒ“ƒh‚Ì•s“§–¾“x attr_reader :openness # Æ’I[Æ’vƒ““x attr_reader :tone # â€wÅ’i‚ÌF’² attr_reader :index # Æ’J[Æ’\ƒ‹ˆÊ’u attr_reader :help_window # Æ’wƒ‹ƒvÆ’EÆ’Bƒ“ƒhÆ’E attr_accessor :cursor_fix # Æ’J[Æ’\ƒ‹ŒÅ’èƒtƒ‰ƒO attr_accessor :cursor_all # Æ’J[Æ’\ƒ‹‘S‘I‘ðƒtƒ‰ƒO #-------------------------------------------------------------------------- # Å“ Æ’IÆ’uÆ’WÆ’FÆ’NÆ’g‰Šú‰» #-------------------------------------------------------------------------- def initialize(*args) init_basic_values(*args) init_sprite_command update_tone refresh select(0) activate end #-------------------------------------------------------------------------- # Å“ Šî–{•Ãâ€â€šÃŒâ€°Å ú‰» #-------------------------------------------------------------------------- def init_basic_values(x, y, width = window_width, height = window_height) @windowskin = Cache.system("Window") @viewport = nil @active = true @visible = true @x = x @y = y @width = width @height = height @z = 100 @ox = 0 @oy = 0 @padding = 12 @padding_bottom = 12 @opacity = 255 @back_opacity = 255 @contents_opacity = 255 @openness = 255 @tone = Tone.new @index = -1 @handler = {} @cursor_fix = false @cursor_all = false @opening = false @closing = false end #-------------------------------------------------------------------------- # Å“ Æ’XÆ’vƒ‰ƒCÆ’gÆ’RÆ’}ƒ“ƒh•Ãâ€â€šÃŒâ€°Å ú‰» #-------------------------------------------------------------------------- def init_sprite_command @command_sprites = [] @object_sprites = {} create_dummy_bitmap end #-------------------------------------------------------------------------- # Å“ ‰ð•ú #-------------------------------------------------------------------------- def dispose dispose_dummy_bitmap dispose_object_sprites dispose_command_sprites end #-------------------------------------------------------------------------- # Å“ Æ’EÆ’Bƒ“ƒhÆ’E•‚̎擾 #-------------------------------------------------------------------------- def window_width return 96 end #-------------------------------------------------------------------------- # Å“ Æ’EÆ’Bƒ“ƒhÆ’E‚‚³‚̎擾 #-------------------------------------------------------------------------- def window_height return 88 end #-------------------------------------------------------------------------- # Å“ €–Úâ€â€šÃŒÅ½Ã¦â€œÂ¾ #-------------------------------------------------------------------------- def item_max @list.size end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’Å Æ’XÆ’g‚̃NÆ’Å Æ’A #-------------------------------------------------------------------------- def clear_command_list @list = [] end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’Å Æ’XÆ’g‚Ìì¬ #-------------------------------------------------------------------------- def make_command_list end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚̒ljà # name : Æ’RÆ’}ƒ“ƒh–¼ # symbol : ‘Ήž‚·‚éƒVƒ“ƒ{ƒ‹ # enabled : —LŒøó‘Ôƒtƒ‰ƒO # ext : â€CˆÓ‚ÌŠg’£ƒf[Æ’^ #-------------------------------------------------------------------------- def add_command(name, symbol, enabled = true, ext = nil) @list.push({:name=>name, :symbol=>symbol, :enabled=>enabled, :ext=>ext}) end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh–¼‚̎擾 #-------------------------------------------------------------------------- def command(index) @list[index] end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh–¼‚̎擾 #-------------------------------------------------------------------------- def command_name(index) @list[index][:name] end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚Ì—LŒøó‘Ô‚ðŽæ“¾ #-------------------------------------------------------------------------- def command_enabled?(index) @list[index][:enabled] end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’Vƒ“ƒ{ƒ‹‚̎擾 #-------------------------------------------------------------------------- def command_symbol(index) @list[index][:symbol] end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚ÌŠg’£ƒf[Æ’^‚̎擾 #-------------------------------------------------------------------------- def command_ext(index) @list[index][:ext] end #-------------------------------------------------------------------------- # Å“ ‘I‘ð€–ڂ̃RÆ’}ƒ“ƒhÆ’f[Æ’^‚ðŽæ“¾ #-------------------------------------------------------------------------- def current_data index >= 0 ? @list[index] : nil end #-------------------------------------------------------------------------- # Å“ ‘I‘ð€–ڂ̃RÆ’}ƒ“ƒh–¼‚ðŽæ“¾ #-------------------------------------------------------------------------- def current_item_name current_data ? current_data[:name] : "" end #-------------------------------------------------------------------------- # Å“ ‘I‘ð€–Ú‚Ì—LŒøó‘Ô‚ðŽæ“¾ #-------------------------------------------------------------------------- def current_item_enabled? current_data ? current_data[:enabled] : false end #-------------------------------------------------------------------------- # Å“ ‘I‘ð€–ڂ̃Vƒ“ƒ{ƒ‹‚ðŽæ“¾ #-------------------------------------------------------------------------- def current_symbol current_data ? current_data[:symbol] : nil end #-------------------------------------------------------------------------- # Å“ ‘I‘ð€–Ú‚ÌŠg’£ƒf[Æ’^‚ðŽæ“¾ #-------------------------------------------------------------------------- def current_ext current_data ? current_data[:ext] : nil end #-------------------------------------------------------------------------- # Å“ Žw’肳‚ꂽƒVƒ“ƒ{ƒ‹‚ðŽ‚ÂƒRÆ’}ƒ“ƒh‚ɃJ[Æ’\ƒ‹‚ðˆÚ“® #-------------------------------------------------------------------------- def select_symbol(symbol) @list.each_index {|i| select(i) if @list[:symbol] == symbol } end #-------------------------------------------------------------------------- # Å“ Žw’肳‚ꂽŠg’£ƒf[Æ’^‚ðŽ‚ÂƒRÆ’}ƒ“ƒh‚ɃJ[Æ’\ƒ‹‚ðˆÚ“® #-------------------------------------------------------------------------- def select_ext(ext) @list.each_index {|i| select(i) if @list[:ext] == ext } end #-------------------------------------------------------------------------- # Å“ Æ’XÆ’vƒ‰ƒCÆ’gÆ’RÆ’}ƒ“ƒhÆ’Nƒ‰ƒX‚̎擾 #-------------------------------------------------------------------------- def sprite_command_class return Sprite_ZiifCommandSprite end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhâ€wÅ’iÆ’Nƒ‰ƒX‚̎擾 #-------------------------------------------------------------------------- def sprite_background_class return Sprite_ZiifCommandSprite end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’J[Æ’\ƒ‹ƒNƒ‰ƒX‚̎擾 #-------------------------------------------------------------------------- def sprite_cursor_class return Sprite_ZiifCommandSprite end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’XÆ’vƒ‰ƒCÆ’g‚̈ʒu‚ðŽæ“¾ #-------------------------------------------------------------------------- def sprite_index(sprite) @command_sprites.index(sprite) end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’XÆ’vƒ‰ƒCÆ’g‚Ìì¬ #-------------------------------------------------------------------------- def make_command_sprites item_max.times {|i| @command_sprites = sprite_command_class.new(self) } end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’XÆ’vƒ‰ƒCÆ’g‚̉ð•ú #-------------------------------------------------------------------------- def dispose_command_sprites @command_sprites.each {|sprite| sprite.dispose } @command_sprites.clear end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’XÆ’vƒ‰ƒCÆ’g‚ÌXV #-------------------------------------------------------------------------- def update_command_sprites @command_sprites.each {|sprite| sprite.update } end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’XÆ’vƒ‰ƒCÆ’g‚̈ʒuî•ñ‚ðXV #-------------------------------------------------------------------------- def update_command_sprites_position @command_sprites.each {|sprite| sprite.update_position } end #-------------------------------------------------------------------------- # Å“ Æ’IÆ’uÆ’WÆ’FÆ’NÆ’gÆ’XÆ’vƒ‰ƒCÆ’g‚Ìì¬ #-------------------------------------------------------------------------- def make_object_sprites @object_sprites[:background] = sprite_background_class.new(self) @object_sprites[:cursor] = sprite_cursor_class.new(self) end #-------------------------------------------------------------------------- # Å“ Æ’IÆ’uÆ’WÆ’FÆ’NÆ’gÆ’XÆ’vƒ‰ƒCÆ’g‚̉ð•ú #-------------------------------------------------------------------------- def dispose_object_sprites @object_sprites.each_value {|sprite| sprite.dispose } @object_sprites.clear end #-------------------------------------------------------------------------- # Å“ Æ’IÆ’uÆ’WÆ’FÆ’NÆ’gÆ’XÆ’vƒ‰ƒCÆ’g‚ÌXV #-------------------------------------------------------------------------- def update_object_sprites @object_sprites.each_value {|sprite| sprite.update } end #-------------------------------------------------------------------------- # Å“ Æ’IÆ’uÆ’WÆ’FÆ’NÆ’gÆ’XÆ’vƒ‰ƒCÆ’g‚̈ʒuî•ñ‚ðXV #-------------------------------------------------------------------------- def update_object_sprites_position @object_sprites.each_value {|sprite| sprite.update_position } end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh“à —e‚Ìì¬ #-------------------------------------------------------------------------- def create_contents dispose_object_sprites dispose_command_sprites make_command_sprites make_object_sprites end #-------------------------------------------------------------------------- # Å“ Æ’tÆ’Å’[ƒ€XV #-------------------------------------------------------------------------- def update update_tone update_open if @opening update_close if @closing update_move update_command_sprites update_object_sprites process_cursor_move process_handling end #-------------------------------------------------------------------------- # Å“ ˆÊ’uî•ñ‚ÌXV #-------------------------------------------------------------------------- def update_position update_command_sprites_position update_object_sprites_position end #-------------------------------------------------------------------------- # Å“ XÀ•W‚Ì•ÃX #-------------------------------------------------------------------------- def x=(x) @x = x update_position end #-------------------------------------------------------------------------- # Å“ YÀ•W‚Ì•ÃX #-------------------------------------------------------------------------- def y=(y) @y = y update_position end #-------------------------------------------------------------------------- # Å“ •‚Ì•ÃX #-------------------------------------------------------------------------- def width=(width) @width = width update_position end #-------------------------------------------------------------------------- # Å“ ‚‚³‚Ì•ÃX #-------------------------------------------------------------------------- def height=(height) @height = height update_position end #-------------------------------------------------------------------------- # Å“ ZÀ•W‚Ì•ÃX #-------------------------------------------------------------------------- def z=(z) @z = z update_position end #-------------------------------------------------------------------------- # Å“ XÀ•WAYÀ•WA•A‚‚³‚ð‚܂Ƃ߂ĕÃX #-------------------------------------------------------------------------- def move(x, y, width, height) @x = x @y = y @width = width @height = height update_position end #-------------------------------------------------------------------------- # Å“ “]‘—Œ³Œ´“_ XÀ•W‚Ì•ÃX #-------------------------------------------------------------------------- def ox=(ox) @ox = ox update_position end #-------------------------------------------------------------------------- # Å“ “]‘—Œ³Œ´“_ YÀ•W‚Ì•ÃX #-------------------------------------------------------------------------- def oy=(oy) @oy = oy update_position end #-------------------------------------------------------------------------- # Å“ —]â€â€™â€šÃŒâ€˜Ã¥â€šÂ«â€šÂ³â€šÃŒâ€¢ÃX #-------------------------------------------------------------------------- def padding=(padding) @padding = padding @padding_bottom = padding_bottom update_position end #-------------------------------------------------------------------------- # Å“ ‰ºü—]â€â€™â€šÃŒâ€˜Ã¥â€šÂ«â€šÂ³â€šÃŒâ€¢ÃX #-------------------------------------------------------------------------- def padding_bottom=(padding_bottom) @padding_bottom = padding_bottom update_position end #-------------------------------------------------------------------------- # Å“ Æ’EÆ’Bƒ“ƒhÆ’EÆ’XÆ’Lƒ“‚Ì•ÃX #-------------------------------------------------------------------------- def windowskin=(windowskin) @windowskin = windowskin update_position end #-------------------------------------------------------------------------- # Å“ Æ’rƒ…[Æ’|[Æ’g‚Ì•ÃX #-------------------------------------------------------------------------- def viewport=(viewport) @viewport = viewport update_position end #-------------------------------------------------------------------------- # Å“ ‰ÂŽ‹ó‘Ô‚Ì•ÃX #-------------------------------------------------------------------------- def visible=(visible) @visible = visible update_position end #-------------------------------------------------------------------------- # Å“ •\ަ #-------------------------------------------------------------------------- def show self.visible = true self end #-------------------------------------------------------------------------- # Å“ â€Ã±â€¢\ަ #-------------------------------------------------------------------------- def hide self.visible = false self end #-------------------------------------------------------------------------- # Å“ Æ’AÆ’NÆ’eÆ’BÆ’uó‘Ô‚Ì•ÃX #-------------------------------------------------------------------------- def active=(active) @active = active update_cursor call_update_help end #-------------------------------------------------------------------------- # Å“ Æ’AÆ’NÆ’eÆ’BÆ’u‰» #-------------------------------------------------------------------------- def activate self.active = true self end #-------------------------------------------------------------------------- # Å“ â€Ã±Æ’AÆ’NÆ’eÆ’BÆ’u‰» #-------------------------------------------------------------------------- def deactivate self.active = false self end #-------------------------------------------------------------------------- # Å“ •s“§–¾“x‚Ì•ÃX #-------------------------------------------------------------------------- def opacity=(opacity) @opacity = [[opacity, 255].min, 0].max update_position end #-------------------------------------------------------------------------- # Å“ â€wÅ’i‚Ì•s“§–¾“x‚Ì•ÃX #-------------------------------------------------------------------------- def back_opacity=(opacity) @back_opacity = [[opacity, 255].min, 0].max update_position end #-------------------------------------------------------------------------- # Å“ “à —e‚Ì•s“§–¾“x‚Ì•ÃX #-------------------------------------------------------------------------- def contents_opacity=(opacity) @contents_opacity = [[opacity, 255].min, 0].max update_position end #-------------------------------------------------------------------------- # Å“ Æ’I[Æ’vƒ““x‚Ì•ÃX #-------------------------------------------------------------------------- def openness=(openness) @openness = [[openness, 255].min, 0].max update_position end #-------------------------------------------------------------------------- # Å“ Š®‘S‚ÉŠJ‚¢‚½ó‘Ô‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def open? (@openness == 255) end #-------------------------------------------------------------------------- # Å“ Š®‘S‚ɕ‚¶‚½ó‘Ô‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def close? (@openness == 0) end #-------------------------------------------------------------------------- # Å“ Å J‚ˆ—’l‚̎擾 #-------------------------------------------------------------------------- def opening_value return 48 end #-------------------------------------------------------------------------- # Å“ •‚¶‚鈗’l‚̎擾 #-------------------------------------------------------------------------- def closing_value return 48 end #-------------------------------------------------------------------------- # Å“ Å J‚ˆ—‚ÌXV #-------------------------------------------------------------------------- def update_open self.openness += opening_value @opening = false if open? end #-------------------------------------------------------------------------- # Å“ •‚¶‚鈗‚ÌXV #-------------------------------------------------------------------------- def update_close self.openness -= closing_value @closing = false if close? end #-------------------------------------------------------------------------- # Å“ Å J‚ #-------------------------------------------------------------------------- def open @opening = true unless open? @closing = false self end #-------------------------------------------------------------------------- # Å“ •‚¶‚é #-------------------------------------------------------------------------- def close @closing = true unless close? @opening = false self end #-------------------------------------------------------------------------- # Å“ F’²‚ÌXV #-------------------------------------------------------------------------- def update_tone end #-------------------------------------------------------------------------- # Å“ ˆÚ“®’†‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def move? return false end #-------------------------------------------------------------------------- # Å“ ’âŽ~’†‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def stop? return true end #-------------------------------------------------------------------------- # Å“ ˆÊ’uˆÚ“®‚ÌXV #-------------------------------------------------------------------------- def update_move end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹ˆÊ’u‚ÌÃ’è #-------------------------------------------------------------------------- def index=(index) @index = index update_cursor call_update_help end #-------------------------------------------------------------------------- # Å“ €–Ú‚Ì‘I‘ð #-------------------------------------------------------------------------- def select(index) self.index = index if index end #-------------------------------------------------------------------------- # Å“ €–Ú‚Ì‘I‘ð‰ðœ #-------------------------------------------------------------------------- def unselect self.index = -1 end #-------------------------------------------------------------------------- # Å“ “®ì‚ɑΉž‚·‚éƒnƒ“ƒhƒ‰‚ÌÃ’è # method : Æ’nƒ“ƒhƒ‰‚Æ‚µ‚ÄÃ’è‚·‚郃\Æ’bÆ’h (Method Æ’IÆ’uÆ’WÆ’FÆ’NÆ’g) #-------------------------------------------------------------------------- def set_handler(symbol, method) @handler[symbol] = method end #-------------------------------------------------------------------------- # Å“ Æ’nƒ“ƒhƒ‰‚Ì‘¶ÃÅ mâ€F #-------------------------------------------------------------------------- def handle?(symbol) @handler.include?(symbol) end #-------------------------------------------------------------------------- # Å“ Æ’nƒ“ƒhƒ‰‚̌ĂÑo‚µ #-------------------------------------------------------------------------- def call_handler(symbol) @handler[symbol].call if handle?(symbol) end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚̈ړ®‰Ââ€\â€Â»â€™Ã¨ #-------------------------------------------------------------------------- def cursor_movable? stop? && active && open? && !@cursor_fix && !@cursor_all && item_max > 0 end #-------------------------------------------------------------------------- # Å“ ‰ºƒL[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def input_down? Input.repeat?(:DOWN) end #-------------------------------------------------------------------------- # Å“ ãƒL[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def input_up? Input.repeat?(:UP) end #-------------------------------------------------------------------------- # Å“ ‰EÆ’L[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def input_right? Input.repeat?(:RIGHT) end #-------------------------------------------------------------------------- # Å“ ¶ƒL[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def input_left? Input.repeat?(:LEFT) end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚ð‰º‚ÉˆÚ“® #-------------------------------------------------------------------------- def cursor_down(wrap = false) end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚ðã‚Ɉړ® #-------------------------------------------------------------------------- def cursor_up(wrap = false) end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚ð‰E‚Ɉړ® #-------------------------------------------------------------------------- def cursor_right(wrap = false) end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚ð¶‚Ɉړ® #-------------------------------------------------------------------------- def cursor_left(wrap = false) end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚̈ړ®‘Oˆ— #-------------------------------------------------------------------------- def process_before_cursor_move @cursor_sound_value = @index end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚̈ړ®Œãˆ— #-------------------------------------------------------------------------- def process_after_cursor_move Sound.play_cursor if @index != @cursor_sound_value end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚̈ړ®ˆ— #-------------------------------------------------------------------------- def process_cursor_move return unless cursor_movable? process_before_cursor_move cursor_down (Input.trigger?(:DOWN)) if input_down? cursor_up (Input.trigger?(:UP)) if input_up? cursor_right(Input.trigger?(:RIGHT)) if input_right? cursor_left (Input.trigger?(:LEFT)) if input_left? process_after_cursor_move end #-------------------------------------------------------------------------- # Å“ Œˆ’è‚âƒLƒƒƒ“ƒZƒ‹‚Ȃǂ̃nƒ“ƒhƒŠƒ“ƒOˆ— #-------------------------------------------------------------------------- def process_handling return unless open? && active && stop? return process_ok if ok_enabled? && Input.trigger?(:C) return process_cancel if cancel_enabled? && Input.trigger?(: return process_pagedown if handle?(:pagedown) && Input.trigger?(:R) return process_pageup if handle?(:pageup) && Input.trigger?(:L) end #-------------------------------------------------------------------------- # Å“ Œˆ’舗‚Ì—LŒøó‘Ô‚ðŽæ“¾ #-------------------------------------------------------------------------- def ok_enabled? return true end #-------------------------------------------------------------------------- # Å“ Æ’Lƒƒƒ“ƒZƒ‹ˆ—‚Ì—LŒøó‘Ô‚ðŽæ“¾ #-------------------------------------------------------------------------- def cancel_enabled? handle?(:cancel) end #-------------------------------------------------------------------------- # Å“ Œˆ’èƒ{Æ’^ƒ“‚ª‰Ÿ‚³‚ꂽ‚Æ‚«‚̈— #-------------------------------------------------------------------------- def process_ok if current_item_enabled? Sound.play_ok Input.update deactivate call_ok_handler else Sound.play_buzzer end end #-------------------------------------------------------------------------- # Å“ Œˆ’èƒnƒ“ƒhƒ‰‚̌ĂÑo‚µ #-------------------------------------------------------------------------- def call_ok_handler if handle?(current_symbol) call_handler(current_symbol) elsif handle?(:ok) call_ok_handler_default else activate end end #-------------------------------------------------------------------------- # Å“ Œˆ’èƒnƒ“ƒhƒ‰‚̌ĂÑo‚µ (Æ’fÆ’tÆ’Hƒ‹ƒg) #-------------------------------------------------------------------------- def call_ok_handler_default call_handler(:ok) end #-------------------------------------------------------------------------- # Å“ Æ’Lƒƒƒ“ƒZƒ‹ƒ{Æ’^ƒ“‚ª‰Ÿ‚³‚ꂽ‚Æ‚«‚̈— #-------------------------------------------------------------------------- def process_cancel Sound.play_cancel Input.update deactivate call_cancel_handler end #-------------------------------------------------------------------------- # Å“ Æ’Lƒƒƒ“ƒZƒ‹ƒnƒ“ƒhƒ‰‚̌ĂÑo‚µ #-------------------------------------------------------------------------- def call_cancel_handler call_handler(:cancel) end #-------------------------------------------------------------------------- # Å“ L Æ’{Æ’^ƒ“iPageUpj‚ª‰Ÿ‚³‚ꂽ‚Æ‚«‚̈— #-------------------------------------------------------------------------- def process_pageup Sound.play_cursor Input.update deactivate call_handler(:pageup) end #-------------------------------------------------------------------------- # Å“ R Æ’{Æ’^ƒ“iPageDownj‚ª‰Ÿ‚³‚ꂽ‚Æ‚«‚̈— #-------------------------------------------------------------------------- def process_pagedown Sound.play_cursor Input.update deactivate call_handler(:pagedown) end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚ÌXV #-------------------------------------------------------------------------- def update_cursor update_position end #-------------------------------------------------------------------------- # Å“ Æ’wƒ‹ƒvÆ’EÆ’Bƒ“ƒhÆ’E‚ÌÃ’è #-------------------------------------------------------------------------- def help_window=(help_window) @help_window = help_window call_update_help end #-------------------------------------------------------------------------- # Å“ Æ’wƒ‹ƒvÆ’EÆ’Bƒ“ƒhÆ’EXVÆ’Æ’\Æ’bÆ’h‚̌ĂÑo‚µ #-------------------------------------------------------------------------- def call_update_help update_help if active && @help_window end #-------------------------------------------------------------------------- # Å“ Æ’wƒ‹ƒvÆ’EÆ’Bƒ“ƒhÆ’E‚ÌXV #-------------------------------------------------------------------------- def update_help @help_window.clear end #-------------------------------------------------------------------------- # Å“ ‘S€–Ú‚Ì•`‰æ #-------------------------------------------------------------------------- def draw_all_items item_max.times {|i| draw_item(i) } end #-------------------------------------------------------------------------- # Å“ €–Ú‚Ì•`‰æ #-------------------------------------------------------------------------- def draw_item(index) @command_sprites[index].create_contents end #-------------------------------------------------------------------------- # Å“ €–Ú‚ÌÃ‹Ž #-------------------------------------------------------------------------- def clear_item(index) @command_sprites[index].clear_contents end #-------------------------------------------------------------------------- # Å“ €–Ú‚ÌÄ•`‰æ #-------------------------------------------------------------------------- def redraw_item(index) clear_item(index) if index >= 0 draw_item(index) if index >= 0 end #-------------------------------------------------------------------------- # Å“ ‘I‘ð€–Ú‚ÌÄ•`‰æ #-------------------------------------------------------------------------- def redraw_current_item redraw_item(@index) end #-------------------------------------------------------------------------- # Å“ Æ’Å Æ’tÆ’Å’Æ’bÆ’Vƒ… #-------------------------------------------------------------------------- def refresh clear_command_list make_command_list create_contents draw_all_items update_position end #-------------------------------------------------------------------------- # › Æ’_Æ’~[Æ’rÆ’bÆ’gÆ’}Æ’bÆ’v‚Ìì¬ (Æ’EÆ’Bƒ“ƒhÆ’EŒÊ·—p) #-------------------------------------------------------------------------- def create_dummy_bitmap @dummy_bitmap = Bitmap.new(32, 32) end #-------------------------------------------------------------------------- # › Æ’_Æ’~[Æ’rÆ’bÆ’gÆ’}Æ’bÆ’v‚̉ð•ú (Æ’EÆ’Bƒ“ƒhÆ’EŒÊ·—p) #-------------------------------------------------------------------------- def dispose_dummy_bitmap @dummy_bitmap.dispose end #-------------------------------------------------------------------------- # › Æ’EÆ’Bƒ“ƒhÆ’E“à —e‚̎擾 (Æ’EÆ’Bƒ“ƒhÆ’EŒÊ·—p) #-------------------------------------------------------------------------- def contents @dummy_bitmap end #-------------------------------------------------------------------------- # › Æ’J[Æ’\ƒ‹‚Ì‹éŒ` (Æ’EÆ’Bƒ“ƒhÆ’EŒÊ·—p) #-------------------------------------------------------------------------- def cursor_rect Rect.new(self.x, self.y, self.width, self.height) end #-------------------------------------------------------------------------- # › Æ’XÆ’NÆ’[ƒ‹—p–îˆó‚̉Ž‹ó‘Ô (Æ’EÆ’Bƒ“ƒhÆ’EŒÊ·—p) #-------------------------------------------------------------------------- def arrows_visible return true end #-------------------------------------------------------------------------- # › Æ’XÆ’NÆ’[ƒ‹—p–îˆó‚̉Ž‹ó‘Ô‚Ì•ÃX (Æ’EÆ’Bƒ“ƒhÆ’EŒÊ·—p) #-------------------------------------------------------------------------- def arrows_visible=(arrows_visible) end #-------------------------------------------------------------------------- # › Æ’|[Æ’Y‚̉Ž‹ó‘Ô (Æ’EÆ’Bƒ“ƒhÆ’EŒÊ·—p) #-------------------------------------------------------------------------- def pause return false end #-------------------------------------------------------------------------- # › Æ’|[Æ’Y‚̉Ž‹ó‘Ô‚Ì•ÃX (Æ’EÆ’Bƒ“ƒhÆ’EŒÊ·—p) #-------------------------------------------------------------------------- def pause=(pause) end end #****************************************************************************** # Â¥ ‰ñ“]Æ’AÆ’CÆ’Rƒ“ƒRÆ’}ƒ“ƒh•†#****************************************************************************** #============================================================================== # ¡ Sprite_ZiifRollIconCommand #------------------------------------------------------------------------------ # @‰ñ“]Æ’RÆ’}ƒ“ƒhÆ’AÆ’CÆ’Rƒ“•\ަ—p‚̃XÆ’vƒ‰ƒCÆ’g‚Å‚·B #============================================================================== class Sprite_ZiifRollIconCommand < Sprite_ZiifCommandSprite #-------------------------------------------------------------------------- # Å“ ‰ð•ú #-------------------------------------------------------------------------- def dispose self.bitmap.dispose super end #-------------------------------------------------------------------------- # Å“ Æ’rÆ’bÆ’gÆ’}Æ’bÆ’v‚Ìì¬ #-------------------------------------------------------------------------- def create_bitmap self.bitmap = Bitmap.new(24, 24) self.ox = self.bitmap.width / 2 self.oy = self.bitmap.height / 2 end #-------------------------------------------------------------------------- # Å“ Æ’AÆ’CÆ’Rƒ“â€Ã”†‚̎擾 #-------------------------------------------------------------------------- def icon_index ZiifManager.command_icon_index(command_set.command(self.index)) end #-------------------------------------------------------------------------- # Å“ Æ’AÆ’CÆ’Rƒ“â€Ã”†‚̎擾 #-------------------------------------------------------------------------- def enabled command_set.command_enabled?(self.index) end #-------------------------------------------------------------------------- # Å“ â€Â¼â€œÂ§â€“¾•`‰æ—p‚̃Aƒ‹ƒtÆ’@’l‚ðŽæ“¾ #-------------------------------------------------------------------------- def translucent_alpha return 160 end #-------------------------------------------------------------------------- # Å“ “à —e‚Ìì¬ #-------------------------------------------------------------------------- def create_contents draw_icon end #-------------------------------------------------------------------------- # Å“ Æ’AÆ’CÆ’Rƒ“‚ð•`‰æ #-------------------------------------------------------------------------- def draw_icon bitmap = Cache.system("Iconset") icon_index = self.icon_index rect = Rect.new(icon_index % 16 * 24, icon_index / 16 * 24, 24, 24) self.bitmap.blt(0, 0, bitmap, rect, enabled ? 255 : translucent_alpha) end #-------------------------------------------------------------------------- # Å“ “à —e‚ÌÃÅ“ #-------------------------------------------------------------------------- def clear_contents self.bitmap.clear end #-------------------------------------------------------------------------- # Å“ ˆÊ’uî•ñ‚ÌXV #-------------------------------------------------------------------------- def update_position super update_roll end #-------------------------------------------------------------------------- # Å“ ‰ñ“]•‚̎擾 #-------------------------------------------------------------------------- def roll_width command_set.width * command_set.openness / 510 end #-------------------------------------------------------------------------- # Å“ ‰ñ“]‚‚³‚̎擾 #-------------------------------------------------------------------------- def roll_height command_set.height * command_set.openness / 510 end #-------------------------------------------------------------------------- # Å“ ‰ñ“]Å p“x‚̎擾 #-------------------------------------------------------------------------- def roll_angle angle = (self.index - command_set.index) * command_set.move_size angle += command_set.roll_angle end #-------------------------------------------------------------------------- # Å“ ‰ñ“]ˆÊ’u‚ÌXV #-------------------------------------------------------------------------- def update_roll angle = roll_angle self.x = roll_width * Math.sin(angle) + command_set.x self.y = roll_height * (-Math.cos(angle)) + command_set.y self.z = command_set.z end end #============================================================================== # ¡ Sprite_ZiifRollIconBackground #------------------------------------------------------------------------------ # @‰æ‘œƒRÆ’}ƒ“ƒhâ€wÅ’i‚̃XÆ’vƒ‰ƒCÆ’g‚Å‚·B #============================================================================== class Sprite_ZiifRollIconBackground < Sprite_ZiifCommandSprite #-------------------------------------------------------------------------- # Å“ ‰ð•ú #-------------------------------------------------------------------------- def dispose self.bitmap.dispose if command_set.background_filename.empty? super end #-------------------------------------------------------------------------- # Å“ Æ’rÆ’bÆ’gÆ’}Æ’bÆ’v‚Ìì¬ #-------------------------------------------------------------------------- def create_bitmap self.bitmap = Cache.system(command_set.background_filename) self.ox = self.bitmap.width / 2 self.oy = self.bitmap.height / 2 end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚Ì“§–¾“x‚̎擾 #-------------------------------------------------------------------------- def command_set_opacity opacity = command_set.opacity opacity *= command_set.back_opacity opacity *= command_set.openness opacity /= 65025 end #-------------------------------------------------------------------------- # Å“ ˆÊ’uî•ñ‚ÌXV #-------------------------------------------------------------------------- def update_position super self.x = command_set.x self.y = command_set.y self.z = command_set.z - 10 end end #============================================================================== # ¡ Sprite_ZiifRollIconCursor #------------------------------------------------------------------------------ # @‰æ‘œƒRÆ’}ƒ“ƒhÆ’J[Æ’\ƒ‹‚̃XÆ’vƒ‰ƒCÆ’g‚Å‚·B #============================================================================== class Sprite_ZiifRollIconCursor < Sprite_ZiifCommandSprite #-------------------------------------------------------------------------- # Å“ ‰ð•ú #-------------------------------------------------------------------------- def dispose self.bitmap.dispose if command_set.cursor_filename.empty? super end #-------------------------------------------------------------------------- # Å“ Æ’rÆ’bÆ’gÆ’}Æ’bÆ’v‚Ìì¬ #-------------------------------------------------------------------------- def create_bitmap self.bitmap = Cache.system(command_set.cursor_filename) self.ox = self.bitmap.width / 2 self.oy = self.bitmap.height / 2 @effect_count = 0 end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚Ì“§–¾“x‚̎擾 #-------------------------------------------------------------------------- def command_set_opacity if @effect_count < 32 value = 176 + @effect_count * 4 else value = 432 - @effect_count * 4 end return (value * command_set.contents_opacity / 255) end #-------------------------------------------------------------------------- # Å“ Æ’tÆ’Å’[ƒ€XV #-------------------------------------------------------------------------- def update super update_effect end #-------------------------------------------------------------------------- # Å“ ‰‰oŒø‰Ê‚ÌXV #-------------------------------------------------------------------------- def update_effect self.opacity = command_set_opacity @effect_count = 0 if @effect_count == 64 @effect_count += 1 end #-------------------------------------------------------------------------- # Å“ ‰ñ“]•‚̎擾 #-------------------------------------------------------------------------- def roll_width return 0 end #-------------------------------------------------------------------------- # Å“ ‰ñ“]‚‚³‚̎擾 #-------------------------------------------------------------------------- def roll_height (- command_set.height * command_set.openness / 510) end #-------------------------------------------------------------------------- # Å“ ˆÊ’uî•ñ‚ÌXV #-------------------------------------------------------------------------- def update_position super self.x = command_set.x + roll_width self.y = command_set.y + roll_height self.z = command_set.z - 5 end end #============================================================================== # ¡ Window_ZiifRollIconCommandName #------------------------------------------------------------------------------ # @‰ñ“]Æ’AÆ’CÆ’Rƒ“ƒRÆ’}ƒ“ƒh‚Ì‘I‘ðƒRÆ’}ƒ“ƒh–¼‚ð•\ަ‚·‚éƒEÆ’Bƒ“ƒhÆ’E‚Å‚·B #============================================================================== class Window_ZiifRollIconCommandName < Window_Base #-------------------------------------------------------------------------- # Å“ Æ’IÆ’uÆ’WÆ’FÆ’NÆ’g‰Šú‰» #-------------------------------------------------------------------------- def initialize(command_set) super(0, 0, command_set.width, fitting_height(1)) @command_set = command_set self.opacity = 0 end #-------------------------------------------------------------------------- # Å“ Æ’XÆ’vƒ‰ƒCÆ’gÆ’RÆ’}ƒ“ƒh‚̎擾 #-------------------------------------------------------------------------- def command_set return @command_set end #-------------------------------------------------------------------------- # Å“ XÀ•W‚̎擾 #-------------------------------------------------------------------------- def window_x (command_set.x - self.width / 2) end #-------------------------------------------------------------------------- # Å“ YÀ•W‚̎擾 #-------------------------------------------------------------------------- def window_y (command_set.y - self.height / 2) end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚̃rƒ…[Æ’|[Æ’g‚̎擾 #-------------------------------------------------------------------------- def command_set_viewport return command_set.viewport end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚̉Ž‹ó‘Ԃ̎擾 #-------------------------------------------------------------------------- def command_set_visible return command_set.visible && command_set.open? end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚Ì“§–¾“x‚̎擾 #-------------------------------------------------------------------------- def command_set_opacity return command_set.contents_opacity end #-------------------------------------------------------------------------- # Å“ ˆÊ’uî•ñ‚ÌXV #-------------------------------------------------------------------------- def update_position set_information update_base_position end #-------------------------------------------------------------------------- # Å“ Šî–{‚̈ʒuî•ñ‚ÌXV #-------------------------------------------------------------------------- def update_base_position self.viewport = command_set_viewport self.visible = command_set_visible self.contents_opacity = command_set_opacity self.x = window_x + command_set.info_window_offset_x self.y = window_y + command_set.info_window_offset_y self.z = command_set.z + 10 end #-------------------------------------------------------------------------- # Å“ •\ަî•ñ‚ÌÃ’è #-------------------------------------------------------------------------- def set_information return if command_set.current_item_name == @name @name = command_set.current_item_name refresh end #-------------------------------------------------------------------------- # Å“ Æ’Å Æ’tÆ’Å’Æ’bÆ’Vƒ… #-------------------------------------------------------------------------- def refresh contents.clear texts = command_set.info_text_separate? ? @name.scan(/\S+/) : [@name] texts.push("") if texts.empty? self.width = texts.collect {|text| text_size(text).width + 8 }.max self.width += standard_padding * 2 self.height = fitting_height(texts.size) create_contents texts.each_with_index do |text, line| draw_text(0, line_height * line, contents.width, line_height, text, 1) end end end #============================================================================== # ¡ ZiifSpriteCommand_RollIcon #------------------------------------------------------------------------------ # @‰ñ“]Æ’AÆ’CÆ’Rƒ“ƒRÆ’}ƒ“ƒh‘I‘ð‚ðs‚¤ƒ‚ƒWƒ…[ƒ‹‚Å‚·BMix-In‚É‚æ‚èŽg—p‚µ‚Ü‚·B #============================================================================== module ZiifSpriteCommand_RollIcon #-------------------------------------------------------------------------- # Å“ Mix-In #-------------------------------------------------------------------------- include ZiifSpriteCommand # ‰æ‘œƒRÆ’}ƒ“ƒh‘I‘ðƒ‚ƒWƒ…[ƒ‹ #-------------------------------------------------------------------------- # Å“ ŒöŠJÆ’Cƒ“ƒXÆ’^ƒ“ƒX•Æ#-------------------------------------------------------------------------- attr_reader :move_size # ˆÚ“®ƒTÆ’CÆ’Y attr_reader :move_speed # ˆÚ“®‘¬“x attr_reader :move_count # ˆÚ“®ƒJÆ’Eƒ“ƒg attr_reader :move_type # ˆÚ“®ƒ^Æ’CÆ’v #-------------------------------------------------------------------------- # Å“ Æ’XÆ’vƒ‰ƒCÆ’gÆ’RÆ’}ƒ“ƒh•Ãâ€â€šÃŒâ€°Å ú‰» #-------------------------------------------------------------------------- def init_sprite_command super @move_size = 0 @move_speed = 64 @move_count = 0 @move_type = nil end #-------------------------------------------------------------------------- # Å“ ‹t‰ñ“]‚Ìâ€Â»â€™Ã¨ #-------------------------------------------------------------------------- def reverse_roll? return $game_system.ziifop_reverse_roll end #-------------------------------------------------------------------------- # Å“ Å p“x‚Ì·‚̎擾 #-------------------------------------------------------------------------- def angle_difference (item_max > 0 ? Math::PI * 2 / item_max : 0) end #-------------------------------------------------------------------------- # Å“ ‰ñ“]‘¬“x‚̎擾 #-------------------------------------------------------------------------- def roll_speed ([64 - item_max * 3, 16].max * correct_roll_speed) end #-------------------------------------------------------------------------- # Å“ ‰ñ“]‘¬“x‚̕Ⳓl‚̎擾 #-------------------------------------------------------------------------- def correct_roll_speed case $game_system.ziifop_roll_speed when 0; return 0.6 # ’x‚¢ when 1; return 0.8 # ‚â‚â’x‚¢ when 2; return 1 # •’Ê when 3; return 1.2 # ‚â‚⑬‚¢ when 4; return 1.4 # ‘¬‚¢ end end #-------------------------------------------------------------------------- # Å“ ‰ñ“]“®ìŽž‚ÌŠp“x‚̎擾 #-------------------------------------------------------------------------- def roll_angle (move? ? move_count * move_speed * correct_roll_angle / 360 : 0) end #-------------------------------------------------------------------------- # Å“ ‰ñ“]•ûŒü‚̕Ⳓl‚̎擾 #-------------------------------------------------------------------------- def correct_roll_angle case @move_type when :right ; return 1 # ‰E‰ñ“] when :left ; return -1 # ¶‰ñ“] else ; return 0 end end #-------------------------------------------------------------------------- # Å“ ‰ñ“]Æ’JÆ’Eƒ“ƒg’l‚ÌÃ’è #-------------------------------------------------------------------------- def roll_count (move_size * 360 / move_speed) end #-------------------------------------------------------------------------- # Å“ â€wÅ’i‰æ‘œ‚̃tÆ’@Æ’Cƒ‹–¼‚ðŽæ“¾ #-------------------------------------------------------------------------- def background_filename return "" end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‰æ‘œ‚̃tÆ’@Æ’Cƒ‹–¼‚ðŽæ“¾ #-------------------------------------------------------------------------- def cursor_filename return "RollIconCursor" end #-------------------------------------------------------------------------- # Å“ î•ñƒEÆ’Bƒ“ƒhÆ’E‚Ì‹óâ€â€™â€¢Â¶Å½Å¡â€šÃ…‚̉üsâ€Â»â€™Ã¨ #-------------------------------------------------------------------------- def info_text_separate? return false end #-------------------------------------------------------------------------- # Å“ î•ñƒEÆ’Bƒ“ƒhÆ’E‚ÌXÀ•W’²® #-------------------------------------------------------------------------- def info_window_offset_x return 0 end #-------------------------------------------------------------------------- # Å“ î•ñƒEÆ’Bƒ“ƒhÆ’E‚ÌYÀ•W’²® #-------------------------------------------------------------------------- def info_window_offset_y return 0 end #-------------------------------------------------------------------------- # Å“ Æ’XÆ’vƒ‰ƒCÆ’gÆ’RÆ’}ƒ“ƒhÆ’Nƒ‰ƒX‚̎擾 #-------------------------------------------------------------------------- def sprite_command_class return Sprite_ZiifRollIconCommand end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhâ€wÅ’iÆ’Nƒ‰ƒX‚̎擾 #-------------------------------------------------------------------------- def sprite_background_class return Sprite_ZiifRollIconBackground end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒhÆ’J[Æ’\ƒ‹ƒNƒ‰ƒX‚̎擾 #-------------------------------------------------------------------------- def sprite_cursor_class return Sprite_ZiifRollIconCursor end #-------------------------------------------------------------------------- # Å“ î•ñƒEÆ’Bƒ“ƒhÆ’EÆ’Nƒ‰ƒX‚̎擾 #-------------------------------------------------------------------------- def info_window_class return Window_ZiifRollIconCommandName end #-------------------------------------------------------------------------- # Å“ Æ’IÆ’uÆ’WÆ’FÆ’NÆ’gÆ’XÆ’vƒ‰ƒCÆ’g‚Ìì¬ #-------------------------------------------------------------------------- def make_object_sprites @object_sprites[:info_window] = info_window_class.new(self) super end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh“à —e‚Ìì¬ #-------------------------------------------------------------------------- def create_contents super set_roll_value end #-------------------------------------------------------------------------- # Å“ ‰ñ“]’l‚ÌÃ’è #-------------------------------------------------------------------------- def set_roll_value @move_size = angle_difference @move_speed = roll_speed end #-------------------------------------------------------------------------- # Å“ “®ì’†‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def move? @move_type end #-------------------------------------------------------------------------- # Å“ ’âŽ~’†‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def stop? !@move_type end #-------------------------------------------------------------------------- # Å“ ˆÊ’uˆÚ“®‚ÌXV #-------------------------------------------------------------------------- def update_move if move? @move_count -= 1 @move_type = nil if @move_count <= 0 update_cursor end end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚ð‰E‚ɉñ“] #-------------------------------------------------------------------------- def roll_right @index = (@index + 1) % item_max @move_type = :right @move_count = roll_count end #-------------------------------------------------------------------------- # Å“ Æ’RÆ’}ƒ“ƒh‚ð¶‚ɉñ“] #-------------------------------------------------------------------------- def roll_left @index = (@index - 1 + item_max) % item_max @move_type = :left @move_count = roll_count end #-------------------------------------------------------------------------- # Å“ ‰ñ“]Æ’L[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def input_roll?(symbol) case $game_system.ziifop_roll_input_type when 0; return Input.press?(symbol) # Æ’vÆ’Å’Æ’X when 1; return Input.trigger?(symbol) # Æ’gÆ’Å Æ’K[ when 2; return Input.repeat?(symbol) # Æ’Å Æ’s[Æ’g else ; return Input.repeat?(symbol) end end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚̈ړ®‘Oˆ— #-------------------------------------------------------------------------- def process_before_cursor_move @cursor_sound_value = false end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚̈ړ®Œãˆ— #-------------------------------------------------------------------------- def process_after_cursor_move Sound.play_cursor if @cursor_sound_value end #-------------------------------------------------------------------------- # Å“ ‰EÆ’L[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def input_right? input_roll?(:RIGHT) end #-------------------------------------------------------------------------- # Å“ ¶ƒL[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚©‚Ç‚¤‚©H #-------------------------------------------------------------------------- def input_left? input_roll?(:LEFT) end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚ð‰E‚Ɉړ® #-------------------------------------------------------------------------- def cursor_right(wrap = false) reverse_roll? ? roll_left : roll_right @cursor_sound_value = true end #-------------------------------------------------------------------------- # Å“ Æ’J[Æ’\ƒ‹‚ð¶‚Ɉړ® #-------------------------------------------------------------------------- def cursor_left(wrap = false) reverse_roll? ? roll_right : roll_left @cursor_sound_value = true end end =begin ************************************************************************ Ÿ ‰ñ“]Ž®ƒoÆ’gƒ‹ƒRÆ’}ƒ“ƒh Ver.1.11 --------------------------------------------------------------------------- Æ’oÆ’gƒ‹ƒRÆ’}ƒ“ƒh‚ð‰ñ“]Ž®ƒAÆ’CÆ’Rƒ“ƒRÆ’}ƒ“ƒh‚É•ÃX‚µ‚Ü‚·B =end # ************************************************************************ #-information------------------------------------------------------------------ $ziifee ||= {} $ziifee[:RollBattleCommand] = true #------------------------------------------------------------------------------ #-memo------------------------------------------------------------------------- # [•K—vÆ’XÆ’NÆ’Å Æ’vÆ’g] # ‰æ‘œƒRÆ’}ƒ“ƒhÆ’XÆ’NÆ’Å Æ’vÆ’g (Ver.1.50ˆÈã) # [•K—v‰æ‘œ] ˆÈ‰º‚̉摜‚ð Graphics/System ‚ɃCƒ“ƒ|[Æ’g‚µ‚¾‚³‚¢B # Æ’oÆ’gƒ‹ƒRÆ’}ƒ“ƒh—pâ€wÅ’i‰æ‘œ ( Æ’tÆ’@Æ’Cƒ‹–¼ : Ring96x88 ) # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # ‚±‚̃XÆ’NÆ’Å Æ’vÆ’g‚ÃA‰æ‘œƒRÆ’}ƒ“ƒhÆ’XÆ’NÆ’Å Æ’vÆ’g‚̉º‚É“ü‚ꂾ‚³‚¢B # Æ’AÆ’CÆ’Rƒ“‚Ì•ÃX‚ÃA‰æ‘œƒRÆ’}ƒ“ƒhÆ’XÆ’NÆ’Å Æ’vÆ’g‚Ì’†‚Ås‚¦‚Ü‚·B #------------------------------------------------------------------------------ module ZiifRollBattleCommand # Â¥ Æ’RÆ’}ƒ“ƒh•\ަŒã‚É•\ަˆÊ’u‚ð’²®‚·‚é ( true / false ) AdjustPartyWindow = true # Æ’p[Æ’eÆ’BÆ’EÆ’Bƒ“ƒhÆ’E AdjustActorWindow = true # Æ’AÆ’NÆ’^[Æ’EÆ’Bƒ“ƒhÆ’E end #****************************************************************************** # Â¥ ‰ñ“]Ž®ƒRÆ’}ƒ“ƒh“±“ü•†#****************************************************************************** class Window_PartyCommand; include ZiifSpriteCommand_RollIcon; end class Window_ActorCommand; include ZiifSpriteCommand_RollIcon; end #****************************************************************************** # Â¥ Æ’Å’Æ’CÆ’AÆ’EÆ’g•†#****************************************************************************** #============================================================================== # ¡ Sprite_ZiifRollIconActorBattleCommand #============================================================================== class Sprite_ZiifRollIconActorBattleCommand < Sprite_ZiifRollIconCommand #-------------------------------------------------------------------------- # Å“ Æ’AÆ’CÆ’Rƒ“â€Ã”†‚̎擾 #-------------------------------------------------------------------------- def icon_index if command_set.command_symbol(self.index) == :attack return command_set.attack_icon_index end return super end end #============================================================================== # ¡ Window_PartyCommand #============================================================================== class Window_PartyCommand #-------------------------------------------------------------------------- # Å“ •‚̎擾 #-------------------------------------------------------------------------- def window_width return 96 end #-------------------------------------------------------------------------- # Å“ ‚‚³‚̎擾 #-------------------------------------------------------------------------- def window_height return 88 end #-------------------------------------------------------------------------- # Å“ â€wÅ’i‰æ‘œ‚̃tÆ’@Æ’Cƒ‹–¼‚ðŽæ“¾ #-------------------------------------------------------------------------- def background_filename return "Ring96x88" end end #============================================================================== # ¡ Window_ActorCommand #============================================================================== class Window_ActorCommand #-------------------------------------------------------------------------- # Å“ •‚̎擾 #-------------------------------------------------------------------------- def window_width return 96 end #-------------------------------------------------------------------------- # Å“ ‚‚³‚̎擾 #-------------------------------------------------------------------------- def window_height return 88 end #-------------------------------------------------------------------------- # Å“ â€wÅ’i‰æ‘œ‚̃tÆ’@Æ’Cƒ‹–¼‚ðŽæ“¾ #-------------------------------------------------------------------------- def background_filename return "Ring96x88" end #-------------------------------------------------------------------------- # Å“ Æ’XÆ’vƒ‰ƒCÆ’gÆ’RÆ’}ƒ“ƒhÆ’Nƒ‰ƒX‚̎擾 #-------------------------------------------------------------------------- def sprite_command_class return Sprite_ZiifRollIconActorBattleCommand end #-------------------------------------------------------------------------- # Å“ UŒ‚ƒAÆ’CÆ’Rƒ“â€Ã”†‚ðŽæ“¾ #-------------------------------------------------------------------------- def attack_icon_index if @actor && !@actor.weapons.compact.empty? return @actor.weapons.compact.first.icon_index end ZiifManager::IconSet[:attack][nil] end end #============================================================================== # ¡ Scene_Battle #============================================================================== class Scene_Battle #-------------------------------------------------------------------------- # Å“ Æ’p[Æ’eÆ’BÆ’RÆ’}ƒ“ƒhÆ’EÆ’Bƒ“ƒhÆ’E‚Ìì¬ #-------------------------------------------------------------------------- alias :ziif_roll_battle_command_create_party_command_window :create_party_command_window def create_party_command_window ziif_roll_battle_command_create_party_command_window if ZiifRollBattleCommand::AdjustPartyWindow @party_command_window.x += 64 @party_command_window.y += 60 end end #-------------------------------------------------------------------------- # Å“ Æ’AÆ’NÆ’^[Æ’RÆ’}ƒ“ƒhÆ’EÆ’Bƒ“ƒhÆ’E‚Ìì¬ #-------------------------------------------------------------------------- alias :ziif_roll_battle_command_create_actor_command_window :create_actor_command_window def create_actor_command_window ziif_roll_battle_command_create_actor_command_window if ZiifRollBattleCommand::AdjustActorWindow @actor_command_window.x += 64 @actor_command_window.y += 60 end end end ***NEW UPDATE I got it to work with my software, here is a screenshot (Note, I made some personal changes so mine will look a bit different) Hello Bigdog! I used your command spin on the hud of moghunter like you did ... But to me the command window of the 'actor 1 is everything to the left side of the screen! Comes to you instead very well, as you have done? Edited November 2, 2013 by Lionheart_84 Share this post Link to post Share on other sites
ShinGamix 101 Posted November 18, 2013 What lines do I use to move the action Icons and graphic around? Share this post Link to post Share on other sites