Yami Order Battlers Strange Escape Bug + Vertical Gauge?

RCXDan

Champion of Brightmoon Tor
Veteran
Joined
Jan 4, 2019
Messages
342
Reaction score
763
First Language
English
Primarily Uses
RMVXA
So I've already solved the enemy transform and death/revival problems I had with this script thanks to Roninator2.

However, as time passed, I've started to notice this odd bug that happens no matter what project I put this in:

When you escape from battle without killing all the enemies, the order gauge shoots out into the middle of the screen farther than it should be. It is not a compatibility error as it doesn't happen when you kill all the enemies in combat, as it goes back to normal.

What I really want to get working, though, is a vertical version of the Order Battlers gauge. The current horizontal configuration takes up too much space and I find vertical variants better looking regardless.

We294DS.png


I've made this mock-up as a demonstration of what I want.

OgiSEEB.png


When an action is completed, the person on bottom shuffles to the top of the line.

I've attempted to do this on my own by configuring the x and y values of the original script, but nothing worked out. Maybe it needed an extra push in coding that I don't quite grasp.

Either way, here's the script link: YSA Order Battlers
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,535
Reaction score
854
First Language
English
Primarily Uses
RMVXA
Ruby:
class Sprite_OrderBattler < Sprite_Base
  def update_dtb_style
    #---
    actor_window = SceneManager.scene.actor_window
    enemy_window = SceneManager.scene.enemy_window
    if actor_window.active
      if $game_party.members[actor_window.index] == @battler
        @move_x = 12
      else
        @move_x = 24
      end
    end
    if enemy_window.active
      if $game_troop.members[enemy_window.index] == @battler
        @move_x = 36
      else
        @move_x = 24
      end
    end
    if !actor_window.active && !enemy_window.active
      @move_x = 24
    end
    #---
    return if !@move_x && !@move_y
    if @battler.hidden? || (!@show_dead && @battler.dead?)
      self.opacity -= 20
    end
    if self.y != @move_y && @move_y
      if @move_y > self.y
        @move_x = 16
      elsif @move_y < self.y
        @move_x = 34
      else
        @move_x = 20
      end
      self.z = (@move_y < self.y) ? 7500 : 8500
      if @move_y >= self.y
        self.y += [@move_rate_y, @move_y - self.y].min
      else
        self.y -= [@move_rate_y, - @move_y + self.y].min
      end
    end
    if self.x != @move_x && @move_x
      self.x += (self.x > @move_x) ? -@move_rate_x : @move_rate_x
    end
    if self.y == @move_y && @move_y
      @first_time = false if @first_time
      @move_y = nil
    end
    if self.x == @move_x && @move_x
      @move_x = nil
    end
  end
  def make_dtb_destination
    #---
    BattleManager.performed_battlers = [] if !BattleManager.performed_battlers
    array = BattleManager.performed_battlers.reverse
    action = BattleManager.action_battlers.reverse - BattleManager.performed_battlers.reverse
    array += action
    action.uniq!
    array.uniq!
    #---
    result = []
    for member in array
      next if member.hidden?
      result.push(member) unless member.dead?
      action.delete(member) if member.dead? and !@show_dead
    end
    if @show_dead
      for member in array
        next if member.hidden?
        result.push(member) if member.dead?
      end
    end
    #---
    index = result.index(@battler).to_i
    @move_y = 24 + index * 24
    if BattleManager.in_turn?
      @move_y += 6 if action.include?(@battler)
      @move_y += 6 if (index + 1 == result.size) and action.size > 1
    end
    den = @first_time ? 12 : 24
    @move_rate_y = [((@move_y - self.y)/den).abs, 1].max
  end
end
 

RCXDan

Champion of Brightmoon Tor
Veteran
Joined
Jan 4, 2019
Messages
342
Reaction score
763
First Language
English
Primarily Uses
RMVXA
Ruby:
class Sprite_OrderBattler < Sprite_Base
  def update_dtb_style
    #---
    actor_window = SceneManager.scene.actor_window
    enemy_window = SceneManager.scene.enemy_window
    if actor_window.active
      if $game_party.members[actor_window.index] == @battler
        @move_x = 12
      else
        @move_x = 24
      end
    end
    if enemy_window.active
      if $game_troop.members[enemy_window.index] == @battler
        @move_x = 36
      else
        @move_x = 24
      end
    end
    if !actor_window.active && !enemy_window.active
      @move_x = 24
    end
    #---
    return if !@move_x && !@move_y
    if @battler.hidden? || (!@show_dead && @battler.dead?)
      self.opacity -= 20
    end
    if self.y != @move_y && @move_y
      if @move_y > self.y
        @move_x = 16
      elsif @move_y < self.y
        @move_x = 34
      else
        @move_x = 20
      end
      self.z = (@move_y < self.y) ? 7500 : 8500
      if @move_y >= self.y
        self.y += [@move_rate_y, @move_y - self.y].min
      else
        self.y -= [@move_rate_y, - @move_y + self.y].min
      end
    end
    if self.x != @move_x && @move_x
      self.x += (self.x > @move_x) ? -@move_rate_x : @move_rate_x
    end
    if self.y == @move_y && @move_y
      @first_time = false if @first_time
      @move_y = nil
    end
    if self.x == @move_x && @move_x
      @move_x = nil
    end
  end
  def make_dtb_destination
    #---
    BattleManager.performed_battlers = [] if !BattleManager.performed_battlers
    array = BattleManager.performed_battlers.reverse
    action = BattleManager.action_battlers.reverse - BattleManager.performed_battlers.reverse
    array += action
    action.uniq!
    array.uniq!
    #---
    result = []
    for member in array
      next if member.hidden?
      result.push(member) unless member.dead?
      action.delete(member) if member.dead? and !@show_dead
    end
    if @show_dead
      for member in array
        next if member.hidden?
        result.push(member) if member.dead?
      end
    end
    #---
    index = result.index(@battler).to_i
    @move_y = 24 + index * 24
    if BattleManager.in_turn?
      @move_y += 6 if action.include?(@battler)
      @move_y += 6 if (index + 1 == result.size) and action.size > 1
    end
    den = @first_time ? 12 : 24
    @move_rate_y = [((@move_y - self.y)/den).abs, 1].max
  end
end

Holy hell. I don't care if this was easy for you or not, you're a miracle worker. I've finally gotten the vertical gauge I wanted. :kaoluv:

That said I've found something that strengthens my case with the glitch that was 1/2 of the reason for making this thread. Now that we've switched it to vertical, the escape bug happens vertically.

Example:

x5eHRG6.png
VS.
mRWQ4eE.png


Escaping on turn 0 or winning fights doesn't do this. Escaping after 1+ turn or losing the fight completely (via "continue if lose") causes this strange bug. The script itself has $game_party.all_dead? and $game_troop.all_dead? to prevent this bug happening when you win fights, but escaping doesn't have a similar function.

I think something with the sprites isn't updating once this happens.

Also similarly important:

sTMUPRI.png


I've decided to stress test by putting in a lot of enemies and my maximum of five player characters and it wound up doing... this. This is also starting a fight normally without the bug.

In hindsight this would have been worse if it were with the horizontal mode the script originally came with. :kaoswt2:

Is there a way to limit the amount of icons shown to 8 maximum with a modulus function or something? Anybody who uses up their action has their icon disappear to the back of the line by lowering their opacity to 0 if there's more than 8 fighters. And then crank their opacity up to 255 when they enter the queue of 8 visible icons or something.

I genuinely don't know how this works.
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,535
Reaction score
854
First Language
English
Primarily Uses
RMVXA
You are going to have to share a test project. I can't reproduce the icon moving and I get another issue that you don't have. Icons 9 & 10 are overlapped.
 

RCXDan

Champion of Brightmoon Tor
Veteran
Joined
Jan 4, 2019
Messages
342
Reaction score
763
First Language
English
Primarily Uses
RMVXA
You are going to have to share a test project. I can't reproduce the icon moving and I get another issue that you don't have. Icons 9 & 10 are overlapped.


Huh. Weird.

Anyway, here's the clean project that I use to test bugs. The bug happens on both this and my real projects, and deleting scripts in-between doesn't change it so I don't think it's a compatibility issue: Script Bug Testing Project

I've put in a divider image that shows the position of where the icons should be vs. what happens when you escape after 1 turn or lose a fight.
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,535
Reaction score
854
First Language
English
Primarily Uses
RMVXA
Now I understand, it's when starting the next battle after escaping not when you escape.
Let me see what I can figure out
Also you are getting the icons duplicated at the top like me.

Fixed the position issue.
def make_dtb_destination
BattleManager.performed_battlers = []
remove everything after the []

As for the icons duplicating. they seem to disappear after a second into the battle, but don't know yet what the issue is.
 
Last edited:

RCXDan

Champion of Brightmoon Tor
Veteran
Joined
Jan 4, 2019
Messages
342
Reaction score
763
First Language
English
Primarily Uses
RMVXA
Now I understand, it's when starting the next battle after escaping not when you escape.
Let me see what I can figure out
Also you are getting the icons duplicated at the top like me.

Fixed the position issue.
def make_dtb_destination
BattleManager.performed_battlers = []
remove everything after the []

As for the icons duplicating. they seem to disappear after a second into the battle, but don't know yet what the issue is.

If you mean getting rid of " if !BattleManager.performed_battlers " then, well...

I tried this and it brings a few new problems with it.

The biggest problem being that the icons go up and stack behind each other when actions are finished. It fixes our original problem but invites one that's a bit worse.

The icon duplicating goes away when I remove your patch from the other thread, since it does the same glitchy reload of the icons that you see at the start of battle when I revive party members. Maybe the methods are overlapping?
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,535
Reaction score
854
First Language
English
Primarily Uses
RMVXA
The biggest problem being that the icons go up and stack behind each other when actions are finished. It fixes our original problem but invites one that's a bit worse.
Figured that out. Your using the script incorrectly. The switch is to be reserved not turned on.
You have the event turning the switch on that makes the extra icons show up.
The switch is automatically turned on when one of the conditions happen, enemy is revealed, enemy is revived, enemy is transformed.
Then the icons are updated and the switch is turned off.
 

RCXDan

Champion of Brightmoon Tor
Veteran
Joined
Jan 4, 2019
Messages
342
Reaction score
763
First Language
English
Primarily Uses
RMVXA
Figured that out. Your using the script incorrectly. The switch is to be reserved not turned on.
You have the event turning the switch on that makes the extra icons show up.
The switch is automatically turned on when one of the conditions happen, enemy is revealed, enemy is revived, enemy is transformed.
Then the icons are updated and the switch is turned off.

I'm sorry, I don't follow?

What I understand is that the switch should be listed but I should never turn it on. Either way doing this stops the glitch when it happens at the start of battle, but when you revive allies the glitch still happens. This is without ever turning it on.

Maybe send me your version of the project so I can see what you mean.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,535
Reaction score
854
First Language
English
Primarily Uses
RMVXA
Ok so I haven't been able to prevent the icons from piling up after they attack.
but I got the duplicate icon fixed.
Here is a new order fix.
Ruby:
# if you get an error under Order Battlers Line 679 put a # there

# if @actor_command_window.current_symbol == :attack #&& !BattleManager.actor.input.attack?
# Order patch by Roninator2

module R2_Turn_Gauge_Display
  SWITCH = 977
end

class Game_Interpreter
  #--------------------------------------------------------------------------
  # * Enemy Appear
  #--------------------------------------------------------------------------
  def command_335
    iterate_enemy_index(@params[0]) do |enemy|
      enemy.appear
      $game_switches[R2_Turn_Gauge_Display::SWITCH] = true
      $game_troop.make_unique_names
    end
  end
  #--------------------------------------------------------------------------
  # * Enemy Transform
  #--------------------------------------------------------------------------
  def command_336
    iterate_enemy_index(@params[0]) do |enemy|
      enemy.transform(@params[1])
      $game_switches[R2_Turn_Gauge_Display::SWITCH] = true
      $game_troop.make_unique_names
    end
  end
end
module BattleManager
  #--------------------------------------------------------------------------
  # alias method: turn_start
  #--------------------------------------------------------------------------
  def self.sort_battlers(cache = false)
    battlers = []
    for battler in ($game_party.members + $game_troop.members)
      next if battler.dead? || battler.hidden?
      battlers.push(battler)
    end
    battlers.sort! { |a,b|
      if a.agi != b.agi
        b.agi <=> a.agi
      else
        a.name <=> b.name
      end
    }
    return battlers
  end
end
class Scene_Battle < Scene_Base
  alias r2_order_gauge_create_all_windows create_all_windows
  def create_all_windows
    r2_order_gauge_create_all_windows
    update_spriteset
  end
  #--------------------------------------------------------------------------
  # new method: update spriteset
  #--------------------------------------------------------------------------
  def update_spriteset
    for order in @spriteset_order
      order.bitmap.dispose
      order.dispose
    end
    @spriteset_order = []
    h = []
    $game_troop.members.each do |enemy|
      h << enemy if enemy.hidden?
    end
    for battler in $game_party.members + $game_troop.members
      battle_type = :dtb
      battle_type = :pctb if BattleManager.btype?(:pctb)
      battle_type = :catb if BattleManager.btype?(:catb)
      next if h.include?(battler)
      order = Sprite_OrderBattler.new(@spriteset.viewportOrder, battler, battle_type)
      @spriteset_order.push(order)
    end
  end
  #--------------------------------------------------------------------------
  # alias method: update
  #--------------------------------------------------------------------------
  alias update_order_guage update_basic
  def update_basic
    update_spriteset if $game_switches[R2_Turn_Gauge_Display::SWITCH] == true
    $game_switches[R2_Turn_Gauge_Display::SWITCH] = false
    update_order_guage
  end
end
class Game_Battler < Game_BattlerBase
  alias r2_enemy_revive_order_gauge   revive
  def revive
    r2_enemy_revive_order_gauge
    $game_switches[R2_Turn_Gauge_Display::SWITCH] = true
  end
end
@RCXDan
Something was off with the order battlers you had done.
I put in the original I had in my script repository and it worked fine.
 

Attachments

  • [Script Bug fixed].zip
    1.8 MB · Views: 3
Last edited:

RCXDan

Champion of Brightmoon Tor
Veteran
Joined
Jan 4, 2019
Messages
342
Reaction score
763
First Language
English
Primarily Uses
RMVXA
Ok so I haven't been able to prevent the icons from piling up after they attack.
but I got the duplicate icon fixed.
Here is a new order fix.
Ruby:
# if you get an error under Order Battlers Line 679 put a # there

# if @actor_command_window.current_symbol == :attack #&& !BattleManager.actor.input.attack?
# Order patch by Roninator2

module R2_Turn_Gauge_Display
  SWITCH = 977
end

class Game_Interpreter
  #--------------------------------------------------------------------------
  # * Enemy Appear
  #--------------------------------------------------------------------------
  def command_335
    iterate_enemy_index(@params[0]) do |enemy|
      enemy.appear
      $game_switches[R2_Turn_Gauge_Display::SWITCH] = true
      $game_troop.make_unique_names
    end
  end
  #--------------------------------------------------------------------------
  # * Enemy Transform
  #--------------------------------------------------------------------------
  def command_336
    iterate_enemy_index(@params[0]) do |enemy|
      enemy.transform(@params[1])
      $game_switches[R2_Turn_Gauge_Display::SWITCH] = true
      $game_troop.make_unique_names
    end
  end
end
module BattleManager
  #--------------------------------------------------------------------------
  # alias method: turn_start
  #--------------------------------------------------------------------------
  def self.sort_battlers(cache = false)
    battlers = []
    for battler in ($game_party.members + $game_troop.members)
      next if battler.dead? || battler.hidden?
      battlers.push(battler)
    end
    battlers.sort! { |a,b|
      if a.agi != b.agi
        b.agi <=> a.agi
      else
        a.name <=> b.name
      end
    }
    return battlers
  end
end
class Scene_Battle < Scene_Base
  alias r2_order_gauge_create_all_windows create_all_windows
  def create_all_windows
    r2_order_gauge_create_all_windows
    update_spriteset
  end
  #--------------------------------------------------------------------------
  # new method: update spriteset
  #--------------------------------------------------------------------------
  def update_spriteset
    for order in @spriteset_order
      order.bitmap.dispose
      order.dispose
    end
    @spriteset_order = []
    h = []
    $game_troop.members.each do |enemy|
      h << enemy if enemy.hidden?
    end
    for battler in $game_party.members + $game_troop.members
      battle_type = :dtb
      battle_type = :pctb if BattleManager.btype?(:pctb)
      battle_type = :catb if BattleManager.btype?(:catb)
      next if h.include?(battler)
      order = Sprite_OrderBattler.new(@spriteset.viewportOrder, battler, battle_type)
      @spriteset_order.push(order)
    end
  end
  #--------------------------------------------------------------------------
  # alias method: update
  #--------------------------------------------------------------------------
  alias update_order_guage update_basic
  def update_basic
    update_spriteset if $game_switches[R2_Turn_Gauge_Display::SWITCH] == true
    $game_switches[R2_Turn_Gauge_Display::SWITCH] = false
    update_order_guage
  end
end
class Game_Battler < Game_BattlerBase
  alias r2_enemy_revive_order_gauge   revive
  def revive
    r2_enemy_revive_order_gauge
    $game_switches[R2_Turn_Gauge_Display::SWITCH] = true
  end
end
@RCXDan
Something was off with the order battlers you had done.
I put in the original I had in my script repository and it worked fine.

Alright. It stops the duplication glitch, but the "enemies get pushed forward when you escape turn 1" thing still happens. Isn't there a script call or something for the escape command?

Like doing something with this code:
if $game_party.all_dead? || $game_troop.all_dead?
@spriteset.viewportOrder.ox = Graphics.height if @spriteset.viewportOrder.ox != Graphics.width
@spriteset.viewportOrder.oy = Graphics.width if @spriteset.viewportOrder.oy != Graphics.height
end

So it does something similar to when the player wins the fight, aka. Resetting the positions back to start? Because it's definitely the game trying to save the positions of the prior turn but it just stacks the positions of the new one. (I've put 10 bats in a fight and escaping turn 1 to fight the slimes made the order bar go super far down)
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,535
Reaction score
854
First Language
English
Primarily Uses
RMVXA
Sorry forgot about that.
Two ways to fix it, as stated above remove everything after the [] for
def make_dtb_destination.
but it has to be in my vertical fix. or the original script since you merged the two.
Or you can add into the def dispose_spriteset under Scene_Battle
BattleManager.performed_battlers = []
Just above
order_gauge_dispose_spriteset
 

RCXDan

Champion of Brightmoon Tor
Veteran
Joined
Jan 4, 2019
Messages
342
Reaction score
763
First Language
English
Primarily Uses
RMVXA
Sorry forgot about that.
Two ways to fix it, as stated above remove everything after the [] for
def make_dtb_destination.
but it has to be in my vertical fix. or the original script since you merged the two.
Or you can add into the def dispose_spriteset under Scene_Battle
BattleManager.performed_battlers = []
Just above
order_gauge_dispose_spriteset

