Akea Animated Battle Cursor

Raizen

Veteran
Veteran
Joined
Oct 24, 2012
Messages
380
Reaction score
652
First Language
Portuguese
Primarily Uses
RMMV
Akea Animated Battle Cursor
 
Compatible with: RMVXAce
Compatibility :good
Usage difficulty: easy
 
Usage Condition

 Can be modified and distributed as long as the credits remain
  for portuguese users: Here
 
Script functions
[x] Enables Actor and Enemy Cursor, it can be animated or not
[x] It is highly compatible with any Scene_Battle based battle script, if a battle script is not compatible with this one, leave a message with the script.
 
 
Script
 
http://pastebin.com/raw.php?i=yhtbiGkN

 
Images
You can use my cursor if you wish


Images are in portuguese, but all the script has been translated to english
 
 
 
Credits
 
 Raizen for the script
 
Joined
Sep 21, 2012
Messages
10
Reaction score
2
First Language
Spanish
Primarily Uses
Sorry to bother yourself Raizen,it is possible to make the cursor position based in the battler size? I want to put the cursor above monsters/actors. Excuse me for my bad english and greetings from Argentina.

Here is a example:



I dont have problem with actors because they have the same size. But in the monsters case not,i tried to adjust the y position and does not look good in different battlers size.
 

Raizen

Veteran
Veteran
Joined
Oct 24, 2012
Messages
380
Reaction score
652
First Language
Portuguese
Primarily Uses
RMMV
Here I made the change for you xD.

I had thought when I did the script about putting the height value to count, but there was a BIG problem with that, is that if you are using animated battlers, the bitmap will have an extremely high height because of the spritesheet, and I would end up doing it only compatible with my system xD, so thats why I chose a constant.

Basically the below code will work just fine, IF you only use static enemies which looks like the case :)

