Jump to content


Photo

Rotate Formation


  • Please log in to reply
27 replies to this topic

#1 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 29 October 2012 - 06:29 PM

Rotate Formation
-Tsukihime

Rotate the formation of your battle members one position to the left on the map.

Download

Script: http://db.tt/Guvp3gSd

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

Posted Image

Press rotate key. Notice my formation changed:

Posted Image

Edited by Tsukihime, 03 November 2012 - 06:42 PM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#2 WCouillard

WCouillard

    Sanubian Menace

  • Member
  • 1188 posts
  • RM Skill - Jack of All Trades

Posted 29 October 2012 - 07:18 PM

<3 this.

My Completed Scripts: http://pastebin.com/u/WCouillard

Final Fantasy Discovery: http://www.rpgmaker.net/games/4071/


#3 Cal Avera

Cal Avera

    Advanced Member

  • Member
  • 48 posts
  • RM Skill - Jack of All Trades

Posted 29 October 2012 - 10:18 PM

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.

#4 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 29 October 2012 - 11:02 PM

I've changed it to use a left and right key for rotating. Seems better than using the same key and specifying the direction.
All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#5 JANK

JANK

    Music Composer

  • Member
  • 108 posts
  • RM Skill - Musician

Posted 30 October 2012 - 12:28 AM

Too cool for school! Tsukihime for president.
Current project: The Last Werewolf, inspired by the Breath of Fire series: http://www.rpgmakerv...1306#entry71306
My music page: http://www.rpgmakerv...s-music-studio/

#6 Sana

Sana

    Knight of Hope

  • Member
  • 118 posts
  • LocationVanadux
  • RM Skill - Designer

Posted 30 October 2012 - 08:04 PM

Lol, this reminds me of Breath of Fire III, great script Tsuki~ :)
Spoiler

#7 Sly

Sly

    Advanced Member

  • Member
  • 128 posts
  • LocationChicago
  • RM Skill - Writer

Posted 01 November 2012 - 08:06 PM

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..

#==============================================================================
# ★ RGSS3_マップで並び順変更 Ver1.01
#==============================================================================
=begin

作者:tomoaky
webサイト:ひきも記 (http://hikimoki.sakura.ne.jp/)

マップシーンでもLとRボタン(初期設定では Q と W)で並び順が
変更できるようになります。

Xボタン(初期設定では 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

#8 estriole

estriole

    Advanced Member

  • Member
  • 1999 posts
  • LocationIndonesia
  • RM Skill - Coder

Posted 01 November 2012 - 09:17 PM

@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 :P.

but if you refer to something else... ignore above.

#9 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 01 November 2012 - 09:39 PM

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..


Credit for something I've never seen before? Probably not.
All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#10 WCouillard

WCouillard

    Sanubian Menace

  • Member
  • 1188 posts
  • RM Skill - Jack of All Trades

Posted 02 November 2012 - 05:52 AM

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.

My Completed Scripts: http://pastebin.com/u/WCouillard

Final Fantasy Discovery: http://www.rpgmaker.net/games/4071/


#11 Sana

Sana

    Knight of Hope

  • Member
  • 118 posts
  • LocationVanadux
  • RM Skill - Designer

Posted 02 November 2012 - 06:06 AM

People are allowed to write different scripts that do the same thing.

Yup, what Sir Cactuar said lol~
Spoiler

#12 Jinjo

Jinjo

    Member

  • Member
  • 29 posts
  • RM Skill - Musician

Posted 03 November 2012 - 05:50 PM

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 :D

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 by Jinjo, 03 November 2012 - 05:53 PM.


#13 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 03 November 2012 - 05:54 PM

Just use script calls in your event

$game_party.rotate_formation_left
$game_party.rotate_formation_right

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#14 Jinjo

Jinjo

    Member

  • Member
  • 29 posts
  • RM Skill - Musician

Posted 03 November 2012 - 06:00 PM

Just use script calls in your event

$game_party.rotate_formation_left
$game_party.rotate_formation_right


Ah brilliant :D

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 by Jinjo, 03 November 2012 - 06:02 PM.


#15 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 03 November 2012 - 06:10 PM

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 by Tsukihime, 03 November 2012 - 06:10 PM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?

#16 Jinjo

Jinjo

    Member

  • Member
  • 29 posts
  • RM Skill - Musician

Posted 03 November 2012 - 06:18 PM

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!

#17 Jinjo

Jinjo

    Member

  • Member
  • 29 posts
  • RM Skill - Musician

Posted 04 November 2012 - 11:37 AM

Hello,

There is a big problem with your script. It makes it impossible to change player graphic!

#18 WCouillard

WCouillard

    Sanubian Menace

  • Member
  • 1188 posts
  • RM Skill - Jack of All Trades

Posted 04 November 2012 - 11:54 AM

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.

My Completed Scripts: http://pastebin.com/u/WCouillard

Final Fantasy Discovery: http://www.rpgmaker.net/games/4071/


#19 Jinjo

Jinjo

    Member

  • Member
  • 29 posts
  • RM Skill - Musician

Posted 04 November 2012 - 12:13 PM


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!

#20 Tsukihime

Tsukihime

    Advanced Member

  • Member
  • 7120 posts
  • LocationToronto
  • RM Skill - Coder

Awards Bar:

Users Awards

Posted 04 November 2012 - 01:36 PM

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 by Tsukihime, 04 November 2012 - 01:38 PM.

All of my work can be found on my website:

banner200x40.png

You can follow me on any of these platforms:

logo_facebook40x40.pnglogo_twitter40x40.pnglogo_youtube40x40.pnglogo_patreon40x40.pnglogo_instagram40x40.png

Go here for Bugs and Requests.
 
Want to become a beta tester for my plugins before they are released to the public?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users