Missing feature:
We have an opcode to set variables where you can specify the index of the variable as a constant, variable or as various functions. What is missing is a way of "getting" a variable from an index which is specified by a variable or as various functions. Currently we can only do it with a constant index.
Example where this feature would be useful:
This would be useful when doing recursive autocrafting on a single core. You could store the crafting tickets of items that can't be crafted directly in variables with dynamically assigned indexes using an "index variable" that is increased by 1 for each new crafting event (currently possible). Then once you reach an item that can be crafted directly you iterate backwards through the variables, accessing them in the right order thanks to the "index variable" that is used as index and subtracting 1 from it for each successful crafting operation (currently impossible).
Implementation suggestion:
For the implementation I have two suggestions:
Either make a new opcode called "get variable" that functions much in the same way of "set variable" and has access to the same features for the index value but instead gets the variable.
Or add the variable/function functionality when specifying the index of a variable for all opcodes. For example the opcode "Eval: number"'s menu consists of three tabs; constant, variable and function. In the variable tab the index must be specified with a constant. Instead of forcing a constant, the same menu can be added again; constant, variable, function.
My thoughts:
To me it seems like this feature is missing. I mean we can set variables dynamically so one would think that the opcodes also would allow dynamic retrieval of the variables.
Missing feature: We have an opcode to set variables where you can specify the index of the variable as a constant, variable or as various functions. What is missing is a way of "getting" a variable from an index which is specified by a variable or as various functions. Currently we can only do it with a constant index.
Example where this feature would be useful: This would be useful when doing recursive autocrafting on a single core. You could store the crafting tickets of items that can't be crafted directly in variables with dynamically assigned indexes using an "index variable" that is increased by 1 for each new crafting event (currently possible). Then once you reach an item that can be crafted directly you iterate backwards through the variables, accessing them in the right order thanks to the "index variable" that is used as index and subtracting 1 from it for each successful crafting operation (currently impossible).
Implementation suggestion: For the implementation I have two suggestions:
Either make a new opcode called "get variable" that functions much in the same way of "set variable" and has access to the same features for the index value but instead gets the variable.
Or add the variable/function functionality when specifying the index of a variable for all opcodes. For example the opcode "Eval: number"'s menu consists of three tabs; constant, variable and function. In the variable tab the index must be specified with a constant. Instead of forcing a constant, the same menu can be added again; constant, variable, function.
My thoughts: To me it seems like this feature is missing. I mean we can set variables dynamically so one would think that the opcodes also would allow dynamic retrieval of the variables.