Code:
#=======================================================#        Akea Animated Battle Cursor# Author: Raizen# Community: [URL="http://www.centrorpg.com/#"]http://www.centrorpg.com/#[/URL] Compatibility: RMVXAce##=======================================================# =========================Don't Modify==============================$included ||= Hash.new$included[:akea_battlecursor] = truemodule Akea_BattleCursor# =========================Don't Modify==============================# Configuration starts Here#=======================================================#        INSTRUCTIONS# Simple, put the script above main and below any other battle scripts# (for better compatibility)# And then configure below, the scripts shows an animated battle cursor.#=======================================================# If animated, this is the framerate update of the animation, the higher the slower.Cursor_Update = 10# Show the default windows that identify the enemies and actors?Show_Windows = false# Show battler names?Show_Name = true# Name of fot, put '' to be used default fontFont_Name = 'Georgia' # Size of font, put 0 to use default font sizeFont_Size = 18#==============================================================================# ** Enemy Configuration#==============================================================================# Font Color for Enemies, following the default R, G, B and on the end put the# opacity of the font, being 0 invisible until 255 full visibleEnemy_Font_Color = [255, 100, 100, 255]# Name of cursor image, must be in the folder Graphics/AkeaEnemy_Cursor = 'Enemy_Cursor'# Number of frames the enemy cursor has, if not animated put# Enemy_Frames = 1Enemy_Frames = 5# Cursor position over the enemies# E_Cursor_Position = [x position, y position]E_Cursor_Position = [0, 0]# Position of enemy name# E_Name_Position = [x position, y position]E_Name_Position = [0, -30]# Name of cursor image, must be in the folder Graphics/Akea# In case you do not use visible actors, put# Actor_Cursor = ''Actor_Cursor = 'Actor_Cursor'#==============================================================================# ** Actor configuration# Not necessary IF you do not use visible actors#==============================================================================# Font color for the actors, following the default R, G, B and on the end put the# opacity of the font, being 0 invisible until 255 full visibleActor_Font_Color = [100, 255, 150, 255]# Numver of frames from the actor cursor, if not animated put# Actor_Frames = 1Actor_Frames = 5# Cursor Position over the actors# A_Cursor_Position = [x position, y position]A_Cursor_Position = [-55, -70]# # Name position of the actors# A_Name_Position = [x position, y position]A_Name_Position = [-10, -10]#==============================================================================# ** HERE starts the script#==============================================================================end#==============================================================================# ** Scene_Battle#------------------------------------------------------------------------------#  Esta classe executa o processamento da tela de batalha.#==============================================================================class Scene_Battle < Scene_Basealias :akea_bc_start :startalias :akea_bc_update :updatealias :akea_bc_select_enemy_selection :select_enemy_selectionalias :akea_bc_on_skill_ok :on_skill_okalias :akea_bc_on_enemy_cancel :on_enemy_cancelalias :akea_bc_on_item_ok :on_item_okalias :akea_bc_on_actor_cancel :on_actor_cancelalias :akea_bc_select_actor_selection :select_actor_selectionalias :akea_bc_terminate :terminatealias :akea_bc_turn_start :turn_startalias :akea_bc_next_command :next_command  #--------------------------------------------------------------------------  # * Inicialização do processo  #--------------------------------------------------------------------------  def start    @bc_cursor = Array.new    @bc_enemy_cursor = Array.new    @bc_actor_cursor = Array.new    @akea_target_all = false    akea_bc_start    akea_bc_create_pictures  end  def akea_bc_create_pictures    @bc_actor_size = $game_party.battle_members.size    @bc_frame_position = 0    for n in 0...all_battle_members.size      next unless all_battle_members[n].use_sprite?      @bc_cursor[n] = Sprite.new      @bc_cursor[n].bitmap = Bitmap.new(Graphics.width, Graphics.height)      #@bc[n].bitmap.font.size = 48      rect = Rect.new(0, 0, 200, 50)      if all_battle_members[n].actor?        @bc_cursor[n].bitmap.font.color = Color.new(Akea_BattleCursor::Actor_Font_Color[0], Akea_BattleCursor::Actor_Font_Color[1], Akea_BattleCursor::Actor_Font_Color[2], Akea_BattleCursor::Actor_Font_Color[3])        @bc_actor_cursor[n] = Sprite.new        @bc_actor_cursor[n].bitmap = Cache.akea(Akea_BattleCursor::Actor_Cursor)        @bc_actor_cursor[n].src_rect.set(0, 0, @bc_actor_cursor[n].bitmap.width/Akea_BattleCursor::Actor_Frames, @bc_actor_cursor[n].bitmap.height)        @bc_actor_cursor[n].opacity = 0      else        @bc_enemy_cursor << Sprite.new        @bc_enemy_cursor.last.bitmap = Cache.akea(Akea_BattleCursor::Enemy_Cursor)        @bc_enemy_cursor.last.src_rect.set(0, 0, @bc_enemy_cursor.last.bitmap.width/Akea_BattleCursor::Enemy_Frames, @bc_enemy_cursor.last.bitmap.height)        @bc_enemy_cursor.last.opacity = 0        @bc_cursor[n].bitmap.font.color = Color.new(Akea_BattleCursor::Enemy_Font_Color[0], Akea_BattleCursor::Enemy_Font_Color[1], Akea_BattleCursor::Enemy_Font_Color[2], Akea_BattleCursor::Enemy_Font_Color[3])      end      @bc_cursor[n].bitmap.font.size = Akea_BattleCursor::Font_Size unless Akea_BattleCursor::Font_Size == 0      @bc_cursor[n].bitmap.font.name = Akea_BattleCursor::Font_Name unless Akea_BattleCursor::Font_Name == ''      @bc_cursor[n].bitmap.draw_text(rect, all_battle_members[n].name, 0) if Akea_BattleCursor::Show_Name      @bc_cursor[n].z = 105      if all_battle_members[n].enemy?        @bc_cursor[n].x = all_battle_members[n].screen_x + Akea_BattleCursor::E_Name_Position[0]        @bc_cursor[n].y = all_battle_members[n].screen_y + Akea_BattleCursor::E_Name_Position[1]      else        @bc_cursor[n].x = all_battle_members[n].screen_x + Akea_BattleCursor::A_Name_Position[0]        @bc_cursor[n].y = all_battle_members[n].screen_y + Akea_BattleCursor::A_Name_Position[1]      end      @bc_cursor[n].opacity = 0    end  end  def update(*args, &block)    akea_bc_update    show_bc_info  end  def show_bc_info    if @enemy_window.active      @bc_enemy_cursor.each{|cursor| cursor.opacity -= 30}      @bc_actor_cursor.each{|cursor| cursor.opacity -= 30}      @bc_cursor.each{|cursor| cursor.opacity -= 30}      if @akea_target_all        for n in 0...@bc_enemy_cursor.size          if $game_troop.members[n].alive?            @bc_cursor[n + $game_party.members.size].opacity += 60            @bc_enemy_cursor[n].x = $game_troop.members[n].screen_x + Akea_BattleCursor::E_Cursor_Position[0]            @bc_enemy_cursor[n].y = $game_troop.members[n].screen_y + Akea_BattleCursor::E_Cursor_Position[1] - @spriteset.enemy_sprites[n].bitmap.height            @bc_enemy_cursor[n].opacity += 60          end        end      else        p @spriteset.enemy_sprites[0].bitmap.height        @bc_enemy_cursor[@enemy_window.enemy.index].x = $game_troop.members[@enemy_window.enemy.index].screen_x + Akea_BattleCursor::E_Cursor_Position[0]        @bc_enemy_cursor[@enemy_window.enemy.index].y = $game_troop.members[@enemy_window.enemy.index].screen_y + Akea_BattleCursor::E_Cursor_Position[1] - @spriteset.enemy_sprites[@enemy_window.enemy.index].bitmap.height        @bc_enemy_cursor[@enemy_window.enemy.index].opacity += 60        @bc_cursor[@enemy_window.enemy.index + $game_party.members.size].opacity += 60      end      update_bc_enemy_cursor    elsif @actor_window.active      if all_battle_members[0].use_sprite?        @bc_enemy_cursor.each{|cursor| cursor.opacity -= 30}        @bc_actor_cursor.each{|cursor| cursor.opacity -= 30}        @bc_cursor.each{|cursor| cursor.opacity -= 30}        if @akea_target_all          for n in 0...@bc_actor_cursor.size            @bc_actor_cursor[n].x = all_battle_members[n].screen_x + Akea_BattleCursor::A_Cursor_Position[0]            @bc_actor_cursor[n].y = all_battle_members[n].screen_y + Akea_BattleCursor::A_Cursor_Position[1]            @bc_actor_cursor[n].opacity += 60            @bc_cursor[n].opacity += 60          end        else          @bc_actor_cursor[@actor_window.index].x = all_battle_members[@actor_window.index].screen_x + Akea_BattleCursor::A_Cursor_Position[0]          @bc_actor_cursor[@actor_window.index].y = all_battle_members[@actor_window.index].screen_y + Akea_BattleCursor::A_Cursor_Position[1]          @bc_actor_cursor[@actor_window.index].opacity += 60          @bc_cursor[@actor_window.index].opacity += 60        end      end      update_bc_actor_cursor    else      for n in 0...all_battle_members.size        next unless all_battle_members[n].use_sprite?        @bc_cursor[n].opacity -= 30      end        @bc_enemy_cursor.each{|cursor| cursor.opacity -= 30}        @bc_actor_cursor.each{|cursor| cursor.opacity -= 30}    end  end  def update_bc_enemy_cursor    return unless Graphics.frame_count % Akea_BattleCursor::Cursor_Update == 0    if @bc_frame_position >= Akea_BattleCursor::Enemy_Frames - 1      @bc_frame_position = 0    else      @bc_frame_position += 1    end    @bc_enemy_cursor.each{|cursor| cursor.src_rect.set(@bc_frame_position*@bc_enemy_cursor[0].bitmap.width/Akea_BattleCursor::Enemy_Frames, 0, @bc_enemy_cursor[0].bitmap.width/Akea_BattleCursor::Enemy_Frames, @bc_enemy_cursor[0].bitmap.height)}  end  def update_bc_actor_cursor    return unless Graphics.frame_count % Akea_BattleCursor::Cursor_Update == 0    if @bc_frame_position >= Akea_BattleCursor::Actor_Frames - 1      @bc_frame_position = 0    else      @bc_frame_position += 1    end    @bc_actor_cursor.each {|cursor| cursor.src_rect.set(@bc_frame_position*@bc_actor_cursor[0].bitmap.width/Akea_BattleCursor::Actor_Frames, 0, @bc_actor_cursor[0].bitmap.width/Akea_BattleCursor::Actor_Frames, @bc_actor_cursor[0].bitmap.height)}  end  #--------------------------------------------------------------------------  # * Início do turno  #--------------------------------------------------------------------------  def turn_start    for n in 0...all_battle_members.size      next unless all_battle_members[n].use_sprite?      @bc_cursor[n].opacity = 0    end    @bc_enemy_cursor.each{|cursor| cursor.opacity = 0}    @bc_actor_cursor.each{|cursor| cursor.opacity = 0}    akea_bc_turn_start  end  #--------------------------------------------------------------------------  # * Seleção da escolha de inimigos  #--------------------------------------------------------------------------  def select_enemy_selection    akea_bc_select_enemy_selection    @enemy_window.hide unless Akea_BattleCursor::Show_Windows  end  #--------------------------------------------------------------------------  # * Seleção da escolha de heróis  #--------------------------------------------------------------------------  def select_actor_selection    akea_bc_select_actor_selection    @actor_window.hide if all_battle_members[0].use_sprite? && !Akea_BattleCursor::Show_Windows  end  #--------------------------------------------------------------------------  # * Habilidade [Confirmação]  #--------------------------------------------------------------------------  def on_skill_ok    @force_window = true    akea_bc_on_skill_ok    @force_window = false    if @skill.for_opponent?      @skill_window.hide    else      @skill_window.hide if all_battle_members[0].use_sprite?    end  end  #--------------------------------------------------------------------------  # * Entrada de comandos para o próximo herói  #--------------------------------------------------------------------------  def next_command    if @force_window && @skill.for_opponent?        @akea_target_all = true        select_enemy_selection      elsif @force_window        @akea_target_all = true        select_actor_selection      else        @akea_target_all = false        akea_bc_next_command    end  end  #--------------------------------------------------------------------------  # * Inimigo [Cancelamento]  #--------------------------------------------------------------------------  def on_enemy_cancel    akea_bc_on_enemy_cancel    @akea_target_all = false    case @actor_command_window.current_symbol    when :skill      @skill_window.show.activate    when :item      @item_window.show.activate    end  end  #--------------------------------------------------------------------------  # * Herói [Cancelamento]  #--------------------------------------------------------------------------  def on_actor_cancel    akea_bc_on_actor_cancel    @akea_target_all = false    case @actor_command_window.current_symbol    when :skill      @skill_window.show.activate    when :item      @item_window.show.activate    end  end  #--------------------------------------------------------------------------  # * Item [Confirmação]  #--------------------------------------------------------------------------  def on_item_ok    akea_bc_on_item_ok    if @item.for_opponent?      @item_window.hide    else      @item_window.hide if all_battle_members[0].use_sprite?    end  end  #--------------------------------------------------------------------------  # * Finalização do processo  #--------------------------------------------------------------------------  def terminate    for n in 0...all_battle_members.size      next unless all_battle_members[n].use_sprite?      @bc_cursor[n].bitmap.dispose      @bc_cursor[n].dispose    end    @bc_actor_cursor.each{|cursor| cursor.bitmap.dispose}    @bc_actor_cursor.each{|cursor| cursor.dispose}    @bc_enemy_cursor.each{|cursor| cursor.bitmap.dispose}    @bc_enemy_cursor.each{|cursor| cursor.dispose}    akea_bc_terminate  endend#==============================================================================# ** Cache#------------------------------------------------------------------------------#  Este modulo carrega cada gráfico, cria um objeto de Bitmap e retém ele.# Para acelerar o carregamento e preservar memória, este módulo matém o# objeto de Bitmap em uma Hash interna, permitindo que retorne objetos# pré-existentes quando mesmo Bitmap é requerido novamente.#==============================================================================module Cache  #--------------------------------------------------------------------------  # * Carregamento dos gráficos de animação  #     filename : nome do arquivo  #     hue      : informações da alteração de tonalidade  #--------------------------------------------------------------------------  def self.akea(filename)    load_bitmap("Graphics/Akea/", filename)  endend#==============================================================================# ** Window_BattleActor#------------------------------------------------------------------------------#  Esta janela para seleção de heróis na tela de batalha.#==============================================================================class Window_BattleActor < Window_BattleStatus  #--------------------------------------------------------------------------  # * Movimento do cursor para baixo  #     wrap : cursor retornar a primeira ou ultima posição  #--------------------------------------------------------------------------  def cursor_down(wrap = false)    super(true)  end  #--------------------------------------------------------------------------  # * Movimento do cursor para cima  #     wrap : cursor retornar a primeira ou ultima posição  #--------------------------------------------------------------------------  def cursor_up(wrap = false)    super(true)  end  #--------------------------------------------------------------------------  # * Movimento do cursor para direita  #     wrap : cursor retornar a primeira ou ultima posição  #--------------------------------------------------------------------------  def cursor_right(wrap = false)    cursor_down  end  #--------------------------------------------------------------------------  # * Movimento do cursor para esquerda  #     wrap : cursor retornar a primeira ou ultima posição  #--------------------------------------------------------------------------  def cursor_left(wrap = false)    cursor_up  endend#==============================================================================# ** Window_BattleEnemy#------------------------------------------------------------------------------#  Esta janela para seleção de inimigos na tela de batalha.#==============================================================================class Window_BattleEnemy < Window_Selectable  #--------------------------------------------------------------------------  # * Aquisição do número de colunas  #--------------------------------------------------------------------------  def col_max    if Akea_BattleCursor::Show_Windows      return 2    else      return 1    end  end  #--------------------------------------------------------------------------  # * Movimento do cursor para baixo  #     wrap : cursor retornar a primeira ou ultima posição  #--------------------------------------------------------------------------  def cursor_down(wrap = false)    super(true)  end  #--------------------------------------------------------------------------  # * Movimento do cursor para cima  #     wrap : cursor retornar a primeira ou ultima posição  #--------------------------------------------------------------------------  def cursor_up(wrap = false)    super(true)  end  #--------------------------------------------------------------------------  # * Movimento do cursor para direita  #     wrap : cursor retornar a primeira ou ultima posição  #--------------------------------------------------------------------------  def cursor_right(wrap = false)    cursor_down  end  #--------------------------------------------------------------------------  # * Movimento do cursor para esquerda  #     wrap : cursor retornar a primeira ou ultima posição  #--------------------------------------------------------------------------  def cursor_left(wrap = false)    cursor_up  endend#==============================================================================# ** Spriteset_Battle#------------------------------------------------------------------------------#  Esta classe reune os sprites da tela de batalha. Esta classe é usada # internamente pela classe Scene_Battle. #==============================================================================class Spriteset_Battle  attr_reader :enemy_spritesend
 
Last edited by a moderator:

mangaka7

Villager
Member
Joined
Jan 10, 2014
Messages
8
Reaction score
0
First Language
English
Primarily Uses
RMMV
Hi there,

I have a problem with this script. When I use a spell that targets the user (self), the arrows and name will appear for all actors. Here's a pic:

I am using Yami Battle Symphony and I did a test with just these 2 scripts. Is your script not compatible or am I doing something wrong?

Thank you!

 

Raizen

Veteran
Veteran
Joined
Oct 24, 2012
Messages
380
Reaction score
652
First Language
Portuguese
Primarily Uses
RMMV
Are you sure the spell is one specific target?

The script does that in two settings, if the spells targets all users, or if it targets a random user, since if its a random user I can't put the arrow on a specific actor :)
 

Halrawk

Veteran
Veteran
Joined
Dec 14, 2012
Messages
97
Reaction score
24
First Language
English
Primarily Uses
I just tested this out using only your animated battler and battle cursor. When you use any skill that targets "The User" it puts cursors on the whole party.
 
Joined
Apr 30, 2012
Messages
216
Reaction score
35
First Language
Spanish
Primarily Uses
Espero que Rpg Maker Mv soporte Rgss3,asi puedo seguir usando este hermoso script.

I just hope to use this beautiful script in Rpg Maker Mv.
 

mangaka7

Villager
Member
Joined
Jan 10, 2014
Messages
8
Reaction score
0
First Language
English
Primarily Uses
RMMV
Are you sure the spell is one specific target?

The script does that in two settings, if the spells targets all users, or if it targets a random user, since if its a random user I can't put the arrow on a specific actor :)
As Halrawk said, any skill that targets "The User" puts cursors on the whole party. Everything else works fine though.
 

diddlydoo

Villager
Member
Joined
Jan 7, 2016
Messages
12
Reaction score
0
First Language
English
Primarily Uses
Im using battle symphony and I cant for the life of me have the cursor show on my actors. It shows up fine when its time to select an enemy but will NOT shot on my battlers?! i just copy/pasted the script and renamed the cursors to what they need to be.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,565
Reaction score
541
First Language
English
Primarily Uses
RMVXA
Hello, I'm getting an error. Probably a compatibility with my scripts. It was working at one time but now there's an issue. 


I getting an error on line 206 with code @bc_cursor[n].opacity -= 30.


I have yanfly battle system with victor animated battlers and yanfly victory aftermath.


The error comes up after the battle is won and the spoils are tallied, just as the game would normally go back to the map.


If I rem that line out the next error is on line 327 - @bc_cursor[n].bitmap.dispose


Then line 328 - @bc_cursor[n].dispose


with those three rem'd out, it seems to work.


So I guess just FYI. Thanks


*update - I was getting other problems as well. When pressing right in battle to skip player input, there was an error.


When selecting a spell like heal for a player, I could not select any character except the first one. I figured these out. They were by other script problems.


I guess the scripts I added/changed scripts have changed things. I had issues with VE Target Arrow so I started using yours. Now I have issues with yours and VE script works fine. Go figure.


*next update - The VE script is having the same issue I had before now. But now I know what the issue is, I just don't know how to fix it. I left a comment on victors wordpress for target arrow. Maybe he'll give an answer. It does not highlight the correct enemy, but when I hit the arrow key, then it works.


I have now put your script back in and with those three lines commented out it's working again. At least from what I can tell so far. Holy hell, this is getting crazy.


*another point. The reason I had to switch to VE was because the arrow keys input does not let me scroll through the enemies. Only the mouse will select all enemies. I'm not sure which way to go now. It does work both ways without any battle cursor.


*hopefully my last update. At the moment my testing shows that everything is working. So probably your script works, I just had other problems.
 
Last edited by a moderator:

SaburoX

Veteran
Veteran
Joined
Jan 27, 2013
Messages
87
Reaction score
8
Primarily Uses
I tried using this with Journey Battle System (tankentai) and got the following error:

battlecursorerror.jpg
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

I worked a lot more today and I am thinking about Youtube videos to make to my channel, but I am still looking for some content :D

But I am happy to be back at work :D
Update... no scam calls all day. I think they learned their lesson. And I'm working on a fake anti-piracy video, featuring a fan game I'm making in MV. If I had the permission to make the game a licensed game that I could sell (rather than having it totally free like fan games are required to be), I'd use a really cool anti-piracy screen...
People2_1 added! ( with alternative hairstyle )

Hey there fellow makers!

just looking for an excuse to post this, really... :kaoslp:

Forum statistics

Threads
104,356
Messages
1,005,796
Members
135,868
Latest member
LuxRae
Top