I went and added "range and label generators". What that means is that certain events from add-ons, which contains a file named eventScriptLabels.txt, will generate ranges and labels for those events specified.
Example:
onActivate -> Self -> toggleEventEnabled("1 2 3 4")
onActivate -> Self -> setColor("1 1 1 1")
onActivate -> Self -> setColor("1 0 0 1")
onActivate -> Self -> setColor("0 1 0 1")
onActivate -> Self -> setColor("0 0 1 1")
Will be turned into:
onActivate -> Self -> toggleEventEnabled([onActivate1:onActivate4])
onActivate1: onActivate -> Self -> setColor("1 1 1 1")
onActivate -> Self -> setColor("1 0 0 1")
onActivate -> Self -> setColor("0 1 0 1")
onActivate4: onActivate -> Self -> setColor("0 0 1 1")
Or with labels disabled:
onActivate -> Self -> toggleEventEnabled([1:4])
onActivate -> Self -> setColor("1 1 1 1")
onActivate -> Self -> setColor("1 0 0 1")
onActivate -> Self -> setColor("0 1 0 1")
onActivate -> Self -> setColor("0 0 1 1")
All event indices used in that event field will be replaced with EventScript ranges and labels. This should make it a lot easier to share, migrate and merge events without other events interfering. Of course, the names that are created is not unique and that still needs to be handled manually, but that will take less time than manually changing the event numbering.
To make your add-on support this feature, just add eventScriptLabel.txt to your archive and format the file like this pseudo-file:
<event name 1>\t<field>\t<version>
<event name 2>\t<field>\t<version>
<...>
Example:
fireRelayNum 0 2
fireRelayRandomNum 0 2
Event name is the event that will be checked.
Field is the field index, starting from 0, where the numbers will be parsed.
Version is what type of version the field are. 1 means the defaults from like, setEventEnabled. 2 means enhanced, like fireRelayNum.
It might sound like "version" in this case means more like "type", and that is indeed correct as well.
There might be plan to add more versions for certain events, but for now I will let it be as this is the starting point.
Worth mentioning is that manual custom labels are supported, but currently not used.