Limiting the number of displayable states?

● ARCHIVED · READ-ONLY
Started by Aurorain 5 posts View original ↗
  1. Is there a way to limit the number of displayable states using Yanfly's Battle System for Ace? Currently, I have it set up like this, and it's all fine, except when a fifth state is added. The states I circled go past the area I want to limit the states to, and as they are now, cover up the actor's name.

    Spoiler
    StateIssue_zpsd4c1ec7d.png
    How can I go about setting it up like..limiting the amount of states shown to say, four?  :unsure:
  2. There's a couple of solutions, the easiest probably being this one:

    http://rmrk.net/index.php?topic=44751.0

    That makes the states scroll so you can always see all the states but they width that they display is set to 96 pixels or so I think (not 100% sure).

    I also think Formar0153 as a script that does this as well, but I couldn't think of it's name off the top of my head.

    The the method that draws their icons is this:

    #-------------------------------------------------------------------------- # * Draw State and Buff/Debuff Icons #-------------------------------------------------------------------------- def draw_actor_icons(actor, x, y, width = 96) icons = (actor.state_icons + actor.buff_icons)[0, width / 24] icons.each_with_index {|n, i| draw_icon(n, x + 24 * i, y) } endSo if you open up your script editor and do ctrl+shift+f and search for "draw_actor_icons" it'll show all the places that draw your actor's states.. usually it's the status screen, some other menu screens and the battle screens. So pick the script that looks most like the one where you want to edit it.

    Now I have no idea how comfortable you are with making edits to the script but you'll want it to look something like this:

    draw_actor_icons(actor, rect.x, line_height*1, 96)I think that's the line you'll want to edit in yanfly's battle engine. You're changing the width of the draw area to 96 pixels (the width of the face image)

    edit: on second though, you'll still have to edit the line in yanfly's battle image to set it's width if you go with a scroll state script
  3. Oh wow! Yeah, changing the part in Yanfly's script to 96 fixed it...it amazes me how I missed something like that, when the solution for it was so simple.. :headshake:  Anyway, thanks for the help, Venka! :)
  4. np :)
  5. I've moved this thread to RGSSx Script Support. Please be sure to post your threads in the correct forum next time. Thank you.


    When you need help with a script, please include a link to the script so people can look it up easily/quickly.