Jump to content
Venusaur

Alternate death?

Recommended Posts

Hi, I'm using RPG maker Vx ace. I'm using the Falcao Pearl Liquid ABS combat system (It's an overworld real-time combat script) and I'm trying to incorporate an alternative death system somehow. Preferably one that can be altered depending on where you're slain.


I've asked the creator of the script about it and he was quite rude and just told me to figure it out myself, and that I didn't need his help as the script is designed to work with other vanilla scripts.

 

Anyone have any idea on how I can do this?

 

 

Thanks.

Share this post


Link to post
Share on other sites

Hi, I'm using RPG maker Vx ace. I'm using the Falcao Pearl Liquid ABS combat system (It's an overworld real-time combat script) and I'm trying to incorporate an alternative death system somehow. Preferably one that can be altered depending on where you're slain.

 

 

I've asked the creator of the script about it and he was quite rude and just told me to figure it out myself, and that I didn't need his help as the script is designed to work with other vanilla scripts.

 

Anyone have any idea on how I can do this?

 

 

Thanks.

 

What do you exactly mean by Alternate Death?

 

And I am sorry for what happened. If that's the case, doing a vanilla based script should work with Pearl.

Share this post


Link to post
Share on other sites

Thanks for the quick reply! I appreciate it.

What I mean is.... Instead of the typical "gameover" screen, something else happens. An example would be, waking up with your health fully restored in a different area. Preferably customizable on a dungeon to dungeon basis.

Share this post


Link to post
Share on other sites
class Game_Interpreter
  attr_accessor                                                :respawn_area
  attr_accessor                                                   :respawn_x
  attr_accessor                                                   :respawn_y
  alias :pearl_abs_construct_initialize                          :initialize
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     depth : nest depth
  #--------------------------------------------------------------------------
  def initialize(depth = 0)
    pearl_abs_construct_initialize
    @respawn_area = 1 # => Map where you would be respawned after dying
    @respawn_x = 15 #=> X Position in the Map you'd be respawned
    @respawn_y = 15 #=> Y Position in the Map you'd be respawned
  end  
  
  def change_respawn_area(value, x, y)
    @respawn_area = value
    @respawn_x = x
    @respawn_y = y
  end
  
  def execute_respawn
    $game_party.members.each {|member| member.recover_all}
    $game_player.reserve_transfer(@respawn_area, @respawn_x, @respawn_y, 1)
  end
  #--------------------------------------------------------------------------
  # * Change HP
  #--------------------------------------------------------------------------
  def command_311
    value = operate_value(@params[2], @params[3], @params[4])
    iterate_actor_var(@params[0], @params[1]) do |actor|
      next if actor.dead?
      actor.change_hp(value, @params[5])
      actor.perform_collapse_effect if actor.dead?
    end
      execute_respawn if $game_party.all_dead?
  end
end

Just set up your default map to respawn at, the x and y position and also, if you want to change where you want to respawn, do this script call:

change_respawn_area(value, x, y)

where value = map_id

x = x position

y = y position

 

example:

change_respawn_area(1, 2, 2)

Respawn to Map 1, At 2, 2 of that certain map.

 

Hope it helps.

Share this post


Link to post
Share on other sites

Woah. Thanks for the quick and really helpful response! Question though. Where do I put the script? I tried adding it to it's own script page underneath materials and above main. But it didn't work there.

 

 

Also, I hate to double ask, but is there a way I can make a common or non-common event trigger upon death?

 

Thanks so much, for the response.

Share this post


Link to post
Share on other sites

Woah. Thanks for the quick and really helpful response! Question though. Where do I put the script? I tried adding it to it's own script page underneath materials and above main. But it didn't work there.

 

 

Also, I hate to double ask, but is there a way I can make a common or non-common event trigger upon death?

 

Thanks so much, for the response.

 

Put the script below all Falcao's scripts. I don't have the script with me, so I can't guarantee you on that. If you want a common event to play right after someone dies:

class Game_Interpreter
  #--------------------------------------------------------------------------
  # * Change HP
  #--------------------------------------------------------------------------
  def command_311
    value = operate_value(@params[2], @params[3], @params[4])
    iterate_actor_var(@params[0], @params[1]) do |actor|
      next if actor.dead?
      actor.change_hp(value, @params[5])
      actor.perform_collapse_effect if actor.dead?
    end
    $game_temp.reserve_common_event(1) if $game_party.all_dead?
  end
end

Just change this line's value:

$game_temp.reserve_common_event(1)

change 1 to any common event you like. Well that's the least and easiest way I know.

Share this post


Link to post
Share on other sites

Are you sure? I tested this on Falcao's ABS I just downloaded and it works fine. The respawning happens when ALL of your party members die.

 

Use this script:

 

 

 

#==============================================================================
# ** Pearl ABS Add-On: Respawn Areas
# Author: Soulpour777
# Web URL: infinitytears.wordpress.com
#------------------------------------------------------------------------------
# Author's Note: This is an add on for Pearl ABS. My terms are only about this
# script, thus you can use it freely if you want. Any terms of use that
# adheres to Pearl ABS goes to Falcao, the creator of the ABS himself. By
# that I don't guarantee supports to the scripts, since this script is an
# add-on. Installing this script is optional for those who wants to use this.
#------------------------------------------------------------------------------
# Please support Falcao's ABS. 
# Site: http://falcaorgss.wordpress.com/
#------------------------------------------------------------------------------
# Description:
# This script allows you to respawn in different areas when you die.
#------------------------------------------------------------------------------
# Script Calls:
# change_current_respawn(new_respawn_area)
# where new_respawn_area is the new respawn area you want to assign. Note
# that these new respawn areas are the ones from Pearl_ABS_Respawn module.
# Script call example:
# change_current_respawn(Arksophia_Lodge)
#==============================================================================

module Soulpour
  module Pearl_ABS_Respawn
    # -------------------------------------------------------------------
    # List of Respawn Areas
    #       [map_id, x, y, position]
    # -------------------------------------------------------------------
    # Default Location = Map 1, X = 2, Y = 2, Position = 1
    # -------------------------------------------------------------------
    # Start Editing below:
    # -------------------------------------------------------------------
    Default_Location = [1, 2, 2, 1] #=> Default Respawn Area
    Town_Of_Beginnings = [1, 2, 2, 1]
    Arksophia_Lodge = [75, 2, 2, 1]
    # -------------------------------------------------------------------
  end
end

class Game_Interpreter 
  include Soulpour::Pearl_ABS_Respawn
  alias :pearl_abs_respawn_add_on_soulpour_rgss3_initialize       :initialize
  attr_accessor                                                 :current_area
  #--------------------------------------------------------------------------
  # * Object Initialization
  #     depth : nest depth
  #--------------------------------------------------------------------------
  def initialize(depth = 0)
    pearl_abs_respawn_add_on_soulpour_rgss3_initialize
    @current_area = Default_Location
  end
  #--------------------------------------------------------------------------
  # * Change Respawn Area
  #     new_respawn_area : taken only from the Pear_ABS_Respawn modules!
  #     Example: change_current_respawn(Arksophia_Lodge)
  #--------------------------------------------------------------------------  
  def change_current_respawn(new_respawn_area)
    @current_area = new_respawn_area
  end
  #--------------------------------------------------------------------------
  # * Execute Respawn When Dead
  #     @current_area[0] : map_id
  #     @current_area[1] : x
  #     @current_area[2] : y
  #     @current_area[0] : position (0 - 3)  
  #--------------------------------------------------------------------------  
  def execute_respawn
    $game_party.members.each {|member| member.recover_all}
    $game_player.reserve_transfer(@current_area[0], @current_area[1], @current_area[2], @current_area[3])
    $game_player.refresh
    $game_map.autoplay
  end
  #--------------------------------------------------------------------------
  # * Change HP
  #--------------------------------------------------------------------------
  def command_311
    value = operate_value(@params[2], @params[3], @params[4])
    iterate_actor_var(@params[0], @params[1]) do |actor|
      next if actor.dead?
      actor.change_hp(value, @params[5])
      actor.perform_collapse_effect if actor.dead?
    end
      execute_respawn if $game_party.all_dead?
  end
end
 

 

 

Share this post


Link to post
Share on other sites

Thanks. I appreciate the help. But, for some odd reason, it's not working... I can't tell, what I did wrong...

 

I just copied and pasted the script underneath the others and edited the map variables in the script. Any ideas?

 

Thanks again.

Share this post


Link to post
Share on other sites

Soulpour can you make this script for XAS battle system cuz this looks really help ful

 

It works in XAS.

 

 

Thanks. I appreciate the help. But, for some odd reason, it's not working... I can't tell, what I did wrong...

 

I just copied and pasted the script underneath the others and edited the map variables in the script. Any ideas?

 

Thanks again.

 

zj4heqL.jpg

 

It's actually easy.

 

When you die, automatically you would be spawned on the default location, which is Map 1, under 2, 2 of your Map. Also, you can change that via the script call:

change_current_respawn(new_respawn_area)

where new_respawn_area is the new respawn area you want to assign. Note that these new respawn areas are the ones from Pearl_ABS_Respawn module.
 
Script call example:
 
change_current_respawn(Arksophia_Lodge)

Try to kill your character, it would respawn quickly to that place.

Share this post


Link to post
Share on other sites

Weird because it just works when you die, but the

class Game_CharacterBase
  def check_for_dead_four
    return if $game_party.members.size <= 4
    execute_respawn if all_fourdead?
  end
end 

But then again, use this script below my script respawn (which is also below Falcao's scripts)

 

Here's a demo with my script and how it works, maybe you forgot to set it up correctly: https://www.mediafire.com/?ldwy3czw7enfwsy

Edited by SoulPour777

Share this post


Link to post
Share on other sites

You're setting up everything wrong. Look at how I did it in the demo, when Eric dies, he respawns to Map 1. With the script I also put below, the script removes Falcao's original set up of Gameovers, and places a respawn area instead.

Share this post


Link to post
Share on other sites

Ohhh, try to check this script up:

class Game_CharacterBase
  def check_for_dead_four
    return if $game_party.members.size <= 4
    execute_respawn if all_fourdead?
  end
end 

I'll check it up again when this doesn't work. I'll redownload the ABS.

Share this post


Link to post
Share on other sites

Thanks for all the help, but why don't we go back to the "common event" idea. It better suits what I'm trying to achieve.

 

Please? Thanks.

Share this post


Link to post
Share on other sites

I actually answered this on the beginning of my post.


class Game_CharacterBase
  def check_for_dead_four
    return if $game_party.members.size <= 4
    reserve if all_fourdead?
  end
  
  def reserve
    $game_temp.common_event_reserve(COMMON_EVENT_ID)
  end
  
end 

class Game_Interpreter
  #--------------------------------------------------------------------------
  # * Change HP
  #--------------------------------------------------------------------------
  def command_311
    value = operate_value(@params[2], @params[3], @params[4])
    iterate_actor_var(@params[0], @params[1]) do |actor|
      next if actor.dead?
      actor.change_hp(value, @params[5])
      actor.perform_collapse_effect if actor.dead?
    end
    $game_temp.reserve_common_event(COMMON_EVENT_ID) if $game_party.all_dead?
  end
end

where COMMON_EVENT_ID is the common event you want to do.

Share this post


Link to post
Share on other sites

Hmmm, it seems its calling even the scene_map, do this:

class Scene_Map < Scene_Base
  #--------------------------------------------------------------------------
  # * Determine if Game Is Over
  #   Transition to the game over screen if the entire party is dead.
  #--------------------------------------------------------------------------
  def check_gameover
    $game_temp.reserve_common_event(COMMON_EVENT) if $game_party.all_dead?
  end
end

You'll need to recover the actor in the common event properly.

Edited by SoulPour777

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×