FRUSTRATING TARGETING SNAFU IN VX, URGENT HELP NEEDED
Posts
Pages:
1
The background is that a resurrection ability wasn't working, so I tried to make sure it was set up in the DB exactly like another resurrection ability I knew did work and had been working for months, only now when I went to test it...neither of them is working.
So basically, the problem I seem to have run into is that, for no adequately explained reason, the "Scope" (as VX calls it) of "One Ally (Dead)" no longer works. Instead, the abilities with this scope can select ANY ALLY...and always fizzle.
Having my resurrection abilities suddenly break when my project has been sitting at 99% complete for months is really frustrating.
The only possible thing I can think it would be is that the YEZ Custom Target Options script is fucking up.
But the problem with that theory is that I am pretty sure that I had that script installed and working for a while before this problem cropped up. Any help would be greatly appreciated! I'm really trying for a release in the next week or so. If there's any other info I can provide, let me know.
Thanks so much in advance.
-Max
P.S. Here is the script in question if it helps. I had to tack this big mess onto the end of the topic because hide/spoiler tags and code tags don't combine well. I really don't think it's the cause of the problem, though but perhaps a scripter can see something I can't see.
So basically, the problem I seem to have run into is that, for no adequately explained reason, the "Scope" (as VX calls it) of "One Ally (Dead)" no longer works. Instead, the abilities with this scope can select ANY ALLY...and always fizzle.
Having my resurrection abilities suddenly break when my project has been sitting at 99% complete for months is really frustrating.
The only possible thing I can think it would be is that the YEZ Custom Target Options script is fucking up.
But the problem with that theory is that I am pretty sure that I had that script installed and working for a while before this problem cropped up. Any help would be greatly appreciated! I'm really trying for a release in the next week or so. If there's any other info I can provide, let me know.
Thanks so much in advance.
-Max
P.S. Here is the script in question if it helps. I had to tack this big mess onto the end of the topic because hide/spoiler tags and code tags don't combine well. I really don't think it's the cause of the problem, though but perhaps a scripter can see something I can't see.
#===============================================================================
#
# Yanfly Engine Zealous - Custom Target Options
# Last Date Updated: 2010.02.10
# Level: Normal, Hard, Lunatic
#
# This script will raise the number of target selection options originally
# provided within the database and provide more dynamic playstyles for your
# players and characters. Included with this script are area of effect type
# selection, knockback effects, and a fully customizable lunatic selection
# process to allow for more unique selection opportunities.
#
#===============================================================================
# Updates
# -----------------------------------------------------------------------------
# o 2010.02.10 - Finished Script.
# o 2010.02.09 - Started Script.
#===============================================================================
# Instructions
# -----------------------------------------------------------------------------
# To install this script, open up your script editor and copy/paste this script
# to an open slot below â–¼ Materials but above â–¼ Main. Remember to save.
#
# -----------------------------------------------------------------------------
# Skill and Item Tags - Insert the following tags into Skill or Item noteboxes.
# -----------------------------------------------------------------------------
# <area radius: x>
# For those who want their skills to have AoE effects but not target everything,
# you can set the pixel radius with x and the skill will target units within
# that marked area. Note that area of effect targetting does not apply to
# Lunatic Mode to maintain custom control. You'll have to manually enter it in
# if you wish for area of effect targetting. Selection typical is elliptical.
#
# <area height: x%>
# By default, x is 33% allowing for a small height radius when selecting your
# targets. However, some skills can target higher than normal so use this to
# adjust it accordingly. For ellipitical selection type.
#
# <area image: phrase>
# Those that want to change the area of effect image, change the phrase name to
# the name of a file within your Graphics\Pictures folder. Leave out the file
# name extension out of phrase. For ellipitical selection type.
#
# <area blend: x>
# If you want your area image to use a different blend type, change x to the
# proper blend value. 0 for normal. 1 for additive. 2 for subtractive. For
# ellipitical selection type.
#
# <area column: x>
# For those who want an entire column (vertical) of enemies to be selected,
# use this tag. x will determine the amount of pixels both ways to offer
# targets for selection. Note that area of effect targetting does not apply to
# Lunatic Mode to maintain custom control. You'll have to manually enter it in
# if you wish for area of effect targetting. Selection typical is rectangular.
#
# <area row: x>
# For those who want an entire row (horizontal) of enemies to be selected,
# use this tag. x will determine the amount of pixels both ways to offer
# targets for selection. Note that area of effect targetting does not apply to
# Lunatic Mode to maintain custom control. You'll have to manually enter it in
# if you wish for area of effect targetting. Selection typical is rectangular.
#
# <area map>
# This will select the entire map area for valid enemies. This is pretty much
# the same thing as selecting all enemies or all allies, but offers a visual
# representation of the selection area instead. Note that area of effect
# targetting does not apply to Lunatic Mode to maintain custom control. You'll
# have to manually enter it in if you wish for area of effect targetting.
# Selection typical is rectangular.
#
# <rect image: phrase>
# Those that want to change the area of effect image, change the phrase name to
# the name of a file within your Graphics\Pictures folder. Leave out the file
# name extension out of phrase. For rectangular selection type.
#
# <rect blend: x>
# If you want your rectangle image to use a different blend type, change x to
# the proper blend value. 0 for normal. 1 for additive. 2 for subtractive. For
# rectangular selection type.
#
# <knock backward: +x> or <knock sideway: +x>
# <knock backward: -x> or <knock sideway: -x>
# This will allow your items and skills to push your enemies (and possibly
# allies) around the screen. This can potentially throw enemies into range of
# area of attack skills and items.
#
# <knock random side>
# If your skill can knock an enemy towards the side with the sideway tag, you
# can have them go a different direction each hit using this tag. They will
# swing either to the left or right without discrimination.
#
# <targets: everybody>
# This will target all existing enemies and allies without any discrimination.
# Will not differentiate damage without aid of custom scripts.
#
# <targets: target all foes>
# Although it targets all foes, it will strike whichever foe was initially
# selected first. Think of it like Final Fantasy 7's Blade Beam.
#
# <targets: target random foe x>
# This will target the selected foe, and then randomly select x enemy targets
# to attack. This way, there's at least one guaranteed foe.
#
# <targets: random foes x>
# This will target x random foes, allowing for numbers over 3. However, this
# tag will not activate if the value equals 0.
#
# <targets: multi foe x>
# This will target the same foe x times, allowing for more than 2 hits on the
# foe with one skill or item. This tag will not activate if the value equals 0.
#
# <targets: all but user>
# This will target all allies except for the user. This means that the user will
# not benefit from whatever skill or item being performed.
#
# <targets: target all allies>
# Just like "target all foes", this will target a single ally and then the rest
# making that single ally to be affected first.
#
# <targets: target random ally x>
# This will target the selected ally, and then randomly select x ally targets
# to affect. This way, there's at least one guaranteed ally.
#
# <targets: random allies x>
# This will target x random allies, allowing for numbers over 3. However, this
# tag will not activate if the value equals 0.
#
# <targets: multi ally x>
# This will target the same ally x times, allowing for more than 2 pops on the
# ally with one skill or item. This tag will not activate if the value equals 0.
#
# <sort targets: true> or <sort targets: false>
# For those with Battle Engine Zealous and don't want a skill to sort the
# targets from left to right screen position, set the tag to true.
#
# -----------------------------------------------------------------------------
# Enemy Tags - Insert the following tags into Enemy noteboxes.
# -----------------------------------------------------------------------------
# <offset x: +n> or <offset y: +n>
# <offset x: -n> or <offset y: -n>
# For those that want to center their enemies properly with the area of effect
# images and allow for the right selection calculations, use these tags to
# adjust the x and y offsets of your enemies.
#
# <unmovable>
# Some enemies need to remain stationary and cannot move or be knocked around
# like statues and whatnot. Place this tag inside of their notebox and they
# will be immune to moving.
#
#===============================================================================
# Compatibility
# -----------------------------------------------------------------------------
# - Works With: YEZ Battle Engine Zealous
# -----------------------------------------------------------------------------
# Note: This script may not work with former Yanfly Engine ReDux scripts.
# Use Yanfly Engine Zealous scripts to work with this if available.
#===============================================================================
$imported = {} if $imported == nil
$imported["CustomTargetOptions"] = true
module YEZ
module TARGET
#===========================================================================
# Area of Effect Settings
# --------------------------------------------------------------------------
# The following allows you to adjust the default settings available for
# area of effect. Note that most of these are changable with tags, but
# there's a few that will warrant your attention.
#===========================================================================
# If your actors have actual screen positions, change this value to true.
# Otherwise, set it as false as it will only cause errors.
ALLOW_AOE_ACTORS = false
# This is the file name used for area of effect selection types.
DEFAULT_SELECTION_CIRCLE = "MagicCircleFull"
# This is how much smaller (or larger) the selection height is in
# comparison to the default width of selection area. The offset is how
# much higher the circle should be than normal.
DEFAULT_SELECTION_HEIGHT = 0.33
# This determines the default selection blend type. Use the following
# values: 0 - Normal, 1 - Additive, 2 - Subtractive
DEFAULT_SELECTION_BLEND = 1
# This is the default offset coordinate offsets for enemies on screen.
# Made to center the circles properly.
DEFAULT_ENEMY_OFFSET_X = 0
DEFAULT_ENEMY_OFFSET_Y = -8
#===========================================================================
# Rectangular Settings
# --------------------------------------------------------------------------
# Like area of effect, rectangular selection has a few settings that will
# allow for unique selection. Adjust the default settings here.
#===========================================================================
# This is the file name used for the rectangular selection types.
DEFAULT_SELECTION_RECTANGLE = "MagicSquareFull"
# This determines the default selection blend type. Use the following
# values: 0 - Normal, 1 - Additive, 2 - Subtractive
DEFAULT_RECTANGULAR_BLEND = 1
#===========================================================================
# Knockback Settings
# --------------------------------------------------------------------------
# Introduced with this script is the new mechanic called knockback. This
# section lets you adjust the mechanics regarding knockback.
#===========================================================================
# Since not all games are front view, knockback will work differently in
# regards to the direction enemies are swung around. This will steer the
# knockback skills towards the right direction.
KNOCKBACK ={
# Direction => [ x, y],
:backward => [ 0, 0],
:sideward => [ 0, 0],
} # Do not remove this.
# This will determine whether or not actors will be affected by knockback
# skills. Set this to false if you don't want them to be able to move.
ACTOR_KNOCKBACK = false
# Since you probably don't want your enemies flying all over the place,
# you can set your knockback boundaries here. Note that array works in
# [left x, upper y, right x, lower y] fashion.
KNOCKBACK_BOUNDARIES = [0, 240, 544, 288]
end # TARGET
end # YEZ
#===============================================================================
# Custom Target Options - Lunatic Mode
# ----------------------------------------------------------------------------
# For those who wish to create their own custom targetting schemes, use the
# note tag below to initiate your methods.
#
# <custom target: phrase>
#
# Replace "phrase" with a phrase you'll refer to in the custom_target_creation
# method below. Note that if you include multiple custom target tags, they
# will run in order and add together all of the targets created for selection.
#
# NOTE: Since custom target creation does not determine the scope settings
# needed for the selection window, you must manually set the skill to pick
# either an ally or enemy. For example, if you're using State Buster below,
# set it to target one enemy. If you're using Speed Strike, set it to target
# all enemies. This way, there will be little confusion as to what the game
# will need to know on what to pick.
#
#===============================================================================
class Game_BattleAction
#--------------------------------------------------------------------------
# new method: custom_target_creation
#--------------------------------------------------------------------------
def custom_target_creation(obj)
targets = []
for selection in obj.custom_target
case selection
#----------------------------------------------------------------------
# Start editting here.
#----------------------------------------------------------------------
when "State Buster" # Hits foe based on number of states they have.
target = opponents_unit.smooth_target(@target_index)
hits = target.states.size
hits.times do; targets.push(target); end
when "Weakness Strike" # Hits foe two times if foe is under 25% HP.
target = opponents_unit.smooth_target(@target_index)
if target.hp <= target.maxhp / 4
targets.push(target)
targets.push(target)
else
targets.push(target)
end
when "Magic Strike" # Hits the foe two times if user is above 50% MP.
target = opponents_unit.smooth_target(@target_index)
if battler.mp >= battler.maxhp / 2
targets.push(target)
targets.push(target)
else
targets.push(target)
end
when "Speed Strike" # Hits only foes with less AGI than the user.
for member in opponents_unit.existing_members
targets.push(member) if battler.agi > member.agi
end
when "Area Select" # Hits foes with more than Half HP within the area.
target = opponents_unit.smooth_target(@target_index)
group = target.actor? ? $game_party : $game_troop
members = group.area_targets(target)
members.push(target)
for member in members
targets.push(member) if member.hp >= member.maxhp / 2
end
#----------------------------------------------------------------------
# Stop editting past this point.
#----------------------------------------------------------------------
end
end
return targets
end
end # Game_BattleAction
#===============================================================================
# Editting anything past this point may potentially result in causing computer
# damage, incontinence, explosion of user's head, coma, death, and/or halitosis.
# Therefore, edit at your own risk.
#===============================================================================
module YEZ
module REGEXP
module USABLEITEM
CUSTOM_TARGET = /<(?:CUSTOM_TARGET|custom target|custom targets):[ ](.*)>/i
SORT_TARGETS = /<(?:SORT_TARGETS|sort targets):[ ](.*)>/i
TARGETS2 = /<(?:TARGET|targets):[ ](.*)[ ](\d+)>/i
TARGETS1 = /<(?:TARGET|targets):[ ](.*)>/i
AOE_IMAGE = /<(?:AREA_IMAGE|area image):[ ](.*)>/i
AOE_BLEND = /<(?:AREA_BLEND|area blend):[ ](\d+)>/i
AOE_HEIGHT = /<(?:AREA_HEIGHT|area height):[ ](\d+)([%ï¼…])>/i
AOE_RADIUS = /<(?:AREA_RADIUS|area radius):[ ](\d+)>/i
RECT_IMAGE = /<(?:RECT_IMAGE|rect image):[ ](.*)>/i
RECT_BLEND = /<(?:RECT_BLEND|rect blend):[ ](\d+)>/i
RECT_COL = /<(?:AREA_COLUMN|area column):[ ](\d+)>/i
RECT_ROW = /<(?:AREA_ROW|area row):[ ](\d+)>/i
RECT_MAP = /<(?:AREA_MAP|area map)>/i
KNOCKBACK_BACK = /<(?:KNOCK BACKWARD|knock backwards):[ ]([\+\-]\d+)>/i
KNOCKBACK_SIDE = /<(?:KNOCK SIDEWARD|knock sideway):[ ]([\+\-]\d+)>/i
RANDOM_SIDE = /<(?:KNOCK_RANDOM_SIDE|knock random side)>/i
end # USABLEITEM
module ENEMY
OFFSET_X = /<(?:OFFSET_X|offset x):[ ]*([\+\-]\d+)>/i
OFFSET_Y = /<(?:OFFSET_Y|offset y):[ ]*([\+\-]\d+)>/i
UNMOVABLE = /<(?:UNMOVABLE|unmovable|cannot move)>/i
end # ENEMY
end # REGEXP
end # YEZ
#===============================================================================
# RPG::UsableItem
#===============================================================================
class RPG::UsableItem < RPG::BaseItem
#--------------------------------------------------------------------------
# common cache: yez_cache_usableitem_cto
#--------------------------------------------------------------------------
def yez_cache_usableitem_cto
@custom_scope = "NONE"; @scope_value = 0; @custom_target = []
@sort_targets = true; @knock_backward = 0; @knock_sideward = 0
@knock_random_side = false; @selection_radius = 0
@selection_circle = YEZ::TARGET::DEFAULT_SELECTION_CIRCLE
@selection_blend = YEZ::TARGET::DEFAULT_SELECTION_BLEND
@selection_height = YEZ::TARGET::DEFAULT_SELECTION_HEIGHT
@rect_image = YEZ::TARGET::DEFAULT_SELECTION_RECTANGLE
@rect_blend = YEZ::TARGET::DEFAULT_SELECTION_BLEND
@rect_type = 0; @rect_value = 0
self.note.split(/[\r\n]+/).each { |line|
case line
#---
when YEZ::REGEXP::USABLEITEM::AOE_IMAGE
@selection_circle = $1.to_s
when YEZ::REGEXP::USABLEITEM::AOE_BLEND
@selection_blend = $1.to_i
when YEZ::REGEXP::USABLEITEM::AOE_HEIGHT
@selection_height = $1.to_i / 100.0
when YEZ::REGEXP::USABLEITEM::AOE_RADIUS
@selection_radius = [$1.to_i, 3].max
#---
when YEZ::REGEXP::USABLEITEM::RECT_IMAGE
@rect_image = $1.to_s
when YEZ::REGEXP::USABLEITEM::RECT_BLEND
@rect_blend = $1.to_i
when YEZ::REGEXP::USABLEITEM::RECT_COL
@rect_type = 1; @rect_value = [$1.to_i, 3].max
when YEZ::REGEXP::USABLEITEM::RECT_ROW
@rect_type = 2; @rect_value = [$1.to_i, 3].max
when YEZ::REGEXP::USABLEITEM::RECT_MAP
@rect_type = 3
#---
when YEZ::REGEXP::USABLEITEM::KNOCKBACK_BACK
@knock_backward = $1.to_i
when YEZ::REGEXP::USABLEITEM::KNOCKBACK_SIDE
@knock_sideward = $1.to_i
when YEZ::REGEXP::USABLEITEM::RANDOM_SIDE
@knock_random_side = $1.to_i
#---
when YEZ::REGEXP::USABLEITEM::CUSTOM_TARGET
@custom_target.push($1.to_s)
@custom_scope = "CUSTOM"
when YEZ::REGEXP::USABLEITEM::SORT_TARGETS
case $1.upcase
when "TRUE", "YES"
@sort_targets = true
when "FALSE", "NO"
@sort_targets = false
end
when YEZ::REGEXP::USABLEITEM::TARGETS2
case $1.upcase
when "TARGET RANDOM FOE"
text = "TARGET RANDOM FOE"
@scope_value = $2.to_i
@sort_targets = false
when "RANDOM FOE", "RANDOM FOES"
text = "RANDOM FOE"
@scope_value = $2.to_i
next if @scope_value <= 0
when "MULTI FOE", "MULTI-HIT FOE", "MULTHIT FOE"
text = "MULTI FOE"
@scope_value = $2.to_i
next if @scope_value <= 0
when "TARGET RANDOM ALLY"
text = "TARGET RANDOM ALLY"
@scope_value = $2.to_i
@sort_targets = false
when "RANDOM ALLY", "RANDOM ALLIES"
text = "RANDOM ALLY"
@scope_value = $2.to_i
next if @scope_value <= 0
when "MULTI ALLY", "MULTI-HIT ALLY", "MULTHIT ALLY"
text = "MULTI ALLY"
@scope_value = $2.to_i
next if @scope_value <= 0
else; next
end
@custom_scope = text
#---
when YEZ::REGEXP::USABLEITEM::TARGETS1
case $1.upcase
#---
when "EVERYBODY"
text = "EVERYBODY"
#---
when "TARGET ALL FOES"
text = "TARGET ALL FOES"
@sort_targets = false
when "ALL BUT USER"
text = "ALL BUT USER"
when "TARGET ALL ALLIES"
text = "TARGET ALL ALLIES"
@sort_targets = false
#---
else; next
end
@custom_scope = text
#---
end
} # end self.note.split
end # yez_cache_baseitem_el
#--------------------------------------------------------------------------
# overwrite method: need_selection?
#--------------------------------------------------------------------------
def need_selection?
yez_cache_usableitem_cto if @custom_scope == nil
no_selection = ["EVERYBODY", "RANDOM FOE", "ALL BUT USER", "RANDOM ALLY"]
yes_selection = ["TARGET ALL FOES", "TARGET RANDOM FOE", "MULTI FOE",
"TARGET RANDOM ALLY", "MULTI ALLY"]
return false if no_selection.include?(@custom_scope)
return true if yes_selection.include?(@custom_scope)
return [1, 3, 7, 9].include?(@scope)
end
#--------------------------------------------------------------------------
# overwrite method: for_opponent?
#--------------------------------------------------------------------------
def for_opponent?
yez_cache_usableitem_cto if @custom_scope == nil
no_selection = ["ALL BUT USER", "TARGET RANDOM ALLY", "RANDOM ALLY",
"MULTI ALLY"]
yes_selection = ["EVERYBODY", "TARGET ALL FOES", "TARGET RANDOM FOE",
"RANDOM FOE", "MULTI FOE"]
return false if no_selection.include?(@custom_scope)
return true if yes_selection.include?(@custom_scope)
return [1, 2, 3, 4, 5, 6].include?(@scope)
end
#--------------------------------------------------------------------------
# overwrite method: for_friend?
#--------------------------------------------------------------------------
def for_friend?
yez_cache_usableitem_cto if @custom_scope == nil
no_selection = ["TARGET ALL FOES", "TARGET RANDOM FOE", "RANDOM FOE",
"MULTI ALLY"]
yes_selection = ["EVERYBODY", "ALL BUT USER", "TARGET RANDOM ALLY",
"RANDOM ALLY"]
return false if no_selection.include?(@custom_scope)
return true if yes_selection.include?(@custom_scope)
return [7, 8, 9, 10, 11].include?(@scope)
end
#--------------------------------------------------------------------------
# overwrite method: for_user?
#--------------------------------------------------------------------------
def for_user?
yez_cache_usableitem_cto if @custom_scope == nil
return false if @custom_scope == "ALL BUT USER"
return [11].include?(@scope)
end
#--------------------------------------------------------------------------
# new method: custom_scope
#--------------------------------------------------------------------------
def custom_scope
yez_cache_usableitem_cto if @custom_scope == nil
return @custom_scope.upcase
end
#--------------------------------------------------------------------------
# new method: scope_value
#--------------------------------------------------------------------------
def scope_value
yez_cache_usableitem_cto if @scope_value == nil
return @scope_value
end
#--------------------------------------------------------------------------
# new method: custom_target
#--------------------------------------------------------------------------
def custom_target
yez_cache_usableitem_cto if @custom_target == nil
return @custom_target
end
#--------------------------------------------------------------------------
# new method: sort_targets?
#--------------------------------------------------------------------------
def sort_targets?
yez_cache_usableitem_cto if @sort_targets == nil
return @sort_targets
end
#--------------------------------------------------------------------------
# new method: selection_circle
#--------------------------------------------------------------------------
def selection_circle
yez_cache_usableitem_cto if @selection_circle == nil
return @selection_circle
end
#--------------------------------------------------------------------------
# new method: selection_blend
#--------------------------------------------------------------------------
def selection_blend
yez_cache_usableitem_cto if @selection_blend == nil
return @selection_blend
end
#--------------------------------------------------------------------------
# new method: selection_height
#--------------------------------------------------------------------------
def selection_height
yez_cache_usableitem_cto if @selection_height == nil
return @selection_height
end
#--------------------------------------------------------------------------
# new method: selection_radius
#--------------------------------------------------------------------------
def selection_radius
yez_cache_usableitem_cto if @selection_radius == nil
return @selection_radius
end
#--------------------------------------------------------------------------
# new method: rect_image
#--------------------------------------------------------------------------
def rect_image
yez_cache_usableitem_cto if @rect_image == nil
return @rect_image
end
#--------------------------------------------------------------------------
# new method: rect_blend
#--------------------------------------------------------------------------
def rect_blend
yez_cache_usableitem_cto if @rect_blend == nil
return @rect_blend
end
#--------------------------------------------------------------------------
# new method: rect_type
#--------------------------------------------------------------------------
def rect_type
yez_cache_usableitem_cto if @rect_type == nil
return @rect_type
end
#--------------------------------------------------------------------------
# new method: rect_value
#--------------------------------------------------------------------------
def rect_value
yez_cache_usableitem_cto if @rect_value == nil
return @rect_value
end
#--------------------------------------------------------------------------
# new method: knock_backward
#--------------------------------------------------------------------------
def knock_backward
yez_cache_usableitem_cto if @knock_backward == nil
return @knock_backward
end
#--------------------------------------------------------------------------
# new method: knock_sideward
#--------------------------------------------------------------------------
def knock_sideward
yez_cache_usableitem_cto if @knock_sideward == nil
return @knock_sideward
end
#--------------------------------------------------------------------------
# new method: knock_random_side
#--------------------------------------------------------------------------
def knock_random_side
yez_cache_usableitem_cto if @knock_sideward == nil
return @knock_random_side
end
end # RPG::UsableItem
#===============================================================================
# RPG::Enemy
#===============================================================================
class RPG::Enemy
#--------------------------------------------------------------------------
# common cache: yez_cache_enemy_cto
#--------------------------------------------------------------------------
def yez_cache_enemy_cto
@offset_x = YEZ::TARGET::DEFAULT_ENEMY_OFFSET_X
@offset_y = YEZ::TARGET::DEFAULT_ENEMY_OFFSET_Y
@unmovable = false
self.note.split(/[\r\n]+/).each { |line|
case line
#---
when YEZ::REGEXP::ENEMY::OFFSET_X
@offset_x = $1.to_i
when YEZ::REGEXP::ENEMY::OFFSET_Y
@offset_y = $1.to_i
#---
when YEZ::REGEXP::ENEMY::UNMOVABLE
@unmovable = TRUE
#---
end
} # end self.note.split
end
#--------------------------------------------------------------------------
# new method: offset_x
#--------------------------------------------------------------------------
def offset_x
yez_cache_enemy_cto if @offset_x == nil
return @offset_x
end
#--------------------------------------------------------------------------
# new method: offset_y
#--------------------------------------------------------------------------
def offset_y
yez_cache_enemy_cto if @offset_y == nil
return @offset_y
end
#--------------------------------------------------------------------------
# new method: unmovable
#--------------------------------------------------------------------------
def unmovable
yez_cache_enemy_cto if @unmovable == nil
return @unmovable
end
end # RPG::Enemy
#===============================================================================
# Game_Battler
#===============================================================================
class Game_Battler
#--------------------------------------------------------------------------
# public instance variables
#--------------------------------------------------------------------------
attr_accessor :update_knockback
attr_accessor :knockback_x
attr_accessor :knockback_y
#--------------------------------------------------------------------------
# alias method: clear_action_results
#--------------------------------------------------------------------------
alias clear_action_results_cto clear_action_results unless $@
def clear_action_results
clear_action_results_cto
@update_knockback = false
end
#--------------------------------------------------------------------------
# alias method: item_effect
#--------------------------------------------------------------------------
alias item_effect_cto item_effect unless $@
def item_effect(user, item)
item_effect_cto(user, item)
calculate_knockback(user, item) if !@skipped and !@missed and !@evaded
end
#--------------------------------------------------------------------------
# alias method: skill_effect
#--------------------------------------------------------------------------
alias skill_effect_cto skill_effect unless $@
def skill_effect(user, skill)
skill_effect_cto(user, skill)
calculate_knockback(user, skill) if !@skipped and !@missed and !@evaded
end
#--------------------------------------------------------------------------
# new method: calculate_knockback
#--------------------------------------------------------------------------
def calculate_knockback(user, obj)
return unless can_knockback?(true)
hash = knockback_hash
dest_x = 0; dest_y = 0
if obj.knock_random_side
random_x = (rand(100) >= 50) ? -1 : 1
else
random_x = 1
end
dest_x += obj.knock_backward * hash[:backward][0]
dest_y += obj.knock_backward * hash[:backward][1]
dest_x += obj.knock_sideward * hash[:sideward][0] * random_x
dest_y += obj.knock_sideward * hash[:sideward][1] * random_x
if !self.actor?
dest_x *= -1
dest_y *= -1
end
set_knockback(dest_x, dest_y)
end
#--------------------------------------------------------------------------
# new method: knockback_hash
#--------------------------------------------------------------------------
def knockback_hash; return YEZ::TARGET::KNOCKBACK; end
#--------------------------------------------------------------------------
# new method: set_knockback
#--------------------------------------------------------------------------
def set_knockback(dest_x = nil, dest_y = nil)
boundary = YEZ::TARGET::KNOCKBACK_BOUNDARIES
if dest_x != nil
result = self.screen_x + dest_x
result = [[result, boundary[0]].max, boundary[2]].min
@knockback_x = result
end
if dest_y != nil
result = self.screen_y + dest_y
result = [[result, boundary[1]].max, boundary[3]].min
@knockback_y = result
end
end
#--------------------------------------------------------------------------
# new method: spriteset
#--------------------------------------------------------------------------
def spriteset
if actor?
return $scene.spriteset.actor_sprites[index]
else
return $scene.spriteset.enemy_sprites.reverse[index]
end
end
#--------------------------------------------------------------------------
# new method: bitmap_height
#--------------------------------------------------------------------------
def bitmap_height; return spriteset.height; end
#--------------------------------------------------------------------------
# new method: bitmap_width
#--------------------------------------------------------------------------
def bitmap_width; return spriteset.width; end
end # Game_Battler
#===============================================================================
# Game_Actor
#===============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# new method: can_knockback?
#--------------------------------------------------------------------------
def can_knockback?(ignore = false)
return YEZ::TARGET::ACTOR_KNOCKBACK
end
#--------------------------------------------------------------------------
# anti-crash methods: bitmap_width and bitmap_height
#--------------------------------------------------------------------------
unless method_defined?(:bitmap_width)
def bitmap_width; return 32; end
def bitmap_height; return 32; end
end # method_defined?(:bitmap_width)
end # Game_Actor
#===============================================================================
# Game_Enemy
#===============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# new method: can_knockback?
#--------------------------------------------------------------------------
def can_knockback?(ignore = false)
return false if enemy.unmovable
return true
end
#--------------------------------------------------------------------------
# alias method: screen_x
#--------------------------------------------------------------------------
alias screen_x_character_srw screen_x unless $@
def screen_x
return @battle_screen_x if @battle_screen_x != nil
return screen_x_character_srw
end
#--------------------------------------------------------------------------
# new method: screen_x=
#--------------------------------------------------------------------------
def screen_x=(value); @battle_screen_x = value; end
#--------------------------------------------------------------------------
# alias method: screen_y
#--------------------------------------------------------------------------
alias screen_y_character_srw screen_y unless $@
def screen_y
return @battle_screen_y if @battle_screen_y != nil
return screen_y_character_srw
end
#--------------------------------------------------------------------------
# new method: screen_y=
#--------------------------------------------------------------------------
def screen_y=(value); @battle_screen_y = value; end
end # Game_Enemy
#===============================================================================
# Game_BattleAction
#===============================================================================
class Game_BattleAction
#--------------------------------------------------------------------------
# alias method: make_obj_targets
#--------------------------------------------------------------------------
alias make_obj_targets_cto make_obj_targets unless $@
def make_obj_targets(obj)
targets = []
#------------------------------------------------------------------------
case obj.custom_scope
when "CUSTOM"
return custom_target_creation(obj)
when "EVERYBODY"
targets += opponents_unit.existing_members
targets += friends_unit.existing_members
when "TARGET ALL FOES"
selected = opponents_unit.smooth_target(@target_index)
other_targets = opponents_unit.existing_members
other_targets -= [selected]
targets.push(selected)
targets += other_targets
when "TARGET RANDOM FOE"
targets.push(opponents_unit.smooth_target(@target_index))
$game_temp.true_random = true if $imported["AggroAI"]
obj.scope_value.times do; targets.push(opponents_unit.random_target); end
when "RANDOM FOE"
obj.scope_value.times do; targets.push(opponents_unit.random_target); end
when "MULTI FOE"
selected = opponents_unit.smooth_target(@target_index)
obj.scope_value.times do; targets.push(selected); end
when "ALL BUT USER"
targets += friends_unit.existing_members
targets.delete(battler)
when "TARGET RANDOM ALLY"
selected = friends_unit.smooth_target(@target_index)
other_targets = friends_unit.existing_members
other_targets -= [selected]
targets.push(selected)
targets += other_targets
when "RANDOM ALLY"
obj.scope_value.times do; targets.push(friends_unit.random_target); end
when "MULTI ALLY"
selected = friends_unit.smooth_target(@target_index)
obj.scope_value.times do; targets.push(selected); end
else
$game_temp.true_random = true_random? if $imported["AggroAI"]
targets = make_obj_targets_cto(obj)
end
$game_temp.true_random = nil if $imported["AggroAI"]
for target in targets
group = target.actor? ? $game_party : $game_troop
targets += group.area_targets(target)
end
return targets
end
end # Game_BattleAction
#===============================================================================
# Game_Unit
#===============================================================================
class Game_Unit
#--------------------------------------------------------------------------
# new method: area_targets
#--------------------------------------------------------------------------
def area_targets(main_target)
return [] unless $scene.is_a?(Scene_Battle)
return [] if main_target.actor? and !YEZ::TARGET::ALLOW_AOE_ACTORS
if $scene.active_battler.action.skill?
obj = $scene.active_battler.action.skill
elsif $scene.active_battler.action.item?
obj = $scene.active_battler.action.item
else
obj = nil
end
return [] if obj == nil
result = []
for member in members
next if member.dead? != obj.for_dead_friend?
result.push(member) if within_radius?(main_target, member, obj)
result.push(member) if within_area?(main_target, member, obj)
end
return result.uniq
end
#--------------------------------------------------------------------------
# new method: within_radius?
#--------------------------------------------------------------------------
def within_radius?(main_target, target, obj)
return false if target.actor? and !YEZ::TARGET::ALLOW_AOE_ACTORS
return false if target == main_target
return false if obj == nil
return false if obj.selection_radius <= 0
radius = obj.selection_radius + 1
height = obj.selection_height
#--- Target Point Creation ---
main_x = main_target.screen_x
main_y = main_target.screen_y
target_x = target.screen_x
target_y = target.screen_y
#--- Target Offset Buffering ---
main_x += main_target.enemy.offset_x unless main_target.actor?
main_y += main_target.enemy.offset_y unless main_target.actor?
target_x += target.enemy.offset_x unless target.actor?
target_y += target.enemy.offset_y unless target.actor?
#--- Target Point Buffering ---
if main_x >= target_x
target_x += target.bitmap_width/2
elsif main_x <= target_x
target_x -= target.bitmap_width/2
end
#--- Calculations ---
x = (target_x - main_x) * Math.cos(0) + (target_y - main_y) * Math.sin(0)
y = -(target_x - main_x) * Math.sin(0) + (target_y - main_y) * Math.cos(0)
a = radius; b = radius * height
return (x**2 / a**2) + (y**2 / b**2) <= 1
end
#--------------------------------------------------------------------------
# new method: within_area?
#--------------------------------------------------------------------------
def within_area?(main_target, target, obj)
return false if target.actor? and !YEZ::TARGET::ALLOW_AOE_ACTORS
return false if target == main_target
return false if obj == nil
return false if obj.rect_type <= 0
#--- Target Point Creation ---
main_x = main_target.screen_x
main_y = main_target.screen_y
target_x = target.screen_x
target_y = target.screen_y
#--- Target Offset Buffering ---
main_x += main_target.enemy.offset_x unless main_target.actor?
main_y += main_target.enemy.offset_y unless main_target.actor?
target_x += target.enemy.offset_x unless target.actor?
target_y += target.enemy.offset_y unless target.actor?
#--- Target Point Buffering ---
if main_x >= target_x
target_x += target.bitmap_width/2
elsif main_x <= target_x
target_x -= target.bitmap_width/2
end
#--- Area Creation ---
case obj.rect_type
when 1 # Column
y1 = 0; y2 = Graphics.height
x1 = main_x - obj.rect_value
x2 = main_x + obj.rect_value
when 2 # Row
x1 = 0; x2 = Graphics.width
y1 = main_y - obj.rect_value
y2 = main_y + obj.rect_value
when 3 # Map
x1 = 0; x2 = Graphics.width
y1 = 0; y2 = Graphics.height
else; return false
end
#--- Calculations ---
in_x = ((x1..x2) === target_x)
in_y = ((y1..y2) === target_y)
return (in_x and in_y)
end
end # Game_Unit
#===============================================================================
# Spriteset_Battle
#===============================================================================
class Spriteset_Battle
#--------------------------------------------------------------------------
# public instance variables
#--------------------------------------------------------------------------
attr_accessor :enemy_sprites
attr_accessor :actor_sprites
#--------------------------------------------------------------------------
# alias method: update
#--------------------------------------------------------------------------
alias update_spriteset_battle_cto update unless $@
def update
update_spriteset_battle_cto
update_magic_circle
update_magic_square
end
#--------------------------------------------------------------------------
# new method: create_magic_circle
#--------------------------------------------------------------------------
def create_magic_circle(enemy_window, active_battler)
if active_battler.action.skill?
obj = active_battler.action.skill
elsif active_battler.action.item?
obj = active_battler.action.item
else
return
end
return if obj.selection_radius <= 0
@enemy_window = enemy_window
@magic_circle_sprite = Sprite.new(@viewport1)
@magic_circle_sprite.bitmap = Cache.picture(obj.selection_circle)
diameter = obj.selection_radius*2 + 1
@magic_circle_sprite.blend_type = obj.selection_blend
@magic_circle_sprite.zoom_x = diameter * 1.125 /
@magic_circle_sprite.width
@magic_circle_sprite.zoom_y = @magic_circle_sprite.zoom_x *
(obj.selection_height + 0.01)
@magic_circle_sprite.ox = @magic_circle_sprite.width/2
@magic_circle_sprite.oy = @magic_circle_sprite.height/2
@magic_circle_sprite.z = 2
end
#--------------------------------------------------------------------------
# new method: dispose_magic_circle
#--------------------------------------------------------------------------
def dispose_magic_circle
@magic_circle_sprite.dispose if @magic_circle_sprite != nil
@magic_circle_sprite = nil
@enemy_window = nil
end
#--------------------------------------------------------------------------
# new method: update_magic_circle
#--------------------------------------------------------------------------
def update_magic_circle
return if @magic_circle_sprite == nil
if @enemy_window != nil
target = @enemy_window.enemy
@magic_circle_sprite.x = target.screen_x + target.enemy.offset_x
@magic_circle_sprite.y = target.screen_y + target.enemy.offset_y
end
@magic_circle_sprite.opacity += @magic_circle_sprite_upward ? 8 : -8
if @magic_circle_sprite.opacity <= 0
@magic_circle_sprite_upward = true
elsif @magic_circle_sprite.opacity >= 255
@magic_circle_sprite_upward = false
end
end
#--------------------------------------------------------------------------
# new method: create_magic_square
#--------------------------------------------------------------------------
def create_magic_square(enemy_window, active_battler)
if active_battler.action.skill?
obj = active_battler.action.skill
elsif active_battler.action.item?
obj = active_battler.action.item
else
return
end
return if obj.rect_type <= 0
@enemy_window = enemy_window
@magic_square_sprite = Sprite.new(@viewport1)
@magic_square_sprite.bitmap = Cache.picture(obj.rect_image)
@magic_square_sprite.blend_type = obj.rect_blend
@magic_square_type = obj.rect_type
rect_value = obj.rect_value * 2 + 1
case @magic_square_type
when 1 # Column
@magic_square_sprite.zoom_x = rect_value * 1.0 /
@magic_square_sprite.width
@magic_square_sprite.zoom_y = Graphics.height * 1.0 /
@magic_square_sprite.height
@magic_square_sprite.ox = @magic_square_sprite.width/2
when 2 # Row
@magic_square_sprite.zoom_x = Graphics.width * 1.0 /
@magic_square_sprite.width
@magic_square_sprite.zoom_y = rect_value * 1.0 /
@magic_square_sprite.height
@magic_square_sprite.oy = @magic_square_sprite.height/2
when 3 # Map
bounds = YEZ::TARGET::KNOCKBACK_BOUNDARIES
@magic_square_sprite.zoom_x = (bounds[2]-bounds[0]) * 1.0 /
@magic_square_sprite.width
@magic_square_sprite.zoom_y = (bounds[3]-bounds[1]) * 1.0 /
@magic_square_sprite.height
end
@magic_square_sprite.z = 3
end
#--------------------------------------------------------------------------
# new method: dispose_magic_square
#--------------------------------------------------------------------------
def dispose_magic_square
@magic_square_sprite.dispose if @magic_square_sprite != nil
@magic_square_sprite = nil
@enemy_window = nil
end
#--------------------------------------------------------------------------
# new method: update_magic_square
#--------------------------------------------------------------------------
def update_magic_square
return if @magic_square_sprite == nil
if @enemy_window != nil
target = @enemy_window.enemy
case @magic_square_type
when 1 # Column
@magic_square_sprite.x = target.screen_x + target.enemy.offset_x
when 2 # Row
@magic_square_sprite.y = target.screen_y + target.enemy.offset_y
when 3 # Map
@magic_square_sprite.x = YEZ::TARGET::KNOCKBACK_BOUNDARIES[0]
@magic_square_sprite.y = YEZ::TARGET::KNOCKBACK_BOUNDARIES[1]
end
end
@magic_square_sprite.opacity += @magic_square_sprite_upward ? 8 : -8
if @magic_square_sprite.opacity <= 0
@magic_square_sprite_upward = true
elsif @magic_square_sprite.opacity >= 255
@magic_square_sprite_upward = false
end
end
end # Spriteset_Battle
#===============================================================================
# Scene_Battle
#===============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# public instance variables
#--------------------------------------------------------------------------
attr_accessor :active_battler
attr_accessor :spriteset
#--------------------------------------------------------------------------
# alias method: update_basic
#--------------------------------------------------------------------------
alias update_basic_cto update_basic unless $@
def update_basic(main = false)
update_basic_cto(main)
update_knockback
end
#--------------------------------------------------------------------------
# new method: update_knockback
#--------------------------------------------------------------------------
def update_knockback
for member in $game_troop.members
next unless member.can_knockback?
push_knockback(member)
end
for member in $game_party.members
next unless member.can_knockback?
push_knockback(member)
end
end
#--------------------------------------------------------------------------
# new method: push_knockback
#--------------------------------------------------------------------------
def push_knockback(member)
if member.knockback_x != nil
dist_x = (member.knockback_x - member.screen_x).abs
modifier = (member.knockback_x > member.screen_x) ? 1 : -1
if dist_x > 256
modifier *= 10
elsif dist_x > 128
modifier *= 8
elsif dist_x > 64
modifier *= 6
elsif dist_x > 32
modifier *= 4
elsif dist_x > 16
modifier *= 3
elsif dist_x > 8
modifier *= 2
elsif dist_x > 4
modifier *= 1
elsif dist_x <= 0
member.update_knockback = nil
member.knockback_x = nil
modifier *= 0
end
member.screen_x += modifier
end
if member.knockback_y != nil
dist_y = (member.knockback_y - member.screen_y).abs
modifier = (member.knockback_y > member.screen_y) ? 1 : -1
if dist_y > 256
modifier *= 10
elsif dist_y > 128
modifier *= 8
elsif dist_y > 64
modifier *= 6
elsif dist_y > 32
modifier *= 4
elsif dist_y > 16
modifier *= 3
elsif dist_y > 8
modifier *= 2
elsif dist_y > 4
modifier *= 1
elsif dist_y <= 0
member.update_knockback = nil
member.knockback_y = nil
modifier *= 0
end
member.screen_y += modifier
end
end
#--------------------------------------------------------------------------
# alias method: start_target_enemy_selection
#--------------------------------------------------------------------------
alias start_target_enemy_selection_cto start_target_enemy_selection unless $@
def start_target_enemy_selection
start_target_enemy_selection_cto
@spriteset.create_magic_circle(@target_enemy_window, @active_battler)
@spriteset.create_magic_square(@target_enemy_window, @active_battler)
end
#--------------------------------------------------------------------------
# alias method: end_target_enemy_selection
#--------------------------------------------------------------------------
alias end_target_enemy_selection_cto end_target_enemy_selection unless $@
def end_target_enemy_selection
end_target_enemy_selection_cto
@spriteset.dispose_magic_circle
@spriteset.dispose_magic_square
end
#--------------------------------------------------------------------------
# alias method: update_target_enemy_selection
#--------------------------------------------------------------------------
alias update_target_enemy_selection_cto update_target_enemy_selection unless $@
def update_target_enemy_selection
update_target_enemy_selection_cto
return if @target_enemy_window == nil
for member in $game_troop.area_targets(@target_enemy_window.enemy)
member.white_flash = true
end
end
#--------------------------------------------------------------------------
# alias method: display_damage
#--------------------------------------------------------------------------
alias display_damage_cto display_damage unless $@
def display_damage(target, obj = nil)
display_damage_cto(target, obj)
target.update_knockback = true
end
end # Scene_Battle
#===============================================================================
#
# END OF FILE
#
#===============================================================================
Why are you "pretty sure" instead of utterly certain? Start by placing Main above your custom scripts and testing your revive skills. Move Main down a script and test; repeat until they break. The script you just moved Main under is your culprit.
I have an actual answer to that question, but it seems way too complicated to explain.
Suffice to say due to various circumstances that kind of diagnostic process is not an option for me.
Suffice to say due to various circumstances that kind of diagnostic process is not an option for me.
Jesus Christ, I tried to do what you said and it broke my entire project. I moved main back...and my entire project is still broken.
I had this weird thing in XP, where going to do anything involving scope made the game crash(in just one troop I think), despite the fact I hadn't touched the default battle system at all. It just fixed itself a few hours later. I think I just kept changing the conditions, until the problem undid itself and I could go back to what I had. I was very confused.
So just keep messing around with stuff and your glitch may fix itself too!
So just keep messing around with stuff and your glitch may fix itself too!
Okay, put the targeting script below main, tested it, and the problem is still happening. I don't have any other scripts that it would make sense would be affecting this. Thoughts?
/me checks.
No. One Main, contained below one Main Process thing with a little down pointing black triangle.
Anyway, forget the "HORRIBLE FATAL DOOM ERROR" bug. That is a separate issue and has been (for now) resolved.
The issue that is still present is the one I made this post about. Even placing the YEZ targeting script beneath Main and starting a new game, targeting on "One Ally (Dead)" skills seems thoroughly borked.
Sorry if I have been snappy I'm just kind of in a bit of a panic about this. I've been 99% done with the game for months but every week that goes by without a release, I feel that the chance of it ever being released gets exponentially less likely. Suffice to say it would be "inconvenient" for me to systematically test every script in that manner, in the same way it would be inconvenient to be a Cambodian intellectual during the reign of the Khmer Rouge. So I'm really hoping this can be solved/troubleshooted through some other means.
No. One Main, contained below one Main Process thing with a little down pointing black triangle.
Anyway, forget the "HORRIBLE FATAL DOOM ERROR" bug. That is a separate issue and has been (for now) resolved.
The issue that is still present is the one I made this post about. Even placing the YEZ targeting script beneath Main and starting a new game, targeting on "One Ally (Dead)" skills seems thoroughly borked.
Sorry if I have been snappy I'm just kind of in a bit of a panic about this. I've been 99% done with the game for months but every week that goes by without a release, I feel that the chance of it ever being released gets exponentially less likely. Suffice to say it would be "inconvenient" for me to systematically test every script in that manner, in the same way it would be inconvenient to be a Cambodian intellectual during the reign of the Khmer Rouge. So I'm really hoping this can be solved/troubleshooted through some other means.
If placing YEZ Targeting under Main (i.e., making VX completely ignore that script) doesn't fix it, then YEZ Targeting isn't your culprit. Have any other edits been made to those methods?
I don't really understand what the problem is or I would be glad to help.
Here is a very simple way to disable a script without moving anything around.
Add this to the top of any script on the first line and everything below will be ignored by the game.
Note: You will know it worked because all the text will be turned black
That way you can pinpoint where your problem is.
Here is a very simple way to disable a script without moving anything around.
Add this to the top of any script on the first line and everything below will be ignored by the game.
__END__
That way you can pinpoint where your problem is.
No Anaryu it very wasn't and it is preventing a project that has been complete for months from seeing release, which is incredibly upsetting.
@Chaos: The problem is that I don't think I HAVE other scripts that could be effecting those methods. The OTHER problem is that I am pretty sure I have not installed any new scripts or anything, this has just STARTED happening and I don't know why. The one thing I know is that either I am being unbelievably myopic, or it is not being caused by a problem in the database.
@TDS: The method I prefer to use is just DELETING the script/pasting it into a dummy project for safe keeping, that way I know it's gone. The issue isn't how to neutralize a script, the issue is I have a lot of scripts, removing some of them makes the project untestable, and...see above. Unless I've gone insane, it definitely isn't the one script I thought it might make sense for it to be.
What I really need is a very experienced scripter with a ton of free time to look really closely at everything going on in the project and figure out what weird obscure gasket blew to cause this problem to blindside me out of nowhere. In lieu of that, I might NEVER be able to release a project that has BEEN DONE since early june.
I'm really at "battle stations" here--this project has been at READY TO GO for months, with the only reason for me not making a full public final build release being that I did not have my OST ducks in a row yet. It's gone from DONE, FINISHED, JUST NEEDS A FRESH COAT OF PAINT to BROKEN AND I DON'T KNOW HOW TO FIX IT seemingly for no reason. I could try to revert to a previous edition (I have several betas backed up) but I don't know if that would fix it and I don't want to lose all the work I've done since the last beta edition. If I sound like I'm panicking, it's because I am.
Honestly I was kind of "done" with game making (at least for a while) but I kept thinking about how stupid it was to leave with a project that was all but 100% done just sitting in my folder waiting to go. Then when I tried to do the final .01%, even though I changed nothing that would have effected it, my skills started breaking.
@Chaos: The problem is that I don't think I HAVE other scripts that could be effecting those methods. The OTHER problem is that I am pretty sure I have not installed any new scripts or anything, this has just STARTED happening and I don't know why. The one thing I know is that either I am being unbelievably myopic, or it is not being caused by a problem in the database.
@TDS: The method I prefer to use is just DELETING the script/pasting it into a dummy project for safe keeping, that way I know it's gone. The issue isn't how to neutralize a script, the issue is I have a lot of scripts, removing some of them makes the project untestable, and...see above. Unless I've gone insane, it definitely isn't the one script I thought it might make sense for it to be.
What I really need is a very experienced scripter with a ton of free time to look really closely at everything going on in the project and figure out what weird obscure gasket blew to cause this problem to blindside me out of nowhere. In lieu of that, I might NEVER be able to release a project that has BEEN DONE since early june.
I'm really at "battle stations" here--this project has been at READY TO GO for months, with the only reason for me not making a full public final build release being that I did not have my OST ducks in a row yet. It's gone from DONE, FINISHED, JUST NEEDS A FRESH COAT OF PAINT to BROKEN AND I DON'T KNOW HOW TO FIX IT seemingly for no reason. I could try to revert to a previous edition (I have several betas backed up) but I don't know if that would fix it and I don't want to lose all the work I've done since the last beta edition. If I sound like I'm panicking, it's because I am.
Honestly I was kind of "done" with game making (at least for a while) but I kept thinking about how stupid it was to leave with a project that was all but 100% done just sitting in my folder waiting to go. Then when I tried to do the final .01%, even though I changed nothing that would have effected it, my skills started breaking.
IMPORTANT UPDATE:
I think my incredible panic attack could be explained by my jumping back into a project that had just sat for over a month, and incorrectly remembering how the "One Ally (Dead)" scope is SUPPOSED to work.
I REMEMBER it working as only choosing from Dead Allies, whereas now it can choose a living ally, and fizzle (resolve unsuccessfully). Maybe this is the way it has always been, and I just remembered wrong. In any case, the abilities DO seem to work when used on DEAD allies, and being able to choose a wrong target is just annoying, not a game breaker, hence the importance of this is downgraded significantly and there could be (I am embarassed to admit) no problem at all.
Maybe I am just remembering it wrong. Yes I feel embarrassed and yes I'm sorry for making such a fuss. I still don't know that there's NO problem but it seems to be far less crucial than I thought it was.
I think my incredible panic attack could be explained by my jumping back into a project that had just sat for over a month, and incorrectly remembering how the "One Ally (Dead)" scope is SUPPOSED to work.
I REMEMBER it working as only choosing from Dead Allies, whereas now it can choose a living ally, and fizzle (resolve unsuccessfully). Maybe this is the way it has always been, and I just remembered wrong. In any case, the abilities DO seem to work when used on DEAD allies, and being able to choose a wrong target is just annoying, not a game breaker, hence the importance of this is downgraded significantly and there could be (I am embarassed to admit) no problem at all.
Maybe I am just remembering it wrong. Yes I feel embarrassed and yes I'm sorry for making such a fuss. I still don't know that there's NO problem but it seems to be far less crucial than I thought it was.
SOLUTION:
Don't die! ;)
In RM2k3, you could only select dead allies, I believe. In RMVX...truthfully I haven't played enough games to know what the default behavior is!
Don't die! ;)
In RM2k3, you could only select dead allies, I believe. In RMVX...truthfully I haven't played enough games to know what the default behavior is!
Yep VX will let you try to revive yourself or anyone else alive. It's probably to account for other possible effects a skill might have aside from revival.
This is a small fix to prevent a character from reviving a living party member.
I haven't tested it, but it should work with VX default Battle System. I did not see the method below being used in the script you provided so it should also work.
This is a small fix to prevent a character from reviving a living party member.
I haven't tested it, but it should work with VX default Battle System. I did not see the method below being used in the script you provided so it should also work.
#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
# This class performs battle screen processing.
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# * Update Target Actor Selection
#--------------------------------------------------------------------------
def update_target_actor_selection
@target_actor_window.update
if Input.trigger?(Input::B)
Sound.play_cancel
end_target_actor_selection
elsif Input.trigger?(Input::C)
# If Skill object is not nil
if @skill != nil
# If targetted party member is not dead and skill is for a dead ally
if !$game_party.members[@target_actor_window.index].dead? and @skill.for_dead_friend?
# Play buzzer SE
Sound.play_buzzer
return
end
end
Sound.play_decision
@active_battler.action.target_index = @target_actor_window.index
end_target_actor_selection
end_skill_selection
end_item_selection
next_actor
end
end
end
Pages:
1