Tsukihime 1,489 Posted October 30, 2012 (edited) Rotate Formation -Tsukihime Rotate the formation of your battle members one position to the left on the map. Download Script: Download here Usage Press "A" and "S" to rotate members left or right You can configure this keys in the script Suppose you had 3 actors in your party [A, B, C]When you press A, the formation will rotate left by one position, resulting in [B, C, A] This only applies to battle members so if you only had 4 battle members, but 6 actors in your party, the last 2 would not move [A, B, C, D, E, F] ==> [B, C, D, A, E, F] Screenshots Press rotate key. Notice my formation changed: Edited July 17, 2017 by Tsukihime 3 Share this post Link to post Share on other sites
Cal Avera 3 Posted October 30, 2012 I really liked it, thanks for the script One question: it's possible to have 2 keys for the rotation? I mean, one key for rotate to the right, and one for the left. Share this post Link to post Share on other sites
Tsukihime 1,489 Posted October 30, 2012 I've changed it to use a left and right key for rotating. Seems better than using the same key and specifying the direction. Share this post Link to post Share on other sites
JANK 12 Posted October 30, 2012 Too cool for school! Tsukihime for president. Share this post Link to post Share on other sites
Sana 6 Posted October 31, 2012 Lol, this reminds me of Breath of Fire III, great script Tsuki~ Share this post Link to post Share on other sites
Sly 10 Posted November 2, 2012 So I guess you won't be giving Tomoaky credit for this one http://hikimoki.sakura.ne.jp/rgss3/script_map.html'>http://hikimoki.sakura.ne.jp/rgss3/script_map.html Even though he scripted this function over 10 months ago.. #============================================================================== # ★ RGSS3_マップã§ä¸¦ã³é †å¤‰æ›´ Ver1.01 #============================================================================== =begin 作者:tomoaky webサイト:ã²ãも記 (http://hikimoki.sakura.ne.jp/) マップシーンã§ã‚‚Lã¨ï¼²ãƒœã‚¿ãƒ³ï¼ˆåˆæœŸè¨å®šã§ã¯ Q 㨠W)ã§ä¸¦ã³é †ãŒ 変更ã§ãるよã†ã«ãªã‚Šã¾ã™ã€‚ ï¼¸ãƒœã‚¿ãƒ³ï¼ˆåˆæœŸè¨å®šã§ã¯ A)を押ã—ãŸã¨ãã«å…ˆé ã«ã„るアクターã«ã‚ˆã£ã¦ ç•°ãªã‚‹ã‚³ãƒ¢ãƒ³ã‚¤ãƒ™ãƒ³ãƒˆã‚’実行ã§ãã‚‹ãŠã¾ã‘機能ãŒã¤ã„ã¦ã„ã¾ã™ã€‚ 使用ã™ã‚‹ã‚²ãƒ¼ãƒ スイッãƒï¼ˆåˆæœŸè¨å®šï¼‰ 0006 2011.12.16 Ver1.01 ・移動ä¸ã«ã‚³ãƒ¢ãƒ³ã‚¤ãƒ™ãƒ³ãƒˆã‚’呼ã³å‡ºã™ã“ã¨ã§æŽ¥è§¦ã‚¤ãƒ™ãƒ³ãƒˆã‚’  無視ã™ã‚‹ã“ã¨ãŒã§ãã¦ã—ã¾ã†ä¸å…·åˆã‚’ä¿®æ£ 2011.12.15 Ver1.0 公開 =end #============================================================================== # â–¡ è¨å®šé …ç›® #============================================================================== module TMPTSRT # ã“ã®ç•ªå·ã®ã‚¹ã‚¤ãƒƒãƒãŒã‚ªãƒ³ã®ã¨ãã¯ãƒãƒˆãƒ«ãƒ¡ãƒ³ãƒãƒ¼ã®ã¿ã§ä¸¦ã³æ›¿ãˆã‚’ã™ã‚‹ SW_BATTLE_MEMBER = 4961 # アクターã”ã¨ã®ã‚³ãƒ¢ãƒ³ã‚¤ãƒ™ãƒ³ãƒˆè¨å®š # è¨å®šã‚’çœç•¥ã—ãŸã‚¢ã‚¯ã‚¿ãƒ¼ã¯å…±é€šã‚³ãƒ¢ãƒ³ã‚¤ãƒ™ãƒ³ãƒˆã‚’実行ã—ã¾ã™ # ã©ã¡ã‚‰ã‚‚çœç•¥ã•れã¦ã„ã‚‹å ´åˆã¯ä½•も実行ã•れã¾ã›ã‚“ ACTOR_EVENT = [] ACTOR_EVENT[0] = 1 # 共通コモンイベント ACTOR_EVENT[1] = 2 # 1番ã®ã‚¢ã‚¯ã‚¿ãƒ¼ãŒå…ˆé ã®ã¨ãã«å®Ÿè¡Œã™ã‚‹ã‚¤ãƒ™ãƒ³ãƒˆ end #============================================================================== # â– Game_Party #============================================================================== class Game_Party #-------------------------------------------------------------------------- # â—‹ メンãƒãƒ¼ã®ä¸¦ã³é †å¤‰æ›´ #-------------------------------------------------------------------------- def change_member_top(flag) return if members.size == 0 if $game_switches[TMPTSRT::SW_BATTLE_MEMBER] if flag @actors.unshift(@actors.delete_at(battle_members.size - 1)) else @actors.insert(battle_members.size - 1, @actors.shift) end else flag ? @actors.unshift(@actors.pop) : @actors.push(@actors.shift) end $game_player.refresh $game_map.need_refresh = true end end #============================================================================== # â– Scene_Map #============================================================================== class Scene_Map #-------------------------------------------------------------------------- # ◠フレーム更新 #-------------------------------------------------------------------------- alias tmptsrt_scene_map_update update def update tmptsrt_scene_map_update if scene_change_ok? if Input.trigger?(:L) $game_party.change_member_top(true) elsif Input.trigger?(:R) $game_party.change_member_top(false) elsif Input.trigger?(:X) if $game_party.exists && !$game_map.interpreter.running? && !$game_player.moving? id = TMPTSRT::ACTOR_EVENT[$game_party.members[0].id] id ||= TMPTSRT::ACTOR_EVENT[0] $game_temp.reserve_common_event(id) if id end end end end end Share this post Link to post Share on other sites
estriole 326 Posted November 2, 2012 @sly : what do you mean? if you refer why tsukihime write script that someone already script... c'mon... tsuki code is lot shorter than tomiaky. and even not... it's always better to have alternative. if you have incompatibility with other script you could seek another alternative. example: i want to use passive skill script. there a lot of them. from skyval, tsukihime, etc. but there's some compatibility issues. and finally i found neon black's passive skill script is the one that have no incompatibility issues with all my scripts. imagine if he didn't write that script because there already someone who wrote them. i won't have working passive skill in my project . but if you refer to something else... ignore above. 1 Share this post Link to post Share on other sites
Tsukihime 1,489 Posted November 2, 2012 So I guess you won't be giving Tomoaky credit for this one http://hikimoki.sakura.ne.jp/rgss3/script_map.html Even though he scripted this function over 10 months ago.. Credit for something I've never seen before? Probably not. 2 Share this post Link to post Share on other sites
Coolie 148 Posted November 2, 2012 So I guess you won't be giving Tomoaky credit for this one http://hikimoki.saku...script_map.html Even though he scripted this function over 10 months ago.. People are allowed to write different scripts that do the same thing. Share this post Link to post Share on other sites
Sana 6 Posted November 2, 2012 People are allowed to write different scripts that do the same thing. Yup, what Sir Cactuar said lol~ Share this post Link to post Share on other sites
Jinjo 2 Posted November 3, 2012 (edited) Fantastic script. I would like to request that, instead of pressing the A button, there is an event on the map which, when interacted with, changes the party formation. If that is possible then I will be so happy And if you did it like that, where you have to have an event to change formation, then there could be OTHER events that, when pressed, react differently if a certain character is in lead. For example if Actor 1 is in lead, you can press a button, but if Actor 2 is in lead, you can't. So if you're Actor 2 you have to go back to that event that switches the formation in order to change into Actor 1, then walk back over to the button, which you can now press. Do you understand? I will be so excited if this happens! Thanks for the great script already though. Edited November 3, 2012 by Jinjo Share this post Link to post Share on other sites
Tsukihime 1,489 Posted November 3, 2012 Just use script calls in your event $game_party.rotate_formation_left $game_party.rotate_formation_right Share this post Link to post Share on other sites
Jinjo 2 Posted November 4, 2012 (edited) Just use script calls in your event $game_party.rotate_formation_left $game_party.rotate_formation_right Ah brilliant And is it possible to do a conditional branch w/ script call to check which player is in the lead? (That would be AMAZING!) I am so excited by this script + its potential for enhancing games! Great job! You are awesome! Edited November 4, 2012 by Jinjo Share this post Link to post Share on other sites
Tsukihime 1,489 Posted November 4, 2012 (edited) There is a script call in the conditional branch eg: check whether the leader is actor 2 $game_party.leader == $game_actors[2] If you don't like typing all that all the time you can just paste this into your scripts class Game_Interpreter def is_leader?(actor_id) $game_party.leader == $game_actors[actor_id] end end And then in your conditional branch just say is_leader?(2) Edited November 4, 2012 by Tsukihime 2 Share this post Link to post Share on other sites
Jinjo 2 Posted November 4, 2012 There is a script call in the conditional branch eg: check whether the leader is actor 2 $game_party.leader == $game_actors[2] If you don't like typing all that all the time you can just paste this into your scripts class Game_Interpreter def is_leader?(actor_id) $game_party.leader == $game_actors[actor_id] end end And then in your conditional branch just say is_leader?(2) YIPPEE!!! I am so happy right now! This script + the script calls you've given me are fantastic. I can think of so many great uses for them! Thank you so much Tsukihime! Share this post Link to post Share on other sites
Jinjo 2 Posted November 4, 2012 Hello, There is a big problem with your script. It makes it impossible to change player graphic! Share this post Link to post Share on other sites
Coolie 148 Posted November 4, 2012 Hello, There is a big problem with your script. It makes it impossible to change player graphic! I don't have this problem at all. Share this post Link to post Share on other sites
Jinjo 2 Posted November 4, 2012 Hello, There is a big problem with your script. It makes it impossible to change player graphic! I don't have this problem at all. Strange, I do :s I tested it by disabling the script + when I did that, I could change player graphic. Only when I had this script enabled was it impossible! Share this post Link to post Share on other sites
Tsukihime 1,489 Posted November 4, 2012 (edited) Does this happen in a default project? I am not getting the issue either and my project is full of features and effects and yanfly battle engine. Edited November 4, 2012 by Tsukihime Share this post Link to post Share on other sites
Jinjo 2 Posted November 4, 2012 Does this happen in a default project? I am not getting the issue either and my project is full of features and effects and yanfly battle engine. I know nothing about scripting but I wanted to have it so you could only change formation by clicking an event (no keyboard controls). To do that I deleted bits of the script until that became possible. Maybe you could try inserting my copy of the script into your game and seeing if it lets you change player graphic then? =begin #============================================================================== ** Rotate Formation Author: Tsukihime Date: Oct 30, 2012 ------------------------------------------------------------------------------ ** Change log Oct 30, 2012 - changed it to rotate left or rotate right. Just delete what you don't need Oct 29, 2012 - initial release ------------------------------------------------------------------------------ ** Terms of Use * Free to use in commercial/non-commercial projects * No real support. The script is provided as-is * Will do bug fixes, but no compatibility patches * Features may be requested but no guarantees, especially if it is non-trivial * Preserve this header ------------------------------------------------------------------------------ Rotates the formation of your battle members on the map left by 1. Press A to rotate formation. You can configure this button below. You can also configure which direction they rotate #============================================================================== =end $imported = {} if $imported.nil? $imported["Tsuki_RotateFormation"] = true #============================================================================== # ** Configuration #============================================================================= module Tsuki module Rotate_Formation Rotate_L_Button = :X # key to rotate formation Rotate_R_Button = :Y end end #============================================================================== # ** Rest of the script #============================================================================= class Game_Party < Game_Unit def rotate_formation_left j = [@actors.size, max_battle_members].min @actors = @actors[0...j].rotate.concat((@actors[j+1..-1] || [])) $game_player.refresh end def rotate_formation_right j = [@actors.size, max_battle_members].min @actors = @actors[0...j].rotate(-1).concat((@actors[j+1..-1] || [])) $game_player.refresh end end class Scene_Map < Scene_Base alias :th_rot_form_update_scene :update_scene def update_scene th_rot_form_update_scene update_rotate_formation unless scene_changing? end # new def update_rotate_formation $game_party.rotate_formation_left $game_party.rotate_formation_right end end Share this post Link to post Share on other sites
Tsukihime 1,489 Posted November 4, 2012 No issues on my end. Share this post Link to post Share on other sites
Jinjo 2 Posted November 4, 2012 That's very strange. Don't worry about it, I'll keep experimenting my end. I'm sure it must just be something I've done wrong. No worries Tsukihime - this is a fantastic script + I love the way you have such great functionality with only a few lines of code! Share this post Link to post Share on other sites
Mr. Bubble 117 Posted November 5, 2012 So I guess you won't be giving Tomoaky credit for this one http://hikimoki.saku...script_map.html Even though he scripted this function over 10 months ago.. Ironic that you (falsely) claim this is a plagiarized script yet you repost his script on another website without his permission. 3 Share this post Link to post Share on other sites
ShionKreth 0 Posted May 13, 2013 (edited) Tsukihime, would there be a way one could use this script to lock the formation of the party in the field even if it's not the same order used in combat/status screen? *edit* Oh, my apologies, I misunderstood that the script was changing the actual formation rather than just the order they appeared in the field, don't suppose I can use it for what I want. Edited May 13, 2013 by ShionKreth Share this post Link to post Share on other sites