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.

XAS Action Rpg System (Secret Of Mana Styled)

I guess I'm done. @Hackel - correct me if I'm wrong in some cases:

Hackel's XAS Ally System v1.00


1. Introduction

I always wanted to have an ally system for XAS but didn't ever find one, so I wrote one by myself.
When I noticed so many of you asking for one, I decided to release mine. It wasn't easy to do cause
I did not only use the first ally system but also changed a lot and finally didn't work that "cleanly".
------------------------------------------------------------------------------------------------------------------------------------
2. Setup
An ally is created similarly to a monster - exept of the "-" before the ID.

###Picture###

Actually you're almost done as the enemy has the same stats as the ally (for example -3 = third actor in database)
but some things still remain:


3. The Move_route
You could now handle it like every other enemy but then the actor would be 1. quite dense and 2. the actor wouldn't
adapt to his skills and weapons. Therefore only write into the moveroute:

ki(sa,sb,sc,sd,se,ra,rb,rc,rd,re,hp,ha,freq,healper,skilltime,keinn)

with: sa,sb,sd,se = close combat skills. In most cases sa will be used while se is unusual. Both skills are used after the ally learned them
ra,rb,rd,rs = range combat skills. Used like the close combat skills.
hp = skill to recover the health of other players
freq = the attack speed. The higher the number, the slower is the attack speed (every x. time an attack will be started x = freq)
healper = the percentaged amount of life from where health is recovered (e.g. when healper = 30 the ally will recover his life or run away when he's got 30% of his life left)
skilltime = same as freq but meant for the skills
keinn = no close combat. When set "true" the ally won't attack in close combat (e.g. for a sorcerer who has a close combat weapon but is not meant to use it)

If you don't want to use any of the skills above, just place 0 into the gap.
------------------------------------------------------------------------------------------------------------------------------------

Indeed, the AI has a lot of other skills, too: the actor
- is starting to run when he's far away from the hero
- is teleporting himself near to the hero when he's too far away
- is able to avoid little barricades
- is finding the next enemy automatically
- is following the hero automatically when there's no enemy around
- is just attacking when he's sure to hit the enemy (exept the enemy is avoiding the hit)
- cannot block the hero
- and much, much more...

The ally is also using his weapon independently but as he cannot know wether it's a range or close combat weapon, just place
the ID of the weapon skill into module XAS_SKILL LONG_RANGE_SKILL when it's a range combat weapon and into SHORT_RANGE_SKILL
when it's a close combat weapon.

Also you should add every skill that is just causing damage to the enemy to SKILL_ENEMY_ALLY
------------------------------------------------------------------------------------------------------------------------------------
####Pictures####

4. How to use

Though I changed it a bit I'm using Zeriab's Caterpillar Script. According to this you have to name all your ALLY EVENTS \cat_actor 
 
 
@Rainbird - Thanks for the translation Rainbird, I was half way through it but I've been ill recently :cry:

@Hackel - Great update on the system - especially transferring the allies over to new maps, big improvement :)

Still to check out your spawn script - will update http://www.myspace.com/xastutorials now :biggrin:

Edit: Here you go Hackel, you can add this to the latest Ally download - its a html version of Rainbird's translation with pictures included.

http://www.fileden.com/files/2007/5/2/1039333/tutorial.zip

www.myspace.com/xastutorials is starting to look more like hackelstutorials lol
 
realy?
do you copy it direkt from the forum? (rmxp cut links short)

did you use this link

http://www.4shared.com/file/91591591/adad4f79/Xas_Ally_System_v100.html
 
@calvin624: your pictures explaining the whole thing are a big improvement to understand the script, thanks for this!!! When you're fit again don't hesitate to work over my translation cause your words seem to express it in a much better way, I just translated it nearly word by word to avoid mistakes based on the translation. Till then: get well soon!! :)
 
Great work again, I can`t find the right words but: Du bist einfach nur unheimlich gut^^, jedesmal addest du ein paar richtig nützliche Featuers, du vereinfachst es jedesmal aufs neue, auf jedenfall: ich bin total beglückt (x

Even while paying respect for Hackel, I have a problem with the following Script:
http://nopaste.com/p/aKd11TIxA/txt
It`s a Pixelmovement and, after being pasted under the XAS, it jsut works perfectly BUT, the main Char can`t attack anymore.. .
Now I vagely remember that the XAS had this 8movement system in it, but I can`t finde the entry in the script etc... .

I would be that happy if anyone could help me :)
 
@calvin624: you're welcome!! whenever you need a little help translating german into english just tell me and I'll give my best... :)
@Ragnarok: not bad! :) I guess Hackel will be quite flattered (just as he truly deserves it for his great work!!!) :)
 
thanks a lot guys :biggrin:

the pixelmovement script overwrite some methods but i think i managed it
only the quater grafik do not work

(paste it under XAS_SYSTEM)

Code:
#########################

# SUPER WALK #

#Script créé par Zeus81#

#########################

 

class Game_Character

 

 

attr_reader :x2

attr_reader :y2

 

alias game_character_initialize initialize

def initialize

@x2 = 0

@y2 = 0

game_character_initialize

end

 

def moving?

return (@real_x != @x2 * 128 or @real_y != @y2 * 128)

end

 

def passable?(x, y, d)

new_x = x + (d == 6 ? 1 : d == 4 ? -1 : 0)

new_y = y + (d == 2 ? 1 : d == 8 ? -1 : 0)

unless $game_map.valid?(new_x, new_y)

return false

end

if @through

return true

end

unless $game_map.passable?(x, y, d, self)

return false

end

unless $game_map.passable?(new_x, new_y, 10 - d)

return false

end

for event in $game_map.events.values

if event.x == new_x and event.y == new_y

unless event.through

if event.character_name != ""

return false

end

end

end

end

if $game_player.x == new_x and $game_player.y == new_y

unless $game_player.through

if @character_name != ""

return false

end

end

end

return true

end

 

def moveto(x, y)

@x = @x2 = x % $game_map.width

@y = @y2 = y % $game_map.height

@real_x = @x * 128

@real_y = @y * 128

@prelock_direction = 0

end

 

def update_jump

@jump_count -= 1

@real_x = (@real_x * @jump_count + @x2 * 128) / (@jump_count + 1)

@real_y = (@real_y * @jump_count + @y2 * 128) / (@jump_count + 1)

end

 

def update_move

distance = 2 ** @move_speed

if @y2 * 128 > @real_y

@real_y = [@real_y + distance, @y2 * 128].min

end

if @x2 * 128 < @real_x

@real_x = [@real_x - distance, @x2 * 128].max

end

if @x2 * 128 > @real_x

@real_x = [@real_x + distance, @x2 * 128].min

end

if @y2 * 128 < @real_y

@real_y = [@real_y - distance, @y2 * 128].max

end

if @walk_anime

@anime_count += 1.5

elsif @step_anime

@anime_count += 1

end

end

 

def move_down(turn_enabled = true, player = false)

turn_down if turn_enabled

if passable?(@x, @y, 2)

if player

@x2 -= 0.125 if passable?(@x+1, @y, 2) == false and @x2 > @x

@x2 += 0.125 if passable?(@x-1, @y, 2) == false and @x2 < @x

multiplicateur = [(@move_speed - 4) * 2, 1].max

@y2 += 0.125 * multiplicateur

else

@y2 += 1

end

@y = @y2.round

increase_steps

else

if @y2 < @y

@y2 += 0.125

else

check_event_trigger_touch(@x, @y+1)

end

end

end

 

def move_left(turn_enabled = true, player = false)

turn_left if turn_enabled

if passable?(@x, @y, 4)

if player

@y2 -= 0.125 if passable?(@x, @y+1, 4) == false and @y2 > @y

@y2 += 0.125 if passable?(@x, @y-1, 4) == false and @y2 < @y

multiplicateur = [(@move_speed - 4) * 2, 1].max

@x2 -= 0.125 * multiplicateur

else

@x2 -= 1

end

@x = @x2.round

increase_steps

else

if @x2 > @x

@x2 -= 0.125

else

check_event_trigger_touch(@x-1, @y)

end

end

end

 

def move_right(turn_enabled = true, player = false)

turn_right if turn_enabled

if passable?(@x, @y, 6)

if player

@y2 -= 0.125 if passable?(@x, @y+1, 6) == false and @y2 > @y

@y2 += 0.125 if passable?(@x, @y-1, 6) == false and @y2 < @y

multiplicateur = [(@move_speed - 4) * 2, 1].max

@x2 += 0.125 * multiplicateur

else

@x2 += 1

end

@x = @x2.round

increase_steps

else

if @x2 < @x

@x2 += 0.125

else

check_event_trigger_touch(@x+1, @y)

end

end

end

 

def move_up(turn_enabled = true, player = false)

turn_up if turn_enabled

if passable?(@x, @y, 8)

if player

@x2 -= 0.125 if passable?(@x+1, @y, 8) == false and @x2 > @x

@x2 += 0.125 if passable?(@x-1, @y, 8) == false and @x2 < @x

multiplicateur = [(@move_speed - 4) * 2, 1].max

@y2 -= 0.125 * multiplicateur

else

@y2 -= 1

end

@y = @y2.round

increase_steps

else

if @y2 > @y

@y2 -= 0.125

else

check_event_trigger_touch(@x, @y-1)

end

end

end

 

def move_lower_left(turn_enabled = true, player = false)

turn_lower_left if turn_enabled

move_down(false, player)

move_left(false, player)

end

 

def move_lower_right(turn_enabled = true, player = false)

turn_lower_right if turn_enabled

move_down(false, player)

move_right(false, player)

end

 

def move_upper_left(turn_enabled = true, player = false)

turn_upper_left if turn_enabled

move_up(false, player)

move_left(false, player)

end

 

def move_upper_right(turn_enabled = true, player = false)

turn_upper_right if turn_enabled

move_up(false, player)

move_right(false, player)

end

 

def move_random

case rand(8)

when 0

move_lower_left

when 1

move_down

when 2

move_lower_right

when 3

move_left

when 4

move_upper_left

when 5

move_right

when 6

move_upper_right

when 7

move_up

end

end

 

def jump(x_plus, y_plus)

if x_plus != 0 or y_plus != 0

if x_plus.abs > y_plus.abs

x_plus < 0 ? turn_left : turn_right

else

y_plus < 0 ? turn_up : turn_down

end

end

loop do

new_x = @x + x_plus

new_y = @y + y_plus

if (x_plus == 0 and y_plus == 0) or passable?(new_x, new_y, 0)

straighten

@x += x_plus

@x2 += x_plus

@y += y_plus

@y2 += y_plus

distance = Math.sqrt(x_plus * x_plus + y_plus * y_plus).round

@jump_peak = 10 + distance - @move_speed

@jump_count = @jump_peak * 2

@stop_count = 0

return

end

x_plus -= 1 if x_plus > 0

x_plus += 1 if x_plus < 0

y_plus -= 1 if y_plus > 0

y_plus += 1 if y_plus < 0

end

end

 

def turn_lower_left

unless @direction_fix

@direction = (@direction == 6 ? 4 : @direction == 8 ? 2 : @direction)

@stop_count = 0

end

end

 

def turn_lower_right

unless @direction_fix

@direction = (@direction == 4 ? 6 : @direction == 8 ? 2 : @direction)

@stop_count = 0

end

end

 

def turn_upper_left

unless @direction_fix

@direction = (@direction == 6 ? 4 : @direction == 2 ? 8 : @direction)

@stop_count = 0

end

end

 

def turn_upper_right

unless @direction_fix

@direction = (@direction == 4 ? 6 : @direction == 2 ? 8 : @direction)

@stop_count = 0

end

end

 

 

end

 

 

 

 

class Game_Player < Game_Character

 

 

def update

@actor = $game_party.actors[0]

if @actor != nil    

       actor = $game_party.actors[0]     

       if actor.hp <= 0 

       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

       end      

end     

    last_moving = moving?

    unless moving? or $game_system.map_interpreter.running? or

           @move_route_forcing or $game_temp.message_window_showing or

           $game_temp.dodge_time_real > 0 

    if @actor != nil and actor.states.include?(XAS::CONFUSE_ID) == true

 

     end

    actor = $game_party.actors[0]  

    if actor != nil and (actor.states.include?(XAS::SLEEP_ID) or

         actor.states.include?(XAS::STOP_ID) or

         actor.states.include?(XAS::MUTE_ID) or

         actor.states.include?(XAS::SEALATTACK_ID))    

         $game_temp.xas_charge_time = 0

         $game_temp.xas_anime_loop2 = 0 

         $game_temp.xas_anime_loop = 0

         $game_system.move_speed = 0   

         @direction_fix = false  

    end

   if Input.press?(XAS_COMMAND::DASH_BUTTON) and XAS::DASH_SYSTEM == true and 

      $game_switches[XAS::CT_DISABLE_SWITCH] == false and

          $game_temp.xas_charge_time <= 5

          if $game_system.move_meter > XAS::DASH_ACTIVE_PERC

            if hero_dash_graphic?(actor)

             unless self.action != nil 

 

                 @character_name = actor.character_name + "_dash"                   

              end

            end

           @move_speed = XAS::DASH_SPEED + $game_system.move_speed

         else

         @move_speed = XAS::NORMAL_SPEED + $game_system.move_speed

 

         @character_name = actor.character_name

         end

         else   

         @move_speed = XAS::NORMAL_SPEED + $game_system.move_speed

         if actor != nil

 

         @character_name = actor.character_name

         end

       end      

    end

 

  

  

  

last_x = @x

last_y = @y

unless moving? or $game_system.map_interpreter.running? or

@move_route_forcing or $game_temp.message_window_showing

 

case Input.dir8

when 1

move_lower_left(true, true)

when 2

move_down(true, true)

when 3

move_lower_right(true, true)

when 4

move_left(true, true)

when 6

move_right(true, true)

when 7

move_upper_left(true, true)

when 8

move_up(true, true)

when 9

move_upper_right(true, true)

end

end

 

last_moving = (last_x != @x or last_y != @y)

last_real_x = @real_x

last_real_y = @real_y

super

if @real_y > last_real_y and @real_y - $game_map.display_y > CENTER_Y

$game_map.scroll_down(@real_y - last_real_y)

end

if @real_x < last_real_x and @real_x - $game_map.display_x < CENTER_X

$game_map.scroll_left(last_real_x - @real_x)

end

if @real_x > last_real_x and @real_x - $game_map.display_x > CENTER_X

$game_map.scroll_right(@real_x - last_real_x)

end

if @real_y < last_real_y and @real_y - $game_map.display_y < CENTER_Y

$game_map.scroll_up(last_real_y - @real_y)

end

unless moving?

if last_moving

result = check_event_trigger_here([1,2])

if result == false

unless $DEBUG and Input.press?(Input::CTRL)

if @encounter_count > 0

@encounter_count -= 1

end

end

end

end

if Input.trigger?(Input::C)

check_event_trigger_here([0])

check_event_trigger_there([0,1,2])

 end

end

end

end

######################XAS######################################################

######################XAS######################################################

######################XAS######################################################

######################XAS######################################################

######################XAS######################################################

class Game_Player

alias mog_xaswep_update update

def update

mog_xaswep_update  

actor = $game_party.actors[0]  

if actor != nil

weapon_id = actor.weapon_id

weapon_tool_id = XAS_SKILL::WEP_ID_TOOL[weapon_id]

$game_system.xas_action_slash_id = weapon_tool_id 

armor_id = actor.armor1_id

armor_tool_id = XAS_SKILL::SHIELD_ID_TOOL[armor_id]

$game_system.xas_action_shield_id = armor_tool_id 

acce_id = actor.armor4_id

acce_tool_id = XAS_SKILL::ACCESSORY_REACTION_ID_TOOL[acce_id]

$game_system.xas_action_acce_id = acce_tool_id

end  

end

end

#===============================================================================

# Game_Player

#===============================================================================

class Game_Player < Game_Character

  

def character_real_name

if @actor == nil

return false  

end     

    actor = $game_party.actors[0]

    @character_name = actor.character_name   

end    

 

def conf_move

   actor = $game_party.actors[0]

if @actor == nil

return false  

end      

   if  actor.states.include?(XAS::CONFUSE_ID)   

       if Input.press?(Input::UP)

       turn_down

       elsif Input.press?(Input::DOWN)

       turn_up

       elsif Input.press?(Input::RIGHT)

       turn_left

       elsif Input.press?(Input::LEFT)

       turn_right

       end          

    else

       if Input.press?(Input::UP)

       turn_up

       elsif Input.press?(Input::DOWN)

       turn_down

       elsif Input.press?(Input::RIGHT)

       turn_right

       elsif Input.press?(Input::LEFT)

       turn_left

       end

   end   

end

 

def seal_text

       $game_player.battler.damage = XAS::SEALED_TEXT

       $game_player.battler.damage_pop = true    

       $game_system.se_play(XAS::SEALED_SE)

       $game_temp.rendan_item = 0

       $game_temp.item_rendan = 0

       $game_temp.rendan_skill = 0

       $game_temp.skill_rendan = 0 

       $game_temp.cast_skill_id = 0

       $game_temp.cast_time = 0

       $game_temp.cast_type = 0  

end

#===============================================================================

# XAS - Button SKILL

#===============================================================================

 

  alias xrxs64_ya_update update

  def update

    xrxs64_ya_update    

    actor = $game_party.actors[0]  

@actor = $game_party.actors[0]

if @actor == nil

return false  

end    

        if $game_temp.rendan_skill > 0 

        @direction_fix = true  

        else

        @direction_fix = false

        end    

    if Input.trigger?(XAS_COMMAND::SKILL_ACTION) and

             $game_switches[XAS_COMMAND::COMMAND_DISABLE_SWITCH] == false 

      unless $game_system.map_interpreter.running? or

             $game_temp.message_window_showing or

             self.action != nil or self.knockbacking? or

             $game_temp.xas_charge_time >= 100 or

             $game_temp.cast_time > 0

        if actor.states.include?(XAS::SEALSKILL_ID) or

           actor.states.include?(XAS::MUTE_ID) or

           actor.states.include?(XAS::BERSERK_ID)  

           seal_text

           return false

         end             

        if $game_temp.rendan_skill > 0 

        action_id = $game_temp.skill_rendan

        @direction_fix = true

        else

        action_id = $game_system.xas_skill_id

        @direction_fix = false

        end

        if XAS_SKILL::CAST_TIME.include?(action_id)

        self.shoot(action_id)

        $game_temp.cast_type = 1

        $game_player.animation_id = XAS_SKILL::DEFAULT_CAST_ANIMATION_ID 

        return false

        end

        combo_attack = XAS_SKILL::COMBO_ATTACK[action_id]

        conf_move    

if XAS_SKILL::SLIDE_MOVE.include?(action_id) 

        self.battler.hit_it = 1

        if combo_attack != nil or combo_attack == 0

        @direction_fix = true

        end  

        if $game_player.direction == 2

           move_down

        elsif $game_player.direction == 4

           move_left

        elsif $game_player.direction == 6

           move_right

        elsif $game_player.direction == 8  

           move_up           

         end      

elsif XAS_SKILL::BACK_MOVE.include?(action_id)          

        if combo_attack != nil or combo_attack == 0

        @direction_fix = true

        end  

        move_backward            

    end

if XAS_SKILL::JUMP_MOVE.include?(action_id)       

      jump(0,0)

end      

    character_real_name

    if combo_attack != nil or combo_attack == 0

    $game_temp.skill_rendan = combo_attack[0]    

    $game_temp.rendan_skill = combo_attack[1]     

    end     

    $game_temp.rendan_item = 0

    $game_temp.item_rendan = 0

    $game_temp.rendan_attack = 0

    $game_temp.attack_rendan = 0      

    self.shoot(action_id) if action_id != nil or action_id == 0        

          cast_animation = XAS_SKILL::CAST_ANIMATION_ID[action_id]

          if cast_animation != nil or cast_animation == 0

          $game_player.animation_id = cast_animation

          else

          $game_player.animation_id = XAS_SKILL::DEFAULT_CAST_ANIMATION_ID 

          end    

     end

    end

  end

end

#===============================================================================

# XAS - Button Slash

#===============================================================================

class Game_Player < Game_Character

  alias xrxs64_cs_update update

  def update

    xrxs64_cs_update

    actor = $game_party.actors[0]  

@actor = $game_party.actors[0]

if @actor == nil

return false  

end    

        if $game_temp.rendan_attack > 0 

        @direction_fix = true  

        else

        @direction_fix = false

        end

    if Input.trigger?(XAS_COMMAND::SLASH_ACTION) and

             $game_switches[XAS_COMMAND::COMMAND_DISABLE_SWITCH] == false

      unless self.action != nil or $game_system.map_interpreter.running? or

             $game_temp.message_window_showing or $game_map.starting? or

             self.knockbacking? or $game_temp.xas_charge_time >= 100 or

             $game_temp.cast_time > 0

        if actor.states.include?(XAS::SEALATTACK_ID) or

           actor.states.include?(XAS::MUTE_ID)          

        seal_text

        return false

      end              

        if $game_temp.rendan_attack > 0 

        @direction_fix = true  

        action_id = $game_temp.attack_rendan  

        else

        action_id = $game_system.xas_action_slash_id

        @direction_fix = false

      end

              

        if XAS_SKILL::CAST_TIME.include?(action_id)

        self.shoot(action_id)

        $game_temp.cast_type = 2

        return false

        end      

        combo_attack = XAS_SKILL::COMBO_ATTACK[action_id]

        conf_move

if XAS_SKILL::JUMP_MOVE.include?(action_id)       

      jump(0,0)

    end

if XAS_SKILL::SLIDE_MOVE.include?(action_id) 

        self.battler.hit_it = 1

        if combo_attack != nil or combo_attack == 0

        @direction_fix = true

         end        

        if $game_player.direction == 2

           move_down 

        elsif $game_player.direction == 4

           move_left 

        elsif $game_player.direction == 6

           move_right 

        elsif $game_player.direction == 8  

           move_up         

         end    

elsif XAS_SKILL::BACK_MOVE.include?(action_id)          

        if combo_attack != nil or combo_attack == 0

        @direction_fix = true

        end  

        move_backward         

      end         

      

    character_real_name

    if combo_attack != nil or combo_attack == 0

    $game_temp.attack_rendan = combo_attack[0]    

    $game_temp.rendan_attack = combo_attack[1]     

  end     

 

    $game_temp.rendan_item = 0

    $game_temp.item_rendan = 0

    $game_temp.rendan_skill = 0

    $game_temp.skill_rendan = 0 

    self.shoot(action_id) if action_id != nil or action_id == 0

      end

    end

  end

end

#===============================================================================

# XAS - Button SHIELD

#===============================================================================

class Game_Player < Game_Character

  alias xrxs64_cs2_update update

  def update

    xrxs64_cs2_update

    actor = $game_party.actors[0]

    if actor == nil

    return false  

    end      

    if (Input.trigger?(XAS_COMMAND::SHIELD_ACTION) or 

        Input.press?(XAS_COMMAND::SHIELD_ACTION)) and

             $game_switches[XAS_COMMAND::COMMAND_DISABLE_SWITCH] == false

      unless self.action != nil or $game_system.map_interpreter.running? or

             $game_temp.message_window_showing or $game_map.starting? or

             self.knockbacking? or $game_temp.xas_charge_time >= 100

        action_id = $game_system.xas_action_shield_id

      conf_move

      if XAS_SKILL::JUMP_MOVE.include?(action_id)       

      jump(0,0)

      end

      if XAS_SKILL::SLIDE_MOVE.include?(action_id) 

        self.battler.hit_it = 1

        if $game_player.direction == 2

           move_down

        elsif $game_player.direction == 4

           move_left

        elsif $game_player.direction == 6

           move_right

        elsif $game_player.direction == 8  

           move_up           

         end    

      elsif XAS_SKILL::BACK_MOVE.include?(action_id)          

        move_backward          

       end            

       character_real_name      

       $game_temp.rendan_attack = 0

       $game_temp.attack_rendan = 0

       $game_temp.rendan_skill = 0

       $game_temp.skill_rendan = 0  

       $game_temp.rendan_item = 0

       $game_temp.item_rendan = 0         

       self.shoot(action_id) if action_id != nil or action_id == 0

       if $game_system.move_meter > XAS::DASH_ACTIVE_PERC

         $game_temp.shield_active = true

         else    

         $game_temp.shield_active = false         

       end   

              

     end

   else

     $game_temp.shield_active = false

     end

  end

end

#===============================================================================

# XAS - Button ITEM

#===============================================================================

class Game_Player < Game_Character

  alias xrxs64_cs3_update update

  def update

    xrxs64_cs3_update

    actor = $game_party.actors[0]

    if actor == nil

    return false  

    end  

        if $game_temp.rendan_item > 0 

        @direction_fix = true  

        else

        @direction_fix = false

        end       

    if Input.trigger?(XAS_COMMAND::ITEM_ACTION)

      unless self.action != nil or $game_system.map_interpreter.running? or

             $game_temp.message_window_showing or $game_map.starting? or

             self.knockbacking? or $game_temp.xas_charge_time >= 100 or

             $game_temp.cast_time > 0

        if actor.states.include?(XAS::SEALITEM_ID) or

           actor.states.include?(XAS::MUTE_ID) or

           actor.states.include?(XAS::BERSERK_ID)    

           seal_text

           return false

        end             

        item_tool_id = XAS::XASITEM_ID[$game_system.xas_item_id]        

        if $game_temp.rendan_item > 0 

        action_id = $game_temp.item_rendan 

        @direction_fix = true

        else

        action_id = item_tool_id

        @direction_fix = false

        end

        if XAS_SKILL::CAST_TIME.include?(action_id)

        self.shoot(action_id)

        $game_temp.cast_type = 3

        return false

        end      

        combo_attack = XAS_SKILL::COMBO_ATTACK[action_id]

        conf_move

