Longer Scripts?

I'm attempting to create a Javascript function to do something and it's above the length that the script tool cuts off at (it is about 30 lines)

When I attempt to paste the finished script into the "script" tool it cuts off well over half off it.

I can't really break it up either is there some way to increase the text limit of the script tool?
you can turn that script into a plugin and provide a call to it for the game interpreter that handles the event commands (including the script box).


Then you only need to call that function from your script box - one line.
Or try to make it shorter.


Example:


a = $game_variables
a[1] = a[2] - a[3]

or

a = $game_variables ; a[1] = a[2] - a[3]


Atleast in ruby that is possible.
Perhaps try to minify the script. Keep a nice, readable copy of the script in a text file somewhere, but use a minified version in the script field.
Perhaps try to minify the script. Keep a nice, readable copy of the script in a text file somewhere, but use a minified version in the script field.


This worked thanks!

you can turn that script into a plugin and provide a call to it for the game interpreter that handles the event commands (including the script box).


Then you only need to call that function from your script box - one line.


This might be a much more elegant solution as I intend to re-use this a lot could you give me quick rundown of what to do? I'm guess the easiest part would be to save the script as a


.js file with a named function for the script. The question then is how do I provide a call to it for the game interpreter so I can call it from the script tool?

Original thread: https://forums.rpgmakerweb.com/threads/longer-scripts.69059/