Guest Access
Go to page : 1, 2, 3, 4, 5
Administrator
Administrator

Administrator
profile
@DontSay - I can not tell you how pleased I am as well... :face:
Hackel literally blessed the script with his magic touch
This definitely opens the doors for XAS...
now we need a "Caterpillar" script that works perfectly.
Somewhere in our XAS research we may be able to have
multiple character combos! can you imagine!!! ^,^
enjoy
G@MeF@Ce
![]() | ![]() | |
![]() | ||
![]() | ![]() |

profile

Hackel literally blessed the script with his magic touch

This definitely opens the doors for XAS...
now we need a "Caterpillar" script that works perfectly.
Somewhere in our XAS research we may be able to have
multiple character combos! can you imagine!!! ^,^
enjoy
Administrator
Show Signature
ACTIVATED
ACTIVATED

ACTIVATED
profile
I have got a "Caterpillar" script, that worked very well with the XAS up to the point where you are going diagonal. When you do that, the person that follows you, tries to find you and if you are to far away the game crashes with an error... -.-
I will give you my version, maybe someone can fix this and help us all with his wisdom... ^.~
DontSay
![]() | ![]() | |
![]() | ||
![]() | ![]() |

profile

I will give you my version, maybe someone can fix this and help us all with his wisdom... ^.~
- Spoiler:
- Code:
#==============================================================================
# ** Trailing Characters
#==============================================================================
# SephirothSpawn
# Version 1
# 2006-05-24
#------------------------------------------------------------------------------
# * Instructions:
#
# ~ Adding Trailing Character:
# <game_character>.add_trailing_character(<name>, <hue>)
#
# ~ Deleting Trailing Character at a index
# <game_character>.delete_trailing_character(<index>)
#
# ~ Delete Last Trailing Character
# <game_character>.pop_trailing_character
#
# ~ Get Last Trailing Character
# <game_character>.last_trailing_character
#
# ~ Get Number of Trailing Characters
# <game_character>.number_of_trailing_characters
#
# * For Events, Replace <game_character> with
# $game_map.events[<event_id>]
#
# * For Player, Replace <game_character> with
# $game_player
#
# ~ Enable or Disable Caterpillar
# $game_player.enable_caterpillar = True (On) or False (Off)
# $game_player.enable_caterpillar = true WICHTIG!!! BEI GEBRAUCH SO WIEDER ANSTELLEN
#==============================================================================
#------------------------------------------------------------------------------
# * SDK Log script
#------------------------------------------------------------------------------
SDK.log('Trailing Characters', 'SephirothSpawn', 1, '2006-05-24')
#------------------------------------------------------------------------------
# * Begin SDK Enable Test
#------------------------------------------------------------------------------
if SDK.state('Trailing Characters') == true
#==============================================================================
# ** Game_TrailingCharacter
#==============================================================================
class Game_TrailingCharacter < Game_Character
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :trail_number
attr_accessor :character_hue
attr_accessor :character_name
attr_accessor :x, :y, :direction
#--------------------------------------------------------------------------
# * Screen Z
#--------------------------------------------------------------------------
def screen_z(height = 0)
# Get Original Z Value
n = super(height)
# Decrease Z By 1 and return
return n - @trail_number
end
#--------------------------------------------------------------------------
# * Setup Initialization
#--------------------------------------------------------------------------
def setup(parent_character, character_name, character_hue)
# Set X & Y Coordinates
@x, @y = parent_character.x, parent_character.y
@real_x, @real_y = @x * 128, @y * 128
@direction = parent_character.direction
# Sets Character Sprite Information
@character_name = character_name
@character_hue = character_hue
# Turns Through On
@through = true
# If Parent Character is a Trailing Character
if parent_character.is_a?(Game_TrailingCharacter)
# Sets Trailing Number + 1
@trail_number = parent_character.trail_number + 1
else
# Sets 1 to Trailing Number
@trail_number = 1
end
end
#--------------------------------------------------------------------------
# * Delete
#--------------------------------------------------------------------------
def delete
# Return No Trailing Sprite
return if @trailing_character.nil?
# Switch Properties with trailing sprite
@character_name = @trailing_character.character_name
@character_hue = @trailing_character.character_hue
@trail_number = @trailing_character.trail_number
# Delete Trail Sprite
@trailing_character.delete
end
end
#==============================================================================
# ** Game_Character
#==============================================================================
class Game_Character
#--------------------------------------------------------------------------
# * Trailing Character Movements
#--------------------------------------------------------------------------
Trailing_Character_Movements = [[], [], [], [], []]
Trailing_Character_Movements[0][2] = '@trailing_character.move_right'
Trailing_Character_Movements[1][1] =
'@direction == 2 ? @trailing_character.move_right : @trailing_character.move_down'
Trailing_Character_Movements[1][2] =
'@trailing_character.turn_right unless @trailing_character.direction == 6'
Trailing_Character_Movements[1][3] =
'@direction == 8 ? @trailing_character.move_right : @trailing_character.move_up'
Trailing_Character_Movements[2][0] = '@trailing_character.move_down'
Trailing_Character_Movements[2][1] =
'@trailing_character.turn_down unless @trailing_character.direction == 2'
Trailing_Character_Movements[2][3] =
'@trailing_character.turn_up unless @trailing_character.direction == 8'
Trailing_Character_Movements[2][4] = '@trailing_character.move_up'
Trailing_Character_Movements[3][1] =
'@direction == 2 ? @trailing_character.move_left : @trailing_character.move_down'
Trailing_Character_Movements[3][2] =
'@trailing_character.turn_left unless @trailing_character.direction == 4'
Trailing_Character_Movements[3][3] =
'@direction == 8 ? @trailing_character.move_left : @trailing_character.move_up'
Trailing_Character_Movements[4][2] = '@trailing_character.move_left'
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_accessor :trailing_character
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_trailingchara_gmchar_init initialize
alias seph_trailingchara_gmchar_update update
alias seph_trailingchara_gmchar_jump jump
alias seph_trailingchara_gmchar_mt moveto
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Original Initialization
seph_trailingchara_gmchar_init
# Create Nil Trailing Character
@trailing_character = nil
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Original Frame Update
seph_trailingchara_gmchar_update
# If Trailing Sprite Exist
unless @trailing_character.nil?
# Update Trailing Character
@trailing_character.update
# Update Trailing Character Movements
update_trailing_character_movements
end
end
#--------------------------------------------------------------------------
# * Jump
#--------------------------------------------------------------------------
def jump(x_plus, y_plus)
# Original Jump Method
seph_trailingchara_gmchar_jump(x_plus, y_plus)
# Return if No Trailing Character
return if @trailing_character.nil?
# If Jumping
if self.jumping?
x_plus = @x - @trailing_character.x
y_plus = @y - @trailing_character.y
# Jump Trialing Character
@trailing_character.jump(x_plus, y_plus)
end
end
#--------------------------------------------------------------------------
# * Move to Designated Position
#--------------------------------------------------------------------------
def moveto(x, y)
# Original Moveto Method
seph_trailingchara_gmchar_mt(x, y)
# Move Trailing Sprite
unless @trailing_character.nil?
# Move Trailing Character
@trailing_character.moveto(x, y)
end
end
#--------------------------------------------------------------------------
# * Frame Update : Trailing Sprite Movements
#--------------------------------------------------------------------------
def update_trailing_character_movements
# Return if Trailing Character is Moving or Jumping
return if @trailing_character.moving? || @trailing_character.jumping?
# Calculate X & Y Difference
x_diff = @trailing_character.x - @x + 2
y_diff = @trailing_character.y - @y + 2
# Trailing Character Movements
unless Trailing_Character_Movements[x_diff][y_diff].nil?
eval Trailing_Character_Movements[x_diff][y_diff]
end
end
#--------------------------------------------------------------------------
# * Add Trailing Character
#--------------------------------------------------------------------------
def add_trailing_character(name = '', hue = 0)
# Add Trailing Character
if @trailing_character.nil?
@trailing_character = Game_TrailingCharacter.new
@trailing_character.setup(self, name, hue)
# Adds Sprite to Spriteset
if $scene.is_a?(Scene_Map)
$scene.spriteset.add_trailing_character(@trailing_character)
end
# Add Trailing Character to Trailing Sprite
else
@trailing_character.add_trailing_character(name, hue)
end
end
#--------------------------------------------------------------------------
# * Delete Trailing Character
#--------------------------------------------------------------------------
def delete_trailing_character(index = 0)
# Return if No Trailing Character
return if @trailing_character.nil?
# Start Indexing
n = 0
tc = @trailing_character
# Gets Trialing Character Index
while n < index
# Return if No Trailing Character
return if tc.trailing_character.nil?
# Add Index
n += 1
# Get Next Trailing Character
tc = tc.trailing_character
end
# Delete all Trailing Characters
tc.delete
# Pop Last Character
pop_trailing_character
end
#--------------------------------------------------------------------------
# * Pop Trailing Character
#--------------------------------------------------------------------------
def pop_trailing_character
# Return if No Trailing Character
return nil if @trailing_character.nil?
# If Trailing Sprite has a trailing Sprite
if @trailing_character.trailing_character != nil
@trailing_character.pop_trailing_character
# Delete Trailing Character
else
# Remove from Spriteset
$scene.spriteset.pop_trailing_character(@trailing_character)
# Delete Trailing Sprite
@trailing_character = nil
end
end
#--------------------------------------------------------------------------
# * Last Trailing Character
#--------------------------------------------------------------------------
def last_trailing_character
# Return nil if no trailing character
return nil if @trailing_character.nil?
# Fetches Last Character
tc = @trailing_character
until tc.trailing_character.nil?
tc = tc.trailing_character
end
return tc
end
#--------------------------------------------------------------------------
# * Number of Trailing Character
#--------------------------------------------------------------------------
def number_of_trailing_characters
# Returns 0 if no Trailing Character
return 0 if @trailing_character.nil?
# Starts Counter
n = 1
tc = @trailing_character
# Adds to Counter when more Trailing Characters
until tc.trailing_character.nil?
n += 1
tc = tc.trailing_character
end
# Return Counter
return n
end
end
#==============================================================================
# ** Game_Player
#==============================================================================
class Game_Player < Game_Character
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :enable_caterpillar
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_catapillar_gmplyr_init initialize
alias seph_catapillar_gmplyr_refresh refresh
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Original Initialization
seph_catapillar_gmplyr_init
# Enables Catapillar
@enable_caterpillar = false
end
#--------------------------------------------------------------------------
# * Enable Caterpiller
#--------------------------------------------------------------------------
def enable_caterpillar=(boolean)
# If Enabling
if boolean
@enable_caterpillar = true
else
# Deletes Party Members
($game_party.actors.size - 1).times do
delete_trailing_character
end
@enable_caterpillar = false
end
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
# Original Refresh
seph_catapillar_gmplyr_refresh
# Delete all Trailing Characters
until number_of_trailing_characters <
(@enable_caterpillar ? $game_party.actors.size : 1)
pop_trailing_character
end
# Return unless Caterpillar Disabled
return unless @enable_caterpillar
# Refreshes Actors
unless @trailing_character.nil?
tc, i = @trailing_character, 0
loop do
i += 1
actor = $game_party.actors[i]
tc.character_name = actor.character_name
tc.character_hue = actor.character_hue
tc.trailing_character.nil? ? break : tc = tc.trailing_character
end
end
# Add Party Characters
for i in (number_of_trailing_characters + 1)...$game_party.actors.size
# Gets Actor
actor = $game_party.actors[i]
# Adds Actor
add_trailing_character(actor.character_name, actor.character_hue)
end
end
#--------------------------------------------------------------------------
# * Pop Trailing Character
#--------------------------------------------------------------------------
def pop_trailing_character
# If Caterpillar Enabled
if @enable_caterpillar
# If No Extra Trailing Characters
return if number_of_trailing_characters < $game_party.actors.size
end
super
end
#--------------------------------------------------------------------------
# * Delete Trailing Character
#--------------------------------------------------------------------------
def delete_trailing_character(index = 0)
# If Caterpillar Enabled
if @enable_caterpillar
# Return if trying to delete a party member
return if (index + 1) < $game_party.actors.size
end
super(index)
end
end
#==============================================================================
# ** Spriteset_Map
#==============================================================================
class Spriteset_Map
#--------------------------------------------------------------------------
# * Alias Listings
#--------------------------------------------------------------------------
alias seph_trailingchara_ssetm_init initialize
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
# Original Initialization
seph_trailingchara_ssetm_init
# Adds Trailing Characters (Player)
unless $game_player.trailing_character.nil?
trailing_character = $game_player.trailing_character
add_trailing_character(trailing_character)
until trailing_character.trailing_character.nil?
trailing_character = trailing_character.trailing_character
add_trailing_character(trailing_character)
end
end
# Adds Trailing Characters (Events)
for event in $game_map.events.values
unless event.trailing_character.nil?
trailing_character = event.trailing_character
add_trailing_character(trailing_character)
until trailing_character.trailing_character.nil?
trailing_character = trailing_character.trailing_character
add_trailing_character(trailing_character)
end
end
end
end
#--------------------------------------------------------------------------
# * Add Trailing Character
#--------------------------------------------------------------------------
def add_trailing_character(character = nil)
# Return if nil Character
return if character.nil?
# Adds Character Sprite
@character_sprites.push(Sprite_Character.new(@viewport1, character))
end
#--------------------------------------------------------------------------
# * Pop Trailing Character
#--------------------------------------------------------------------------
def pop_trailing_character(character)
# Return if nil character
return if character.nil?
# Passes through all Character Sprites
for sprite in @character_sprites
# Pops Sprites Character
if sprite.character == character
# Disposes Sprite
sprite.dispose
# Deletes from Character Sprites
@character_sprites.delete(sprite)
return
end
end
end
end
#==============================================================================
# ** Scene_Map
#==============================================================================
class Scene_Map
attr_accessor :spriteset
end
#------------------------------------------------------------------------------
# * End SDK Enable Test
#------------------------------------------------------------------------------
end
ACTIVATED
Show Signature
ACTIVATED
ACTIVATED

