Author Topic: [XP] Battle Memory Commands  (Read 7096 times)

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6583
  • LV: 407
  • Gender: Male
    • View Profile
[XP] Battle Memory Commands
« on: July 21, 2009, 10:14:47 PM »
Battle Memory Commands
Authors: gameus
Version: 1.3
Type: Command Memorizing System
Key Term: Battle Add-on

Introduction

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 owned)
  • Resets Memory at Beginning of Each Battle

Screenshots

N/A

Demo

N/A

Script

(click to show/hide)

Instructions

Place 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)

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 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 Notes

Enjoy and give credits.
« Last Edit: April 13, 2013, 07:30:29 AM by gameus »

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2222
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: [XP] Battle Memory Commands
« Reply #1 on: July 22, 2009, 01:28:17 PM »
Code: [Select]
def update_phase3_basic_command
    if Input.trigger?(Input::C)
      case @actor_command_window.index
      when 0
        @active_battler.memory = 0
      when 1
        @active_battler.memory = 1
      when 2
        @active_battler.memory = 2
      when 3
        @active_battler.memory = 3
      end
    end
    change_actor_index
  end

You could simply...
Code: [Select]
def update_phase3_basic_command
    if Input.trigger?(Input::C)
      @active_battler.memory = @actor_command_window.index
    end
    change_actor_index
  end

Otherwise, good job :up:
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews



Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6583
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Battle Memory Commands
« Reply #2 on: July 22, 2009, 04:48:54 PM »
Fixed Thanks Fantasist

I see why that words in your name now. You're always asisting people



EDIT:

Updated to 1.1
Now memorizes last skill and item used
« Last Edit: July 22, 2009, 07:57:07 PM by game_guy »

Offline Ryex

  • Arctic Bird of Programming
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 5125
  • LV: 197
  • Gender: Male
  • Wants to write a compiler for fun
    • View Profile
Re: [XP] Battle Memory Commands
« Reply #3 on: July 23, 2009, 07:18:02 AM »
Dose it work with AnTBS?  :naughty:
I no longer keep up with posts in the forum very well. If you have a question or comment, about my work, or in general I welcome PM's. if you make a post in one of my threads and I don't reply with in a day or two feel free to PM me and point it out to me.

DropBox, the best free file syncing service there is.
(click to show/hide)

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6583
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Battle Memory Commands
« Reply #4 on: July 23, 2009, 01:58:47 PM »
I'll test it. Like I said I havent tested it with any custom battle systems. But if anyones willing to help me by doing this I'd be much obliged.
But for it to work the custom battle system has to have the same command window.

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2222
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: [XP] Battle Memory Commands
« Reply #5 on: July 24, 2009, 01:28:51 PM »
Quote
I see why that words in your name now. You're always asisting people
Wow, I never realized it till now o.o I named myself that because I think I'm hopelessly dependent on unreality...
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews



Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6583
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Battle Memory Commands
« Reply #6 on: August 22, 2009, 07:33:18 PM »
Added a few instructions to check battle system compatibility.

Offline G_G

  • Green Gmod Game_Guy AKA G4 AKA hyper-G AKA G-force
  • Global Moderator
  • Chaos Ultimate
  • ****
  • Posts: 6583
  • LV: 407
  • Gender: Male
    • View Profile
Re: [XP] Battle Memory Commands
« Reply #7 on: April 13, 2013, 07:19:29 AM »
Updated to work with my new script, Skill Categories.
http://forum.chaos-project.com/index.php/topic,13055.new.html#new

Offline PrinceEndymion88

  • Awakened Visionist
  • **
  • Posts: 74
  • LV: 1
  • Gender: Male
    • View Profile
Re: [XP] Battle Memory Commands
« Reply #8 on: February 06, 2015, 01:01:03 PM »
Updated to work with my new script, Skill Categories.
http://forum.chaos-project.com/index.php/topic,13055.new.html#new

Can you make it compatible with CCOA 3.04 EX Battle System? :)

Offline KK20

  • Master Scripter Fixer
  • Global Moderator
  • Lexima Warrior
  • ****
  • Posts: 2854
  • LV: 364
  • Gender: Male
  • Bringer of Salt
    • View Profile
Re: [XP] Battle Memory Commands
« Reply #9 on: February 07, 2015, 07:25:16 AM »
Place below everything related to the battle system.
Code: [Select]
#===============================================================================
# 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_windows[@actor_index].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_windows[@actor_index].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(*args) #<=====
    get_skill_memory(*args) #<=====
    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(*args) #<=====
    get_item_memory(*args) #<=====
    @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
« Last Edit: February 07, 2015, 07:26:43 AM by KK20 »



(click to show/hide)
NNID: KK20-CP

Offline PrinceEndymion88

  • Awakened Visionist
  • **
  • Posts: 74
  • LV: 1
  • Gender: Male
    • View Profile
Re: [XP] Battle Memory Commands
« Reply #10 on: February 07, 2015, 06:47:34 PM »
really thanks, I'll try :D

Offline PhoenixFire

  • Moderator
  • Astral Trancist
  • ***
  • Posts: 917
  • LV: 6
  • Gender: Female
  • ~That's an interesting notion, in it's own way~
    • View Profile
Re: [XP] Battle Memory Commands
« Reply #11 on: February 11, 2015, 03:23:57 PM »
This would be very cool to see as a VXA port. Love the idea, surprised I didn't see it until now because of the last request on it.
Next off, how to create a first person shooter using microsoft excel.

<Remember when computers had turbo buttons?