Incredibly specific issue: I need party members to keep their position in the party when there's less than 4 members

level2janitor

Regular
Regular
Joined
Feb 8, 2018
Messages
62
Reaction score
13
First Language
English
Primarily Uses
RMXP
I use a lot of common events to do things the basic editor isn't capable of, such as equipment that heals its wearer each turn, or use invisible status effects for a sort of blue-magic system where a specific character can learn some enemy spells by being hit by them.

Unfortunately, lots of event functions have no option to target a specific actor, only a specific spot in the party. Like one skill is supposed to make its user attack multiple times in a row, but since the Force Action command only lets you choose which space in the party to give an extra action - not which character - that skill stops working properly as soon as that character isn't in his usual spot.

I'm hoping to have moments where your party splits for story reasons, but anytime there's less than 4 party members, only the first spots from the left are filled in. So someone who's normally associated with spot number 4 can't be there, breaking a bunch of mechanics tied to that character. Is there any way for me to make a character leave their spot in the party empty when they're absent?
 

AkiraKotatsuhime

炬燵姫
Regular
Joined
Jan 2, 2013
Messages
297
Reaction score
207
First Language
DE / ドイツ語
Primarily Uses
N/A
I have the exact opposite in mind that involves a change in what the event-commands are doing.

From what I get, your game has up to or exactly four actors, correct? If not, we can throw the idea below away since you can't go beyond a choice of four in the affected commands.

The following re-define of Interpreter#iterate_battler should make the commands for animations on battle-screen, thrown-in damage-operations aswell as forced actions access the actors-list instead of party-slots, so if everything is going as planned, you can reference actor on ID 001 by choosing slot 1, etc., up to the fourth.

Code:
#==============================================================================
# ** Redirect Party Iteration in Battle Event Commands to Database Order
#------------------------------------------------------------------------------
#  © 2023 KotatsuAkira
#==============================================================================

class Interpreter
  #--------------------------------------------------------------------------
  # * Iterate Battler
  #--------------------------------------------------------------------------
  def iterate_battler(st, si)
    if st == 0
      iterate_enemy(si) {|se| yield se }
    elsif si == -1
      $game_party.actors.each {|sa| yield sa }
    else
      sa = $game_actors[si + 1]
      yield sa if sa
    end
  end
end

~炬燵あ
 

level2janitor

Regular
Regular
Joined
Feb 8, 2018
Messages
62
Reaction score
13
First Language
English
Primarily Uses
RMXP
This works fantastic, thank you so much! I wasn't even sure this would be possible, but this fixes my problem super smoothly.
 

Latest Threads

Latest Posts

Latest Profile Posts

It’s going to take awhile before it goes to dev thread (because my husband wants a lot of design docs and mockups before he starts programming anything) …but I’m going to make a goal of by the end of the month doing something I’ve never done in all my years here…making a prototype thread from my game Three Trees.
Ami
--- HP Cost Skill ---

M.Mage: Charging!

(M.Mage Cast Charging, Restore 25 Stamina With 10 HP Cost)

F.Knight: I'm Powered!
M.Mage: (Bleeding From His Mouth)

(Many Encounters Later...)

F.Knight: M.Mage, Bring Me Your Stamina Magic!
M.Mage: STOP IT ALREADY!
TSR
Capture d’écran, le 2023-09-29 à 21.08.27.png
Last week, I had shown my world map. Today, I show how it look in game :cutesmile:
This is the area near Galileo, on the main continent, where the game begins.
Have a nice day, everyones :D

Forum statistics

Threads
134,970
Messages
1,252,437
Members
177,841
Latest member
MDWARNER
Top