I found myself wandering on internet when i discover this code from OriginalWij that is inspired by the press system turn battle of the series shin megami tensei series,i try to make it work in ACE but discovered that several of the methods that overwrote no longer used in the programming of ACE , I found it quite simple and easy to use compared to the Melody of yanfly , also try to locate OriginalWij but I havent found he active in any forum to ask for permission to try to convert to ACE , also as the script does not have any reporting legal not know if I could or not.
if you can and it 's no much trouble to anyone would like someone to help me to convert or at least tell me whati could do to make something similar in ACE , also im trying to gradually change the scene_battle to achieve battles of only one turn, to see how the main script works .
I'm learning to program , but I'm more graphic, thanks beforehand .
this is his page:
http://originalwij.wordpress.com/downloads/
the original donwload:
http://www.mediafire.com/download/mjmkdg5zajd/FireAndIce10.rar
the code itself:
Spoiler
#==============================================================================
# Fire and Ice
#==============================================================================
# Author : OriginalWij
# Version : 1.0
#==============================================================================
#==============================================================================
# v1.0
# - Initial release
#==============================================================================
#==============================================================================
# Features:
#
# - Customizable element "pairs" that are opposite of each other (weak/strong)
# - Customizable weak/strong images & image positions
# - Customizable weak/strong sound effects
# - Customizable turn images, image positions & image blend types
#==============================================================================
#===============================================================================
# REMINDER: This script REQUIRES 6 images that MUST be in the
# /Graphics/System folder. (see config below)
# 1 → ACTOR_WHOLE
# 2 → ENEMY_WHOLE
# 3 → BONUS_WHOLE
# 3 → TURN_BLANK
# 4 → WEAK
# 5 → STRONG
# [default files are included in the demo (one each)]
#===============================================================================
#===============================================================================
# Installation:
#
# INSERT this script in the Materials section. (above Main)
#
# The actual position will depend on what other scripts you are using.
#
# This script should be below most non-battle scripts, but above most
# battle-related scripts.
#===============================================================================
#===============================================================================
# Compatibility:
#
# This script rewrites 3 methods in Scene_Battle:
# 'next_actor', 'prior_actor', and 'make_action_orders'
# Therefore, it may conflict with scripts that also rewrite those methods.
# All other methods are new or are aliased.
# So, compatibility should be high.
#===============================================================================
################################################################################
################################################################################
################################################################################
#
# Start Configuration
#
################################################################################
################################################################################
################################################################################
#==============================================================================
# Config
#==============================================================================
module OW_FIREICE
# Elements to include (element IDs) (MUST be in pairs)
# (example: [[9, 10], [15, 16]] = fire/ice & light/dark)
# (use ELEMENTS = [] to disable)
ELEMENTS = [[9, 10], [15, 16]]
# Turn image filenames (MUST be in the /Graphics/System folder)
ACTOR_WHOLE = 'ActorTurn'
ENEMY_WHOLE = 'EnemyTurn'
TURN_BLANK = 'TurnBlank'
BONUS_WHOLE = 'BonusTurn'
# Turn images blend type (NOT effective for TURN_BLANK)
# (0: normal, 1: add, 2: subtract)
ACTOR_BLEND_TYPE = 0
ENEMY_BLEND_TYPE = 0
BONUS_BLEND_TYPE = 0
# Turn images position
TURN_X = 400
TURN_Y = 4
# Weak/strong image filenames (MUST be in the /Graphics/System folder)
WEAK = 'Weak'
STRONG = 'Strong'
# Weak/strong image position adjustment offsets
# (-X = left +X = right)
# (-Y = up +Y = down )
WEAK_X_OFFSET = 0
WEAK_Y_OFFSET = 0
STRONG_X_OFFSET = 0
STRONG_Y_OFFSET = 0
# Weak and strong sound effects (Must be in the /Audio/SE folder)
WEAK_SOUND = 'Flash2'
WEAK_VOLUME = 100
WEAK_PITCH = 125
STRONG_SOUND = 'Stare'
STRONG_VOLUME = 100
STRONG_PITCH = 75
end
################################################################################
################################################################################
################################################################################
#
# End Configuration
#
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
#
# Do NOT modify anything beyond this point
# unless you know what you are doing!
# Failure to do so may cause a zombie apocalypse!
# (and I'm low on ammo ...)
#
################################################################################
################################################################################
################################################################################
#==============================================================================
# Game_Temp
#==============================================================================
class Game_Temp
#--------------------------------------------------------------------------
# Public Instance Variables (New)
#--------------------------------------------------------------------------
attr_accessor :strong
attr_accessor :weak
attr_accessor :bonus
attr_accessor :bonus_hold
attr_accessor :bonus_max
attr_accessor :bonus_turn
#--------------------------------------------------------------------------
# Initialize (Mod)
#--------------------------------------------------------------------------
alias ow_fireice_game_temp_initialize initialize unless $@
def initialize
ow_fireice_game_temp_initialize
@strong = @weak = @bonus_turn = false
@bonus = @bonus_hold = @bonus_max = 0
end
end
#==============================================================================
# Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# Include (New)
#--------------------------------------------------------------------------
include OW_FIREICE
#--------------------------------------------------------------------------
# Public Instance Variables (New)
#--------------------------------------------------------------------------
attr_accessor :screen_x
attr_accessor :screen_y
attr_accessor :fireice
#--------------------------------------------------------------------------
# Initialize (Mod)
#--------------------------------------------------------------------------
alias ow_fireice_game_actor_initialize initialize unless $@
def initialize(actor_id)
ow_fireice_game_actor_initialize(actor_id)
@screen_x = Graphics.width / 2
@screen_y = Graphics.height - 68
@fireice = ELEMENTS
end
#--------------------------------------------------------------------------
# Calculation of Damage Caused by Skills or Items (New)
#--------------------------------------------------------------------------
def make_obj_damage_value(user, obj)
strong = weak = nil
for i in 0...@fireice.size
which = @fireice.index(obj.element_set[0])
next if which == nil
if which == 0
strong = @fireice[0]
weak = @fireice[1]
elsif which == 1
strong = @fireice[1]
weak = @fireice[0]
end
end
if strong != nil
damage = obj.base_damage
if damage > 0
damage += user.atk * 4 * obj.atk_f / 100
damage += user.spi * 2 * obj.spi_f / 100
unless obj.ignore_defense
damage -= self.def * 2 * obj.atk_f / 100
damage -= self.spi * 1 * obj.spi_f / 100
end
damage = 0 if damage < 0
elsif damage < 0
damage -= user.atk * 4 * obj.atk_f / 100
damage -= user.spi * 2 * obj.spi_f / 100
end
damage = apply_variance(damage, obj.variance)
damage = apply_guard(damage)
if self.class.element_ranks[weak] > 3
damage *= 2
$game_temp.weak = true
elsif self.class.element_ranks[strong] > 3
damage /= 2
$game_temp.strong = true
end
if obj.damage_to_mp
@mp_damage = damage
else
@hp_damage = damage
end
else
super(user, obj)
end
end
end
#==============================================================================
# Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# Include (New)
#--------------------------------------------------------------------------
include OW_FIREICE
#--------------------------------------------------------------------------
# Public Instance Variables (New)
#--------------------------------------------------------------------------
attr_accessor :fireice
#--------------------------------------------------------------------------
# Initialize (Mod)
#--------------------------------------------------------------------------
alias ow_fireice_game_enemy_initialize initialize unless $@
def initialize(index, enemy_id)
@fireice = ELEMENTS
ow_fireice_game_enemy_initialize(index, enemy_id)
end
#--------------------------------------------------------------------------
# Calculation of Damage Caused by Skills or Items (New)
#--------------------------------------------------------------------------
def make_obj_damage_value(user, obj)
strong = weak = nil
for i in 0...@fireice.size
which = @fireice.index(obj.element_set[0])
next if which == nil
if which == 0
strong = @fireice[0]
weak = @fireice[1]
elsif which == 1
strong = @fireice[1]
weak = @fireice[0]
end
end
if strong != nil
damage = obj.base_damage
if damage > 0
damage += user.atk * 4 * obj.atk_f / 100
damage += user.spi * 2 * obj.spi_f / 100
unless obj.ignore_defense
damage -= self.def * 2 * obj.atk_f / 100
damage -= self.spi * 1 * obj.spi_f / 100
end
damage = 0 if damage < 0
elsif damage < 0
damage -= user.atk * 4 * obj.atk_f / 100
damage -= user.spi * 2 * obj.spi_f / 100
end
damage *= elements_max_rate(obj.element_set)
damage /= 100
damage = apply_variance(damage, obj.variance)
damage = apply_guard(damage)
if enemy.element_ranks[weak] > 3
$game_temp.weak = true
elsif enemy.element_ranks[strong] > 3
$game_temp.strong = true
end
if obj.damage_to_mp
@mp_damage = damage
else
@hp_damage = damage
end
else
super(user, obj)
end
end
end
#==============================================================================
# Spriteset_Battle
#==============================================================================
class Spriteset_Battle
#--------------------------------------------------------------------------
# Include (New)
#--------------------------------------------------------------------------
include OW_FIREICE
#--------------------------------------------------------------------------
# Initialize (Mod)
#--------------------------------------------------------------------------
alias ow_fireice_spriteset_battle_initialize initialize unless $@
def initialize
@turns = []
ow_fireice_spriteset_battle_initialize
end
#--------------------------------------------------------------------------
# Create Turns (New)
#--------------------------------------------------------------------------
def create_turns(enemies = false)
for i in 0...@turns.size
if @turns != nil
@turns.bitmap.dispose
@turns.dispose
@turns = nil
end
end
if enemies
@limit = $game_troop.existing_members.size - 1
turn = ENEMY_WHOLE
blend = ENEMY_BLEND_TYPE
else
@limit = $game_party.existing_members.size - 1
turn = ACTOR_WHOLE
blend = ACTOR_BLEND_TYPE
end
if $game_temp.bonus_turn
for i in 0...$game_temp.bonus_hold
@turns = Sprite.new
@turns.bitmap = Cache.system(BONUS_WHOLE)
x_off = (3 - @limit) * (@turns.bitmap.width + 4)
@turns.x = TURN_X + (i * (@turns.bitmap.width + 4)) + x_off
@turns.y = TURN_Y
@turns.z = 1000
@turns.blend_type = BONUS_BLEND_TYPE
end
else
max = $game_temp.bonus < 0 ? @limit + $game_temp.bonus : @limit
for i in 0..max
@turns = Sprite.new
@turns.bitmap = Cache.system(TURN_BLANK)
x_off = (3 - @limit) * (@turns.bitmap.width + 4)
@turns.x = TURN_X + (i * (@turns.bitmap.width + 4)) + x_off
@turns.y = TURN_Y
@turns.z = 1000
@turns.blend_type = blend
end
end
end
#--------------------------------------------------------------------------
# Recreate Turns (New)
#--------------------------------------------------------------------------
def recreate_turns(enemies = false)
create_turns(enemies)
if enemies
turn = ENEMY_WHOLE
blend = ENEMY_BLEND_TYPE
else
turn = ACTOR_WHOLE
blend = ACTOR_BLEND_TYPE
end
bonus = $game_temp.bonus - 1
if bonus >= 0
for i in 0..bonus
@turns.bitmap = Cache.system(turn)
x_off = (3 - @limit) * (@turns.bitmap.width + 4)
@turns.x = TURN_X + (i * (@turns.bitmap.width + 4)) + x_off
@turns.y = TURN_Y
@turns.z = 1000
@turns.blend_type = blend
end
end
end
#--------------------------------------------------------------------------
# Dispose (Mod)
#--------------------------------------------------------------------------
alias ow_fireice_spriteset_battle_dispose dispose unless $@
def dispose
ow_fireice_spriteset_battle_dispose
for i in 0...@turns.size
if @turns != nil
@turns.bitmap.dispose
@turns.dispose
@turns = nil
end
end
end
end
#==============================================================================
# Scene_Battle
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# Include (New)
#--------------------------------------------------------------------------
include OW_FIREICE
#--------------------------------------------------------------------------
# Create Information Display Viewport (Mod)
#--------------------------------------------------------------------------
alias ow_fireice_sb_create_info_vport create_info_viewport unless $@
def create_info_viewport
@no_turn = -1
$game_temp.bonus_turn = false
ow_fireice_sb_create_info_vport
end
#--------------------------------------------------------------------------
# Go to Command Input for Next Actor (Rewrite)
#--------------------------------------------------------------------------
def next_actor
if @no_turn >= 0
@status_window.index = @actor_index = @no_turn
@no_turn = -1
@message_window.visible = false
@info_viewport.visible = true
@active_battler = $game_party.members[@actor_index]
next_actor if @active_battler.state?(1)
start_actor_command_selection
@status_window.refresh
return
end
if @active_battler == nil
@message_window.visible = false
@info_viewport.visible = true
@status_window.index = @actor_index = 0
@active_battler = $game_party.members[@actor_index]
$game_temp.bonus_max = $game_temp.bonus_hold = $game_temp.bonus = 0
next_actor if @active_battler.state?(1)
start_actor_command_selection
@status_window.refresh
else
@message_window.clear
@info_viewport.visible = false
@message_window.visible = true
execute_action
process_battle_event
return unless $game_temp.in_battle
@status_window.index = @actor_index += 1
if $game_temp.bonus_turn
max = $game_temp.bonus_max
else
max = $game_party.members.size
end
if @actor_index == max or @actor_index == max + $game_temp.bonus
if $game_temp.bonus < 1
$game_temp.bonus_turn = false
$game_temp.bonus_max = $game_temp.bonus_hold = $game_temp.bonus = 0
for actor in $game_party.members
actor.action.clear
end
@status_window.index = @actor_index = -1
@spriteset.create_turns(true)
start_main
return
else
@actor_index = 0
$game_temp.bonus_max = $game_temp.bonus_hold = $game_temp.bonus
$game_temp.bonus = 0
$game_temp.bonus_turn = true
@status_window.index = @actor_index
@status_window.refresh
end
end
@active_battler = $game_party.members[@actor_index]
next_actor if @active_battler.state?(1)
if @active_battler.auto_battle
@active_battler.make_action
next_actor
end
@message_window.visible = false
@info_viewport.visible = true
@spriteset.recreate_turns
start_actor_command_selection
@status_window.refresh
end
end
#--------------------------------------------------------------------------
# Go to Command Input of Previous Actor (Rewrite)
#--------------------------------------------------------------------------
def prior_actor
@no_turn = @actor_index
start_party_command_selection
return
end
#--------------------------------------------------------------------------
# Start party command selection (Mod)
#--------------------------------------------------------------------------
alias ow_fireice_sb_st_party_com_sel start_party_command_selection unless $@
def start_party_command_selection
if $game_temp.in_battle
if $game_temp.bonus > 0
$game_temp.bonus_max = $game_temp.bonus_hold = $game_temp.bonus
$game_temp.bonus = 0
$game_temp.bonus_turn = true
@action_battlers = []
for i in 0...$game_temp.bonus_max
@action_battlers << $game_troop.members
$game_troop.members.make_action
$game_troop.members.action.make_speed
end
@spriteset.create_turns(true)
$game_troop.increase_turn
@info_viewport.visible = false
@info_viewport.ox = 0
@message_window.visible = true
@party_command_window.active = false
@actor_command_window.active = false
@status_window.index = @actor_index = -1
@active_battler = nil
@message_window.clear
wait(20)
return
else
$game_temp.bonus_max = $game_temp.bonus_hold = $game_temp.bonus = 0
$game_temp.bonus_turn = false
end
@status_window.index = 0
@status_window.refresh
@spriteset.create_turns($game_troop.surprise)
end
ow_fireice_sb_st_party_com_sel
if $game_temp.in_battle
@party_command_window.index = 0
end
end
#--------------------------------------------------------------------------
# Create Action Orders (Rewrite)
#--------------------------------------------------------------------------
def make_action_orders
@action_battlers = []
unless $game_troop.surprise
@action_battlers += $game_party.members
end
unless $game_troop.preemptive
@action_battlers += $game_troop.members
end
for battler in @action_battlers
battler.action.make_speed
end
# 3 lines removed here
end
#--------------------------------------------------------------------------
# Execute Battle Actions (Mod)
#--------------------------------------------------------------------------
alias ow_fireice_scene_battle_execute_action execute_action unless $@
def execute_action
ow_fireice_scene_battle_execute_action
$game_temp.bonus_hold -= 1
@spriteset.recreate_turns(!@active_battler.actor?)
unless @active_battler.actor?
if $game_temp.bonus < 0
@active_battler = @action_battlers.shift
end
end
end
#--------------------------------------------------------------------------
# Show Damage (Mod)
#--------------------------------------------------------------------------
alias ow_fireice_scene_battle_display_damage display_damage unless $@
def display_damage(target, obj = nil)
enemy = target.actor?
if $game_temp.weak
$game_temp.bonus += 1 unless $game_temp.bonus_turn
Audio.se_play('Audio/SE/' + WEAK_SOUND, WEAK_VOLUME, WEAK_PITCH)
@fireice = Sprite.new
@fireice.bitmap = Cache.system(WEAK)
@fireice.x = target.screen_x - 64 + WEAK_X_OFFSET
@fireice.y = target.screen_y - 128 + WEAK_Y_OFFSET
$game_temp.weak = false
@spriteset.recreate_turns(enemy)
elsif $game_temp.strong
$game_temp.bonus -= 1 unless $game_temp.bonus_turn
Audio.se_play('Audio/SE/' + STRONG_SOUND, STRONG_VOLUME, STRONG_PITCH)
@fireice = Sprite.new
@fireice.bitmap = Cache.system(STRONG)
@fireice.x = target.screen_x - 64 + STRONG_X_OFFSET
@fireice.y = target.screen_y - 128 + STRONG_Y_OFFSET
$game_temp.strong = false
@spriteset.recreate_turns(enemy)
end
ow_fireice_scene_battle_display_damage(target, obj)
if @fireice != nil
@fireice.bitmap.dispose
@fireice.dispose
@fireice = nil
end
end
end
# Fire and Ice
#==============================================================================
# Author : OriginalWij
# Version : 1.0
#==============================================================================
#==============================================================================
# v1.0
# - Initial release
#==============================================================================
#==============================================================================
# Features:
#
# - Customizable element "pairs" that are opposite of each other (weak/strong)
# - Customizable weak/strong images & image positions
# - Customizable weak/strong sound effects
# - Customizable turn images, image positions & image blend types
#==============================================================================
#===============================================================================
# REMINDER: This script REQUIRES 6 images that MUST be in the
# /Graphics/System folder. (see config below)
# 1 → ACTOR_WHOLE
# 2 → ENEMY_WHOLE
# 3 → BONUS_WHOLE
# 3 → TURN_BLANK
# 4 → WEAK
# 5 → STRONG
# [default files are included in the demo (one each)]
#===============================================================================
#===============================================================================
# Installation:
#
# INSERT this script in the Materials section. (above Main)
#
# The actual position will depend on what other scripts you are using.
#
# This script should be below most non-battle scripts, but above most
# battle-related scripts.
#===============================================================================
#===============================================================================
# Compatibility:
#
# This script rewrites 3 methods in Scene_Battle:
# 'next_actor', 'prior_actor', and 'make_action_orders'
# Therefore, it may conflict with scripts that also rewrite those methods.
# All other methods are new or are aliased.
# So, compatibility should be high.
#===============================================================================
################################################################################
################################################################################
################################################################################
#
# Start Configuration
#
################################################################################
################################################################################
################################################################################
#==============================================================================
# Config
#==============================================================================
module OW_FIREICE
# Elements to include (element IDs) (MUST be in pairs)
# (example: [[9, 10], [15, 16]] = fire/ice & light/dark)
# (use ELEMENTS = [] to disable)
ELEMENTS = [[9, 10], [15, 16]]
# Turn image filenames (MUST be in the /Graphics/System folder)
ACTOR_WHOLE = 'ActorTurn'
ENEMY_WHOLE = 'EnemyTurn'
TURN_BLANK = 'TurnBlank'
BONUS_WHOLE = 'BonusTurn'
# Turn images blend type (NOT effective for TURN_BLANK)
# (0: normal, 1: add, 2: subtract)
ACTOR_BLEND_TYPE = 0
ENEMY_BLEND_TYPE = 0
BONUS_BLEND_TYPE = 0
# Turn images position
TURN_X = 400
TURN_Y = 4
# Weak/strong image filenames (MUST be in the /Graphics/System folder)
WEAK = 'Weak'
STRONG = 'Strong'
# Weak/strong image position adjustment offsets
# (-X = left +X = right)
# (-Y = up +Y = down )
WEAK_X_OFFSET = 0
WEAK_Y_OFFSET = 0
STRONG_X_OFFSET = 0
STRONG_Y_OFFSET = 0
# Weak and strong sound effects (Must be in the /Audio/SE folder)
WEAK_SOUND = 'Flash2'
WEAK_VOLUME = 100
WEAK_PITCH = 125
STRONG_SOUND = 'Stare'
STRONG_VOLUME = 100
STRONG_PITCH = 75
end
################################################################################
################################################################################
################################################################################
#
# End Configuration
#
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
################################################################################
#
# Do NOT modify anything beyond this point
# unless you know what you are doing!
# Failure to do so may cause a zombie apocalypse!
# (and I'm low on ammo ...)
#
################################################################################
################################################################################
################################################################################
#==============================================================================
# Game_Temp
#==============================================================================
class Game_Temp
#--------------------------------------------------------------------------
# Public Instance Variables (New)
#--------------------------------------------------------------------------
attr_accessor :strong
attr_accessor :weak
attr_accessor :bonus
attr_accessor :bonus_hold
attr_accessor :bonus_max
attr_accessor :bonus_turn
#--------------------------------------------------------------------------
# Initialize (Mod)
#--------------------------------------------------------------------------
alias ow_fireice_game_temp_initialize initialize unless $@
def initialize
ow_fireice_game_temp_initialize
@strong = @weak = @bonus_turn = false
@bonus = @bonus_hold = @bonus_max = 0
end
end
#==============================================================================
# Game_Actor
#==============================================================================
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# Include (New)
#--------------------------------------------------------------------------
include OW_FIREICE
#--------------------------------------------------------------------------
# Public Instance Variables (New)
#--------------------------------------------------------------------------
attr_accessor :screen_x
attr_accessor :screen_y
attr_accessor :fireice
#--------------------------------------------------------------------------
# Initialize (Mod)
#--------------------------------------------------------------------------
alias ow_fireice_game_actor_initialize initialize unless $@
def initialize(actor_id)
ow_fireice_game_actor_initialize(actor_id)
@screen_x = Graphics.width / 2
@screen_y = Graphics.height - 68
@fireice = ELEMENTS
end
#--------------------------------------------------------------------------
# Calculation of Damage Caused by Skills or Items (New)
#--------------------------------------------------------------------------
def make_obj_damage_value(user, obj)
strong = weak = nil
for i in 0...@fireice.size
which = @fireice.index(obj.element_set[0])
next if which == nil
if which == 0
strong = @fireice[0]
weak = @fireice[1]
elsif which == 1
strong = @fireice[1]
weak = @fireice[0]
end
end
if strong != nil
damage = obj.base_damage
if damage > 0
damage += user.atk * 4 * obj.atk_f / 100
damage += user.spi * 2 * obj.spi_f / 100
unless obj.ignore_defense
damage -= self.def * 2 * obj.atk_f / 100
damage -= self.spi * 1 * obj.spi_f / 100
end
damage = 0 if damage < 0
elsif damage < 0
damage -= user.atk * 4 * obj.atk_f / 100
damage -= user.spi * 2 * obj.spi_f / 100
end
damage = apply_variance(damage, obj.variance)
damage = apply_guard(damage)
if self.class.element_ranks[weak] > 3
damage *= 2
$game_temp.weak = true
elsif self.class.element_ranks[strong] > 3
damage /= 2
$game_temp.strong = true
end
if obj.damage_to_mp
@mp_damage = damage
else
@hp_damage = damage
end
else
super(user, obj)
end
end
end
#==============================================================================
# Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# Include (New)
#--------------------------------------------------------------------------
include OW_FIREICE
#--------------------------------------------------------------------------
# Public Instance Variables (New)
#--------------------------------------------------------------------------
attr_accessor :fireice
#--------------------------------------------------------------------------
# Initialize (Mod)
#--------------------------------------------------------------------------
alias ow_fireice_game_enemy_initialize initialize unless $@
def initialize(index, enemy_id)
@fireice = ELEMENTS
ow_fireice_game_enemy_initialize(index, enemy_id)
end
#--------------------------------------------------------------------------
# Calculation of Damage Caused by Skills or Items (New)
#--------------------------------------------------------------------------
def make_obj_damage_value(user, obj)
strong = weak = nil
for i in 0...@fireice.size
which = @fireice.index(obj.element_set[0])
next if which == nil
if which == 0
strong = @fireice[0]
weak = @fireice[1]
elsif which == 1
strong = @fireice[1]
weak = @fireice[0]
end
end
if strong != nil
damage = obj.base_damage
if damage > 0
damage += user.atk * 4 * obj.atk_f / 100
damage += user.spi * 2 * obj.spi_f / 100
unless obj.ignore_defense
damage -= self.def * 2 * obj.atk_f / 100
damage -= self.spi * 1 * obj.spi_f / 100
end
damage = 0 if damage < 0
elsif damage < 0
damage -= user.atk * 4 * obj.atk_f / 100
damage -= user.spi * 2 * obj.spi_f / 100
end
damage *= elements_max_rate(obj.element_set)
damage /= 100
damage = apply_variance(damage, obj.variance)
damage = apply_guard(damage)
if enemy.element_ranks[weak] > 3
$game_temp.weak = true
elsif enemy.element_ranks[strong] > 3
$game_temp.strong = true
end
if obj.damage_to_mp
@mp_damage = damage
else
@hp_damage = damage
end
else
super(user, obj)
end
end
end
#==============================================================================
# Spriteset_Battle
#==============================================================================
class Spriteset_Battle
#--------------------------------------------------------------------------
# Include (New)
#--------------------------------------------------------------------------
include OW_FIREICE
#--------------------------------------------------------------------------
# Initialize (Mod)
#--------------------------------------------------------------------------
alias ow_fireice_spriteset_battle_initialize initialize unless $@
def initialize
@turns = []
ow_fireice_spriteset_battle_initialize
end
#--------------------------------------------------------------------------
# Create Turns (New)
#--------------------------------------------------------------------------
def create_turns(enemies = false)
for i in 0...@turns.size
if @turns != nil
@turns.bitmap.dispose
@turns.dispose
@turns = nil
end
end
if enemies
@limit = $game_troop.existing_members.size - 1
turn = ENEMY_WHOLE
blend = ENEMY_BLEND_TYPE
else
@limit = $game_party.existing_members.size - 1
turn = ACTOR_WHOLE
blend = ACTOR_BLEND_TYPE
end
if $game_temp.bonus_turn
for i in 0...$game_temp.bonus_hold
@turns = Sprite.new
@turns.bitmap = Cache.system(BONUS_WHOLE)
x_off = (3 - @limit) * (@turns.bitmap.width + 4)
@turns.x = TURN_X + (i * (@turns.bitmap.width + 4)) + x_off
@turns.y = TURN_Y
@turns.z = 1000
@turns.blend_type = BONUS_BLEND_TYPE
end
else
max = $game_temp.bonus < 0 ? @limit + $game_temp.bonus : @limit
for i in 0..max
@turns = Sprite.new
@turns.bitmap = Cache.system(TURN_BLANK)
x_off = (3 - @limit) * (@turns.bitmap.width + 4)
@turns.x = TURN_X + (i * (@turns.bitmap.width + 4)) + x_off
@turns.y = TURN_Y
@turns.z = 1000
@turns.blend_type = blend
end
end
end
#--------------------------------------------------------------------------
# Recreate Turns (New)
#--------------------------------------------------------------------------
def recreate_turns(enemies = false)
create_turns(enemies)
if enemies
turn = ENEMY_WHOLE
blend = ENEMY_BLEND_TYPE
else
turn = ACTOR_WHOLE
blend = ACTOR_BLEND_TYPE
end
bonus = $game_temp.bonus - 1
if bonus >= 0
for i in 0..bonus
@turns.bitmap = Cache.system(turn)
x_off = (3 - @limit) * (@turns.bitmap.width + 4)
@turns.x = TURN_X + (i * (@turns.bitmap.width + 4)) + x_off
@turns.y = TURN_Y
@turns.z = 1000
@turns.blend_type = blend
end
end
end
#--------------------------------------------------------------------------
# Dispose (Mod)
#--------------------------------------------------------------------------
alias ow_fireice_spriteset_battle_dispose dispose unless $@
def dispose
ow_fireice_spriteset_battle_dispose
for i in 0...@turns.size
if @turns != nil
@turns.bitmap.dispose
@turns.dispose
@turns = nil
end
end
end
end
#==============================================================================
# Scene_Battle
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# Include (New)
#--------------------------------------------------------------------------
include OW_FIREICE
#--------------------------------------------------------------------------
# Create Information Display Viewport (Mod)
#--------------------------------------------------------------------------
alias ow_fireice_sb_create_info_vport create_info_viewport unless $@
def create_info_viewport
@no_turn = -1
$game_temp.bonus_turn = false
ow_fireice_sb_create_info_vport
end
#--------------------------------------------------------------------------
# Go to Command Input for Next Actor (Rewrite)
#--------------------------------------------------------------------------
def next_actor
if @no_turn >= 0
@status_window.index = @actor_index = @no_turn
@no_turn = -1
@message_window.visible = false
@info_viewport.visible = true
@active_battler = $game_party.members[@actor_index]
next_actor if @active_battler.state?(1)
start_actor_command_selection
@status_window.refresh
return
end
if @active_battler == nil
@message_window.visible = false
@info_viewport.visible = true
@status_window.index = @actor_index = 0
@active_battler = $game_party.members[@actor_index]
$game_temp.bonus_max = $game_temp.bonus_hold = $game_temp.bonus = 0
next_actor if @active_battler.state?(1)
start_actor_command_selection
@status_window.refresh
else
@message_window.clear
@info_viewport.visible = false
@message_window.visible = true
execute_action
process_battle_event
return unless $game_temp.in_battle
@status_window.index = @actor_index += 1
if $game_temp.bonus_turn
max = $game_temp.bonus_max
else
max = $game_party.members.size
end
if @actor_index == max or @actor_index == max + $game_temp.bonus
if $game_temp.bonus < 1
$game_temp.bonus_turn = false
$game_temp.bonus_max = $game_temp.bonus_hold = $game_temp.bonus = 0
for actor in $game_party.members
actor.action.clear
end
@status_window.index = @actor_index = -1
@spriteset.create_turns(true)
start_main
return
else
@actor_index = 0
$game_temp.bonus_max = $game_temp.bonus_hold = $game_temp.bonus
$game_temp.bonus = 0
$game_temp.bonus_turn = true
@status_window.index = @actor_index
@status_window.refresh
end
end
@active_battler = $game_party.members[@actor_index]
next_actor if @active_battler.state?(1)
if @active_battler.auto_battle
@active_battler.make_action
next_actor
end
@message_window.visible = false
@info_viewport.visible = true
@spriteset.recreate_turns
start_actor_command_selection
@status_window.refresh
end
end
#--------------------------------------------------------------------------
# Go to Command Input of Previous Actor (Rewrite)
#--------------------------------------------------------------------------
def prior_actor
@no_turn = @actor_index
start_party_command_selection
return
end
#--------------------------------------------------------------------------
# Start party command selection (Mod)
#--------------------------------------------------------------------------
alias ow_fireice_sb_st_party_com_sel start_party_command_selection unless $@
def start_party_command_selection
if $game_temp.in_battle
if $game_temp.bonus > 0
$game_temp.bonus_max = $game_temp.bonus_hold = $game_temp.bonus
$game_temp.bonus = 0
$game_temp.bonus_turn = true
@action_battlers = []
for i in 0...$game_temp.bonus_max
@action_battlers << $game_troop.members
$game_troop.members.make_action
$game_troop.members.action.make_speed
end
@spriteset.create_turns(true)
$game_troop.increase_turn
@info_viewport.visible = false
@info_viewport.ox = 0
@message_window.visible = true
@party_command_window.active = false
@actor_command_window.active = false
@status_window.index = @actor_index = -1
@active_battler = nil
@message_window.clear
wait(20)
return
else
$game_temp.bonus_max = $game_temp.bonus_hold = $game_temp.bonus = 0
$game_temp.bonus_turn = false
end
@status_window.index = 0
@status_window.refresh
@spriteset.create_turns($game_troop.surprise)
end
ow_fireice_sb_st_party_com_sel
if $game_temp.in_battle
@party_command_window.index = 0
end
end
#--------------------------------------------------------------------------
# Create Action Orders (Rewrite)
#--------------------------------------------------------------------------
def make_action_orders
@action_battlers = []
unless $game_troop.surprise
@action_battlers += $game_party.members
end
unless $game_troop.preemptive
@action_battlers += $game_troop.members
end
for battler in @action_battlers
battler.action.make_speed
end
# 3 lines removed here
end
#--------------------------------------------------------------------------
# Execute Battle Actions (Mod)
#--------------------------------------------------------------------------
alias ow_fireice_scene_battle_execute_action execute_action unless $@
def execute_action
ow_fireice_scene_battle_execute_action
$game_temp.bonus_hold -= 1
@spriteset.recreate_turns(!@active_battler.actor?)
unless @active_battler.actor?
if $game_temp.bonus < 0
@active_battler = @action_battlers.shift
end
end
end
#--------------------------------------------------------------------------
# Show Damage (Mod)
#--------------------------------------------------------------------------
alias ow_fireice_scene_battle_display_damage display_damage unless $@
def display_damage(target, obj = nil)
enemy = target.actor?
if $game_temp.weak
$game_temp.bonus += 1 unless $game_temp.bonus_turn
Audio.se_play('Audio/SE/' + WEAK_SOUND, WEAK_VOLUME, WEAK_PITCH)
@fireice = Sprite.new
@fireice.bitmap = Cache.system(WEAK)
@fireice.x = target.screen_x - 64 + WEAK_X_OFFSET
@fireice.y = target.screen_y - 128 + WEAK_Y_OFFSET
$game_temp.weak = false
@spriteset.recreate_turns(enemy)
elsif $game_temp.strong
$game_temp.bonus -= 1 unless $game_temp.bonus_turn
Audio.se_play('Audio/SE/' + STRONG_SOUND, STRONG_VOLUME, STRONG_PITCH)
@fireice = Sprite.new
@fireice.bitmap = Cache.system(STRONG)
@fireice.x = target.screen_x - 64 + STRONG_X_OFFSET
@fireice.y = target.screen_y - 128 + STRONG_Y_OFFSET
$game_temp.strong = false
@spriteset.recreate_turns(enemy)
end
ow_fireice_scene_battle_display_damage(target, obj)
if @fireice != nil
@fireice.bitmap.dispose
@fireice.dispose
@fireice = nil
end
end
end
Add two videos of how it works:
if im breaking some rule please tell me, so i can apologise.