Valur, why 1 and not 0 ? pluginManager

hi
why use values from 1 instead of 0??
it complicates things so much, or maybe I'm not understanding something. !?
if anyone can explain to me the reasoning of the plugin manager and why he should use 1 for start valur.
thank

example
PHP:
* @param layersLimits
* @type number
* @max 50
* @min 1
* @default 10
* @desc limits layers in you project. Easy manager picture layering.

* @param layersNames
* @parent layersLimits
* @type string[]
* @default ["paralaxe1","paralaxe2","backgroundDecor","backgroundMountaine","backgroundMountaine","otherName"]
* @desc Asign custom name to layers. like unity, this allow to get a layer by name instead ID
*
* @param layers_ZIndex
* @parent layersLimits
* @type string[]
* @default ["parallax","parallax","bellowTile","belowEvents","middleEvents","upperEvents","top","top"]
* @desc Asign rmmv layer Z to layers, default:"top", 'top' are over all rmmv basic sprites

it makes it necessary later to think with a logic of length + 1.
I find it really weird and difficult, or it's me who does not understand the logic of the plugin manager?
knowing that 0 is a valid decimal for arrays!
From what I understand of this, it needs the value of 1 because it's referencing something that can be used and 1 is the first of the positive digits. 0 can be used, but doesn't equal out to anything because it's 0.... Who know's I could be completely off thinking this way. ahaha
the problem arises and becomes illogical when decanting and interpreting the values.
with Object.key or .length.

because in js , in array, 0 is valid
so if i need example Layer id:0
is logic and valid

but for now if we need keep the logic of the pluginManager, we need
[null,data,data]
I will express myself with an image, I think it will be more meaningful.
Sans-titre-1.jpg
Arrays start from element 0. And arrays are things programmers use. Plugins are things programmers write to make it easy for non-programmers to do stuff. Non-programmers often find the "first = 0" thing hard to grasp.

It is easier for plugin writers to let the users say 1 and then convert it to 0 if necessary, than for users to remember to say 0.

Plus, sometimes it's not always 0. The first item in most of the database tabs is shown as id 1, and IS element 1, as element 0 is null. It's easier for programmers to remember when to start at 0 and when to start at 1, and when they need to be adjusted, and it keeps things more consistent for people using the plugin.


If it's a plugin you're using that someone else has written, then it just depends on how that plugin writer wanted to do it.
@Jonforum If I had to guess, I would say it's because starting counting at 0 is programmer-friendly, while starting counting at 1 is user-friendly. Most people that have never touched a programming language even consider starting to count at 0.
I find this very disturbing.
but I did not think about those who have ever touch the programming base.
But logically to start a game, you have to learn the basics.
but that does not change the fact that why not put them in the right direction.
this way of doing it bad and makes it necessary to create a 'null' valur in all the tables that will call this pluginManager !
[null,data,data]
then it falsing the real data of .length, and also the loop and start valur.
I think I'll drop this plugin manager.
this way of doing it bad and makes it necessary to create a 'null' valur in all the tables that will call this pluginManager !
[null,data,data]

You don't need to include a null value at all. According to the Introduction to the New Plugin Manager post, any array will have values assigned starting from 0, but the list displayed to the user will start at 1. Starting at 1 is simply a cosmetic change so as not to confuse the person who's using your plugin.

In other words, what is displayed in the Plugin Manager screen of the editor as "1: parallax" is accessed with
Code:
JSON.parse(PluginManager.parameters('pluginName')['layers_ZIndex'])[0]   //returns 'parallax'
even using software designed for doing code it starts with a 1 value.

I love your graphics by the way, that looks amazing!! <3

Original thread: https://forums.rpgmakerweb.com/threads/valur-why-1-and-not-0-pluginmanager.90392/