Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Party Control

Sorry to necropost this (Is this even necroposting?), but how can I make it so the actors not in battle do not get EXP?

Also, is there anyway to make this script compatible with Minkoff's Animated Battlers? When I use it with that script, I get an error on this line of A.B.

Code:
      return if @spriteset.battler(actor).moving
 
Fommar if your party has more than 4 members, when you enter a battle the battlers images, and the numbers look all messed up, I implemented this script in a new project and when I had 4 party members, I looked fine but when I added 1 member and fought it looks messed up.
 
Fomar0153;158038 said:
There was an error with the bugfix I've updated it in the post a few up and also I've corrected the script in the original post.

Here's the updated bugfix again though:
Code:
class Game_Actor < Game_Battler
  def exist?
    return super == self.index < $game_party.max_party
  end
end

class Scene_Battle
  
    def set_target_battlers(scope)
    # If battler performing action is enemy
    if @active_battler.is_a?(Game_Enemy)
      # Branch by effect scope
      case scope
      when 1  # single enemy
        index = @active_battler.current_action.target_index
        @target_battlers.push($game_party.smooth_target_actor(index))
      when 2  # all enemies
        for actor in $game_party.actors
          if actor.exist? and actor.index < $game_party.max_party
            @target_battlers.push(actor)
          end
        end
      when 3  # single ally
        index = @active_battler.current_action.target_index
        @target_battlers.push($game_troop.smooth_target_enemy(index))
      when 4  # all allies
        for enemy in $game_troop.enemies
          if enemy.exist?
            @target_battlers.push(enemy)
          end
        end
      when 5  # single ally (HP 0) 
        index = @active_battler.current_action.target_index
        enemy = $game_troop.enemies[index]
        if enemy != nil and enemy.hp0?
          @target_battlers.push(enemy)
        end
      when 6  # all allies (HP 0) 
        for enemy in $game_troop.enemies
          if enemy != nil and enemy.hp0?
            @target_battlers.push(enemy)
          end
        end
      when 7  # user
        @target_battlers.push(@active_battler)
      end
    end
    # If battler performing action is actor
    if @active_battler.is_a?(Game_Actor)
      # Branch by effect scope
      case scope
      when 1  # single enemy
        index = @active_battler.current_action.target_index
        @target_battlers.push($game_troop.smooth_target_enemy(index))
      when 2  # all enemies
        for enemy in $game_troop.enemies
          if enemy.exist?
            @target_battlers.push(enemy)
          end
        end
      when 3  # single ally
        index = @active_battler.current_action.target_index
        @target_battlers.push($game_party.smooth_target_actor(index))
      when 4  # all allies
        for actor in $game_party.actors
          if actor.exist? and actor.index < 4
            @target_battlers.push(actor)
          end
        end
      when 5  # single ally (HP 0) 
        index = @active_battler.current_action.target_index
        actor = $game_party.actors[index]
        if actor != nil and actor.hp0?
          @target_battlers.push(actor)
        end
      when 6  # all allies (HP 0) 
        for actor in $game_party.actors
          if actor != nil and (actor.hp0? and actor.index < 4)
            @target_battlers.push(actor)
          end
        end
      when 7  # user
        @target_battlers.push(@active_battler)
      end
    end
  end
  
end
class Window_BattleStatus < Window_Base
  
  def initialize
    super(0, 320, 640, 160)
    self.contents = Bitmap.new(width - 32, height - 32)
    unless $game_party.actors.size > $game_party.max_party
      @level_up_flags = [false, false, false, false]
    else
      @level_up_flags = []
      for i in 0...$game_party.placement_correctment
        @level_up_flags.push(false)
      end
    end
    refresh
  end
end
My mistake was thinking this was my party changing script so I put 4 instead of $game_party.max_party in a few places.

Where do i put this script?
 
Hm... I put it in there as I was supposed to, but I have an issue here. On the menu, it doesn't show the Party members stats or images. When I try selecting one, it always selects the first one... What should I do?
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top