Own distinct variables

I want to declare my own variables. In ace, we can do this via Modules. How can I make this in js so when I call certain variables, I can just say for example:

var overdrive_meter_start = Milena.overdrive_value;

and so on? I want this to be the variables that would receive the values from the params.

In general, how can you make something like this? is there a way to implement imported = {} as well?
Yes, we're able to do that like this:

Imported = Imported || {};Milena = Milena || {};Milena.whatever = "something";Personally, I prefer to keep all my scripts in separate areas of my 'module', like so:

Zale = Zale || {};Zale.Plugin = {};Zale.Plugin.Variable = "Something";This way, I can use the same variable name for separate scripts, in the event that they overlap. It also lets me easily check the variables another plugin has set in a loop or something similar.
If I understand correctly, does that code also applies the same in this manner?

Code:
var Imported = Imported || {};Imported.BasicMenuPlus = true;var Milena = Milena || {};Milena.params = PluginManager.parameters('Basic Menu Plus');
Yes, the only difference is than You are using BasicMenuPlas without using Milena first.

You may use:

Milena.BasicMenuPlus = {};Milena.BasicMenuPlus.params = PluginManager.parameters('Basic Menu Plus');Because that way you don't have to worry about the params value if you make another script later.
One small thing, dont use snake case, all of Javascript is camelCase. Its the convention.
One small thing, dont use snake case, all of Javascript is camelCase. Its the convention.
Conventions aren't requirements. If you like it one way, we can recommend the other, but we can't force you into it. We can only be bigots about it.
One small thing, dont use snake case, all of Javascript is camelCase. Its the convention.
except for class names, module names, and constants... ya' know.

A module cound be considered a singleton class, and classes uses the first letter in uppercase, right?... So first letter upper case for singleton classes 😛

Original thread: https://forums.rpgmakerweb.com/threads/own-distinct-variables.49961/