Amanda K. said:
I'd like to use one of them to make a dual weapon attack macro to attach to my token, instead of having to open my character sheet
every time to use the built in macros for each weapon. I have figured out how to create the macro for the dual weapon attack, but I don't know how to have it pull the information for my rolls. I can manually change it each time I level, but I want to try and have it so it updates itself. Could anyone explain this way to me?
Here are some excerpts from a macro-writing tutorial series I wrote up for a group I'm in. Maybe it will help you.
---
A macro at its heart is simply a series of commands pre-packaged so they
can be fired off with the click of a button or a typed command in chat.
There's two different ways you can set up a macro. First is through
the Macros sidebar.
Click on the geartab at the topright of your
screen, then click the +Add button. This will bring up the Macro
editing dialog box. Name it and then type in the commands, one per
line, you wish to have in the macro and then save your macro.

If
you check the 'Show as Token Action' button, it will appear as a
click-able button when you have any token you control selected.
The second method is via your character sheet, as an Ability.
Open
your character journal, click on 'Attributes & Abilities', and +add
next to Abilities. Hover over your new 'Ability' and click on the
pencil icon. This will bring up the Ability editing Dialog box. Name
it and then type in the commands, one per line, you wish to have in the
macro and then save your macro by clicking on the checkmark.

The
benefit of doing macros via this second method are two-fold: firstly,
character specific macros can be placed here and not spam your macro
sidebar. The second advantage will be explained in a later section.
-----
Thus far we've used static numbers in our macros, aside from our roll
queries. Time to kick it up a notch and start using Attributes in our
macros!
An attribute is anything that isn't an ability. This tutorial deals with attributes that
you control.
Setting
attributes is simple. Open your character journal, click on
'Attributes & Abilities', and then click on +Add next to Attributes.
Fill in the needed values, there's no special button to click to save
your work. Below Is part of Adara's Attributes & Abilities to give
you an idea of what you can do.
Here
I insert a caveat: In games with a 'Character Sheet' enabled, the sheet
can and can cause confusion to your Attributes & Abilities page
because a character sheet is just a really really REALLY complicated
version of the A&A tab. Be careful here.Once
you've added some attributes, we can start using them in macros. The
code below assumes you're using Abilities for your macros.
@{attribute} [Pulls Current value]
@{attribute|max} [Pulls Max value, if set]
WARNING:
Attempting to reference an unset attribute will cause your macro to
fail to execute and then you'll be unhappy. Don't be unhappy, make sure
all your attributes have values./em attacks with his longsword! He his AC [[1d20 +@{HalfLevel} +@{Str} +?{Modifier to Hit|0}]] for a potential [[1d10 + @{Str} + ?{Modifier to Damage|0}]] damage.
/em attempts an Acrobatics check: [[1d20 + @{Acrobatics} + ?{TempMods|0}]]
/em attacks with Clever Strike. She hits AC [[1d20 +@{HalfLevel} +@{Dex} + ?{Modifier to Hit|0}]] for [[1d6 + @{Dex} + ?{Modifier to Damage|0} + ?{Sneak?|[NH]2d6} ]] potential damage.
The
benefit to this approach is mainly for longer-term campaigns. Instead
of editing your macros, you edit your attributes. Additionally, I
discovered that once I started building macros in this style, I started
better understanding the mechanics of 4. The attack macros above are
actually incomplete for 4e, leaving out a lot of numbers that need to be
input. If you decide you want to explore further, I will post a
tutorial specifically on how to write your attack powers for 4e with
this method.
This is where the second benefit of using Abilities
rather than Macros comes into play. Because this macro is attached to a
specific character, the code parser only looks at this specific
character journal for the attributes you are referencing. To use
attributes in a non-attribute macro, you have to specify the character
you wish to pull from:
@{Adara|HP}
The next tutorial covers attributes that the GM controls, for campaigns where the GM cooperates and has these values set ^_-
-----
This level of macro-making requires cooperation on the GM's part and thus is to be considered fully optional.Macros
can pull information not just from your own personal characters, but
also from any other token on the game board. The attributes common to
4e games are
token_name, AC, Fort, Ref, and
Will (or whatever the GM has named those last four.
token_name is always
token_name).
@{target|descriptor|attribute}
@{target|Foe|token_name}
@{target|Foe|AC}
@{target|Ally|token_name} [Target your friends, too! You can count on your fellow PCs to have their token_name set]
/em attacks @{target|Foe|token_name} with his longsword! He hits AC [[1d20+11+ ?{Modifier to Hit|0}]] for a potential [[1d10 + 7 + ?{Modifier to Damage|0}]] damage.
/em casts Healing Word; @{target|Ally|token_name} spends a healing surge and gains [[2d6 + ?{Any bonus healing?|0}]] additional healing.
Now,
an example of a differently formatted macro that speeds up gameplay but
sacrifices a level of mystery many GMs prefer to retain.
/me rolls to attack with his longsword.
Attacks AC [[1d20+11+ ?{Modifier to Hit|0}]] vs [[@{target|Foe|AC}]] @{target|Foe|token_name}'s AC
Damage is [[1d10 + 7 + ?{Modifier to Damage|0}]] | Maximum Damage is [[ 17+ ?{Modifier to Damage} ]]
If
the GM is so kind as to set these values on his or her tokens and allow
you to make macros that reference them (ask before assuming), you will
thank that GM earnestly and not abuse the privilege. I have
yet to be a player in a campaign where the defense values are available
for PC macro-making, but I wanted to add this section of the tutorial
for completeness's sake. Token_name is usually fair game. Usually. Don't be annoyed if your GM says 'stop doing that'.