Defining movement routes in a script

So i did some console.logging and found out that the jump command is defined as follows. (all commands are quite similiar, but im using it as an example)
Code:
code : 14
indent: null
parameters: Array(2)
    0: 48
    1: 48
    length:2
    __proto__:Array(0)
__proto__:Object

Moveroutes are defined in _moveroute.list and are an Object (list itself is an array). How would I go about defining them in a script?
Here are the instructions for Ace.

https://forums.rpgmakerweb.com/index.php?threads/creating-a-move-route-with-a-script-command.59367/

That might give you a starting point - the steps will be pretty much the same, but you'll need to convert each of those commands and structures to the MV equivalent. For the move route itself, create a new map with one event, and create the move route command. Save that, then go take a look at the .json file and see what the move route commands look like from that point of view. That's the same thing you're going to have to set up in script. Then you'll have to look at the code (probably rpg_objects.js and search for the Move Route command in Game_Interpreter) to see how you apply a move route to an event once it's been created.
Here are the instructions for Ace.

https://forums.rpgmakerweb.com/index.php?threads/creating-a-move-route-with-a-script-command.59367/

That might give you a starting point - the steps will be pretty much the same, but you'll need to convert each of those commands and structures to the MV equivalent. For the move route itself, create a new map with one event, and create the move route command. Save that, then go take a look at the .json file and see what the move route commands look like from that point of view. That's the same thing you're going to have to set up in script. Then you'll have to look at the code (probably rpg_objects.js and search for the Move Route command in Game_Interpreter) to see how you apply a move route to an event once it's been created.

Oh right, you came up with something simular for RPG Maker VX Ace. Which would be a good reference point.

The structure hasn't changed, but the commands have. As the language has. So It shouldn't be too hard. I'll let you know how it goes. Thanks again.

Original thread: https://forums.rpgmakerweb.com/threads/defining-movement-routes-in-a-script.105254/