JavaScript, good. Plugin Manager, restrictive!

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
I feel that while JavaScript is the best option for a new language, I feel that the plugin manager made it much more restrictive. Here's why:

  • Changes are made inside the plugin manager. Everything that the plugin writer puts there are the ones that can be modified.
  • Because of the plugin manager changing the values you want modified, you can't openly add something you want.
  • Plugins such as Achievements, Story Books, In Game changed values for the plugins isn't that widely free to do.
Of course, I am basing this upon what I know.

In my examples, I mentioned Achievements and Story Book plugins as an example. Let's say you want to make a plugin that hoards achievements, yes? Then, the plugin user decides that she wants to add another achievement. She can't, because everything is inside the plugin manager now.

Back in Ace, since we do use the script editor we can freely add variables to our liking very much easier.

My question is,

how would the plugin writers defeat this problem? What are the viable ways to make the plugin user create an extensive and non restrictive plugin to add variables that is changable in our out of the game?

Aside from opening the plugin in an IDE or Text Editor, that is.
 

Resonance

Veteran
Veteran
Joined
Oct 25, 2015
Messages
43
Reaction score
6
First Language
English
What? Back in Ace, it's not like the end user didn't have to still go into a text editor and directly modify the code.

The difference now is that they have to click a QuickLaunch icon instead of pressing F11 to get to a text editor.

If you did want to somehow have the user not touch the code at all, though, you could just do gimmicky stuff with note tags or use particular items in the database to work as achievements.
 
Last edited by a moderator:

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
What? Back in Ace, it's not like the end user didn't have to still go into a text editor and directly modify the code.

The difference now is that they have to click a QuickLaunch icon instead of pressing F11 to get to a text editor.
It seems you misunderstood. What I am explaining is, in Ace, code modification is easier, since it is open in the text editor. For RMMV, it all goes in the Plugin Manager. Therefore anything that is indicated there is the only things you can edit if you're the user of that plugin. If you're going to make a plugin that deals with something like adding stories, adding quests, etc, it feels a little bit harder to do that because you're considering how you'll put that up easier for the user to use and edit.
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
I think the plugin manager is a superb addition.


As a scripter, adding functionality to your own game, it's entirely up to you whether you use it or not.


But as a developer who wants to use other people's scripts and not have to struggle to figure out what needs to be customized and where, and to do it all without worrying about breaking the script, it's a godsend.


And as a scripter, providing scripts for others to use in their games, it's great to not have to try and walk a non-scripter through making changes and wondering if issues reported are because there really are issues with the script, or because they haven't added them or customized them correctly.


For your examples ...


There is no reason someone writing an achievement system cannot write it in a way that it can be added to by the users.


There is no reason why someone using a plugin can't extend it by modifying the script, assuming they have either the knowledge or assistance to do so.


Plugins are not more restrictive than Ace scripts at all. They are safer to use, because the remove the risk of people breaking them by changing things they should not. But the flexibility to modify the guts out of them is still right there, for those who want to - they just need to open the file in an appropriate text editor (which could NOT be done in Ace).
 
Last edited by a moderator:

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
I think the plugin manager is a superb addition.

As a scripter, adding functionality to your own game, it's entirely up to you whether you use it or not.

But as a developer who wants to use other people's scripts and not have to struggle to figure out what needs to be customized and where, and to do it all without worrying about breaking the script, it's a godsend.

And as a scripter, providing scripts for others to use in their games, it's great to not have to try and walk a non-scripter through making changes and wondering if issues reported are because there really are issues with the script, or because they haven't added them or customized them correctly.

For your examples ...

There is no reason someone writing an achievement system cannot write it in a way that it can be added to by the users.

There is no reason why someone using a plugin can't extend it by modifying the script, assuming they have either the knowledge or assistance to do so.

Plugins are not more restrictive than Ace scripts at all. They are safer to use, because the remove the risk of people breaking them by changing things they should not. But the flexibility to modify the guts out of them is still right there, for those who want to - they just need to open the file in an appropriate text editor (which could NOT be done in Ace).
Hmm, but how would that be done for those people like me who doesn't know any way to do it? If I want to write a plugin that considers adding something, what ways do you propose to beat the problem of not having the way to add anything at all?
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,309
Reaction score
531
First Language
indonesian
it's up to the coder creativity to make it right...

for example in my autocolor plugin.

http://forums.rpgmakerweb.com/index.php?/topic/49350-est-auto-text-color-plus/

i give 30 entry in plugin parameter which you could modify.

if you don't use 30. just left some of it blank to not using that entry...

i loop through that plugin parameter and save that entry to a variable.

if you want more entry? i give option adding it ingame (via plugin command / scriptcall)

which just add new entry to the variable we saved earlier...

it's not as practical as ACE script editor. but at least we secure the code that shouldn't be edited.

and less mistake from people that don't know how to modify script correctly.

edit: this method could be done too for achievement plugin, etc. as long as they save the plugin parameter to a variable. just add new /modify existing entry to that variable.
 
Last edited by a moderator:

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
Hmm, but how would that be done for those people like me who doesn't know any way to do it? If I want to write a plugin that considers adding something, what ways do you propose to beat the problem of not having the way to add anything at all?
Check out my Linked Variables and Linked Switches plugins. In the Ace version, you had to modify the script to assign a script call to a variable or switch. In the MV version, I have made it flexible enough to link switches/variables to commands within the script, just like in Ace, for those who are game to do the mods, but it also allows you to add them via a plugin command.


For achievements, it depends on how you have it set up - if it's something that the game developer just says "give this achievement" and they do their own tracking of when it's earned, it's super easy. If you want them to be able to set the conditions but for the plugin to track when the conditions are met, that can also be done either via plugin commands or by letting them add it to the script - in just the same way as my two plugins mentioned above. The script calls might be a bit more complicated for the tricky achievements.
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
Check out my Linked Variables and Linked Switches plugins. In the Ace version, you had to modify the script to assign a script call to a variable or switch. In the MV version, I have made it flexible enough to link switches/variables to commands within the script, just like in Ace, for those who are game to do the mods, but it also allows you to add them via a plugin command.

For achievements, it depends on how you have it set up - if it's something that the game developer just says "give this achievement" and they do their own tracking of when it's earned, it's super easy. If you want them to be able to set the conditions but for the plugin to track when the conditions are met, that can also be done either via plugin commands or by letting them add it to the script - in just the same way as my two plugins mentioned above. The script calls might be a bit more complicated for the tricky achievements.
I am just guessing here but when you said plugin commands, let's say if its an achievement, do you mean like making an empty array... then in the plugin commands let the user add something in that array, read by the plugin's other classes and display it? I think that's a good solution.

I'll check your plugin and see if I may learn something from it as well :)

I am still open to more solutions as well :)
 

Shaz

Veteran
Veteran
Joined
Mar 2, 2012
Messages
40,098
Reaction score
13,704
First Language
English
Primarily Uses
RMMV
yes. That's pretty much what those plugins do. You can either edit the script itself to define them, or you can use a plugin command to define them. You can even use a combination of the two.


The only REAL difference between plugins in MV and scripts in Ace, is that Ace has its own editor, and you need to use an external editor for MV (which could be as simple as Notepad). Everything else can be done in just the same way.
 

Quxios

Veteran
Veteran
Joined
Jan 8, 2014
Messages
1,055
Reaction score
785
First Language
English
Primarily Uses
RMMV
I like to use json files for my plugins. But they would still have to use some text editor to set the values up, so not sure if you'll even consider it, but I'll still type up my reasoning for using them.

I had asked some of my users on how they would like these type of things to be handled. Most of the votes went towards using JSON files, with directly editing the js in 2nd and then using bunch of plugin parameters in last.

json files are pretty easy to setup and it would pretty much be like directly editing the js since you'll create the array / object in the json except if the js file ever gets updated they wouldn't have to copy over their array or object to the new js file. I think as long as you give them an example json file with some instructions most users will be able to set them up, since I've only gotten 1 pm for help on setting up the json.
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
Would you be able to share me how JSON files work exactly? Thanks :)
 

Quxios

Veteran
Veteran
Joined
Jan 8, 2014
Messages
1,055
Reaction score
785
First Language
English
Primarily Uses
RMMV
Well for json loading I just copied how MV loads the data files.
Example from my parameters plugin:

