Add some more "logic" features #288

  • Enhancment
  • OwnMakesChannel created this issue May 21, 2021

    As you already now, I use MyCommand to really program with it and I am missing out some standard features that every language has. The features listed below will not just help me, but also will make the Plugin much more powerful and a real easy to use replacement for normal plugin-programming. Maybe also add some error messages in the console, when the code has an error for better debugging. I think the order of the features listed below is a good order how to do it.


    Proper Lists

    There is currently just one type of a %TempVariable% list "$GetRandomStringFromList%string1;string2;...3%". You define it with given content and can only access randomly.

    I'd wish a %TempVariable% list like a Playerdata list with some more features, that you can also add to the Playerdata list (in my opinion Playerdata is really just for saving data and not to work with it, it has to be accessed as less as possible).


    Features that are needed:

    - Create a list with a specified name


    - Add contents to a list


    - Delete contents from a list by name


    - Pop feature (works as placeholder, has to work with all other features, more in example)

    example: 1. list.pop() (takes the object with index 0 and removes from list), list.pop(3) (takes the object with index 3 and removes from list)


    - Reference an object in a list using an index (works as a placeholder, has to work with all the other features, more in Pop feature exmple)

    example: list[3] (returns the object at index 3)


    - list.length (returns the length of the list, needed for loops)


    For Loops inside the Command to use lists properly

    There is currently the feature to run the whole command with the same parameters in a loop RUN_COMMAND_TASK. There has to be an option to do it inside a command and also multiple loops inside a command (loop in loop is also a possibility, but can be added later on, don't know how difficult that is).


    Features that are needed:

    - Loop creation (with creation of run variable, that can be used inside the loop)

    example: $Script$%for%VARIABLENAME==0<and>VARIABLENAME<list.length<and>VARIABLENAME+1

                                                Create run Variable             the condition for the loop              what happens every run


    - Edit run Variable inside the for loop

    example: %TempVariable%VARIABLENAME+1 (all features that TempVariable supports)


    - Use/read run Variable inside the for loop (like a normal TempVariable)


    - Define loop end (so that the loops know which code is inside the loop)

    example: $Script$%endfor%


    Command accepts a list as $arg

    Currently it is just possible to use the given $args as $arg1, $arg2 and so on. There is also a big problem with "dynamic" $multiargs as "$argX $multiargs". This will solve the problem and give the user the power to do everything on his own. This will also solve one of my previous problems, where I tried to find a workaround using a TempVariable "$argTempVariable $multiargs".


    Features needed:

    - Specify that you want accpet one list of args (under the command, accept_list_of_args: true)



        command: /taskexample

        type: RUN_COMMAND_TASK runcmd:

        - /do something

        accept_list_of_args: true


    - Has to be like a list specified above

    example: args[3] (to reference the object at index 3)



    If you have questions, feel free to ask me. I can also try to help you programming it, if it is possible to help you somehow. Maybe as a tester for the features.

  • OwnMakesChannel added a tag Enhancment May 21, 2021
  • OwnMakesChannel edited description May 21, 2021
  • OwnMakesChannel edited description May 21, 2021

To post a comment, please login or register a new account.