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

level2janitor

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

炬燵姫
Veteran
Joined
Jan 2, 2013
Messages
285
Reaction score
200
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

Veteran
Veteran
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 Profile Posts

Next Up. The 2nd floor of the Western Academy!

Base:
Map012.png

With a little parallax magic *:



WestAcademyFl2.png


Anything you'd add?
BUwvmx.png


Introducing a new and exciting challenge mode!! Is our demo too easy? Did you get a rare pull and want to show off on stream? Please talk to the mysterious 2nd announcer who has 6 additional challenges PER ROUND! As a game developer, I struggled to complete some of the stage 2 challenges, so I hope you tactics fans have a blast!
AeroPergold wrote on Woratana's profile.
You gucci, Woratana?
so wild I came across a video about side-scrollers for RPG Maker and my game was used as an example in the video. I really felt honored to be honest.
hi all. Is this video working for you? It's published on YT but i've had people say they can't view it?!

Forum statistics

Threads
131,638
Messages
1,221,818
Members
173,384
Latest member
dreamless
Top