Status
Not open for further replies.

MathyK450

Meem Dog
Member
Joined
Dec 31, 2019
Messages
8
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
As the title says, I need a bit of help with this script, link below.

Script

You see, the window that pops up during Target Selection(Window_ComparisonHelp or "Press SHIFT to see target info") is just too small. I tried messing around with the script, and I managed to make the drawn rectangle bigger and move the text around, but I couldn't figure out how to make said text a readable size.
After that I tried to search in the forums, and while a lot of people have had questions about different aspects of the script, I've yet to find something about my specific problem. To closest thing I found was this post but it remains unanswered. There's also a lot of comments on the script's wordpress page but again, no answer.

I can already feel that there's an obvious solution I'm missing, like maybe the script has a font size value that I just couldn't find, but I'm at limit with this one problem.

Please help.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,348
Reaction score
8,079
First Language
German
Primarily Uses
RMMV
the screenshots of the results on the wordpress page are looking very readable.
can you show what it looks like for you in a screenshot?
 

MathyK450

Meem Dog
Member
Joined
Dec 31, 2019
Messages
8
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
Oh, sure sure. Should've thought about inserting an image first, sorry.

b2.png
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,983
Reaction score
665
First Language
English
Primarily Uses
RMVXA
Try this
Ruby:
class Window_ComparisonHelp < Window_Base

  #--------------------------------------------------------------------------
  # update_text
  #--------------------------------------------------------------------------
  def update_text
    return unless self.visible
    contents.font.size = YEA::ENEMY_INFO::PARAM_FONT_SIZE
    if @info_window.visible
      text = YEA::ENEMY_INFO::HELP_INFO_SWITCH
    else
      text = YEA::ENEMY_INFO::HELP_INFO_SHOW
    end
    return if @text == text
    @text = text
    refresh
  end
end

Or you can edit the script and add in the one line.
contents.font.size = YEA::ENEMY_INFO::PARAM_FONT_SIZE
around line 988
 

MathyK450

Meem Dog
Member
Joined
Dec 31, 2019
Messages
8
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
Tried both copypasting your code and just inserting the Parameter Font Size between line 986 and 996, but neither worked, sadly. Thank you regardless.
I found this, which could be a solution to my problem, but I've got no idea how to make said window. And I don't think this would be the correct board to request a script.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,983
Reaction score
665
First Language
English
Primarily Uses
RMVXA
neither worked
Silly me. The font is reset in the refresh method.
Ruby:
  def refresh
    contents.clear
    reset_font_settings
    draw_background
    contents.font.size = 24
    draw_text_ex(4, 0, @text)
  end
 

MathyK450

Meem Dog
Member
Joined
Dec 31, 2019
Messages
8
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
Silly me. The font is reset in the refresh method.
Ruby:
  def refresh
    contents.clear
    reset_font_settings
    draw_background
    contents.font.size = 24
    draw_text_ex(4, 0, @text)
  end
Tried putting everywhere between line 1002 and 1007 but to no use. In desperation I even tried putting it after every line of code in the refresh method, which also didn't work.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,348
Reaction score
8,079
First Language
German
Primarily Uses
RMMV
In desperation I even tried putting it after every line of code in the refresh method, which also didn't work.
inside or outside the definition of the refresh method?
that code looks as if it is intended to replace the refresh method completely, and in that case the definition line needs to start after the original def structure ends.
 

MathyK450

Meem Dog
Member
Joined
Dec 31, 2019
Messages
8
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
Sorry for the late response, I just woke up. As soon as I saw your response I tried what you said, sadly it didn't work.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,983
Reaction score
665
First Language
English
Primarily Uses
RMVXA
You have something done wrong or there is something overwriting the font size before the text is written to the screen.
Try placing the script (yanfly enemy target info) just above main in the script list.
 

MathyK450

Meem Dog
Member
Joined
Dec 31, 2019
Messages
8
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
Alright, so after faffing about with the script, moving the content.font.size to every possible place, I did a couple of things. Firstly I did what you asked, with caused this:

proof 1.png

This was fixed by putting the script above the Yanfly Compatibility Script that comes with the Luna Engine, but the text was still too small to be readable. The readable blue rectangle is the monkey temporary solution I've worked: literally just a picture of a rectangle placed with Luna Engine.
After moving a couple things in the script, I tried a new project with YEA Core, YEA Battle and Yanfly's target enemy info. Of course this worked perfectly, after which I inserted the code from Roninator in order to see if something would change. Nothing did, and it still looked like the screenshots in the wordpress page, so I put in something stupid like content.font.size = 10. The results were:

proof 2.png

Nothing changed. So I thought maybe it was the Luna Engine's fault. Highly unlikely since it was made to be compatible with Yanfly's stuff, but I tried anyways since I'm getting desperate. With only Luna Engine and Enemy target info, I got the following:

proof 3.png

So yeah, I confirmed that indeed Luna Engine is compatible with everything Yanfly and works just fine. So it HAS to be one of the other scripts (not from Yanfly) thats not playing nice with target enemy info. The only other scripts I have in my project are: Venka's Crafting Script, Archeia's Press Turn Battle System, Hime's Conditional States, Hime's State Faces, Hime's Map Regions and Hime's Menu Music.
I'm again asking for your scripting support.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,983
Reaction score
665
First Language
English
Primarily Uses
RMVXA
So yeah, I confirmed that indeed Luna Engine is compatible with everything Yanfly and works just fine. So it HAS to be one of the other scripts (not from Yanfly) thats not playing nice with target enemy info. The only other scripts I have in my project are: Venka's Crafting Script, Archeia's Press Turn Battle System, Hime's Conditional States, Hime's State Faces, Hime's Map Regions and Hime's Menu Music.
I'm again asking for your scripting support.
I put all of those into a demo and they work fine.
Why not take the test project you just made and put those scripts in and see if it works.
 

MathyK450

Meem Dog
Member
Joined
Dec 31, 2019
Messages
8
Reaction score
0
First Language
Spanish
Primarily Uses
RMVXA
I'm deeply embarrassed that, while doing what I was reccommended, I discovered that all I had to do was just modify the Main. It literally has a Default Font Size and I didn't think of changing it.
Sorry for wasting everyone's time, but to be fair, all this did help me fix this problem I have been dealing for a while.
Thank you!
 

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
41,871
Reaction score
14,522
First Language
English
Primarily Uses
RMMV

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

I really lack discipline and find myself far too often giving into or at least seriously considering the temptation to start a new project rather than following through on a WIP that's no longer a shiny and new idea.

Does anyone have any strategies or tricks for making themselves follow through with things instead of doing this? Like that actually work?
I'm starting the "Switches lesson" on Learn MV today, what would you like to learn about them?
I managed to review my previous lessons on Learn MV and fixed a lot of things. Yay! :kaopride:

Forum statistics

Threads
110,415
Messages
1,053,150
Members
143,483
Latest member
DemiseOfEros
Top