Yanfly Menu Engine - Aligning actor status texts

RaZzi

My Peculiar Brother
Veteran
Joined
Jul 19, 2013
Messages
423
Reaction score
206
First Language
Finnish
Primarily Uses
Oh just changed the x, not the width, because the width is like how many spaces you're wlling to give to the text. : p

Instead of

draw_actor_class(actor, dx + 290, dy, dw)try

draw_actor_class(actor, dx + 270, dy, dw)
This only changes the text position to left, it does'nt change the LVL text width (LVL text width is the problem).

Awesome that you take the time to make that custom script. Thank you for your time helping me :)
 
Last edited by a moderator:

Mike

Veteran
Veteran
Joined
Aug 28, 2013
Messages
316
Reaction score
36
First Language
English
Primarily Uses
Did you change the width back to 24 and still got that problem?

Gimme 5 mins. for that sprite on menu.

Edit: Haven't tested it yet, but done.

Edit: Forgot to tell you, put the picture inside the Your_Project_Name_Here/Graphics/System

Edit: Put this right under the material.

Code:
#==============================================================================# Scene_Menu#==============================================================================class Scene_Menu < Scene_MenuBase  alias aliasing_Scene_Menu_start start  def start    aliasing_Scene_Menu_start    create_custom_sprite_for_status  end    def create_custom_sprite_for_status    @custom_sprite = Sprite.new    @custom_sprite.bitmap = Cache.system("inser your picture here")    @custom_sprite.x = @command_window.width    @custom_sprite.z = 200  end    def terminate    super    @custom_sprite.dispose  endend 
 
Last edited by a moderator:

RaZzi

My Peculiar Brother
Veteran
Joined
Jul 19, 2013
Messages
423
Reaction score
206
First Language
Finnish
Primarily Uses
Changing width 24 makes the text draw few pixels under the rightside border.

FIXED: Added -3 to this line : draw_text(x + counter -3, y, 24, line_height, actor.level, 2)

Your script draws the border only once above Le Frog. I tried it right after Materials and after Yanfly's menu engine.

btw, Should'nt that script be inside that Yanfly's menu engine?
 
Last edited by a moderator:

Mike

Veteran
Veteran
Joined
Aug 28, 2013
Messages
316
Reaction score
36
First Language
English
Primarily Uses
It's a stand alone since based on the result you're telling me, no error has occurred. You can put them inside yanfly engine, and see how it worked.

Could you provide me with a screenshot of how and where the sprite is drawn? I need to visualize the position.
 

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
I've been following this with great interest but with all the amendments and corrections I'm now unsure what's in and what's out. When it's finalized would it be possible for you to post a 'clean' version?

Thanks
 

RaZzi

My Peculiar Brother
Veteran
Joined
Jul 19, 2013
Messages
423
Reaction score
206
First Language
Finnish
Primarily Uses
I've been following this with great interest but with all the amendments and corrections I'm now unsure what's in and what's out. When it's finalized would it be possible for you to post a 'clean' version?

Thanks
So uhm... you mean the border thing or the visual style of the menus and my positionings with full name showing? 

@Mike: Here's screenshot with the border image drawn at the top. I've marked it with red color.

Decided to show some sneakpeek of the characters of my game if people are actually following this thread :p
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
Well, both actually.  I really like what you've done with the menus and, btw, think your characters look brilliant.  Can't wait to see more of this game.
 

RaZzi

My Peculiar Brother
Veteran
Joined
Jul 19, 2013
Messages
423
Reaction score
206
First Language
Finnish
Primarily Uses
This is what the Yanfly Menu Engine script part looks like at the moment (use find on the script editor and search for window_base inside Yanfly's menu engine):

#==============================================================================

# ■ Window_Base

#==============================================================================

 

class Window_Base < Window

  def draw_actor_simple_status(actor, dx, dy)

    dy -= line_height / 2

    draw_actor_full_name(actor, dx, dy)

    draw_actor_icons(actor, dx, dy + line_height * 3)

    dw = contents.width - dx - 124

   draw_actor_class(actor, dx + 290, dy, dw)

    draw_actor_hp(actor, dx, dy + line_height * 1, dw + 124)

    if YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && !actor.draw_mp?

      draw_actor_tp(actor, dx, dy + line_height * 2, dw + 124)

    elsif YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && actor.draw_mp?

      if $imported["YEA-BattleEngine"]

        draw_actor_tp(actor, dx, dy + line_height * 2, dw/2 + 1 + 124)

        draw_actor_mp(actor, dx + dw/2, dy + line_height * 2, dw/2 + 124)

      else

        draw_actor_mp(actor, dx, dy + line_height * 2, dw/2 + 1 + 124)

        draw_actor_tp(actor, dx + dw/2, dy + line_height * 2, dw/2 + 124)

      end

    else

      draw_actor_mp(actor, dx, dy + line_height * 2, dw + 124)

    end

  end

  def draw_actor_full_name(actor, dx, dy, dw = 292) 

    change_color(hp_color(actor))

    draw_text(dx, dy, dw, line_height, actor.name + " " + actor.nickname)

  end

  def draw_actor_class(actor, x, y, width = 112)

    change_color(system_color)

    draw_text(x, y, width, line_height, " " + Vocab::level_a)

    counter = text_size(" " + Vocab::level_a).width

    change_color(normal_color)

    draw_text(x + counter -3, y, 24, line_height, actor.level, 2)

    change_color(normal_color)

    counter = text_size(actor.class.name).width

    draw_text(x - counter, y, width, line_height, actor.class.name)

  end

end # Window_Base  
You can find the Mikes border addon for it above but it is'nt integrated and optimized fully yet.

Keep in mind those settings are for screen resolution 640 x 480.

Since these wonderful people are doing this for free, I will release the full script part when we've finished it for the sake of the community. :)

And credit Mike (If Mike wants to be credited...?) and Hollow since they are mainly the reason we are this far with this :)

You can see more of my game from the links of my signature.
 
Last edited by a moderator:

Mike

Veteran
Veteran
Joined
Aug 28, 2013
Messages
316
Reaction score
36
First Language
English
Primarily Uses
I don't really mind whether I got credited or not since I didn't even spend an hour on this. .-.

Hum, I see where the sprite is located.

Check this thread again in 5-10 mins.

Edit: Play around with the y coordinate

Code:
#==============================================================================# Scene_Menu#==============================================================================class Scene_Menu < Scene_MenuBase  alias aliasing_Scene_Menu_start start  def start    aliasing_Scene_Menu_start    create_custom_sprite_for_status  end    def create_custom_sprite_for_status    @custom_sprite = Sprite.new    @custom_sprite.bitmap = Cache.system("insert_picture_here")    @custom_sprite.x = @command_window.width    @custom_sprite.z = 200    @custom_sprite2 = Sprite.new    @custom_sprite2.bitmap = Cache.system("insert_picture_here")    @custom_sprite2.x = @command_window.width    @custom_sprite2.z = 200    @custom_sprite2.y = 120 #Play around with this number    @custom_sprite3 = Sprite.new    @custom_sprite3.bitmap = Cache.system("insert_picture_here")    @custom_sprite3.x = @command_window.width    @custom_sprite3.z = 200    @custom_sprite3.y = 240 #Play around with this number    @custom_sprite4 = Sprite.new    @custom_sprite4.bitmap = Cache.system("insert_picture_here")    @custom_sprite4.x = @command_window.width    @custom_sprite4.z = 200    @custom_sprite4.y = 360 #Play around with this number  end    def terminate    super    @custom_sprite4.dispose    @custom_sprite3.dispose    @custom_sprite2.dispose    @custom_sprite.dispose  endend
 
Last edited by a moderator:

RaZzi

My Peculiar Brother
Veteran
Joined
Jul 19, 2013
Messages
423
Reaction score
206
First Language
Finnish
Primarily Uses
Thats it. I think its done. I redid the border image and played around with the script values to get the images show in the right position. I'm happy with the results.

Here are the finished scripts with the values I'm using on 640 x 480 resolution.

Yanfly's Menu Engine - Border Addon by Mike (add this right after Materials):

#==============================================================================

# Mike rocks

#==============================================================================

 

class Scene_Menu < Scene_MenuBase

  alias aliasing_Scene_Menu_start start

  def start

    aliasing_Scene_Menu_start

    create_custom_sprite_for_status

  end

  

  def create_custom_sprite_for_status

    @custom_sprite = Sprite.new

    @custom_sprite.bitmap = Cache.system("Border")

    @custom_sprite.x = @command_window.width

    @custom_sprite.z = 200

    @custom_sprite.y = 112

    @custom_sprite2 = Sprite.new

    @custom_sprite2.bitmap = Cache.system("Border")

    @custom_sprite2.x = @command_window.width

    @custom_sprite2.z = 200

    @custom_sprite2.y = 226 #Play around with this number

    @custom_sprite3 = Sprite.new

    @custom_sprite3.bitmap = Cache.system("Border")

    @custom_sprite3.x = @command_window.width

    @custom_sprite3.z = 200

    @custom_sprite3.y = 340 #Play around with this number

    @custom_sprite4 = Sprite.new

    @custom_sprite4.bitmap = Cache.system("Border")

    @custom_sprite4.x = @command_window.width

    @custom_sprite4.z = 200

    @custom_sprite4.y = 454 #Play around with this number

  end

  

  def terminate

    super

    @custom_sprite4.dispose

    @custom_sprite3.dispose

    @custom_sprite2.dispose

    @custom_sprite.dispose

  end

end

Yanfly Engine Ace - Ace Menu Engine v1.07  ---- Modified by Hollow / Mike / RaZzi (Replace Window_Base with this):

(Added if conditional to hide the mana bar from characters that don't use mana. (if actor.mmp > 0)

class Window_Base < Window

  def draw_actor_simple_status(actor, dx, dy)

    dy -= line_height / 2

    draw_actor_full_name(actor, dx, dy)

    draw_actor_icons(actor, dx, dy + line_height * 3)

    dw = contents.width - dx - 124

   draw_actor_class(actor, dx + 290, dy, dw)

    draw_actor_hp(actor, dx, dy + line_height * 1, dw + 124)

    if YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && !actor.draw_mp?

      draw_actor_tp(actor, dx, dy + line_height * 2, dw + 124)

    elsif YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && actor.draw_mp?

      if $imported["YEA-BattleEngine"]

        draw_actor_tp(actor, dx, dy + line_height * 2, dw/2 + 1 + 124)

        draw_actor_mp(actor, dx + dw/2, dy + line_height * 2, dw/2 + 124) if actor.mmp > 0

      else

        draw_actor_mp(actor, dx, dy + line_height * 2, dw/2 + 1 + 124) if actor.mmp > 0

        draw_actor_tp(actor, dx + dw/2, dy + line_height * 2, dw/2 + 124)

      end

    else

      draw_actor_mp(actor, dx, dy + line_height * 2, dw + 124) if actor.mmp > 0

    end

  end

  def draw_actor_full_name(actor, dx, dy, dw = 292) 

    change_color(hp_color(actor))

    draw_text(dx, dy, dw, line_height, actor.name + " " + actor.nickname)

  end

  def draw_actor_class(actor, x, y, width = 112)

    change_color(system_color)

    draw_text(x, y, width, line_height, " " + Vocab::level_a)

    counter = text_size(" " + Vocab::level_a).width

    change_color(normal_color)

    draw_text(x + counter -3, y, 24, line_height, actor.level, 2)

    change_color(normal_color)

    counter = text_size(actor.class.name).width

    draw_text(x - counter, y, width, line_height, actor.class.name)

  end

end # Window_Base   

Here is screenshot (I added some variations of my classes to show the menu in its full effect. Some characters use Rage instead of MP and some characters use health instead of rage or mana. Rage works like TP. I also stepped on poison tile on purpose to get state icons to the screenshot as well):

Edit: Lols, one slight error still remains... "Rage" is shrinked. Couldn't get it fixed..
 
Last edited by a moderator:

Kes

Veteran
Veteran
Joined
Aug 3, 2012
Messages
22,299
Reaction score
11,712
First Language
English
Primarily Uses
RMVXA
Thanks for posting the clean version.  That's very helpful.
 

RaZzi

My Peculiar Brother
Veteran
Joined
Jul 19, 2013
Messages
423
Reaction score
206
First Language
Finnish
Primarily Uses
Tried few ways to correct the "TP" font shrink but came up with nothing. You can see the error in the font in that last screenshot. Pain-Da Alepaw uses TP (which is named RAGE in this game) and the font shrinks a bit. How to fix that so it doesn't shrink at all?
 

Mike

Veteran
Veteran
Joined
Aug 28, 2013
Messages
316
Reaction score
36
First Language
English
Primarily Uses
if YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && !actor.draw_mp? draw_actor_tp(actor, dx, dy + line_height * 2, dw + 124) elsif YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && actor.draw_mp? if $imported["YEA-BattleEngine"] draw_actor_tp(actor, dx, dy + line_height * 2, dw/2 + 1 + 124) draw_actor_mp(actor, dx + dw/2, dy + line_height * 2, dw/2 + 124) if actor.mmp > 0 else draw_actor_mp(actor, dx, dy + line_height * 2, dw/2 + 1 + 124) if actor.mmp > 0 draw_actor_tp(actor, dx + dw/2, dy + line_height * 2, dw/2 + 124) end else draw_actor_mp(actor, dx, dy + line_height * 2, dw + 124) if actor.mmp > 0 endI took this from the code

And apply this

Code:
    if YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && !actor.draw_mp?      draw_actor_tp(actor, dx, dy + line_height * 2, dw + 124 + QWE) #Change QWE to desired number    elsif YEA::MENU::DRAW_TP_GAUGE && actor.draw_tp? && actor.draw_mp?      if $imported["YEA-BattleEngine"]        draw_actor_tp(actor, dx, dy + line_height * 2, dw/2 + 1 + 124 + QWE) #Change QWE to desired number        draw_actor_mp(actor, dx + dw/2, dy + line_height * 2, dw/2 + 124 + QWE) if actor.mmp > 0 #Change QWE to desired number      else        draw_actor_mp(actor, dx, dy + line_height * 2, dw/2 + 1 + 124 + QWE) if actor.mmp > 0 #Change QWE to desired number        draw_actor_tp(actor, dx + dw/2, dy + line_height * 2, dw/2 + 124 + QWE) #Change QWE to desired number      end    else      draw_actor_mp(actor, dx, dy + line_height * 2, dw + 124 + QWE) if actor.mmp > 0 #Change QWE to desired number    end
 

RaZzi

My Peculiar Brother
Veteran
Joined
Jul 19, 2013
Messages
423
Reaction score
206
First Language
Finnish
Primarily Uses
It just makes the TP gauge to go beyond the border on the right so it doesn't work.
 

Mike

Veteran
Veteran
Joined
Aug 28, 2013
Messages
316
Reaction score
36
First Language
English
Primarily Uses
Haha, lazy fix doesn't work it seems.

K, try this one. It's less lazier.

def draw_actor_tp(actor, x, y, width = 124) draw_gauge(x, y, width, actor.tp_rate, tp_gauge_color1, tp_gauge_color2) change_color(system_color) draw_text(x, y, text_size(Vocab::tp_a).width, line_height, Vocab::tp_a) change_color(tp_color(actor)) draw_text(x + width - 42, y, 42, line_height, actor.tp.to_i, 2) endPut it inside

Yanfly Engine Ace - Ace Menu Engine v1.07  ---- Modified by Hollow / Mike / RaZzi (Replace Window_Base with this):
 

RaZzi

My Peculiar Brother
Veteran
Joined
Jul 19, 2013
Messages
423
Reaction score
206
First Language
Finnish
Primarily Uses
Yes, thats it! All fixed. Thank you Mike!

Moderators. This one is all fixed, you can close this. Thanks to all of you who participated and helped: MagicMagor, Hollow, Mike.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,854
Messages
1,016,998
Members
137,562
Latest member
tamedeathman
Top