Battle Memory Commands
Authors: gameus
Version: 1.3
Type: Command Memorizing System
Key Term: Battle Add-on
IntroductionWhat this script does is memorize actions during battle. So if actor 1 attacks and actor 2 defends. The cursor will be on attack for actor 1, and the cursor will still be on defend for actor 2.
Features
- Memorizes Battle Commands
- Memorizes Last Skill Used
- Memorizes Last Item Used (If item is owned)
- Resets Memory at Beginning of Each Battle
ScreenshotsN/A
DemoN/A
Script
#===============================================================================
# Battle Memory Commands
# Version: 1.3
# Author: gameus
#===============================================================================
# Intro:
# What this script does is memorize actions during battle. So if actor 1 attacks
# and actor 2 defends. The cursor will be on attack for actor 1, and the cursor
# will still be on defend for actor 2.
#
# Features:
# Memorizes Battle Commands
# Memorizes Last Skill Used
# Memorizes Last Item Used (If item is still owned)
#
# Instructions:
# Place in a new script above main. Below any battle systems used.
#
# Compatibility:
# Not tested with SDK
# Not tested with any custom battle systems
# If using with Skill Categories (1.0 or above) then place this script below
#
# Credits:
# gameus ~ for making it
# Kain Nobel ~ for making an SDK version which inspired me to do this
#===============================================================================
#-------------------------------------------------------------------------------
# Scene_Battle
#-------------------------------------------------------------------------------
class Scene_Battle
alias gg_reset_memory_main main
def main
$game_party.actors.each {|a| a.reset_memory }
gg_reset_memory_main
end
alias set_command_memory phase3_setup_command_window
def phase3_setup_command_window
set_command_memory
@actor_command_window.index = @active_battler.command_memory
end
alias get_command_memory update_phase3_basic_command
def update_phase3_basic_command
if Input.trigger?(Input::C)
@active_battler.command_memory = @actor_command_window.index
end
get_command_memory
end
alias set_skill_memory update_phase3_skill_select
def update_phase3_skill_select
if Input.trigger?(Input::C)
if $gg_skill_categories != nil && $gg_skill_categories >= 1.0 &&
@actor_command_window.index != 1
index = @actor_command_window.index
cat = @actor_command_window.commands[index]
@active_battler.category_memory[cat] = @skill_window.index
if index == 1
@active_battler.skill_memory = @skill_window.index
end
else
@active_battler.skill_memory = @skill_window.index
end
end
set_skill_memory
end
alias set_item_memory update_phase3_item_select
def update_phase3_item_select
if Input.trigger?(Input::C)
@active_battler.item_memory = @item_window.index
end
set_item_memory
end
alias get_skill_memory start_skill_select
def start_skill_select
get_skill_memory
if $gg_skill_categories != nil && $gg_skill_categories >= 1.0 &&
@actor_command_window.index != 1
index = @actor_command_window.index
cat = @actor_command_window.commands[index]
@skill_window.index = @active_battler.category_memory[cat]
if index == 1
@skill_window.index = @active_battler.skill_memory
end
return
end
@skill_window.index = @active_battler.skill_memory
end
alias get_item_memory start_item_select
def start_item_select
get_item_memory
@item_window.index = @active_battler.item_memory
end
end
#-------------------------------------------------------------------------------
# Game_Actor
#-------------------------------------------------------------------------------
class Game_Actor < Game_Battler
attr_accessor :command_memory
attr_accessor :skill_memory
attr_accessor :item_memory
attr_accessor :category_memory
alias gg_set_memory_vars initialize
def initialize(actor_id)
reset_memory
gg_set_memory_vars(actor_id)
end
def reset_memory
@command_memory = 0
@skill_memory = 0
@item_memory = 0
@category_memory = {}
if $gg_skill_categories != nil && $gg_skill_categories >= 1.0
Gameus::SKILL_SETS.each_key {|key| @category_memory[key] = 0 }
end
end
end
InstructionsPlace in a new script above main. Below any battle systems used.
Checking Compatibility:
Make sure the following variables in the script exist
- @actor_command_window
- @skill_window
- @item_window
To check search through the battle system by pressing Ctrl + F then search each of the
variables to see if they exist.
If so then this script will work. If not post here requesting me to make this script
compatible with any battle system (Except Blizz ABS because I think it'd be useless xD)
CompatibilityNot tested with SDK
Not tested with any custom battle systems
If using with
Skill Categories (1.0 or above) then place this script below
Credits and Thanks
- game_guy ~ for making it
- Kain Nobel ~ for making an SDK version which inspired me to do this
- Fantasist ~ for improved version of code
Author's NotesEnjoy and give credits.