[RMVX ACE] YANFLY ACE BATTLE ENGINE

Posts

Pages: 1
I just got the battle script from here:
https://yanflychannel.wordpress.com/rmvxa/battle-scripts/ace-battle-engine/

There are a few issues with it imo such as the fact the bars cover the faces, here is an example of what I mean and how I went about fixing it:

So that's one problem solved. All I would have to do is do the same thing for each party member. xD
HOWEVER, I'd like to get rid of the gray icons on the top left. Icons for status ailments/buffs are fine, but I don't need a gray button telling me nothing is happening, or a dumb looking fist to show they are about to attack.
In fact, I just checked my previous RPG to see if the fist icons were always there, but they aren't. They are part of the script.

Another thing I'd like to adjust is the font used for the names of the characters. I'd like the font to be bolder/sharper if possible. The names need to stand out more. Something more like this: http://img2.wikia.nocookie.net/__cb20051101170510/finalfantasy/images/c/c9/Final_Fantasy_VI_Final_Kefka.png
SunflowerGames
The most beautiful user on RMN!
13323

I believe that animation may be the icon that is used for "Attack," which is the first skill in your database. Try changing the icon of that first. If that doesn't work I think there would be a line that specified the icon number you wanted to use.

Also if you want to get rid of that button, and can't figure out how to do it otherwise... Export your icons, remove that icon, then put the icon set back in with the removed icons. Now it will just display transparent icons, so you won't see anything.


For your other issue look at lines

254-259
1902-1924

Not too sure about this issue though, just a guess as to where to start looking.

Here are default values for 254-259
BATTLESTATUS_NAME_FONT_SIZE = 20 # Font size used for name.
BATTLESTATUS_TEXT_FONT_SIZE = 16 # Font size used for HP, MP, TP.
BATTLESTATUS_NO_ACTION_ICON = 185 # No action icon.
BATTLESTATUS_HPGAUGE_Y_PLUS = 11 # Y Location buffer used for HP gauge.
BATTLESTATUS_CENTER_FACES = false # Center faces for the Battle Status.


And 1902-1924

def draw_actor_hp(actor, dx, dy, width = 124)
draw_gauge(dx, dy, width, actor.hp_rate, hp_gauge_color1, hp_gauge_color2)
change_color(system_color)
cy = (Font.default_size - contents.font.size) / 2 + 1
draw_text(dx+2, dy+cy, 30, line_height, Vocab::hp_a)
draw_current_and_max_values(dx, dy+cy, width, actor.hp, actor.mhp,
hp_color(actor), normal_color)
end

#--------------------------------------------------------------------------
# overwrite method: draw_actor_mp
#--------------------------------------------------------------------------
def draw_actor_mp(actor, dx, dy, width = 124)
draw_gauge(dx, dy, width, actor.mp_rate, mp_gauge_color1, mp_gauge_color2)
change_color(system_color)
cy = (Font.default_size - contents.font.size) / 2 + 1
draw_text(dx+2, dy+cy, 30, line_height, Vocab::mp_a)
draw_current_and_max_values(dx, dy+cy, width, actor.mp, actor.mmp,
mp_color(actor), normal_color)
end


I changed
BATTLESTATUS_NO_ACTION_ICON = 185 # No action icon.
to
BATTLESTATUS_NO_ACTION_ICON = 0 # No action icon.

And that got rid of the gray button. Thanks Kory_toombs!!
The fist is still there when attacking but now it doesn't seem so bad anymore.

I wonder if I should leave the icon feature alone or try to get rid of it. By default RPG Maker doesn't have those icons, so they hardly seem necessary. If I told my guy to use Cure, why do I need an icon reminding me?




I changed
BATTLESTATUS_NAME_FONT_SIZE = 20 # Font size used for name.
to
BATTLESTATUS_NAME_FONT_SIZE = 30 # Font size used for name.


It's not space efficient. I don't really need the names to be bigger, I mainly just wanted them to stand out more.

Also, I asked myself whether I need the names at all (since the portraits serve the purpose of showing who is who) but for my particular game I'd actually rather have the names.

Hey I just noticed, the font for the menu commands are the same as everything else. So if I change the font for my entire game, the script will use that font also?
Craze
why would i heal when i could equip a morningstar
15150
i like to make battle status elements stand out using

contents.font.bold = true


try it inside of draw_actor_name. remember that you can overwrite the original draw_actor_name from window_base by putting a new version instead of window_battlestatus; only battlestatus will take on that particular method.
I had a crazy idea for removing the icons. Why not just go through all the skills and remove the icons from each one? I honestly have no idea what the icons are for. To the best of my memory in every Final Fantasy game, you knew what a spell did simply by reading the name of the spell, there were no damn icons! (and how exactly is an icon supposed to help anyway)

After that there is only one problem, the names would be floating in the middle for no reason. It's more space efficient to make them left aligned.

@Craze

Thank you!!
But yeah I'm wondering if they could be left aligned more.

1853-1862:

#--------------------------------------------------------------------------
# overwrite method: draw_actor_name
#--------------------------------------------------------------------------
def draw_actor_name(actor, dx, dy, dw = 112)
reset_font_settings
contents.font.size = YEA::BATTLE::BATTLESTATUS_NAME_FONT_SIZE
contents.font.bold = true
change_color(hp_color(actor))
draw_text(dx+24, dy, dw-24, line_height, actor.name)
end

x and y variables actually work. This is great. Trying to decide on the best combination for x, y and font size.
Craze
why would i heal when i could equip a morningstar
15150
Just change the x value -- Yanfly adjusted that because of the action icons present there. It would be under draw_item, I believe. (Sorry, at work.)

Also, FF totally has had icons.

Thanks Craze.

no action icon = 0
name text size = 20
HP text size = 18
name text position x-1 y-5
font bold = true

It's serviceable, at least. I would think the outline for the text should be darker. (seems like it's a light gray, rather than black like in the FF6 screenshots) But the way it is will do for now.

I guess I should get rid of all the icons now. But maybe it would be smarter to find a way to disable the icons in the script as that would technically be less work.

Maybe this has something to do with the icons? 1864-1870
#--------------------------------------------------------------------------
# new method: draw_actor_action
#--------------------------------------------------------------------------
def draw_actor_action(actor, dx, dy)
draw_icon(action_icon(actor), dx, dy)
end
Craze
why would i heal when i could equip a morningstar
15150
You can change draw_icon within window_base. Just change it to look like

def draw_icon; end
and it will do nothing while also not breaking your script. NO icons at ALL will ever display within your game though. (The semicolon works as a line break.)

"w" is width. The game will try to scrunch everything into the width if need be, so setting it too low does cause that "hugging" effect (it does NOT actually affect the kerning of the font itself).

Basically, draw_text has the following arguments:

draw_text(x position, y position, width, height, string)

Do you want to just cut off the faceset a bit instead of squishing it vertically? you should be able to change the rect within draw_actor_face (the variant inside battle engine ace) so that it has a shorter height. i think you're changing the height of the blt itself -- so it's resizing the image, not cutting out a different chunk.

that might not have made any sense, sorry. again, i'm at work atm.





Cutting off the bottom of the faceset would solve nothing. The health bars already do that. What does it matter if I cut off something the player can't see. The whole reason I squished the portraits was so you can see the whole portrait instead of having everyone's mouth cut off.

Ultimately I will draw my own character portraits and take the health bars into account when designing the portrait. For example I can make a landscape drawing and then add blank space underneath where the health bars would be.

Disabling all icons, you say? If I had no other choice I probably would, since I barely see the benefit of icons. But I'm guessing there should be something in this script to disable them so I can have icons in just the normal places.
author=guy
There are a few issues with it imo such as the fact the bars cover the faces, here is an example of what I mean and how I went about fixing it:


See I didn't even notice that until now and now it bothers me

how did you fix it
Craze
why would i heal when i could equip a morningstar
15150
inside of yanfly's battle script:

#--------------------------------------------------------------------------
  # overwrite method: draw_face
  #--------------------------------------------------------------------------
  def draw_face(face_name, face_index, dx, dy, enabled = true)
    bitmap = Cache.face(face_name)
    fx = [(96 - item_rect(0).width + 1) / 2, 0].max
    fy = face_index / 4 * 96 + 2
    fw = [item_rect(0).width - 4, 92].min
    rect = Rect.new(fx, fy, fw, 92)
    rect = Rect.new(face_index % 4 * 96 + fx, fy, fw, 92) # < ------
    contents.blt(dx, dy, bitmap, rect, enabled ? 255 : translucent_alpha)
    bitmap.dispose
  end


change that 92 i pointed an arrow to. it's how many pixels are being vertically sliced out of the faceset!
slash
APATHY IS FOR COWARDS
4158
*favorites entire topic*

These are some really good tricks everyone, thanks! I'm gonna have to get crafty with the Yanfly UI soon because I'm using both MP and TP in my current project, but the way they're displayed by default is cluttered, especially for what I'm doing. The way the mouths are hidden by the UI is kinda eh too, and it'd be useful to squeeze some more status icons in there... hmm...
As an aside, icons are super useful, homie

Not only does it give you an easy visual way to categorize abilities during battle, but icons are great for an instant method of identifying items at a glance. I'm sure some of you have noticed in some games where you receive an item via message "Received X thing!" and because the item has a nonstandard or nonobvious name, you have no idea what it is and you have to fiddle around with your inventory to look for it.

Icons nullify all that by given all items their own icon by type.



This is especially great to plug into your treasure chests.



Not all items are going to as obvious as 'Leather Gloves', so unless you're painfully uncreative as to name every item, weapon, and armor with a super obvious adjective, icons are ultra rad and useful.
Okay okay, icons are great. xD
If only I could figure out how to stop them from appearing on the names/portraits during battle...

author=Feldschlacht IV
author=guy
There are a few issues with it imo such as the fact the bars cover the faces, here is an example of what I mean and how I went about fixing it:
See I didn't even notice that until now and now it bothers me

how did you fix it
I imported new images.
_
_
_


author=slash
*favorites entire topic*

These are some really good tricks everyone, thanks! I'm gonna have to get crafty with the Yanfly UI soon because I'm using both MP and TP in my current project, but the way they're displayed by default is cluttered, especially for what I'm doing.
Oh, darn, I just noticed I have TP disabled. It probably looks worse if I turn TP back on.
But I have no idea yet whether I'll use TP in my game and for what exactly.
I thought about using MP for magic (instead of TP for magic like I had originally planned) but I'd like to use MP AND TP for magic. (the player would have a choice) Which is rather odd.
Maybe I should just stick to MP and make it so characters regain small amounts of MP whenever they attack. (just like TP)
I don't even know how TP works exactly so I should find that out.

p.s. maybe the words "HP, "MP" and "TP" can be removed from the battle display, since it should be easy to know which is which. That will make it a little less cluttered.

author=Craze
inside of yanfly's battle script:

#--------------------------------------------------------------------------
  # overwrite method: draw_face
  #--------------------------------------------------------------------------
  def draw_face(face_name, face_index, dx, dy, enabled = true)
    bitmap = Cache.face(face_name)
    fx = [(96 - item_rect(0).width + 1) / 2, 0].max
    fy = face_index / 4 * 96 + 2
    fw = [item_rect(0).width - 4, 92].min
    rect = Rect.new(fx, fy, fw, 92)
    rect = Rect.new(face_index % 4 * 96 + fx, fy, fw, 92) # < ------
    contents.blt(dx, dy, bitmap, rect, enabled ? 255 : translucent_alpha)
    bitmap.dispose
  end

change that 92 i pointed an arrow to. it's how many pixels are being vertically sliced out of the faceset!
As a test, I changed the 92 to 12 and it sliced out almost the entire portrait. So you are correct.

Then I changed it to 192 and it just turned back to normal pretty much.
The portraits are 96 x 96, so at best you could change the 92 to a 96 and that only would add 4 rows of pixels, which would be added the bottom of the portrait below the HP/MP bars.

EDIT: Yeah, I tested it. Using default portaits

Top = 92
Bottom = 96
As you can see, you get slightly more portrait with 96, but it does not matter since it's at the very bottom and if anything looks worse.
I also set it to 192 again, but the result is identical to 96.

EDIT: 1871-1878
#--------------------------------------------------------------------------
  # new method: action_icon
  #--------------------------------------------------------------------------
  def action_icon(actor)
    return Icon.no_action if actor.current_action.nil?
    return Icon.no_action if actor.current_action.item.nil?
    return actor.current_action.item.icon_index
  end
Maybe if I delete this then the icons will stop appearing in battle?

1864-1869
#--------------------------------------------------------------------------
  # new method: draw_actor_action
  #--------------------------------------------------------------------------
  def draw_actor_action(actor, dx, dy)
    draw_icon(action_icon(actor), dx, dy)
  end
1806
draw_actor_action(actor, rect.x, rect.y)
EDIT: Okay. The battle icons are gone. Here are the changes I made:
1806 is now blank
1864-1867 is now blank
1874-1879 is now blank.
Every time I removed something, it caused the game to crash when a battle starts (or when the game starts) but when I removed all three of those things, then it finally worked. Hopefully there aren't any other errors.
Now I should probably test things like poison and stat buffs to make sure it works the way I want.

EDIT: Yeah, it works.

The icons are placed in a rather obstructive way, however. I thought they would have appeared on the top right, across from the character's name.

By the way, I noticed something. When I select Guard, it says "character guards" for a split second, and then nothing.
What does Guard do? Increase DEF?
Then why not have an DEF+ icon for that?
Why not just replace Guard with an effect that adds a DEF increasing status for exactly 1 turn?

EDIT: Here's how I might icons to look like:

NOT A SCREENSHOT. Artistic mockup

If a third or fourth icon appears, it would just continue left and cover the name. So what.
But maybe it's fine the way it is. I could decide to move forward.
author=zeello
By the way, I noticed something. When I select Guard, it says "character guards" for a split second, and then nothing.
What does Guard do? Increase DEF?
Then why not have an DEF+ icon for that?
Why not just replace Guard with an effect that adds a DEF increasing status for exactly 1 turn?


Remember that you can change the effect of guard anytime you want, just edit the second skill in the database
Thanks El_Waka!
By the way, the screenshots show 5 party members. I can have five party members in my RPG? Four portraits take up the whole window so I had assumed the limit was four.

The page also lists a script titled "Revival and Item Animation Fix". Do I need this?
You gotta use a script if you want to use bigger parties in battles - by default, you can only bring 4 characters to battles but you can have 995 actors in reserve (database cap).
Its probably another yanfly script. Today I downloaded a script that makes the health bars look like the ones in the screenshots. Which made me think that most likely the party members is yet another script.
https://yanflychannel.wordpress.com/rmvxa/core-scripts/party-system/
I think I'm good with 4 party members, even though the screenshots make it seem like 5 can be comfortably fit on screen so long as you have the Core Engine script which increases resolution. I'm shocked you can make it 6 or higher, since I fail to see how there is room.



The only issue now is figuring out how to increase the size of the portraits. The increased space means 96 pixels is no longer wide enough. Unfortunately when selecting a portrait you're forced to choose a 96x96 square, and I can't imagine how I'm going to get around that.

Though, adding a fifth party member might be a cheap last minute solution. At least this way all there won't be spaces between the portraits.

EDIT: or maybe, 96x96 might still be fine so long as all characters are facing right.
See where the HP/MP are, right now they are out of the way of the portrait, so that's one advantage of 96.
This might look bad if characters face left since their left shoulder would be cut off. By facing right their right shoulder is cut off, on our left, which makes sense because the cutoff is aligned with that character's HP and MP gauges.

EDIT: I'm browsing all the yanfly scripts to make sure there's nothing else I missed. Just so I don't forget, here are ones I might use:

https://yanflychannel.wordpress.com/rmvxa/battle-scripts/cast-animations/ Maybe in a future game. Also, you technically don't need a script to do this but it's probably better to use the script.
https://yanflychannel.wordpress.com/rmvxa/battle-scripts/death-common-event/ In a future game maybe.
https://yanflychannel.wordpress.com/rmvxa/battle-scripts/lunatic-parameters/lpp-empower/ - The lower your HP the stronger your attacks.
https://yanflychannel.wordpress.com/rmvxa/battle-scripts/lunatic-states/ - This might help me make a "super mode" for one of the characters.
https://yanflychannel.wordpress.com/rmvxa/battle-scripts/victory-aftermath/ For a future game, maybe. The script only benefits games with exp otherwise you don't really need it.
https://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/follow-up-skills/ This would be great for elemental bullets. (WW1 themed game)
https://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/passive-states/ Might be good if I wanted to make the pig auto-battle like I originally planned. (The only reason I wouldn't is because he has an MP gauge and making him constantly berserk would mean he never uses MP)
https://yanflychannel.wordpress.com/rmvxa/menu-scripts/ace-menu-engine/ My future games would need this as a way of disabling all menu items.
https://yanflychannel.wordpress.com/rmvxa/battle-scripts/command-equip/ I should totally use this, even if simply as a statement on the genre. Because frankly, all games should let you change equipment mid battle. There's bound to be plenty of ways I can make my game take advantage of it, such as throwing weapons/equips on the player that are better against bosses but not so good against normal enemies, and vice versa. Also elemental systems. Also just having a wide variety of weapons with various effects.

https://yanflychannel.wordpress.com/rmvxa/battle-scripts/enemy-death-transform/ I needed this for a boss that I had decided to cut from the game. But this might still be nifty to have "damaging modeling" on certain bosses such as tanks.
https://yanflychannel.wordpress.com/rmvxa/field-scripts/button-common-events/ For shooting a gun outside of battle?
https://yanflychannel.wordpress.com/rmvxa/field-scripts/event-chase-player/ I don't need this but it might be worth checking out, seeing as I use visible enemies.

2017 update: The following scripts I ended up using!
https://yanflychannel.wordpress.com/rmvxa/battle-scripts/state-animations/
https://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/weapon-attack-replace/
https://yanflychannel.wordpress.com/rmvxa/field-scripts/event-window/

Tried to use but failed or decided not to:

https://yanflychannel.wordpress.com/rmvxa/battle-scripts/instant-cast/ This script causes a glitch that makes the battle window temporarily disappear, possibly because my skills trigger text during battle. The text isn't that important to have, but then again neither is this script and after thinking it over I'd actually rather have the text.

Prob won't use: (Probably!)

https://yanflychannel.wordpress.com/rmvxa/battle-scripts/combat-log-display Sure, combat can feel too fast sometimes, but in that case I want to slow down combat, not make the player check a log.
https://yanflychannel.wordpress.com/rmvxa/core-scripts/extra-param-formulas/ Not sure what it means by DEF affecting damage received, doesn't DEF already do that?
https://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/skill-restrictions/ Being forced to wait in order to do things does not seem like the most thrilling of features.
https://yanflychannel.wordpress.com/rmvxa/menu-scripts/system-options/ Why let the player decide those things, isn't that my job? Interesting, though.
https://yanflychannel.wordpress.com/rmvxa/utility-scripts/debug-extension/ seems like it would complicate the testing process
https://yanflychannel.wordpress.com/rmvxa/utility-scripts/diagonal-scroll/
https://yanflychannel.wordpress.com/rmvxa/menu-scripts/ace-save-engine/ Doesn't look like I will need this. My game already autosaves and I can tell it which slot(s) to save to.
https://yanflychannel.wordpress.com/rmvxa/gameplay-scripts/steal-item/ It's been a long time since I had planned for any of my games to have stealing in them.
Pages: 1