Main Menu

[VX] Show Enemy States, Ziifee's State Animation, and Wij's R.I.B.S Problem

Started by Kyriaki, July 11, 2011, 01:14:57 AM

0 Members and 1 Guest are viewing this topic.

Kyriaki

I get this error every time I use all three scripts together:

Wij's R.I.B.S works fine with Ziifee's State Animation, but when I add Show Enemy States this usually happens on the second set of player turns or so when selecting the enemy. I've included a Project with the mentioned scripts.
.: Current Project :.

modern algebra

Your demo is missing the graphics for RIBS, so I wasn't able to run it, but both RIBS and the State Icon Animation script overwrite the draw_actor_state method, so they aren't fully compatible but I suspect it is only a matter of minor graphical issues.

I assume the incompatibility must do with the Show Enemy States script passing an enemy that doesn't exist. It could probably be fixed by inserting the following line:


    return if @enemies[index].nil?


at line 33, right after:


  def draw_item (index, *args)
    mdlg_joy_drw_enmy_stt_drwitm_0gh3 (index, *args)


However, that doesn't explain why the error is occurring, or why an index is being passed that would return nil. That must be something in RIBS doing that, and it might cause further problems in the future. I would need a demo with all the graphics and stuff to test and be sure.

Kyriaki

Oh, I'm sorry about that I completely forgot to copy over the graphics for R.I.B.S, I have fixed the attachment to have the proper files. Thank for looking into it, I will check out that fix and get back to you.
.: Current Project :.

modern algebra

OK, the better fix for it is to go into RIBS at line 1550 and change:


    for i in 0..$game_troop.members.size - 1
      draw_item(i, true, 1)
    end


to:


    for i in 0...@enemies.size
      draw_item(i, true, 1)
    end


Alternatively, you could delete (from line 1540 to 1555) this whole section:


#==============================================================================
# Window_TargetEnemy
#==============================================================================

class Window_TargetEnemy < Window_Command
  #--------------------------------------------------------------------------
  # Initialize (Mod)
  #--------------------------------------------------------------------------
  alias ow_ribs_window_targetenemy_initialize initialize unless $@
  def initialize
    ow_ribs_window_targetenemy_initialize
    for i in 0..$game_troop.members.size - 1
      draw_item(i, true, 1)
    end
  end
end


All that it does is change it so the enemy's names are center aligned. That, however, interferes with the Show Enemy States script since it gives it less room to draw states. It's probably OK since you are using ziifee's anyway, but it might look a little weird nonetheless.

Kyriaki

The fix you mentioned in your first reply worked fine, but the first selection in the next more permanently so. I am not comfortable deleting parts of scripts and especially like how it looks, so I am more than happy to edit it instead. ^^ Thank you for your help.
.: Current Project :.