View RSS Feed

The Portal of Wonders

Maptool Macro Making Basics: Lesson 2

Rate this Entry
Last Time, we covered the basic macro. This lesson will cover unassigned variables and pop-up windows.

Do What?

A variable is a part of an equation (in this case, a macro), that may change depending on the circumstances. Opposite of a variable is a constant. In terms of Maptool, a variable is any term included in a roll that isn't predefined, whereas a constant is a term that has been defined either in token properties or within the macro itself.

How do you make a variable?

That's easy! Using the inline roll brackets, simply put a word in the text somewhere. Take a simple skill roll. It is designed as 1d20+score. If you take out the actual number of the score and leave, in this example, the word score, you have a variable. You can even do this in the chat window.

Code:
Random Variable: [1d20+score]
Redshirt Bob

Last lesson, we learned that Redshirt Bob likes to Intimidate his foes. Having an easy 1-click execution is great, but Bob wants to streamline his intimidation process even more. We have previously determined that his intimidate check is 1d20+2, but Bob wants to be able to call out which foe on the fly. Editing his macro just a little bit, we can add a pop up window that lets us type in an enemy's name.

Code:
Intimidate against [target]: [1d20+2]
The Breakdown

We've added two simple terms to the macro "against" and "[target]". Note that [target] is in inline rolling brackets. Maptool allows you do do 'rolls' without any 'rolling' whatsoever. This is one of these cases. Adding [target] creates a popup asking you to assign a value to the variable target. Type in whatever you want into the pop-up box, and it will output as the roll's result in the chat window.

The Result

Clicking the macro button will first pop up a window asking for "Value for Target". Putting the text "Rodney" into the window will output: "Redshirt Bob: Intimidate against Rodney: 12"

Preview of Next Time

The next lesson will cover assigned constants in the token properties and combining variables and constants into an intuitive attack routine.

Submit "Maptool Macro Making Basics: Lesson 2" to Digg Submit "Maptool Macro Making Basics: Lesson 2" to del.icio.us Submit "Maptool Macro Making Basics: Lesson 2" to StumbleUpon Submit "Maptool Macro Making Basics: Lesson 2" to Google

Updated 06-14-2011 at 01:41 AM by archmagi1 (Thread title to be consistant with lesson 1)

Tags: None Add / Edit Tags
Categories
Uncategorized

Comments