DiceParser
DiceParser copied to clipboard
New feature: documented macros
Adding a new parameter to the macro recording command to add some text could help to ease macro readability.
Idea 1: adding just a comment
!macro F [-1-1]s 0 # Fudge
!macro list
id: 0 Pattern: F Command: [-1-1]s Regexp: False Comment: Fudge
Idea 2: adding specific keys and values
!macro F [-1-1]s 0 Name=Fudge
!macro list
id: 0 Pattern: F Command: [-1-1]s Regexp: False Name: Fudge
It's a good idea.
Right now, macro and aliases are stored inside json files. I worked to port data storage to database, I never put this work in production. it needs more tests. I may use the comment as a datatable key. So It may be mandatory to set a name.
@obiwankennedy it makes sense to have unique names, so it seems a good idea to use them as a key (or a hash of the name, but then it'll need an extra field for the actual name to display). Moreover, that will allow to delete (or even update) macros by name instead of by number. So, two features in one. :ok_hand: