You can quickly try in the browser by pressing F12 and writing in the console
to find out.
JavaScript:
var a = 0.9
a *= 0.9
a *= 0.9
var a = 0.9
a *= 0.9
a *= 0.9
if (!eval(paramTpHideValues)) {
this.contents.fontSize = eval(paramCurrentValueFontSize);
this.changeTextColor(this.tpColor(actor));
this.drawText(actor.tp+"%", eval(paramTpValuesX), eval(paramTpValuesY), eval(paramTpValuesWidth), paramTpValuesAlignment);
this.contents.fontSize = Yanfly.Param.BSWParamFontSize;
}
Is there any reason you can't use this.contents.fontFace?
The face you're using might size itself differently than the one that was being used before, so you may have to make the size bigger with the new one.
They're from the same font family so I'd be surprised, but more relevantly, even if I change the font size (this.content.fontSize) right after changing the font, nothing changes.
I'm using Noto Sans Mono Regular as my basic font for values, and I'm trying to change to Noto Sans Mono Black. But the same thing happens even if I try to change to a font such as Arial.
Thank you so much, yeah this worked perfectly!
Holy god, you have a thousand states? Anyhow...
if (this.states().some(element => element.id>499 && element.id<1001))Unfortunately this doesn't seem to work. Although I have very little coding knowledge so maybe I just don't know how to copy your line in properly.
I missed the part where you wanted to get the actor of the matching ID.
if (this.isActor())
{
var index=-1;
if ((index=this.states().find(element => element.id>499 && element.id<1001))>-1)
battler=$dataActors[index];
else
Unfortunately this didn't work either, but I think I made some progress.
The code from ATT_Turan did not work, because the find function does not return the index of the object in the array, but the object itself. It does return undefined, if the object cannot be found. The following amended version should work a little better:
if( this.isActor() )
{
const firstAffectedStateInRange = this.states().find(element => element.id > 499 && element.id < 1001);
if( firstAffectedStateInRange !== undefined )
{
battler = $dataActors[firstAffectedStateInRange.id];
}
else
{
}
}
Took me a minute to rearrange the brackets, all the while the game kept crashing at battle, but in the end it began to work, all tests passed. And there I though this would be a really simple fix.
Original thread: https://forums.rpgmakerweb.com/threads/javascript-questions-that-dont-deserve-their-own-thread.46341/