Params.custom = []; Params.useCustom = (Params.plugin['Use Custom Parameters'].toLowerCase() === 'true'); Params.loadCustomParams = function() { if (this.useCustom) { var xhr = new XMLHttpRequest(); var url = 'data/Parameters.json'; xhr.open('GET', url, true); xhr.overrideMimeType('application/json'); xhr.onload = function() { Params.custom = JSON.parse(xhr.responseText); }; xhr.onerror = function() { alert("File: data/Parameters.json not found."); }; xhr.send(); } }; Params.loadCustomParams();I was originally going to have it check if the file existed, but doing that would cause the game to have an error on web based. So instead I just use the "Use Custom Parameters" which I tell people to set to true only if they want to use the json file.
So what this pretty much does is opens the json file and stores the data into Params.custom which I can now use in my plugin.
 
And here's a link to the example json file I provide:
https://gist.github.com/quasixi/3b928832bf42d4471560

So if I used Params.custom[0] it would return

{"abr": "qpp", "name": "Quasi Parameters Plus", "default": 0} so I could do something like Params.custom[0].abr and it would return "qpp" or Params.custom[0].name and return "Quasi Parameters Plus"
 
Last edited by a moderator:

Sulsay

Villager
Member
Joined
Nov 25, 2015
Messages
25
Reaction score
7
First Language
Dutch
Primarily Uses
RMMV
The plugin manager makes it easier for a plugin developer to release updates to his or her plugin.


Developers can now safely assume that the original code was not touched, because options are managed in the plugin manager. So releasing an update is considerably safer than back when people without much scripting knowledge HAD to make changes in the source.
 

estriole

Veteran
Veteran
Joined
Jun 27, 2012
Messages
1,309
Reaction score
531
First Language
indonesian
i haven't test it... but if i remember correctly... if we install a plugin. set plugin parameter.

then update the plugin as long as the update didn't modify the plugin parameter.

the parameter will stay the same... without the need for user to reenter the value of their config...

i might be wrong though. i cannot test it at the moment since i'm going out for a while. anyone can clarify it?
 

Milena

The woman of many questions
Veteran
Joined
Jan 26, 2014
Messages
1,281
Reaction score
106
First Language
Irish
Primarily Uses
N/A
They will stay the same as long as you don't delete it from the manager and reload it from there.
 

ArkDG

Veteran
Veteran
Joined
May 26, 2013
Messages
143
Reaction score
48
First Language
portuguese
Primarily Uses
Well, someone just said abou the arrays, but in my window with customizable variables system I'm just using arrays.

I create one parameter for each information a new variable would need, and the developper can just add new values organizing the conditions by this array, separating them by commas.... Like it

Param Variable Name: name1, name2... (Infinity, depends on how many the user adds)

Param variable id: 23, 4, 10... (23 for the name1, 4 for the name 2, etc)

And any other information my system needs.
 

ArkDG

Veteran
Veteran
Joined
May 26, 2013
Messages
143
Reaction score
48
First Language
portuguese
Primarily Uses
Sorry for the double post... But I forgot to say. The only thing that I really dislike about the manager is that we can't change the plugins order freely. We are obligated to delete and readd a plugin, or to overwrite them on the editor, because we just can't change their order properly.
 

Sulsay

Villager
Member
Joined
Nov 25, 2015
Messages
25
Reaction score
7
First Language
Dutch
Primarily Uses
RMMV
You can cut and paste them for easy ordering :)
 

ArkDG

Veteran
Veteran
Joined
May 26, 2013
Messages
143
Reaction score
48
First Language
portuguese
Primarily Uses
I think it's obliquous and awkward yet.... And other thing, there is no import button in it, so you have to copy and paste manually the plugin in the game folder. In truth, there is no import button for any ressource on rmmv. Not that I used it in the older rms, but for plugins that would be nice to have one.

That's just my complains.... Not that my opinion will change anything.
 

Sulsay

Villager
Member
Joined
Nov 25, 2015
Messages
25
Reaction score
7
First Language
Dutch
Primarily Uses
RMMV
I tried dragging the plugins to reorder them, but that didn't work. I must agree, it is a bit awkward.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c

Forum statistics

Threads
105,857
Messages
1,017,018
Members
137,563
Latest member
MinyakaAeon
Top