MV Size up enemy name tag

Hello I'm using MV and the plugin Message Core to make the enemy text bigger than the other text similar to this image.
large name.PNG


The code I'm using is:

<Before Eval>
if (target.isEnemy()) {
var id = target._enemyId;

var text = target.name() + '\n';
text += '\\px[300]HP:\\c[0]' + target.hp;
$gameMessage.add(text);
$gameMessage.add($dataEnemies[b._enemyId].meta.EnemyDescription);
}
</Before Eval>

This code works for the most part but I'm unable to adjust the "target.name()" which is keeping it from allowing it to change size with '\\{'
my size.PNG
Please help and thank you!
This code works for the most part but I'm unable to adjust the "target.name()" which is keeping it from allowing it to change size with '\\{'
What does "unable to adjust" it mean? Why wouldn't it work if you just put it in the order you like?

Code:
var text = "\\{" + target.name() + '\n' + '\\px[300]HP:\\c[0]' + target.hp;

What's the point of declaring that id variable? You never use it, and the one place you might use it you just typed out b._enemyId instead 😛

As a style note - it won't break anything, but doing target.enemyId() is preferable to target._enemyId. It's correct usage to use getter functions when they're provided.
What does "unable to adjust" it mean? Why wouldn't it work if you just put it in the order you like?

Code:
var text = "\\{" + target.name() + '\n' + '\\px[300]HP:\\c[0]' + target.hp;

What's the point of declaring that id variable? You never use it, and the one place you might use it you just typed out b._enemyId instead 😛

As a style note - it won't break anything, but doing target.enemyId() is preferable to target._enemyId. It's correct usage to use getter functions when they're provided.
So basically what I'm trying to achieve is similar to the top screenshot I posted. The code I am using only displays the bottom screenshot that I took.

The command '\\{' is from Message Core and when put into text like '\\{wowie zowie' would make the font size bigger.

The issue is since target.enemyId() isn't inside of ' ' using the command '\\{' doesn't make the enemies name font size change but only makes the description and health change.

This is the issue I want to resolve to better match the top screenshot I provided.
The issue is since target.enemyId() isn't inside of ' ' using the command '\\{' doesn't make the enemies name font size change but only makes the description and health change.
Did you try the code I gave you? Can you provide a screenshot of it?

The JavaScript string concatenation with + does, in fact, combine it all into one string (make it inside of ' ' ) before it gets passed into the escape code processing.

That is, typing
Code:
"\\{" + target.name() + '\n'
should function identically to typing
Code:
"\\{Bat" + '\n'
Did you try the code I gave you? Can you provide a screenshot of it?

The JavaScript string concatenation with + should, in fact, combine it all into one string (make it inside of ' ' ) before it gets passed into the escape code processing.
Yeahh, I'm trying it out right now and what I'm getting is all the text turning big now as well as the name.
ALL BIG.PNG
Yeahh, I'm trying it out right now and what I'm getting is all the text turning big now as well as the name.
...because that's what you have typed? If you want the name larger and the rest of the text back down, you'd need to add that escape code after the name.

Just like you would if you were typing it into a Show Text window.
...because that's what you have typed? If you want the name larger and the rest of the text back down, you'd need to add that escape code after the name.

Just like you would if you were typing it into a Show Text window.
Ah okay, Ima do that.


EDIT: Alright cool looks like it's working, thank you for all the help!

Original thread: https://forums.rpgmakerweb.com/threads/size-up-enemy-name-tag.170598/