ACTIVATED
profile
I changed Gameface101s and hackels "Change Leader Script" a little bit so it worked for my game... in this version, the weapon is also changed to the new leader... ^^ not only the item and skill...
I also changed the "change actor when dead function" and added the features, the "change leader script" has got... so now when the leader dies, the next leader being changed to, will have the item, skill and weapon equiped... And I changed the last part of it, where the "game over" is being called... with this function, it asks if the XAS Autogameover in the "XAS BATTLER module" is true or false, if false, it asks for the switch that is being used, to create your own gameover for example with an common event.. ^^
I am not that good in scripting, but it worked for my game without any errors.... hope you like it... credits go to gameface101 and hackel... ^^
Here is the script:
Greetz,
DontSay
DontSay
![]() | ![]() | |
![]() | ||
![]() | ![]() |

profile

I also changed the "change actor when dead function" and added the features, the "change leader script" has got... so now when the leader dies, the next leader being changed to, will have the item, skill and weapon equiped... And I changed the last part of it, where the "game over" is being called... with this function, it asks if the XAS Autogameover in the "XAS BATTLER module" is true or false, if false, it asks for the switch that is being used, to create your own gameover for example with an common event.. ^^
I am not that good in scripting, but it worked for my game without any errors.... hope you like it... credits go to gameface101 and hackel... ^^
Here is the script:
- Spoiler:
- Code:
=begin
SWITCH XAS LEADER script V.5
by gameface101
1-3-10
special thanks to Hackel
for help with remember skills and items
*free to use and must give credit
=end
module XAS_GLC
#Variable for the weapon-save, you can change it to a VAR that you don't use. ^^
#In my example it is variable 150
GAME_LEADER_VAR = 150
end
class Game_Temp
attr_accessor :remember_skill
attr_accessor :remember_item
attr_accessor :remember_weapon
alias swap_initialize initialize
def initialize
@remember_skill = []
@remember_item = []
@remember_weapon = []
swap_initialize
end
end
class Scene_Map
alias switch_xas_leader update
def update
switch_xas_leader
if Input.press? (Input::A) and Input.press?(Input::X)
$game_system.se_play(RPG::AudioFile.new("009-System09", 100, 100))
$game_player.animation_id = 220
xas_leader
end
def xas_leader
$game_temp.remember_skill = $game_system.xas_skill_id
$game_temp.remember_item = $game_system.xas_item_id
actor = $game_party.actors[0]
$game_temp.remember_weapon = actor.weapon_id
$game_variables[XAS_GLC::GAME_LEADER_VAR] =$game_temp.remember_weapon
actor.equip(0, 0)
last_act = $game_party.actors.shift
$game_party.add_actor (last_act.id)
$game_player.refresh
unless $game_temp.remember_skill == nil
$game_system.xas_skill_id = $game_temp.remember_skill #to clear equipped skill
else
$game_system.xas_skill_id = 0
end
unless $game_temp.remember_item == nil
$game_system.xas_item_id = $game_temp.remember_item #to clear equipped item
else
$game_system.xas_item_id = 0
end
unless $game_temp.remember_weapon == nil
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor.equip(0, $game_variables[XAS_GLC::GAME_LEADER_VAR])
end
else
actor.equip(0, 0)
end
$scene = Scene_Map.new
end
end
end
class Scene_Map
#-----------------------------------------------------------------------------
# * Alias Listings
#-----------------------------------------------------------------------------
alias_method :swap_dead_leader_scene_map_update, :update
#-----------------------------------------------------------------------------
# * Update
#-----------------------------------------------------------------------------
def update
swap_dead_leader_scene_map_update
unless $game_party.actors.empty?
if ($game_party.actors[0].hp).zero?
unless $game_party.all_dead?
$game_temp.remember_skill = $game_system.xas_skill_id
$game_temp.remember_item = $game_system.xas_item_id
actor = $game_party.actors[0]
$game_temp.remember_weapon = actor.weapon_id
$game_variables[XAS_GLC::GAME_LEADER_VAR] =$game_temp.remember_weapon
actor.equip(0, 0)
$game_party.actors << $game_party.actors.shift
$game_player.refresh
unless $game_temp.remember_skill == nil
$game_system.xas_skill_id = $game_temp.remember_skill #to clear equipped skill
else
$game_system.xas_skill_id = 0
end
unless $game_temp.remember_item == nil
$game_system.xas_item_id = $game_temp.remember_item #to clear equipped item
else
$game_system.xas_item_id = 0
end
unless $game_temp.remember_weapon == nil
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor.equip(0, $game_variables[XAS_GLC::GAME_LEADER_VAR])
end
else
actor.equip(0, 0)
end
$scene = Scene_Map.new
else ;
if XAS_BA::AUTOGAMEOVER == true
$scene = Scene_Gameover.new rescue nil if self.collapse_done
else
$game_switches[XAS_BA::GAMEOVER_SWITCH_ID] = true
$game_map.refresh
end#$game_switches[82] = true
end
end
end
end
end
#-------------------------------------------------------------------------------
# * SDK Enabled Test : END
#-------------------------------------------------------------------------------
#end
Greetz,
DontSay
ACTIVATED
Show Signature
ACTIVATED
ACTIVATED

