7/24 Update: Old versions of my implementations of suggested pairs are in nested spoilers.
I guess I should finally get started on abruptly changing the topic and start suggesting key/value pairs we could use for our scripts. None of these listed below are set in stone, so anyone is welcome to agree or disagree with any of the proposed implementations of certain pairs. Let's get started.
Information
Script Name
Spoiler
:name => 'Your Script's Name'The name of the script being installed. Should be a string.
I'm not sure whether this key should be :name or :title.
Script ID
Spoiler
:id => YOUR_SCRIPT_IDThe ID of the script being installed. Can be a symbol or a string. Generally should be the same as your $imported key.
This may be redundant but it should allow scripters to search through the $imported[:SCRIPT_LIST] array for their IDs.
Version Number
Spoiler
:version => 'x.y.z'The script's version number. Should be a string.
Date (Last revised)
Spoiler
:date => 'YYYY-MM-DD'
The script's last revision date. Should be a string. Must be written in ISO8601 format. There are good reasons why.
Author (Revision 1)
Spoiler
:author => ['Author 1', 'Author 2', ...]The script's author(s). Currently proposed to be an array consisting of strings to allow scripters to specify multiple authors.
:author => 'Author'
The script's author(s). Can be either a string or an array consisting of strings. The latter would denote multiple authors.
CompatibilityEnabled Script
Spoiler
:enabled => booleanThe script's enabled state. In order for this to be used effectively, the entire script (save for the import check and the header) should be wrapped in an if conditional that determines whether or not the script has been enabled.
if $imported[:yourscripthere][:enabled] <your script>endThe implementation and default value for the script will need some work and input put into it.
Aliased Methods (Revision 1)
Spoiler
:aliased => { :Class_Name => [[😮ld_method, :new_method], [😮ld_method_2, :new_method_2], [😮ld_method_3, :new_method_3], ...], :Class_Name_2 => [[😮ld_method, :new_method], [😮ld_method_2, :new_method_2], [😮ld_method_3, :new_method_3], ...] }:aliased will consist of a hash. The nested hash's keys will be named after the Class/Module name. Their values will be consist of an array housing a list of arrays that contains two items: the original method name and the aliased method name. This is how it would look in a script.
$imported[:username_yourscriptname] = { :aliased => { :Scene_Title => [ [:create_background, :un_ysn_create_background], [:create_foreground, :un_ysn_create_foreground], [:dispose_background, :un_ysn_dispose_background], [:dispose_foreground, :un_ysn_dispose_foreground] ], :Scene_Map => [ [:transition_speed, :un_ysn_transition_speed], [:fadeout_speed, :un_ysn_fadeout_speed], [:transition_speed, :un_ysn_transition_speed], ] }}I'm trying to decide whether the class/module names and methods should be written as symbols or as strings. What do you guys think?
:aliased => { :Class_Name => [[:new_method,
😮ld_method], [:new_method_2,
😮ld_method_2], [:new_method_3,
😮ld_method_3], ...], :Class_Name_2 => [[:new_method,
😮ld_method], [:new_method_2,
😮ld_method_2], [:new_method_3,
😮ld_method_3], ...] }
:aliased will consist of a hash. The nested hash's keys will be named after the Classes/Modules. Their values will be consist of an array housing a list of arrays that contains two items: the aliased method name and the original method name. It's arranged in this order to maintain consistency with alias_method. This is one way on how to include a list of aliased methods (an alternate method is below).
$imported[:username_yourscriptname] = { :aliased => { :Scene_Title => [ [:un_ysn_create_background, :create_background], [:un_ysn_create_foreground, :create_foreground], [:un_ysn_dispose_background, :dispose_background], [:un_ysn_dispose_foreground, :dispose_foreground] ], :Scene_Map => [ [:un_ysn_transition_speed, :transition_speed], [:un_ysn_fadeout_speed, :fadeout_speed], [:un_ysn_fadein_speed, :fadein_speed], ] }}An alternate means of implementing it would be to create an empty hash within your $imported key.
And then adding this code below a group of alias_method/alias calls.
Code:
$imported[:yourscripthere][:aliased][:Class_Name] => [ [:new_method_1, :old_method_1], [:new_method_2, :old_method_2], [:new_method_3, :old_method_3],]
Overwritten Methods
Spoiler
😮verwritten => { :Class_Name => [:method_1, :method_2, :method_3, ...], :Class_Name_2 => [:method_1, :method_2, :method_3, ...] }😮verwritten will consist of a hash. The nested hash's keys will be named after the Classes/Modules. Their values will be consist of an array housing a list of symbols named after methods that were overwritten in the script.
Like Aliased Methods, I'm trying to decide whether these should be written as symbols or strings.
Defined Methods
Spoiler
:defined => { :Class_Name => [:method_1, :method_2, :method_3, ...], :Class_Name_2 => [:method_1, :method_2, :method_3, ...] }:defined will consist of a hash. The nested hash's keys will be named after the Class/Module name. Their values will be consist of an array housing a list of symbols named after methods that were defined in the script.
Like Aliased Methods, I'm trying to decide whether these should be written as symbols or strings. I'm trying to figure out how this would work for defined classes/modules.
MiscellaneousTags
Spoiler
:tags => [:item_1, :item_2, :item_3]Not quite as necessary as most of the other suggested key/value pairs. This allows scripters to further identify their scripts by freely attaching keywords to their $imported keys. An example of a tag could be a very quick description of what the script does. (Examples: :battlesystem, :easing, :eyecandy)
Trying to decide whether these should be written as symbols or strings.
CancelledScript Set (Revision 1)
Spoiler
:set => ['Set 1', 'Set 2', ...]Specify which set(s) the scripts may be a part of, if any. Currently proposed to be an array consisting of strings to allow scripters to specify multiple sets.
I'm sure this could use a little refining. I'm not sure whether the key should be named :set, :group, :engine, or :library. Is this necessary?
:set => 'Set'
Specify which set(s) the scripts may be a part of, if any. Can be either a string or an array consisting of strings. The latter would denote multiple sets.
I'm sure this could use a little refining. I'm not sure whether the key should be named :set, :group, :engine, or :library.
Two other key/value pairs I'd like to suggest (little thought was put into these so I'm not sure if these might actually be necessary) are:
- Something involving method branches.
- Licenses.