How to read visuStella code--or where is it

Hello;

I opened up the plugin for visuStella and there are just giant comments, a few lines of code and and a const at the end. Did this get minimized or encrypted or something? Usually when you look at a js file plugin it starts with comments and then there are miles and miles of js code. I was thinking mayb my editor notepad++ was the problem but I see a few lines of code so that can't be it. I don't know where else to look.

yours
winkr7
The VisuStella plugins are encrypted, so the source code isn't human-readable.
Encrypted or obfuscated?
Encrypted or obfuscated?

Actual encryption.
It is obfuscated. And I can read it, buuuut its hard... Been in program security field for many years now.
Yeah just like what I thought.
Seems like code passed by an obfuscation technique.
Not bad. Checked it myself too.
Actual encryption.
I didn't know you could do that 👋
I am curious now, how you can do that (for science!)
It's obfuscated, meaning you can read it with a lot of trouble, but you can.

Take VisuMZ_0_CoreEngine.js. You'll see a huge array starting with:
Code:
const _0x18fd = ['_isWindow', 'calcCoreEasing',.... 'makeTargetSprites'];

Now, take a look at this:
Code:
const _0x36b7 = function(_0x58b82f, _0x18fd5d) {
    _0x58b82f = _0x58b82f - 0x0;
    let _0x36b771 = _0x18fd[_0x58b82f];
    return _0x36b771;
};

That part typically reads the huge array and sends back the value, according to the parameter _0x58b82f

Then, a bit everywhere you'll see things like :
Code:
_0x36b7('0x91')

This code will be replaced by the function and transformed into somethings readable for RPG Maker. You can technically do it by hand or writing a bit of code.

Then you'll see arrays in arrays in arrays, a bit different from the usual structure, but you can read it. I just think it is not worth the effort. VisuStella will be nice for short projects, challenges and so on.

For my own complete games, I'll stick with Yanfly's on MV or disregard Stella completely for MZ.
I didn't know you could do that 👋
I am curious now, how you can do that (for science!)

I'm not sure how it was done, exactly.
The world of coding is so deep and mysterious 😤
Just made de-obfuscator for this (to prove it can be readable).

Example:
Code:
/* Deleted to honor Visu ToU */
Yeah, it's called 'minifying', makes it difficult to steal/alter the code though only by making it a pain for humans to read. The primary purpose is to truncate file size so users have a smaller footprint when loading web pages with decent amounts of Javascript.

I'm just not a fan of JS, compiled strongly typed languages please. -_-;
Just made de-obfuscator for this (to prove it can be readable).

Hey.
By editing the base code provided in the plugin and posting it publicly, you are both editing and redistributing VisuStella's code, breaking Terms of Use.
Hey.
By editing the base code provided in the plugin and posting it publicly, you are both editing and redistributing VisuStella's code, breaking Terms of Use.
Thank you for pointing out that. I have now removed the code section.

And I didn't save de-obfuscated code so I guess it depends how "edit" is defined. I was merely "peeking" de-obfuscated code 🙂

Edit: And Visu-team can relax I won't steal their code nor share my de-obfuscator to anyone and actually I just deleted de-obfuscator source codes (it was about 5 min task anyways).
Thank you for pointing out that. I have now removed the code section.

And I didn't save de-obfuscated code so I guess it depends how "edit" is defined. I was merely "peeking" de-obfuscated code 🙂

It's cool! Just wanted to let you know 👋
According to the documentation for battle core I can put these snips in for the code
Is BattleManager.startAction() in the minimized code? Don't I have to be able to see
the code in order to use this kind of plugin? At least that is what the help implies.

I kind of need to know what variables I can get ahold of right before BattleManager.stsrtAction().


*
* <JS Pre-Start Action>
* code
* code
* code
* </JS Pre-Start Action>
*

* - Runs JavaScript code at the start of an action aimed at the function:
* BattleManager.startAction()
* - 'Pre' runs before the function runs.
* - 'Post' runs after the function runs.
BattleManager.startAction() is a default function you can find in the base code. The plugin helps you add code in there within the notetags/parameters. Doing so, you don't have to create your own function which would mangle VisuStella's modifications.

You don't need to see VisuStella's code to do so.
According to the documentation for battle core I can put these snips in for the code
Is BattleManager.startAction() in the minimized code? Don't I have to be able to see
the code in order to use this kind of plugin? At least that is what the help implies.

I kind of need to know what variables I can get ahold of right before BattleManager.stsrtAction().


*
* <JS Pre-Start Action>
* code
* code
* code
* </JS Pre-Start Action>
*

* - Runs JavaScript code at the start of an action aimed at the function:
* BattleManager.startAction()
* - 'Pre' runs before the function runs.
* - 'Post' runs after the function runs.


It's in the plugin parameters 🙂
Thanks Schlangan but visuStella must be calling this (and other functions like it there are a bunch with this <JS notetag) from there code or they wouldn't be able to call my notetag right before the function call in the base code. Unless the code is inside the function after the parameters get passed in which case it has a different scope. I suppose I can try to figure that out by hit or miss but it would be nice to see just where the call is.
Thanks Schlangan but visuStella must be calling this (and other functions like it there are a bunch with this <JS notetag) from there code or they wouldn't be able to call my notetag right before the function call in the base code. Unless the code is inside the function after the parameters get passed in which case it has a different scope. I suppose I can try to figure that out by hit or miss but it would be nice to see just where the call is.

You enter whatever JavaScript code you want to run in the appropriate section, and the plugin handles inserting that code into the function in question. The call is obfuscated, but it's still there.

Original thread: https://forums.rpgmakerweb.com/threads/how-to-read-visustella-code-or-where-is-it.125598/