Posted: Wed Aug 20, 2008 5:08 pm
Moved to documentation forum and stickied
Elorebaen wrote:Hello,
I am rather new to macro programming. Can I have parts of a macro simply fulfill the function without giving output in the Chat window?
For example:
{token.name} takes {DamageValue} points of damage!
<br>Now {token.name} only has {HP = HP - DamageValue} hit points
If I wanted to place this on NPCs, I would not want the info after the BR to show in the Chat window.
Thanks for the help!
E
What I have done (not really macro related, but) is create a separate property set for monsters/NPCs. Then (among other stuff), I set this property in there:Elorebaen wrote:Hello,
I am rather new to macro programming. Can I have parts of a macro simply fulfill the function without giving output in the Chat window?
For example:
{token.name} takes {DamageValue} points of damage!
<br>Now {token.name} only has {HP = HP - DamageValue} hit points
If I wanted to place this on NPCs, I would not want the info after the BR to show in the Chat window.
Thanks for the help!
E
As jfrazier said, you can't have players and GMs see different parts of the output. However, you can comment out the second line (using <!-- -->)so that the effect takes place but nothing is printed to the chat window.Elorebaen wrote:Hello,
I am rather new to macro programming. Can I have parts of a macro simply fulfill the function without giving output in the Chat window?
For example:
{token.name} takes {DamageValue} points of damage!
<br>Now {token.name} only has {HP = HP - DamageValue} hit points
If I wanted to place this on NPCs, I would not want the info after the BR to show in the Chat window.
Thanks for the help!
E
This is on my to-do list of things to fix (allowing multiple commands within a macro), but based on the evaluation I did while waiting on roll syntax feedback, it'll take a fair bit of effort to get it workingjfrazierjr wrote:No, you can use /self to only send to yourself or /gm to only send to you and he GM, but it's all or nothing within a macro.
Hmm... I wonder if you can hook into existing mechanics like what you are doing with tooltips. For example:Mr. Pokeylope wrote:This is on my to-do list of things to fix (allowing multiple commands within a macro), but based on the evaluation I did while waiting on roll syntax feedback, it'll take a fair bit of effort to get it workingjfrazierjr wrote:No, you can use /self to only send to yourself or /gm to only send to you and he GM, but it's all or nothing within a macro.
So, eventually, maybe.
Nah, it'd just be done using the multi-line macro editor, and each line would be a separate command. In theory you're supposed to be able to use newlines to automatically insert <br> tags, but since there's a bug that prevents that from working at the moment, I don't feel too bad about changing the (intended) behavior.jfrazierjr wrote:Hmm... I wonder if you can hook into existing mechanics like what you are doing with tooltips. For example:
/me does super foo [/gm "I actually user super bar instead"]
Mr. Pokeylope wrote:Nah, it'd just be done using the multi-line macro editor, and each line would be a separate command. In theory you're supposed to be able to use newlines to automatically insert <br> tags, but since there's a bug that prevents that from working at the moment, I don't feel too bad about changing the (intended) behavior.jfrazierjr wrote:Hmm... I wonder if you can hook into existing mechanics like what you are doing with tooltips. For example:
/me does super foo [/gm "I actually user super bar instead"]
{state.Bloodied = if (HP==30, 1, 0) }Plissken wrote:Hi, I'm trying to make it so that when a monster reaches its bloodied value, the bloodied state will show up. I tried this and variants of this but wouldn't work.
{ if (HP==30, [state.Bloodied = 1], [state.Bloodied = 0] ) }
What is the correct way to do this?
If you have the following macro:jfrazierjr wrote:Ummm what? What bug are you talking about, cause it may not be a bug....
Code: Select all
foo
bar
Pretty sure it's NOT a bug. Basically, if I remember corretly, this was changed to NOT insert a br automatically because that messes upformatting of tables when someone tries to "prettify" their HTML code. everywhere there is a br tag, the table gets another empty cell that's about 3 px wide...Mr. Pokeylope wrote:If you have the following macro:jfrazierjr wrote:Ummm what? What bug are you talking about, cause it may not be a bug....the documented behavior is that it will replace the newline with a <br> tag. The code to do this exists, but there's a bug in it and the replacement doesn't actually happen. So instead of "foo<br>bar" you get "foo\nbar" (where "\n" represents a newline), which when rendered as HTML is printed as "foo bar".Code: Select all
foo bar