if XAS_SKILL::SLIDE_MOVE.include?(action_id) 

       self.battler.hit_it = 1

        if combo_attack != nil or combo_attack == 0

        @direction_fix = true

        end  

        if $game_player.direction == 2

           move_down

        elsif $game_player.direction == 4

           move_left

        elsif $game_player.direction == 6

           move_right

        elsif $game_player.direction == 8  

           move_up           

         end      

elsif XAS_SKILL::BACK_MOVE.include?(action_id)          

        if combo_attack != nil or combo_attack == 0

        @direction_fix = true

        end  

        move_backward 

end

if XAS_SKILL::JUMP_MOVE.include?(action_id)       

      jump(0,0)

end      

    character_real_name    

    if combo_attack != nil or combo_attack == 0

    $game_temp.item_rendan = combo_attack[0]    

    $game_temp.rendan_item = combo_attack[1]     

    end     

    $game_temp.rendan_attack = 0

    $game_temp.attack_rendan = 0

    $game_temp.rendan_skill = 0

    $game_temp.skill_rendan = 0   

    self.shoot(action_id) if action_id != nil or action_id == 0

      end

    end

  end

end

#===============================================================================

# XAS - Button Reaction

#===============================================================================

class Game_Player < Game_Character

  alias xrxs64_reaction_update update

  def update

    xrxs64_reaction_update

    actor = $game_party.actors[0]

    if actor == nil

    return false  

    end 

   if  actor != nil and (actor.states.include?(XAS::SLEEP_ID) or

        actor.states.include?(XAS::STOP_ID) or

        actor.states.include?(XAS::MUTE_ID))

        $game_temp.counter_time = 0

        $game_temp.counter = false

   end

    if Input.trigger?(XAS_COMMAND::REACTION_BUTTON) and

             $game_switches[XAS_COMMAND::COMMAND_DISABLE_SWITCH] == false and

             actor.hp > 0 and $game_temp.counter_time > 0 and

             $game_temp.counter == true and self.knockbacking?

      unless self.action != nil or $game_system.map_interpreter.running? or

             $game_temp.message_window_showing or $game_map.starting? or

             $game_temp.xas_charge_time >= 100   

      if actor.states.include?(XAS::MUTE_ID)      

         seal_text

         return false        

      end               

        action_id = $game_system.xas_action_acce_id

        if XAS_SKILL::CAST_TIME.include?(action_id)

        self.shoot(action_id)

        $game_temp.cast_type = 0

        return false

        end        

        conf_move 

if XAS_SKILL::SLIDE_MOVE.include?(action_id) 

        self.battler.hit_it = 1

        if $game_player.direction == 2

           move_down

        elsif $game_player.direction == 4

           move_left

        elsif $game_player.direction == 6

           move_right

        elsif $game_player.direction == 8  

           move_up           

         end        

elsif XAS_SKILL::BACK_MOVE.include?(action_id)          

        move_backward          

end

if XAS_SKILL::JUMP_MOVE.include?(action_id)       

      jump(0,0)

end         

   if action_id != nil or action_id == 0

    character_real_name

    $game_temp.rendan_item = 0

    $game_temp.item_rendan = 0

    $game_temp.rendan_skill = 0

    $game_temp.skill_rendan = 0 

    $game_player.animation_id = XAS_SKILL::REACTION_ANIME

    $game_screen.start_flash(Color.new(255, 155, 55, 255),10)

    @knock_back_duration = 0 

    $game_temp.counter_time = 0

    $game_temp.counter = false

    self.shoot(action_id) 

    end

    end

    end

  end

end

#===============================================================================

# XAS - SHIELD DIRECTION

#===============================================================================

class Game_Player < Game_Character  

alias xas_shield_update update

def update

xas_shield_update

    actor = $game_party.actors[0]

    if actor == nil

    return false  

    end 

unless $game_system.map_interpreter.running? or 

    $game_temp.message_window_showing or

    $game_map.starting? or self.knockbacking? or

    $game_temp.xas_charge_time >= 100 

if self.action.id == $game_system.xas_action_shield_id  

   conf_move        

end        

end

end

end

#===============================================================================

# XAS - DODGE

#===============================================================================

