RPGMMV Javascript: Adding Text?

Lady_Blackpearl

Villager
Member
Joined
May 25, 2018
Messages
27
Reaction score
13
First Language
Italian
Primarily Uses
RMMV
Hi I'm new,
until now I have searched for tutorials on youtube or google but seem can't find anything I need. I'm also new in javascript or programming, tho with guides and some of my ideas I'm making my own custom menu. Looking for tutorials how to create text inside the custom menu and place it everywhere I want. For example I made a info bar image and on top I want text " This is a potion" or "You can change equipment here" or showing items/equip info. Buts eem can't find anything for a beginner like me. Thank you!
 

Poryg

Dark Lord of the Castle of Javascreeps
Veteran
Joined
Mar 23, 2017
Messages
4,038
Reaction score
10,254
First Language
Czech
Primarily Uses
RMMV
You won't find plugin making tutorials. The programming part of RM community is so small that it's not worth it to try.

Nevertheless, you'll be looking for this function call:

Code:
Window_CustomMenu.prototype.drawItem = function () {
this.drawText(text, x, y, width, align)
}.
The last two parameters are optional.

The best way to learn is to read the rpg_windows script and see how the text drawing is handled in different menus.

I won't be explaining this in detail though.
 

Lady_Blackpearl

Villager
Member
Joined
May 25, 2018
Messages
27
Reaction score
13
First Language
Italian
Primarily Uses
RMMV
Oh I was looking that part before so I have try different way to draw the text, but none worked. Tho while most of the try reported a error undefined or such, only one didnt bring any errors. But also didnt show any text. It was with the _commandWindow. Problem is if it showed any text it was out the visible area and this._commandWindow.visible = false; ...but I have try for the other scene and no luck mmh. I could also make 8 png images with the text and load it no problem, tho this wasn't the solution for learn soemthing. XD
 

mobiusclimber

Veteran
Veteran
Joined
May 3, 2018
Messages
254
Reaction score
148
First Language
english
Primarily Uses
RMMV
There's a lot of "how to script" tutorials on Youtube. Not sure if any of them will have the solution you're looking for but it's worth a shot:
Also, I know next to nothing about scripting, but I believe for menus and the like, there's more than one place that you have to add stuff to in order for it to show up in the menu. I'd suggest looking around at where all the menu items are at in the script and going from there.
 

Lady_Blackpearl

Villager
Member
Joined
May 25, 2018
Messages
27
Reaction score
13
First Language
Italian
Primarily Uses
RMMV
Oh yes I'm looking a lot of tutorials in youtube but haven't found any example of it for now. Of course I will check for more. Worst case can live without, it was most for learn in case I need it for real. :p thanks!

EDIT: oh right Im following that video tutorial you linked me anyway. Thats how I'm making my custom menu following the guide and adding my few knowledge.

EDIT2: this._commandWindow.drawText("Hello World", 0, 0); apparently this line is working and it was invisible due to this._commandWindow.visible = true; now remain the problem tho.I really want keep the command invisible but also keep the drawText visible ahaha
 
Last edited:

mobiusclimber

Veteran
Veteran
Joined
May 3, 2018
Messages
254
Reaction score
148
First Language
english
Primarily Uses
RMMV
Some Random Dude also has a good series on changing the menu. Here's the first part of it:

 

Lady_Blackpearl

Villager
Member
Joined
May 25, 2018
Messages
27
Reaction score
13
First Language
Italian
Primarily Uses
RMMV
Ah yes that one is also what i was following. Now Im trying to remake the commands images because didn't like the one I amde and then I need to go back modify the size of the menu status window because is not fitting inside the background coulmn I made. As for the text eh it work for the _commandWindow and _goldWindow as I try, but with _infoBarSprite that I made for add the image I get undefined error. @.@
 

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

Latest Threads

Latest Posts

Latest Profile Posts

So I cloned an event in MV today.
Just got two custom tracks for my game. Things are shaping up nicely. :)
Remember, life is sh*t. But it will difinitely be less sh*t in the future! Stay happy everyone ^^ ...*continues to die inside*
Why is it that every time I take a short break from here, we get a new moderator?
Stream will be going live early today as I will be working on some music before I transition to art! When I switch to art, I will be focusing on making a new stream avatar~ Feel free to drop by!

Forum statistics

Threads
93,499
Messages
913,044
Members
123,036
Latest member
boredguy851
Top