Private/hidden macro output, still generating CRs?

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: dorpond, trevor, Azhrei

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
User avatar
celestian
Dragon
Posts: 276
Joined: Mon May 17, 2010 3:29 pm

Private/hidden macro output, still generating CRs?

Post by celestian »

I'm setting up my framework so the DM can hide save/ability/skill checks from the players. Also if the players want to hide their attack/initiative rolls/etc. I've got most of it working (tooltips are a bane here) but I've still one problem.

Some of the macros still generate a blank line/cr it seems. Say a player uses the ability check macro it will send the normal output to the DM but the players still get the "ding" noise from someone typing CR and their name but no text in it.

I seem to recall there being some odd behavior with <!-- --> tho I thought that was frame/dialogs. Either way I went through the process for one macro and found none.

Any theories?

User avatar
aliasmask
RPTools Team
Posts: 9029
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Private/hidden macro output, still generating CRs?

Post by aliasmask »

You can save the chat log and it will show you the "blank" line. It probably is a <!-- comment --> somewhere. Text is not displayed but it is treated as content.

User avatar
celestian
Dragon
Posts: 276
Joined: Mon May 17, 2010 3:29 pm

Re: Private/hidden macro output, still generating CRs?

Post by celestian »

Hum, I tried that and while it did show the one macro that did have <!-- comments --> all I get is this on another.

Code: Select all

 Bruni:
          </td>
        </tr>
      </table>
    </div>
  </body>
</html>

I do not use /div anywhere in my macros so not sure where that's coming from. Infact I think it's part of the chat system because the <!-- comment --> versions had the same thing only showed the "<!-- comment -->" bit also followed by the above. Once I removed the comments I got no more.

My only guess is that last CR below /html is coming from something? I use the same macro, one in a macroLink the other is just a button macro. The button macro works fine but the macroLink produces the above output when it's suppose to be DM only. This probably has something to do with the "all", "self" "gm-self" "none" settings? I can't use none, nor gm-self... I want the macro to determine where the output goes not macroLink.

User avatar
celestian
Dragon
Posts: 276
Joined: Mon May 17, 2010 3:29 pm

Re: Private/hidden macro output, still generating CRs?

Post by celestian »

I've had another "hide" not working tonight and for the life of me it makes no sense.

Code: Select all

[h: macro.return=strformat("totalWeight=%{totalWeight};")]
Everytime that macro is run you'll see in the chat window:

Code: Select all

Briar:totalWeight=42;
I've added an option to that to make sure that's where it's coming from and it is.

Code: Select all

[h: macro.return=strformat("test=%{class}; totalWeight=%{totalWeight};")]
Will show both test= and totalWeight= when the user runs the macro attached to that.

Code: Select all

Bruni:test=oddRow; totalWeight=43;

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Private/hidden macro output, still generating CRs?

Post by wolph42 »

that is correct output!

The statement IN the macro is hidden, however if you use [macro.return=] then IF there is NO ouput of the macro THEN the macro returns whatever is in assigned to macro.return... !
To hide that you need to hide the macro output of that macro e.g.
the macro
"Hello"
contains:

Code: Select all

[h:x=1+1]
[h:macro.return=x]
then you need to call it as

Code: Select all

[h:Hello]
if you set 'ignore output' in the UDF... for 'Hello' then i don't know what will happen.

to put it differently

Code: Select all

[r:x=1+1]
[h:macro.return=500]
will return 2 and

Code: Select all

[h:x=1+1]
[h:macro.return=500]
will return 500.

User avatar
celestian
Dragon
Posts: 276
Joined: Mon May 17, 2010 3:29 pm

Re: Private/hidden macro output, still generating CRs?

Post by celestian »

If I could I would display the weight in the macro above but the way I display I want the weight in another table that is manipulated in the previous macro().

I guess I could put the value in a property and just pull it in that way but if there is a way to get around this it would be useful.

The way I call the macro is UDF(First)->[macro(Second)]->UDF(thisISTheReturnMacro). I did find that if I used [h:UDF(First)] on the initial call it would display the frame correctly AND hide the weight return. If I use [h: macro(Second)] it would hide all the output from UDF(thisISTheReturnMacro) as expected and defeat the purpose.

Post Reply

Return to “MapTool”