Just a simple one, I need a macro to simply remember a variable between other macros on the SAME token. This variable will be different among other tokens.
Basically I am looking to set up the hit die, dice, etc of a token, so I can use another button to role the tokens hit points.
Make an orc (1d8+1 hp). Add the variables 1, 8 and 1 to the token. Copy the token 20 times. Run this macro on all the tokens at once, and they all have random hit points.
I don't want to use global properties.
Create a persistent variable on a token.
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
-
- Giant
- Posts: 183
- Joined: Mon Apr 11, 2011 8:11 pm
Re: Create a persistent variable on a token.
Lets assume all your tokens have a "hp" property. If you set the property in your macro to [H: hp = 1d8+1] it will initialize that property. How you get the hp info is up to you. You can have a json that has the data based on the token name or you can put it in manually. ie copy 20 tokens, select 20 tokens, run macro to set hp to 1d8+1. There's a lot of room for how user friendly you want to make it, which make the coding more complicated.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools