Changing the MOG_ChronoEngine.js Default Font to SFont

p0_boy

anti-kumbaya
Veteran
Joined
Mar 26, 2019
Messages
64
Reaction score
29
First Language
English
Primarily Uses
RMMV
I am currently using MOGHUNTER’s Chrono Engine ABS plugin in my project, as well as Victor Engine’s SFont plugin.


But, as displayed in the screen capture below, the Chrono Engine seems to still be using RPG Maker MV’s default font.





In the last paragraph of Victor Engine’s SFont Help text, he mentions:


Code:
To add SFonts on non-window objects that uses the drawText, you have to add it manually (requires some scripting knowledge). You need to call bitmap.changeSFont(index). The index must be one of the values you setup on the plugin parameters and the bitmap must be a valid bitmap object.

The only thing I understand from this is, based on my VE_SFont.js parameters, the call would be:


Code:
bitmap.changeSFont(0)




But I am still not sure where in MOG_ChronoEngine.js I would place this.


A combing of Google yielded a discussion in these forums (from 2017), where a user named Sixth shed a little more insight on the matter:


Code:
It is actually very easy to change the draw methods in every script.

If something is using the default draw method for texts, that will use either the draw_text or draw_text_ex method.

The only thing you need to do is to search for these methods in your custom scripts and replace them with the drawing method from Victor's script.

You have to set the correct argument values at the correct argument positions, but aside from that, it is not much of a hassle to do.

They were discussing Victor Engine’s SFont plugin for RPG Maker VX ACE, but I thought I might look into it anyway. So I went into the MOG_ChronoEngine.js file and searched for all instances of “drawText” (without the “_”, since this is JavaScript).


I came up with the following results:


Lines 7254-7260:

Code:
//==============================

// * refresh Name

//==============================

ToolCursor.prototype.refreshName = function(target) {

this._name.bitmap.clear();

this._name.bitmap.drawText(target.battler().name(),0,0,200,48,"center")

};

Lines 8926-8941:

Code:
//==============================

// * draw Item Number

//==============================

Window_ToolSkill.prototype.drawItemNumber = function(item, x, y, width) {

    if (item.tool.itemCost) {

var itemCost = $dataItems[item.tool.itemCost];

if (itemCost) {

   this.drawText(':', x, y, width - this.textWidth('00'), 'right');

            this.drawText($gameParty.numItems(itemCost), x, y, width, 'right');

};

} else if (item.tool.mpCost > 0) {

            this.drawText(TextManager.mpA + ' '  + item.tool.mpCost, x, y, width, 'right');

} else if (item.tool.tpCost > 0) {

            this.drawText(TextManager.tpA + ' '  + item.tool.tpCost, x, y, width, 'right');

    };

};

Lines 9183-9198:

Code:
//==============================

// * draw Item Number

//==============================

Window_ToolList.prototype.drawItemNumber = function(item, x, y, width) {

    if (item.tool.itemCost) {

var itemCost = $dataItems[item.tool.itemCost];

if (itemCost) {

   this.drawText(':', x, y, width - this.textWidth('00'), 'right');

            this.drawText($gameParty.numItems(itemCost), x, y, width, 'right');

};

} else if (item.tool.mpCost > 0) {

            this.drawText(TextManager.mpA + ' '  + item.tool.mpCost, x, y, width, 'right');

} else if (item.tool.tpCost > 0) {

            this.drawText(TextManager.tpA + ' '  + item.tool.tpCost, x, y, width, 'right');

    };

};

Lines 11093-11108:

Code:
//==============================

// * refresh Result CR

//==============================

Spriteset_Map.prototype.refreshResultCR = function() {

$gameTemp._chrono.victory[1] = false;

this._resultCR.opacity = 0;

this._resultCRExp.opacity = 0;

this._resultCRGold.opacity = 0;

this._resultCR.x = this._resultCR.org[0] - 50;

this._resultCRExp.bitmap.clear();

this._resultCRGold.bitmap.clear()

var text = $gameTemp._chrono.exp;

this._resultCRExp.bitmap.drawText(text,0,0,190,32,"center");

var text = $gameTemp._chrono.gold;

this._resultCRGold.bitmap.drawText(text,0,0,190,32,"center");

};


I looked in VE_SFont.js to see if I could deduce the “drawing method” that Sixth mentioned, but was not able to do so.


Based on this information, does anybody know how I can go about changing the default font that MOG_ChronoEngine.js uses?


Thanks in advance!
 

WhiteW

The Murderous Clown
Veteran
Joined
Oct 16, 2016
Messages
170
Reaction score
127
First Language
EN/PT
Primarily Uses
RMMV
You're overthinking this, xD

The numbers and the word "Miss" are inside an image file in your IMG/System folder named Damage.png
 

p0_boy

anti-kumbaya
Veteran
Joined
Mar 26, 2019
Messages
64
Reaction score
29
First Language
English
Primarily Uses
RMMV
You're overthinking this, xD

The numbers and the word "Miss" are inside an image file in your IMG/System folder named Damage.png
Woo!

Thank you, WhiteW!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,975
Members
137,563
Latest member
cexojow
Top