Yesterday, 03:03 AM
PATCH RELEASE
(Fukuyama Train Actor Add/Remove Actor patch)
This patch fixes an issue when using the "Change Party Member" event command to either add or remove party members, the issue of the equipped items not appearing when the actor is added or not removing the actor when needed.
Code:
#==============================================================================
# ** Add/Remove actor patch for Ah-sung's Paperdoll (Fukuyama Train Actor)
#------------------------------------------------------------------------------
# version 1.0
# by DerVVulfman
# 01-19-2026 (MM-DD-YYYY)
# RGSS / RPGMaker XP
#==============================================================================
#
# INTRODUCTION:
# =============
#
# Fukuyama's classic "Train Actor" party-following-caterpillar script is
# able to show the remaining party members follow the party leader in a
# straight line. While Ah-sung's paperdoll works well in applying extra
# graphics upon the additional actors, adding a new actor to the party
# resulted in the new member not being visible equipped.
#
# Essentially, actors added to the party appeared virtually naked on the
# field map until the actual field map's sprite system reset. And the
# use of a simple $game_map.need_refresh did absolutly nothing.
#
# This patch takes care of this issue.
#
#
#------------------------------------------------------------------------------
#
# INSTALLATION:
# -------------
#
# Must be placed below both Fukuyama's Train Actor script and Ah-sung.
#
# No further instructions required. ^_^
#
#
#------------------------------------------------------------------------------
#
# REQUIREMENTS:
# -------------
#
# * RPGMaker XP
# * Fukuyama's Train Actor
# * Ah-sung's Paperdoll version 1.2
#
# Further updates to Ah-sung's Paperdoll may make this patch obsolete.
#
#------------------------------------------------------------------------------
#
# COMPATABILITY AND CONFLICTS:
# ----------------------------
#
# This only default method altered by this patch is Interpreter's command_129
# or 'Change Party Member' method. This done by using the alias technique to
# add new content without rewriting the method itself. From there, the code
# will branch to methods to trigger Fukuyama's system to redraw the party, or
# to remove an actor's sprite from within the Spriteset_Mao's class itself.
#
#
#------------------------------------------------------------------------------
#
# CREDITS AND THANKS:
# -------------------
#
# Thanks to unassuming local pigeon in the Save-Point discord for relaying
# the issue.
#
#
#------------------------------------------------------------------------------
#
# TERMS AND CONDITIONS:
# ---------------------
#
# Free to use, even in commercial projects. Just note that I need some form
# of due credit... and that for unassuming local pigeon.
#
#==============================================================================
#==============================================================================
# ** Spriteset_Map
#------------------------------------------------------------------------------
# This class brings together map screen sprites, tilemaps, etc.
# It's used within the Scene_Map class.
#==============================================================================
class Spriteset_Map
#--------------------------------------------------------------------------
# * Reset Character Sprites Flag
#--------------------------------------------------------------------------
def reset_train_cs_flag
#
# Trigger restart of the setup_actor_character_sprites method
@setup_actor_character_sprites_flag = nil
#
end
#--------------------------------------------------------------------------
# * Remove Character Sprite by actor ID
#--------------------------------------------------------------------------
def train_cs_removal(actor_id)
#
new_set = [] # Create a temporary array
#
for char in @character_sprites # Cycle through all map sprites
#
data = char.character # Obtain character data from sprite
#
if data.is_a?(Game_Party_Actor) # IF... it is a TRAIN actor sprite
if data.actor.id != actor_id # ... and if not the one to delete
new_set.push(char) # ... push it in the new temp array
end
else # IF ... its not a TRAIN actor
new_set.push(char) # ... push it in the new temp array
end
# # >> The temp array is everything
end # >> BUT the 'now excluded' actor
#
@character_sprites = new_set # Replace sprites (actor removed)
$game_map.need_refresh = true # Refresh the game map (to be sure)
#
end
end
#==============================================================================
# ** Interpreter
#------------------------------------------------------------------------------
# This interpreter runs event commands. This class is used within the
# Game_System class and the Game_Event class.
#==============================================================================
class Interpreter
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias derv_paper_train_129 command_129 # Rename past version of command_129
#--------------------------------------------------------------------------
# * Change Party Member
#--------------------------------------------------------------------------
def Interpreter
#
reset_train_cs_flag # Run the new sprite reset code
effective = derv_paper_train_129 # Perform the original method
train_cs_removal # Run the new sprite removal code
return effective # Exit method with effective flag
#
end
#--------------------------------------------------------------------------
# * Reset Character Sprites Flag in the the field map
#--------------------------------------------------------------------------
def reset_train_cs_flag
#
return unless $scene.is_a?(Scene_Map) # Exit if not in the field map
return if @parameters[1] != 0 # Function only if adding an actor
$scene.reset_train_cs_flag # Use Scene_Map's reset command
#
end
#--------------------------------------------------------------------------
# * Remove Character Sprite by actor ID on the field map
#--------------------------------------------------------------------------
def train_cs_removal
#
return unless $scene.is_a?(Scene_Map) # Exit if not in the field map
return if @parameters[1] == 0 # Function only if removing an actor
actor_id = @parameters[0] # Obtain the actor ID
$scene.train_cs_removal(actor_id) # Use Scene_Map's remove command
#
end
end
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
# This class performs map screen processing.
#==============================================================================
class Scene_Map
#--------------------------------------------------------------------------
# * Reset Character Sprites Flag in the spriteset
#--------------------------------------------------------------------------
def reset_train_cs_flag
#
@spriteset.reset_train_cs_flag # Reset the flag in Spriteset_Map
#
end
#--------------------------------------------------------------------------
# * Remove Character Sprite by actor ID from the spriteset
#--------------------------------------------------------------------------
def train_cs_removal(actor_id)
#
@spriteset.train_cs_removal(actor_id) # Remove from Spriteset_Map by ID
#
end
end
![[Image: QrnbKlx.jpg]](https://i.imgur.com/QrnbKlx.jpg)
![[Image: sGz1ErF.png]](https://i.imgur.com/sGz1ErF.png)
![[Image: liM4ikn.png]](https://i.imgur.com/liM4ikn.png)
![[Image: fdzKgZA.png]](https://i.imgur.com/fdzKgZA.png)
![[Image: sj0H81z.png]](https://i.imgur.com/sj0H81z.png)
![[Image: QL7oRau.png]](https://i.imgur.com/QL7oRau.png)
![[Image: uSqjY09.png]](https://i.imgur.com/uSqjY09.png)
![[Image: GAA3qE9.png]](https://i.imgur.com/GAA3qE9.png)
![[Image: 2Hmnx1G.png]](https://i.imgur.com/2Hmnx1G.png)
![[Image: BwtNdKw.png%5B]](https://i.imgur.com/BwtNdKw.png%5B)