3
\$\begingroup\$

Can anyone help with this macro? I am trying to generate random starting gold per PC levels, but it only allows me to do it if I put a character’s name. For example:

[[@{Javi "Bones" Rorrey|base_level} *100 +1d10 *25]]
\$\endgroup\$
6
  • \$\begingroup\$ Do you mean that you want it to do it for all your players? Kinda like a for every player do? \$\endgroup\$
    – Chepelink
    Oct 15, 2019 at 5:17
  • \$\begingroup\$ Welcome to RPG.SE! Take the tour if you haven't already, and check out the help center for more guidance. Can you clarify what it is you're trying to do? How do you expect it to calculate the result without specifying a character to use the level of? (Also, note that base_level will calculate based on only their starting class, which is different from character level if the character is multiclassed.) \$\endgroup\$
    – V2Blast
    Oct 15, 2019 at 5:42
  • \$\begingroup\$ @Chepelink Yes I do, or mostly so when they generate a PC, they can generate it themselves. \$\endgroup\$ Oct 15, 2019 at 5:50
  • 1
    \$\begingroup\$ @FranciscoDeLaPaz - Might need the API? Doesn't look like looping is really native to the macro language - app.roll20.net/forum/post/653944/slug%7D \$\endgroup\$
    – JohnP
    Oct 15, 2019 at 13:58
  • \$\begingroup\$ @JohnP Thank you for the link. The answer was just to make a query for input. You get [[100 *?{level} +1d10 *25]] starting gold \$\endgroup\$ Oct 15, 2019 at 14:14

2 Answers 2

4
\$\begingroup\$

The answer was just to make a query for input. You get [[100 *?{level} +1d10 *25]] starting gold. Thank you @JohnP for pointing me in right direction.

\$\endgroup\$
3
\$\begingroup\$

Another way for the players to do this is to use [[@{selected|base_level} *100 +1d10 *25]]

This allows a player or GM to select the token and roll for the gold. This works best when set-up in the macros bar or/and as a token action. There is an option to show it to -target- at the bottom of the "Edit Macros" windows, it can be shown to a specific player or to all players (or just the GM).

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .