MV Modify the " \{ " and " \} " Text-codes

Hello, I am trying to use the \{ and \} text-codes to adjust the text sizes for various words.

However, the effect of these text-codes is way too strong (from looking at the code, it seems that the size is altered in increments of 12, but I'd rather have something like 2 or 4).

Looking through the code, I found this in Line 364 of rpg_windows:

JavaScript:
Window_Base.prototype.processEscapeCharacter = function(code, textState) {
    switch (code) {
    case 'C':
        this.changeTextColor(this.textColor(this.obtainEscapeParam(textState)));
        break;
    case 'I':
        this.processDrawIcon(this.obtainEscapeParam(textState), textState);
        break;
    case '{':
        this.makeFontBigger();
        break;
    case '}':
        this.makeFontSmaller();
        break;
    }
};

Now in the case of "{" and "}" it calls the functions "makeFontBigger();" and "makeFontSmaller();" respectively.
Finding these functions was not hard, they are found a few lines further:

JavaScript:
Window_Base.prototype.makeFontBigger = function() {
    if (this.contents.fontSize <= 96) {
        this.contents.fontSize += 12;
    }
};

Window_Base.prototype.makeFontSmaller = function() {
    if (this.contents.fontSize >= 24) {
        this.contents.fontSize -= 12;
    }
};

This looked very promising, so I saved these functions in a little plugin and changed the numbers, but it did not change anything. Note: I am 98% sure the plugin works properly because I have other modified functions in there that work properly.

It needs to be said that I am a novice at JS and as such I could have easily missed something.
So can someone tell me how to change these text-codes?

Any help is greatly appreciated.
Your approach seems OK to me, though I'd need to see your code to be sure.
  1. Did you test in a new project with no other plugins active? If not, it might be a plugin conflict.

  2. If you press F8 during playtest to show the console, do you see any red text (error messages) there? Errors that occur when the plugin file attempts to load (e.g. syntax errors) will make the game ignore the entire plugin.
It looks like if you reduce the font size below 24, even by 1, then you can no longer reduce it. Same for increasing past 96. Try changing at least the lower limit to something like 12 and the upper to whatever you need. Then make the increments + or - 2.
I tested out both of your suggestions, @caethyril and...
well... this is kind of awkward.

Now, I found the problem and honestly I should have noticed this, but nevertheless you pointed me in the right direction.

As it turns out, YEP_MessageCore already gives access to this function so in my case there was never any need to go into the code myself.

Additionally, my "plugin" did actually work, but because I put it above YEP_MessageCore in the plugin manager, it was overwritten.

I was not aware that YEP_MessageCore already included this feature as the plugin parameter is only called "Font Size Change" and it didn't seem like something I want to mess with.
Also, in the context of the plugin, it did not convey "this changes the \{ and \} text-codes"

So this is one is kind of a hiccup on my part, but thank you very much @caethyril !
I found the problem thanks to you pointing me in the right direction.

Original thread: https://forums.rpgmakerweb.com/threads/modify-the-and-text-codes.134681/