How to access the formation index

● ARCHIVED · READ-ONLY
Started by Manofdusk 3 posts View original ↗
  1.  I've been considering creating a base template (essentially a non-compiled game file) that contains a tactical movement system and then share it with the community.

     I checked earlier and nothing exists like what I want and I've been working through how to get it to work. I THINK I can get it to work using mostly Common Events (I certainly hope so).

     However, I've run into one major snag. I was planning on having 50 variables (the template will support up to 50 characters in the party at once). Each variable represents a slot in the formation screen. The number of the variable itself represents the actual actor.

     So, when the Character Formation Initialization event is run, it checks which actor is in each place in the formation and sets each variable to the appropriate actor ID.

    You would have 1 event set up for each squad. The graphic for each event would be set by which actor is in the 4, 8, 16, ect. formation variable. I do plan on making a 5 person formation variable (so that it's compatible with 5 person parties).

     Set up 30 Switches (where each switch determines which unit's turn it is (20 switches are for enemy units))... the first 10 switches determine which "turn" it is and 30 variables are used along with a parallax event to record the location of each "Unit" in variables (so you can teleport to the right place when the turns come.

    -----------------------------------------------------------------------------------------------

     I think I may be getting off track. What I need is to figure out how the game stores the information that lets the game determine which place a character is in the party at any given time (as the player's formation is what is used to determine which characters are in which unit). It also allows me to create a Common event that allows me to put the characters back in the party in the proper order once the tactical battle is finished.

     The only thing I could find in the scripts was in Window_MenuStatus

    #--------------------------------------------------------------------------
      # * Set Pending Position (for Formation)
      #--------------------------------------------------------------------------
      def pending_index=(index)
        last_pending_index = @pending_index
        @pending_index = index
        redraw_item(@pending_index)
        redraw_item(last_pending_index)
      end

     Any ideas?
  2. $game_party.members[x], but not sure if it starts with 1 or 0...
  3. I'm guessing that I'll need to use the script function to set the variables correctly.

    now:

    $game_party.members[x]

    does the x represent the location of the member in the formation or the actor itself?

      if it represents the location of the member in the party, how does it know which actor it is?

    ---------------------------

     hmmm

    if $game_party.members[x] == $game_actors[y];

      $game_variables[x] = z;

     else;

     end;

     is that something close?

     I don't actually have any experience with Ruby so I'm not 100% sure on the scripting syntax