Posts: 11,235
Threads: 649
Joined: May 2009
SuperVVulf to the rescue???
Sarah's Configuration Screen is a little menu screen with volume controls. Oh, and it includes a bonus; an audio fix to battle animations so their volume is adjusted too.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 797
Threads: 24
Joined: Feb 2010
Heh.
That's actually what I am trying to get to work here. ;)
By trying to find a way for it to know "okay, I'm in the title menu, I should exit to the title menu. And now I'm in the actual game, so I should probably exit back to the ingame menu."
Friendship is born at that moment when one person says to another: "What! You, too? Thought I was the only one." (C.S. Lewis)
For the time you're laughing, there's nothing wrong in the world. (Colin Mochrie)
If it's funny, make sure people laugh. If it's not funny, make it funny (unless it's actually really serious). (silvercheers)
Please don't spell my name "Yamina-chan". It's all small. Thank you =D
Posts: 494
Threads: 9
Joined: Sep 2013
I've encountered a very bizarre issue with this script. It's a fixed version of Wecoc's battle scope script. It adds more scope options to both items and skills. It's part of his collection that brings features from VX/ACE to XP.
The original bug was that it caused skills or items that revive more than one actor to not work at all. That got fixed but now the new bug it's that causes all the offensive skills aligned with the first element on System (Fire by default) to revive all the dead enemies on battle.
Code: #==============================================================================
# [XP] VX Ace Wecoc Features (ACE_WF) VERSION 1.1
#------------------------------------------------------------------------------
# AC : #024
# Name : BATTLE_SCOPE
# Requires : -
# Incompat : -
# Author : Wecoc
#==============================================================================
# Description
#------------------------------------------------------------------------------
# Adds new 'random' scope options to items and skills.
#
# 0: none
# 1: one enemy
# 2: all enemies
# 3: one ally
# 4: all allies
# 5: 1 ally--HP 0
# 6: all allies--HP 0
# 7: the user
#
# 8: 1 random enemy
# 9: 2 random enemies
# 10: 3 random enemies
# 11: 4 random enemies
# 12: 5 random enemies
# 13: 6 random enemies
# 14: 7 random enemies
#
# 15: 1 random ally
# 16: 2 random allies
# 17: 3 random allies
# 18: 4 random allies
# 19: 5 random allies
# 20: 6 random allies
# 21: 7 random allies
#
# 22: 1 random ally--HP 0
# 23: 2 random allies--HP 0
# 24: 3 random allies--HP 0
# 25: 4 random allies--HP 0
# 26: 5 random allies--HP 0
# 27: 6 random allies--HP 0
# 28: 7 random allies--HP 0
#
# - How to call it
# $data_items[id].scope = n
# $data_skills[id].scope = n
#==============================================================================
module ACE_WF
BATTLE_SCOPE = true
end
module RPG
class Item
def to_enemy?
return [1, 2, 8, 9, 10, 11, 12, 13, 14].include?(@scope)
end
def to_ally?
return (to_live_ally? or to_dead_ally?)
end
def to_live_ally?
return [3, 4, 15, 16, 17, 18, 19, 20, 21].include?(@scope)
end
def to_dead_ally?
return [5, 6, 22, 23, 24, 25, 26, 27, 28].include?(@scope)
end
def to_user?
return @scope == 7
end
def to_singular?
return [1, 3, 5, 7, 8, 15, 22].include?(@scope)
end
def to_multiple?
return (not to_singular?)
end
def to_random?
return @scope > 7
end
end
end
module RPG
class Skill
def to_enemy?
return [1, 2, 8, 9, 10, 11, 12, 13, 14].include?(@scope)
end
def to_ally?
return (to_live_ally? or to_dead_ally?)
end
def to_live_ally?
return [3, 4, 15, 16, 17, 18, 19, 20, 21].include?(@scope)
end
def to_dead_ally?
return [5, 6, 22, 23, 24, 25, 26, 27, 28].include?(@scope)
end
def to_user?
return @scope == 7
end
def to_singular?
return [1, 3, 5, 7, 8, 15, 22].include?(@scope)
end
def to_multiple?
return (not to_singular?)
end
def to_random?
return @scope > 7
end
end
end
class Scene_Battle
def set_target_battlers(scope)
live_actors = $game_party.actors.select {|x| x.exist? }
dead_actors = $game_party.actors.select {|x| x && x.hp0?}
live_enemies = $game_troop.enemies.select {|x| x.exist? }
dead_enemies = $game_troop.enemies.select {|x| x && x.hp0?}
# If battler performing action is enemy
if @active_battler.is_a?(Game_Enemy)
case scope
when 1 # single enemy
index = @active_battler.current_action.target_index
@target_battlers.push($game_party.smooth_target_actor(index))
when 2, 11..14 # all enemies
for actor in live_actors + dead_actors # Bugfix
@target_battlers.push(actor)
end
when 3 # single ally
index = @active_battler.current_action.target_index
@target_battlers.push($game_troop.smooth_target_enemy(index))
when 4 # all allies
for enemy in live_enemies + dead_enemies # Bugfix
@target_battlers.push(enemy)
end
when 5 # single ally (HP 0)
index = @active_battler.current_action.target_index
enemy = $game_troop.enemies[index]
if enemy != nil and enemy.hp0?
@target_battlers.push(enemy)
end
when 6 # all allies (HP 0)
for enemy in dead_enemies
@target_battlers.push(enemy)
end
when 7 # user
@target_battlers.push(@active_battler)
when 8 # 1 random enemy
@target_battlers.push(live_actors[rand(live_actors.size)])
when 9 # 2 random enemies
if live_actors.size <= 2
for actor in live_actors
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_actors.size
rand_array.push(rand(live_actors.size))
end
rand_array.uniq!
if rand_array.size >= 2
break
end
end
@target_battlers.push(live_actors[rand_array[0]])
@target_battlers.push(live_actors[rand_array[1]])
end
when 10 # 3 random enemies
if live_actors.size <= 3
for actor in live_actors
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_actors.size
rand_array.push(rand(live_actors.size))
end
rand_array.uniq!
if rand_array.size >= 3
break
end
end
@target_battlers.push(live_actors[rand_array[0]])
@target_battlers.push(live_actors[rand_array[1]])
@target_battlers.push(live_actors[rand_array[2]])
end
when 15 # 1 random ally
@target_battlers.push(live_enemies[rand(live_enemies.size)])
when 16 # 2 random allies
if live_enemies.size <= 2
for enemy in live_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 2
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
end
when 17 # 3 random allies
if live_enemies.size <= 3
for enemy in live_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 3
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
end
when 18 # 4 random allies
if live_enemies.size <= 4
for enemy in live_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 4
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
@target_battlers.push(live_enemies[rand_array[3]])
end
when 19 # 5 random allies
if live_enemies.size <= 5
for enemy in live_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 5
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
@target_battlers.push(live_enemies[rand_array[3]])
@target_battlers.push(live_enemies[rand_array[4]])
end
when 20 # 6 random allies
if live_enemies.size <= 6
for enemy in live_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 6
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
@target_battlers.push(live_enemies[rand_array[3]])
@target_battlers.push(live_enemies[rand_array[4]])
@target_battlers.push(live_enemies[rand_array[5]])
end
when 21 # 7 random allies
if live_enemies.size <= 7
for enemy in live_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 7
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
@target_battlers.push(live_enemies[rand_array[3]])
@target_battlers.push(live_enemies[rand_array[4]])
@target_battlers.push(live_enemies[rand_array[5]])
@target_battlers.push(live_enemies[rand_array[6]])
end
when 22 # 1 random ally --HP=0
@target_battlers.push(dead_enemies[rand(live_enemies.size)])
when 23 # 2 random allies --HP=0
if dead_enemies.size <= 2
for enemy in dead_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...dead_enemies.size
rand_array.push(rand(dead_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 2
break
end
end
@target_battlers.push(dead_enemies[rand_array[0]])
@target_battlers.push(dead_enemies[rand_array[1]])
end
when 24 # 3 random allies --HP=0
if dead_enemies.size <= 3
for enemy in dead_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...dead_enemies.size
rand_array.push(rand(dead_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 3
break
end
end
@target_battlers.push(dead_enemies[rand_array[0]])
@target_battlers.push(dead_enemies[rand_array[1]])
@target_battlers.push(dead_enemies[rand_array[2]])
end
when 25 # 4 random allies --HP=0
if dead_enemies.size <= 4
for enemy in dead_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...dead_enemies.size
rand_array.push(rand(dead_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 4
break
end
end
@target_battlers.push(dead_enemies[rand_array[0]])
@target_battlers.push(dead_enemies[rand_array[1]])
@target_battlers.push(dead_enemies[rand_array[2]])
@target_battlers.push(dead_enemies[rand_array[3]])
end
when 26 # 5 random allies --HP=0
if dead_enemies.size <= 5
for enemy in dead_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...dead_enemies.size
rand_array.push(rand(dead_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 5
break
end
end
@target_battlers.push(dead_enemies[rand_array[0]])
@target_battlers.push(dead_enemies[rand_array[1]])
@target_battlers.push(dead_enemies[rand_array[2]])
@target_battlers.push(dead_enemies[rand_array[3]])
@target_battlers.push(dead_enemies[rand_array[4]])
end
when 27 # 6 random allies --HP=0
if dead_enemies.size <= 6
for enemy in dead_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...dead_enemies.size
rand_array.push(rand(dead_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 6
break
end
end
@target_battlers.push(dead_enemies[rand_array[0]])
@target_battlers.push(dead_enemies[rand_array[1]])
@target_battlers.push(dead_enemies[rand_array[2]])
@target_battlers.push(dead_enemies[rand_array[3]])
@target_battlers.push(dead_enemies[rand_array[4]])
@target_battlers.push(dead_enemies[rand_array[5]])
end
when 28 # 7 random allies --HP=0
if dead_enemies.size <= 7
for enemy in dead_enemies
@target_battlers.push(enemy)
end
else
rand_array = []
loop do
for i in 0...dead_enemies.size
rand_array.push(rand(dead_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 7
break
end
end
@target_battlers.push(dead_enemies[rand_array[0]])
@target_battlers.push(dead_enemies[rand_array[1]])
@target_battlers.push(dead_enemies[rand_array[2]])
@target_battlers.push(dead_enemies[rand_array[3]])
@target_battlers.push(dead_enemies[rand_array[4]])
@target_battlers.push(dead_enemies[rand_array[5]])
@target_battlers.push(dead_enemies[rand_array[6]])
end
end
end
# If battler performing action is actor
if @active_battler.is_a?(Game_Actor)
case scope
when 1 # single enemy
index = @active_battler.current_action.target_index
@target_battlers.push($game_troop.smooth_target_enemy(index))
when 2 # all enemies
for enemy in live_enemies + dead_enemies # Bugfix
@target_battlers.push(enemy)
end
when 3 # single ally
index = @active_battler.current_action.target_index
@target_battlers.push($game_party.smooth_target_actor(index))
when 4, 18..21 # all allies
for actor in live_actors + dead_actors # Bugfix
@target_battlers.push(actor)
end
when 5 # single ally (HP 0)
index = @active_battler.current_action.target_index
actor = $game_party.actors[index]
if actor != nil and actor.hp0?
@target_battlers.push(actor)
end
when 6, 25..28 # all allies (HP 0)
for actor in dead_actors
@target_battlers.push(actor)
end
when 7 # user
@target_battlers.push(@active_battler)
when 8 # 1 random enemy
@target_battlers.push(live_enemies[rand(live_enemies.size)])
when 9 # 2 random enemies
if live_enemies.size <= 2
for actor in live_enemies
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 2
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
end
when 10 # 3 random enemies
if live_enemies.size <= 3
for actor in live_enemies
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 3
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
end
when 11 # 4 random enemies
if live_enemies.size <= 4
for actor in live_enemies
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 4
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
@target_battlers.push(live_enemies[rand_array[3]])
end
when 12 # 5 random enemies
if live_enemies.size <= 5
for actor in live_enemies
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 5
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
@target_battlers.push(live_enemies[rand_array[3]])
@target_battlers.push(live_enemies[rand_array[4]])
end
when 13 # 6 random enemies
if live_enemies.size <= 6
for actor in live_enemies
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 6
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
@target_battlers.push(live_enemies[rand_array[3]])
@target_battlers.push(live_enemies[rand_array[4]])
@target_battlers.push(live_enemies[rand_array[5]])
end
when 14 # 7 random enemies
if live_enemies.size <= 7
for actor in live_enemies
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_enemies.size
rand_array.push(rand(live_enemies.size))
end
rand_array.uniq!
if rand_array.size >= 7
break
end
end
@target_battlers.push(live_enemies[rand_array[0]])
@target_battlers.push(live_enemies[rand_array[1]])
@target_battlers.push(live_enemies[rand_array[2]])
@target_battlers.push(live_enemies[rand_array[3]])
@target_battlers.push(live_enemies[rand_array[4]])
@target_battlers.push(live_enemies[rand_array[5]])
@target_battlers.push(live_enemies[rand_array[6]])
end
when 15 # 1 random ally
@target_battlers.push(live_actors[rand(live_actors.size)])
when 16 # 2 random allies
if live_actors.size <= 2
for actor in live_actors
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_actors.size
rand_array.push(rand(live_actors.size))
end
rand_array.uniq!
if rand_array.size >= 2
break
end
end
@target_battlers.push(live_actors[rand_array[0]])
@target_battlers.push(live_actors[rand_array[1]])
end
when 17 # 3 random allies
if live_actors.size <= 3
for actor in live_actors
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...live_actors.size
rand_array.push(rand(live_actors.size))
end
rand_array.uniq!
if rand_array.size >= 3
break
end
end
@target_battlers.push(live_actors[rand_array[0]])
@target_battlers.push(live_actors[rand_array[1]])
@target_battlers.push(live_actors[rand_array[2]])
end
when 22 # 1 random ally --HP = 0
@target_battlers.push(dead_actors[rand(dead_actors.size)])
when 23 # 2 random allies --HP = 0
if dead_actors.size <= 2
for actor in dead_actors
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...dead_actors.size
rand_array.push(rand(dead_actors.size))
end
rand_array.uniq!
if rand_array.size >= 2
break
end
end
@target_battlers.push(dead_actors[rand_array[0]])
@target_battlers.push(dead_actors[rand_array[1]])
end
when 24 # 3 random allies --HP = 0
if dead_actors.size <= 3
for actor in dead_actors
@target_battlers.push(actor)
end
else
rand_array = []
loop do
for i in 0...dead_actors.size
rand_array.push(rand(dead_actors.size))
end
rand_array.uniq!
if rand_array.size >= 3
break
end
end
@target_battlers.push(dead_actors[rand_array[0]])
@target_battlers.push(dead_actors[rand_array[1]])
@target_battlers.push(dead_actors[rand_array[2]])
end
end
end
end
end
I wasn't able to replicate the glitch on a new project, meaning it must also have something to do with one of the dozen or so scripts on my game. What a pain in the neck.
Posts: 11,235
Threads: 649
Joined: May 2009
That's weird that it is making attacks with the first element nullify death. Is it not that the first 'status ailment/effect' is death? Check to see if you have any other scripts that touch upon $data_states and game_system's @elements... combined likely.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 494
Threads: 9
Joined: Sep 2013
That's correct, the first status ailment on the database is Death/KO. Worth nothing that removing the element alignment from the skill solves the issue.
I think the only script that touches &data_states is Bearcat's Absorb, Null, and Weak Armors, specifically the System script.
Code: =begin
#=============================================================================
# Absorb, Null, and Weak Armors
#=============================================================================
# Bearcat
# Version 1.01
# 8.16.07
#=============================================================================
This script allows you to make armors and states that absorb, nullify, or
make the wearer weak to elemental damage. To set up an an armor or state,
put the armor id and the element id in the appropriate hash in Absorb_Setup.
There is no need to modify anything other than the hashes in Absorb_Setup.
Free use, modification, and distribution permitted (commercial projects
included) so long as credit is given to me, Bearcat.
==============================================================================
=end
module Absorb_Setup
#--------------------------------------------------------------------------
# * Absorb Armors
# syntax armor_id => [element1, element2...]
#--------------------------------------------------------------------------
Absorb_Armors = {
103 => [1], 106 => [2], 109 => [3], 112 => [4], 115 => [5], 118 => [6], 121 => [7], 124 => [8], 127 => [1, 2, 3, 4, 5, 6, 7, 8], 153 => [1], 156 => [2], 159 => [3], 162 => [4], 165 => [5], 168 => [6], 171 => [7], 174 => [8], 177 => [1, 2, 3, 4, 5, 6, 7, 8], 366 => [3], 260 =>[8], 347 => [1, 2, 3, 4, 5, 6, 7, 8], 389 => [2, 6]
}
#--------------------------------------------------------------------------
# * Null Armors
# syntax armor_id => [element1, element2...]
#--------------------------------------------------------------------------
Null_Armors = {
102 => [1], 105 => [2], 108 => [3], 111 => [4], 114 => [5], 117 => [6], 120 => [7], 123 => [8], 126 => [1, 2, 3, 4 ,5 ,6 ,7 ,8], 152 => [1], 155 => [2], 158 => [3], 161 => [4], 164 => [5], 167 => [6], 170 => [7], 173 => [8], 176 => [1, 2, 3, 4, 5, 6, 7, 8], 369 => [5], 378 => [1,2,3], 388 => [9], 389 => [1, 5]
}
#--------------------------------------------------------------------------
# * Weak Armors
# syntax armor_id => [element1, element2...]
#--------------------------------------------------------------------------
Weak_Armors = {
366 => [4], 259 => [10], 260 => [7], 385 => [3, 4]
}
#--------------------------------------------------------------------------
# * Absorb States
# syntax state_id => [element1, element2...]
#--------------------------------------------------------------------------
Absorb_States = {
1 => [1]
}
#--------------------------------------------------------------------------
# * Null States
# syntax state_id => [element1, element2...]
#--------------------------------------------------------------------------
Null_States = {
21 => [10]
}
#--------------------------------------------------------------------------
# * Weak States
# syntax state_id => [element1, element2...]
#--------------------------------------------------------------------------
Weak_States = {
73 => [1], 74 => [2], 75 => [3], 76 => [4], 77 => [5], 78 => [6], 79 => [7], 80 => [8]
}
#--------------------------------------------------------------------------
# * Defaults DO NOT CHANGE
#--------------------------------------------------------------------------
Absorb_Armors.default = []
Null_Armors.default = []
Weak_Armors.default = []
Absorb_States.default = []
Null_States.default = []
Weak_States.default = []
end
Code: class Game_Actor
def element_rate(element_id)
absorb_flag = false
# Get values corresponding to element effectiveness
table = [0,200,150,100,50,0,-100]
result = table[$data_classes[@class_id].element_ranks[element_id]]
# Run Armor Stuff
for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id]
armor = $data_armors[i]
# Halve damage if element is protected
if armor != nil and armor.guard_element_set.include?(element_id)
result /= 2
end
# Damage = 0 if element is nulled
if armor != nil and armor.null_element_set.include?(element_id)
result = 0
end
# Set flag to true if element is absorbed
if armor != nil and armor.absorb_element_set.include?(element_id)
absorb_flag = true
end
# Multiply damage if armor is weak to element
if armor != nil and armor.weak_element_set.include?(element_id)
result *= 2
end
end
# Run State Stuff
for i in @states
# Halve damage if element is protected
if $data_states[i].guard_element_set.include?(element_id)
result /= 2
end
# Damage = 0 if element is nulled
if $data_states[i].null_element_set.include?(element_id)
result = 0
end
# Set flag to true if element is absorbed
if $data_states[i].absorb_element_set.include?(element_id)
absorb_flag = true
end
# Multiply damage if state is weak to element
if $data_states[i].weak_element_set.include?(element_id)
result *= 2
end
end
# If absorb_flag = true, multiply by -1
if absorb_flag
result *= -1
end
# End Method
return result
end
end
class Game_Enemy
def element_rate(element_id)
# Get a numerical value corresponding to element effectiveness
table = [0,200,150,100,50,0,-100]
result = table[$data_enemies[@enemy_id].element_ranks[element_id]]
for i in @states
# Halve damage if element is protected
if $data_states[i].guard_element_set.include?(element_id)
result /= 2
end
# Damage = 0 if element is nulled
if $data_states[i].null_element_set.include?(element_id)
result = 0
end
# Set flag to true if element is absorbed
if $data_states[i].absorb_element_set.include?(element_id)
absorb_flag = true
end
# Multiply damage if state is weak to element
if $data_states[i].weak_element_set.include?(element_id)
result *= 2
end
end
# If absorb_flag = true, multiply by -1
if absorb_flag
result *= -1
end
# End Method
return result
end
end
Thinking about it, pretty sure I had a similar problem with another script that came into conflict with Game_Actor, hence why the default characters are still on the database of my project.
Posts: 11,235
Threads: 649
Joined: May 2009
Well, that sucks. 'Cause I've used that script before and never had that problem. :/
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 494
Threads: 9
Joined: Sep 2013
05-12-2019, 03:48 AM
(This post was last modified: 05-12-2019, 03:49 AM by Steel Beast 6Beets.)
Welp, Wecoc's script had to be scrapped.
As a side note, while I was reorganizing the scripts of my project I couldn't help but wonder why is the order so important. I noticed that some of them did not work correctly unless I put them either under or above others scripts.
I kind of assumed it had something to do with the way Ruby works with RMXP's... shall we say, "eccentricities".
EDIT: Also post number 300. Wowzers!
Posts: 11,235
Threads: 649
Joined: May 2009
Scripts tend to work top-down when loaded. So if you have one script that does a 100% rewrite and another that just 'adds' new content, you want the one that performs the rewrite to be loaded first followed by the rewrite.
If you do it the other way around, you'd add the new content... and then do a full rewrite which would null out any changes.
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
Posts: 494
Threads: 9
Joined: Sep 2013
I see. I noticed that Blizzard's Analyze System doesn't work if I put game_guy's First Strike States or the SP cost modificator script below it. Putting them above it solved the issue.
Posts: 11,235
Threads: 649
Joined: May 2009
05-13-2019, 03:17 AM
(This post was last modified: 05-13-2019, 03:22 AM by DerVVulfman.)
This one goes clickity cllack nicely!
All the actual mechanics of the dialing and combination system are working, including the configuration section. I just now have to make it activate a switch so it can do its job.
[attachment=1133]
Up is down, left is right and sideways is straight ahead. - Cord "Circle of Iron", 1978 (written by Bruce Lee and James Coburn... really...)
Above are clickable links
|