Wow, it actually works! Why it works I don't know, but the fact it works at all is a miracle.

Now one last thing. I want to limit the amount of icons shown at all times to be 8 maximum, regardless of how many actors or enemies are on the field. Is that possible?

sTMUPRI.png


Mostly to prevent a scenario like this.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,535
Reaction score
854
First Language
English
Primarily Uses
RMVXA
Sure I'll try to figure that out, but you could just move the starting position higher up, but that wouldn't prevent you from having 8 enemies on screen and 5 actors.
only other thing I saw was that the icons bunched up when the enemy transformed. This fixes that.
Ruby:
class Scene_Battle < Scene_Base
  alias order_gauge_party_update update
  def update
    order_gauge_party_update
    if @party_command_window.active
      @update_ordergauge = true
    end
  end
end

You could change this and it will only have 8 rows, but if you had 12 battlers on screen the icons for battler 9-12 would be stacked at the top.

Make the adjustment in the vertical script I wrote or in the original if you are overwriting them.
You should be able to tell what I changed.
Ruby:
  def make_dtb_destination
    #---
    BattleManager.performed_battlers = [] if !BattleManager.performed_battlers
    array = BattleManager.performed_battlers.reverse
    action = BattleManager.action_battlers.reverse - BattleManager.performed_battlers.reverse
    array += action
    action.uniq!
    array.uniq!
    #---
    result = []
#~     for member in array
#~       next if member.hidden?
#~       result.push(member) unless member.dead?
#~       action.delete(member) if member.dead? and !@show_dead
#~     end
    #############
    array.each_with_index do |member, i|
      next if member.hidden?
      next if i > 7
      result.push(member) unless member.dead?
      action.delete(member) if member.dead? and !@show_dead
    end
    ##############
    if @show_dead
      for member in array
        next if member.hidden?
        result.push(member) if member.dead?
      end
    end
    #---
    index = result.index(@battler).to_i
    @move_y = 24 + index * 24
    if BattleManager.in_turn?
      @move_y += 6 if action.include?(@battler)
      @move_y += 6 if (index + 1 == result.size) and action.size > 1
    end
    den = @first_time ? 12 : 24
    @move_rate_y = [((@move_y - self.y)/den).abs, 1].max
  end
 
Last edited:

RCXDan

Champion of Brightmoon Tor
Veteran
Joined
Jan 4, 2019
Messages
342
Reaction score
763
First Language
English
Primarily Uses
RMVXA
Sure I'll try to figure that out, but you could just move the starting position higher up, but that wouldn't prevent you from having 8 enemies on screen and 5 actors.
only other thing I saw was that the icons bunched up when the enemy transformed. This fixes that.
Ruby:
class Scene_Battle < Scene_Base
  alias order_gauge_party_update update
  def update
    order_gauge_party_update
    if @party_command_window.active
      @update_ordergauge = true
    end
  end
end

You could change this and it will only have 8 rows, but if you had 12 battlers on screen the icons for battler 9-12 would be stacked at the top.

Make the adjustment in the vertical script I wrote or in the original if you are overwriting them.
You should be able to tell what I changed.
Ruby:
  def make_dtb_destination
    #---
    BattleManager.performed_battlers = [] if !BattleManager.performed_battlers
    array = BattleManager.performed_battlers.reverse
    action = BattleManager.action_battlers.reverse - BattleManager.performed_battlers.reverse
    array += action
    action.uniq!
    array.uniq!
    #---
    result = []
#~     for member in array
#~       next if member.hidden?
#~       result.push(member) unless member.dead?
#~       action.delete(member) if member.dead? and !@show_dead
#~     end
    #############
    array.each_with_index do |member, i|
      next if member.hidden?
      next if i > 7
      result.push(member) unless member.dead?
      action.delete(member) if member.dead? and !@show_dead
    end
    ##############
    if @show_dead
      for member in array
        next if member.hidden?
        result.push(member) if member.dead?
      end
    end
    #---
    index = result.index(@battler).to_i
    @move_y = 24 + index * 24
    if BattleManager.in_turn?
      @move_y += 6 if action.include?(@battler)
      @move_y += 6 if (index + 1 == result.size) and action.size > 1
    end
    den = @first_time ? 12 : 24
    @move_rate_y = [((@move_y - self.y)/den).abs, 1].max
  end

It's an interesting fit, but it's quite glitchy once put into practice. The "next if > 7" works in making it presentable for turn 0, but once actors actually get to fighting the actions don't match the icons.

My idea is that the icons we can't see go down as the action list proceeds and lose their opacity when they shuffle up to the top of the list, but it seems like it's not possible as it currently stands. Oh well. :rsad:
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,535
Reaction score
854
First Language
English
Primarily Uses
RMVXA
I can't make it invisible and shown based on the top 8 order.
But I don't see the issue you stated. Fighting is the same order for me, although I do see a shuffle happening, I can only assume it's because of other circumstances that affect it's agility order.

If another scripter can see what I've done badly or an idea how to remediate all of RCXDan's issues, please chime in.
 

RCXDan

Champion of Brightmoon Tor
Veteran
Joined
Jan 4, 2019
Messages
342
Reaction score
763
First Language
English
Primarily Uses
RMVXA
@Trihan is the only other scripter I know that can possibly help. Maybe they know something?
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
4,171
Reaction score
3,433
First Language
English
Primarily Uses
RMMZ
You have summoned me, and I have come. Let me take a look.

Could you not put the opacity change into Sprite_OrderBattler's update method and use a conditional based on self's current y coordinate?
 
Last edited:

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
3,535
Reaction score
854
First Language
English
Primarily Uses
RMVXA
@Trihan It almost works. The battle start with 7 icons not 8 then after the first round it has 8. since an enemy joined the battle.
I also do see the battle order not matching the attacks. the actor icon is next and the enemy attacks.
It works fine in the default, so something I did messed up the order.
 

RCXDan

Champion of Brightmoon Tor
Veteran
Joined
Jan 4, 2019
Messages
342
Reaction score
763
First Language
English
Primarily Uses
RMVXA
You have summoned me, and I have come. Let me take a look.

Could you not put the opacity change into Sprite_OrderBattler's update method and use a conditional based on self's current y coordinate?

Interesting idea, and one I definitely needed to try. I don't have the greatest grasp on completely made from scratch Ruby, but I managed to get something working that shocked me.

Ruby:
if self.y >= 180
      move_y = 40
      self.opacity = -100
    end
    if self.y <= 40
      move_y = 50
      self.opacity = 255

Very buggy and has the same "wrong icon-actor association" glitch we've had up there, but it's a start as it has the right idea of what I wanted to do. Icons below that threshold vanish which is good!

... But unfortunately it just shows the "middle" of the icons instead of showing the top eight fastest people on the battlefield.

That said, it should be much easier to make this into something presentable now that we have some sort of foundation! :kaohi:
 

Latest Threads

Latest Profile Posts

I think Kipling said it best.

If you can make one heap of all your winnings
And risk it on one turn of pitch-and-toss,
And lose, and start again at your beginnings
⁠And never breathe a word about your loss,
(...)
Yours is the Earth and everything that's in it,
⁠And—which is more—you'll be a Man, my son!


Do you feel like your modern cities are too clean? I made some dumpsters and trash variations. Visit my MZ resource thread (link in signature).
Doing clean-up on tall-ified sprites, filling in pixel by pixel where the stretching warped the image, feels incredibly tedious but also highly rewarding when one zooms out and the sprite looks even better than before.

Forum statistics

Threads
118,578
Messages
1,117,102
Members
155,637
Latest member
CNBTGing
Top