Draw order and battler animations

First off, I'm using GubiD's battle system.
So, the sprite handling is different to stock VX.

I need to draw a couple of animations (character animations, set by @character.animation_id) behind battler sprites (GubiD's battlers, Character classes in Scene_Battle), which load up the same way as character animations, but respond to battle animation effects, the same way as stock battler animations, in Scene_Battle.
basically, he rewired the call to effects from Scene_Battle, to trigger character animations.
the problem is, I need *some* animations to appear behind the character, and some others to appear *above* the character.
tracking the code up and down is a mess, so I resort to someone's better knowledge of sprites and animations.
is there a way to change the Z property of the animations?
all I could find so far is that they're pre-wired to a viewport, at creation time.
I don't want to start experimenting with it, as it is already a task to set up the rest of the framework to work with my design, so I want to make sure it works first before changing *how* it works.
Could you provide a demo (or a link to the script)? His we bsite is not loading.
In any case, try using this script I wrote (I don't know if it will work, haven't tested with the battle system).
Code:
module FOG_ANIM_BEHIND
  ANIMATION_LIST = [14,15,16]
end

class RPG::Animation
  def from_behind?
    FOG_ANIM_BEHIND::ANIMATION_LIST.index(id) != -1
  end
end

class Sprite_Base
  alias fog_asp animation_set_sprites
  def animation_set_sprites(frame)
    fog_asp(frame)
    @ani_sprites.each_with_index do |sprite, i|
      next unless sprite
      sprite.z = self.z - 10 + i if @animation.from_behind?
    end
  end
end
Add the ID of the animation you want to be played behind the actor in the array "ANIMATION_LIST".
Note that the animation is played behind other actors that fall in the area of the animation frames too.
Could you provide a demo (or a link to the script)? His we bsite is not loading.

no.... it's HUGE, and I made a lot of modifications to it... I'd have to upload the whole thing, and as it is right now, it's broken.
I'm in the process of building a stable version, with this change in mind.

I think I've seen animation_set_sprites, and I believe the first thing I changed was sprite.z.
let me try that and I'll get back to you.

Note that the animation is played behind other actors that fall in the area of the animation frames too.
it's ok.
that's what I want.

the draw order for GTBS is map, events, action range, characters, cursor.
but (characters) also bring (animation) with them..... I needed something that would push (animation) back behind (action range) or (events)
if this makes (animation) go behind (characters),.... I'll take this.

EDIT: I just realized I could use the animation's position alignment (head, center, feet or screen) which I don't really need...... everything is feet-aligned.
I might tap into that, which would be inherent to the animation itself, right from the database.
like a charm.

sUBYRNt.jpg


can I ask for your name, for the credit roll? (send pm if you want to keep it private)

Original thread: https://forums.rpgmakerweb.com/threads/draw-order-and-battler-animations.78702/