Project Details:
- Create a lib token on an empty map to hold your functions.
- Drop tokens that you wish to create or add to an image table/database.
- The token names will be the reference you use to access the image in the table, so they must be unique.
- Index 0 will hold a json array of all the token names in the table.
- Macro will ask for table name or use a default name.
- Tables will be invisible to players but accessible.
- Default Table imageId will be that of the lib token.
- Table will be created if it doesn't exist.
- Token names will be unique and overwrite existing image.
- Images can be added with each run of the macro.
- Have an option to clear the table first.
- Get user input for table name and table options.
- Get all token names from current map excluding the lib token (I think getTokens() does this already)
- Loop through list adding each image to table.
- If name exists, update correct index.
- Update index 0 with the image list.
Finally, write a macro that will get an imageId by it's name from the table. You can use my starter lib token for the basis of your lib token.
Feel free to add more features if you think it will be handy. For example, I was thinking of adding only selected tokens to image table.