RPGMMV Javascript: Adding Text?

Discussion in 'RPG Maker MV' started by Lady_Blackpearl, Jun 20, 2018.

  1. Lady_Blackpearl

    Lady_Blackpearl Villager Member

    Messages:
    27
    Likes Received:
    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!
     
    #1
  2. Poryg

    Poryg Dark Lord of the Castle of Javascreeps Veteran

    Messages:
    3,987
    Likes Received:
    10,078
    Location:
    Czech Republic
    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.
     
    #2
  3. Lady_Blackpearl

    Lady_Blackpearl Villager Member

    Messages:
    27
    Likes Received:
    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
     
    #3
  4. mobiusclimber

    mobiusclimber Veteran Veteran

    Messages:
    250
    Likes Received:
    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.
     
    #4
  5. Lady_Blackpearl

    Lady_Blackpearl Villager Member

    Messages:
    27
    Likes Received:
    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: Jun 20, 2018
    #5
    mobiusclimber likes this.
  6. mobiusclimber

    mobiusclimber Veteran Veteran

    Messages:
    250
    Likes Received:
    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:

     
    #6
  7. Lady_Blackpearl

    Lady_Blackpearl Villager Member

    Messages:
    27
    Likes Received:
    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. @.@
     
    #7
    mobiusclimber likes this.

Share This Page