ACTIVATED
profile
Plz i need this script!! but i dont know where do i have to paste it!!
thanks
Basst
![]() | ![]() | |
![]() | ||
![]() | ![]() |

profile

thanks
ACTIVATED
Show Signature
ACTIVATED
EVENTALIST
EVENTALIST

EVENTALIST
profile
have you tried pasting this script bellow the XAS System in your script data base?
mr_wiggles
![]() | ![]() | |
![]() | ||
![]() | ![]() |

profile

EVENTALIST
Show Signature
EVENTALIST
Administrator
Administrator

Administrator
profile
@Basst - ya heard wiggles, simply copy and paste the script below the XAS system script. In RMXP just press F9 to open the Script Database 
oh!? and Welcome to the Underground! ^,^
EDIT: Newer version updated in original post
2nd EDIT: XAS - caterpillar
works like a charm with this script!
G@MeF@Ce
![]() | ![]() | |
![]() | ||
![]() | ![]() |

profile


oh!? and Welcome to the Underground! ^,^
EDIT: Newer version updated in original post
2nd EDIT: XAS - caterpillar
works like a charm with this script!
Administrator
Show Signature
ACTIVATED
ACTIVATED

ACTIVATED
profile
I want this script have a switch. When I set switch on it's possible to change leader...If I set switch off it's impossible to change...Can you fix it like that?
nhokbutchi6
![]() | ![]() | |
![]() | ||
![]() | ![]() |

profile

ACTIVATED
Show Signature
ACTIVATED
Administrator
Administrator

Administrator
profile
@nhokbutchi6 - that shouldn't be too hard, maybe when I get some free time this weekend ^,^
G@MeF@Ce
![]() | ![]() | |
![]() | ||
![]() | ![]() |

profile

Administrator
Show Signature
ACTIVATED
ACTIVATED
Active Member
Active Member
Go to page : 1, 2, 3, 4, 5