Getting started with javascript - Question.

Discussion in 'Learning Javascript' started by AYAMAN, Dec 28, 2017.

  1. AYAMAN

    AYAMAN Cardfighter Member

    Messages:
    5
    Likes Received:
    11
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    Hello, I apologise if this topic isn't supposed to be here although I've read the rules and im sure there is no problem with posting it in this section.

    I know many plug ins use functions from rpg maker mv, my question is, how does people known what functions to edit or what kind of documentation do they use as a guide ?

    Sorry if this sounds dumb but I will be using plug ins created by the community and I want at least understand how they work to get around any problems I may encounter.

    (I also have read this thread https://forums.rpgmakerweb.com/inde...it-source-files-for-plugin-development.47361/ but it says its no longer updated and im not sure if it is what im looking for)

    Thanks.
     
    #1
  2. Poryg

    Poryg Pixie of the Emvee kingdom, Ham of a Hamster Veteran

    Messages:
    3,770
    Likes Received:
    9,427
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    I don't use any documentation.
    In fact I don't need to.
    Let's say I want to edit Yanfly's message core to have more escape codes.
    So I search for either escape or "\" and then based on the names of the functions and reading of its contents I determine which is correct.
    Or when I want to search the core scripts (rpg_*.js) to make it that I don't get a game over after my actors die.
    So I go to rpg_scenes.js, because that is where scenes are handled, and search for "gameover". Again, I read through the results until I find the ones I'm searching for. And what are the ones I'm searching for?
    Commands that call for something like processGameOver or makeGameOver. I may not know the exact name, but I don't need to, because I can read the code and by reading it, see what it does and determine if it is the one I'm searching for or not.
     
    #2
  3. AYAMAN

    AYAMAN Cardfighter Member

    Messages:
    5
    Likes Received:
    11
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    Ah, well that makes sense.
     
    #3
  4. ChampX

    ChampX Veteran Veteran

    Messages:
    185
    Likes Received:
    115
    First Language:
    English
    I wish the JS side of the engine had decent documentation as most non proprietary APIs do.

    As Poryg said, it is generally just searching the JS files. If you aren't sure where something is, on Windows you can go to the project directory and open the js folder then in the windows explorer file path at the top, type cmd then hit enter. A cmd window will pop up and you can type (without the dashes) --findstr /S /I /N "gameover" *.js-- where what is in " " can be what you are searching. This example would search all js files in that directory and subdirectories for gameover listing the line number in the file if found and species that the search is not case sensitive.

    You should also make sure any changes you make to the engine are in new plugins you made and not overwrite the rpg_*.js files or plugins you download off the internet. This makes it so updates don't conflict and break your changes as well as keeps things tidy.

    You can also use console.trace(); in any JavaScript method and have the call stack printed to the console if you aren't sure how a certain method is being called.
     
    #4
  5. Poryg

    Poryg Pixie of the Emvee kingdom, Ham of a Hamster Veteran

    Messages:
    3,770
    Likes Received:
    9,427
    Location:
    Czech Republic
    First Language:
    Czech
    Primarily Uses:
    RMMV
    I don't think it needs documentation to be honest, since it's actually pretty easy to understand once you get the knack of it.
    rpg_core handles the core things about the program itself
    rpg_managers handles managers, like SceneManager and FileManager
    rpg_scenes handles the scenes like Scene_Map, Scene_Title, etc.
    rpg_objects handles how particular objects, like events etc. are made.
    rpg_sprites handles the graphics of the game and how individual objects look
    rpg_windows handle... Well... Individual windows.
     
    #5
  6. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,574
    Likes Received:
    1,339
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    your can dream about dev make a doc like this !
    https://docs.unity3d.com/Manual/index.html
    or like this
    http://pixijs.download/dev/docs/PIXI.Container.html
    but for now, you have to learn by studying and adding some console.log everywhere to understand.

    you have the @Kino doc project
    https://kinoar.github.io/rmmv-doc-web/

    and also a small ugly doc here
    https://rmmv.neocities.org/
    look at JS Library, but its good for start understand what do what?
    Also more info here on github
    https://github.com/rpgtkoolmv/corescript/tree/master/js/rpg_core
     
    #6
    Kino likes this.
  7. Kino

    Kino EIS Game Dev Veteran

    Messages:
    515
    Likes Received:
    671
    Location:
    United States
    First Language:
    English
    Primarily Uses:
    RMMV
    #7
  8. AYAMAN

    AYAMAN Cardfighter Member

    Messages:
    5
    Likes Received:
    11
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    Thanks for the replies everyone !! I just have one more question. I just saw the 1.5.0 update with the new plug in manager and I want to know, what does parameters do and how beneficial are they ?
     
    #8
  9. Jonforum

    Jonforum Veteran Veteran

    Messages:
    1,574
    Likes Received:
    1,339
    Location:
    Canada / Québec
    First Language:
    French
    Primarily Uses:
    RMMV
    #9

Share This Page