Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[VX] Item Name Issue *RESOLVED*

Recently I've been getting a weird problem with my items in that their names, when displayed in the menu or elsely, have a strange space inserted randomly in the word. I'm not sure what's causing this, as they're normal in the database.

Here's a screenshot to demonstrate what's going on:

font-help.jpg

Take a look at "Medicine", "Fresh Water", and "Smelling Salts." They all come out kinda funky for no good reason.

Anyone have any ideas? Here's a list of the scripts that I'm using, but it hasn't started occuring until recently, and I've had these scripts in for some time now.

Skill Criticals by SoS
GTBS by GubiD
NMS by woratana
Party Changer
Large Party
Custom Commands
Advanced Files
Advanced Help all by Dargor

I'm currently using Calibri size 24 as my font, but again, I've been using that for a while.

Edit: On further inspection, it looks like an issue with my "M" shaped letters, as Sweet Tea is kinda irregular. All of the other items show up fine except for the ones with "M" or "W" variants. Now this makes even less sense.
 
I just tested it in Out of the Box VX, and I don't have the problem.
I'm guessing it's gotta be one of the scripts you're using. (NMS?)

Test a new project, then add your new font & test again.
then add your custom scripts in 1 at a time to narrow it down.

If you narrow it down to a specific script, we can help debug it.

Be Well
 
Alright, it looks like the problem's coming from Dargor's Custom Commands script. At first I thought it was because of some minor tinkering I did to have an extra menu option have an icon, but I pasted in a fresh copy of the script and got the same results. M's and w's, for whatever reason, are altered or have an additional space added.

viewtopic.php?f=11&t=43211

That's a link to the script.
 
I think I see it....

There are 2 "draw_text" commands.

self.contents.draw_text(x + cx + 24, y + 2, cw, ch, c)
&

self.contents.draw_text(rect.x + cx, rect.y, cw, ch, c)


draw_text(x, y, width, height, text)

These are drawing one character, and 'cw' is getting set to the width of that specific character in the current font.
the "draw_text" method inherently will 'scrunch' text if it doesn't fit in the defined rectangle.

do a search on "draw_text", and replace 'cw' with 'cw + 10' (any arbitrary number to make it bigger).
This will give a larger rectangle to draw the character at it's full size.

I'll let Dargor know as well.

Be Well
 
I actually sent Dargor a PM about this once I discovered it was Custom Commands, and he did a little hotfix to the script. I haven't gotten a chance to test it yet, but I think this is as good as resolved. If his fix didn't work, I'll go ahead and try your suggestion, Brew.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top