class Game_Player < Game_Character

  alias xrxs64_dodge_update update

  def update

    xrxs64_dodge_update

    actor = $game_party.actors[0]

    if actor == nil

    return false  

    end

    unless $game_system.map_interpreter.running? or

      $game_temp.message_window_showing or

      $game_map.starting? or self.knockbacking?      

       if jumping?

          @anime_count += 1.5  

      end

    end    

    if Input.trigger?(XAS_COMMAND::DASH_BUTTON) and

       $game_switches[XAS_COMMAND::COMMAND_DISABLE_SWITCH] == false and

       $game_temp.dodge_time > 0 and $game_temp.dodge == true       

      unless  $game_system.map_interpreter.running? or

             $game_temp.message_window_showing or $game_map.starting? or

             self.knockbacking? or $game_temp.xas_charge_time >= 100 or

             jumping?

       jump(0,0)

       $game_temp.dodge_time_real = 15

       move_backward

       $game_temp.dodge = false

       $game_temp.dodge_time = 0

       $game_temp.rendan_attack = 0

       $game_temp.attack_rendan = 0

       $game_temp.rendan_skill = 0

       $game_temp.skill_rendan = 0  

       $game_temp.rendan_item = 0

       $game_temp.item_rendan = 0             

     end

   end

   if Input.trigger?(XAS_COMMAND::DASH_BUTTON) and XAS::DODGE_SYSTEM == true and 

      $game_switches[XAS::CT_DISABLE_SWITCH] == false and

          $game_temp.xas_charge_time <= 5

          $game_temp.dodge_time = 15

          $game_temp.dodge = true    

    end

   

end

end

#===============================================================================

# XAS - CAST TIME

#===============================================================================

class Game_Player < Game_Character

  alias xrxs64_ctime_update update

  def update

    xrxs64_ctime_update

    actor = $game_party.actors[0]

    if actor == nil

    return false  

    end  

      if $game_temp.cast_time <= 0 and $game_temp.cast_skill_id != 0

      unless self.action != nil or $game_system.map_interpreter.running? or

             $game_temp.message_window_showing or $game_map.starting? or

             self.knockbacking? or $game_temp.xas_charge_time >= 100            

       action_id = $game_temp.cast_skill_id

        if  $game_temp.cast_type == 0 and 

            actor.states.include?(XAS::MUTE_ID)   

            seal_text

            return false

        elsif $game_temp.cast_type == 1 and 

           (actor.states.include?(XAS::MUTE_ID)or

            actor.states.include?(XAS::SEALSKILL_ID) or 

            actor.states.include?(XAS::BERSERK_ID))          

            seal_text   

            return false

        elsif $game_temp.cast_type == 2 and 

           (actor.states.include?(XAS::MUTE_ID)or

            actor.states.include?(XAS::SEALATTACK_ID))      

            sel_text

            return false

        elsif $game_temp.cast_type == 3 and 

           (actor.states.include?(XAS::MUTE_ID)or

            actor.states.include?(XAS::SEALITEM_ID))      

            seal_text   

            return false

        end        

        conf_move    

      if XAS_SKILL::JUMP_MOVE.include?(action_id)       

      jump(0,0)

      end

      if XAS_SKILL::SLIDE_MOVE.include?(action_id) 

        self.battler.hit_it = 1

        if $game_player.direction == 2

           move_down 

        elsif $game_player.direction == 4

           move_left 

        elsif $game_player.direction == 6

           move_right 

        elsif $game_player.direction == 8  

           move_up         

         end    

      elsif XAS_SKILL::BACK_MOVE.include?(action_id)          

           move_backward         

      end  

    character_real_name

    self.shoot(action_id) 

    $game_temp.rendan_item = 0

    $game_temp.item_rendan = 0

    $game_temp.rendan_skill = 0

    $game_temp.skill_rendan = 0 

    $game_temp.cast_skill_id = 0

    $game_temp.cast_time = 0

    $game_temp.cast_type = 0    

    end

  end

end

end

###############

# Game_Player #

###############

class Game_Player < Game_Character

include MOG

def hero_charge_graphic?(actor) 

    actor = $game_party.actors[0]  

    wp_id = actor.weapon_id

    wp_tool_id = WEP_CHARGE_ID[wp_id]

    wp_tool_time = WEP_CHARGE_TIME[wp_id]  

    if wp_tool_id != nil

    @self_motion = Database_Bullet::SELF_MOTIONS[wp_tool_id]  

    RPG::Cache.character(actor.character_name + @self_motion.to_s + "_Charge", actor.character_hue) rescue return false

    end

end

alias mog_xas05_update update

def update

mog_xas05_update  

    actor = $game_party.actors[0]

    if actor == nil

    return false  

    end   

    wp_id = actor.weapon_id

    wp_tool_id = WEP_CHARGE_ID[wp_id]

    wp_tool_time = WEP_CHARGE_TIME[wp_id]

    if Input.press?(Input::B) or Input.trigger?(Input::B)

    $game_temp.xas_charge_time = 0 

    $game_temp.xas_anime_loop = 0 

    $game_temp.xas_anime_loop2 = 0 

    end

unless $game_system.map_interpreter.running? or

       $game_temp.message_window_showing or $game_map.starting?  or

       self.action != nil or self.knockbacking?  or

  (actor.states.include?(XAS::SLEEP_ID) or

   actor.states.include?(XAS::STOP_ID) or

   actor.states.include?(XAS::SEALATTACK_ID) or

   actor.states.include?(XAS::MUTE_ID)or 

   actor.states.include?(XAS::BERSERK_ID)) or

   $game_temp.cast_time > 0

if Input.press?(XAS_COMMAND::SKILL_CHARGE) and wp_tool_id != nil and

   $game_switches[XAS_COMMAND::COMMAND_DISABLE_SWITCH] == false

  @self_motion = Database_Bullet::SELF_MOTIONS[wp_tool_id]

  if hero_charge_graphic?(actor) and

    $game_temp.xas_charge_time > 10

  @character_name = actor.character_name + @self_motion.to_s + "_Charge"

  end  

if MOG::FIXED_DIRECTION_SKILL.include?(wp_tool_id)

@direction_fix = true  

$game_system.move_speed = -1

else

$game_system.move_speed = 0

end  

if wp_tool_time != nil

$game_temp.xas_charge_time += wp_tool_time if $game_temp.xas_charge_time < 100

$game_temp.xas_anime_loop += wp_tool_time 

$game_temp.xas_anime_loop2 += wp_tool_time 

else

$game_temp.xas_charge_time += DEFAULT_CHARGE_TIME if $game_temp.xas_charge_time < 100   

$game_temp.xas_anime_loop += DEFAULT_CHARGE_TIME  

$game_temp.xas_anime_loop2 += DEFAULT_CHARGE_TIME  

end

if wp_tool_time != nil

loop = 40 * wp_tool_time

else

loop = 40 * DEFAULT_CHARGE_TIME 

end

if $game_temp.xas_anime_loop > loop

if $game_temp.xas_anime_loop2 >= 100

$game_player.animation_id = XAS_FULL_ANIME

else

$game_player.animation_id = XAS_CHARGE_ANIME 

end

$game_temp.xas_anime_loop = 0

end

else

$game_temp.xas_charge_time = 0 if $game_temp.xas_charge_time < 100

$game_temp.xas_anime_loop2 = 0

$game_temp.xas_anime_loop = 0

$game_system.move_speed = 0

@direction_fix = false

end

end

if $game_temp.xas_charge_time >= 100 and not Input.press?(XAS_COMMAND::SKILL_CHARGE)

unless self.action != nil or $game_system.map_interpreter.running? or

$game_temp.message_window_showing or $game_map.starting? or

self.knockbacking?

action_id = wp_tool_id if wp_tool_id != nil 

character_real_name

unless actor.states.include?(XAS::MUTE_ID) or

       actor.states.include?(XAS::SEALATTACK_ID) or

       actor.states.include?(XAS::BERSERK_ID)

        unless action_id == nil or action_id == 0

        skill_id = action_id

        skill    = skill_id == nil ? nil : $data_skills[skill_id]

        sp_cost  = skill.sp_cost

        if XAS_SKILL::CT_COST.include?(skill_id) and

          $game_system.move_meter < sp_cost

          $game_system.se_play(XAS_SKILL::NO_CT_SE)

          $game_temp.rendan_attack = 0

          $game_temp.attack_rendan = 0

          $game_temp.rendan_item = 0

          $game_temp.item_rendan = 0

          $game_temp.rendan_skill = 0

          $game_temp.skill_rendan = 0

          $game_temp.xas_charge_time = 0 

          $game_temp.xas_anime_loop = 0

          @direction_fix = false

          $game_system.move_speed = 0

          @character_name = actor.character_name          

          return

        elsif actor.sp < sp_cost and not

          XAS_SKILL::CT_COST.include?(skill_id)

          $game_system.se_play(XAS_SKILL::NO_CT_SE)

          $game_temp.rendan_attack = 0

          $game_temp.attack_rendan = 0

          $game_temp.rendan_item = 0

          $game_temp.item_rendan = 0

          $game_temp.rendan_skill = 0

          $game_temp.skill_rendan = 0  

          $game_temp.xas_charge_time = 0 

          $game_temp.xas_anime_loop = 0

          @direction_fix = false

          $game_system.move_speed = 0

          @character_name = actor.character_name

          return          

        end

 end        

if XAS_SKILL::SLIDE_MOVE.include?(action_id) 

        if $game_player.direction == 2

           move_down

        elsif $game_player.direction == 4

           move_left

        elsif $game_player.direction == 6

           move_right

        elsif $game_player.direction == 8  

           move_up           

        end        

end

if XAS_SKILL::JUMP_MOVE.include?(action_id)       

      jump(0,0)

end         

  self.shoot(action_id) if action_id != nil   

  else

  $game_player.battler.damage = XAS::SEALED_TEXT

  $game_player.battler.damage_pop = true   

  $game_system.se_play(XAS::SEALED_SE)

  end

  $game_temp.xas_charge_time = 0 

  $game_temp.xas_anime_loop = 0

  @direction_fix = false

  $game_system.move_speed = 0

  @character_name = actor.character_name

  end

end

end

end
 

Star

Sponsor

Hackel":w81jhydq said:
thanks a lot guys :biggrin:

the pixelmovement script overwrite some methods but i think i managed it
only the quater grafik do not work

(paste it under XAS_SYSTEM)
Freaking Nice!!! Hackel is my favorite scripter already. You're the best. In return, I give you. XAS 3.4 Hackel's Party + Pixelmovement + Common Event Based "_quarter" or 8 directional movement

http://files.filefront.com/XAS+34Hackel ... einfo.html

Only thing is that you need like four quarter images instead of one. Cause it's a pain if you use only one.

Anyway, Hackel, I got a question for you. Is there anyway to make your ally's not disappear when they die? I kinda want to be able to use Reviving Items during battle but when they die. They disappear =(
 

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