Boxed in/formatted text

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
Stv
Kobold
Posts: 2
Joined: Sat Mar 07, 2015 4:09 pm

Boxed in/formatted text

Post by Stv »

I saw an example of how someone had created a box around their combat macro output text, but can't seem to find it anymore. Does anyone know who's framework it was (if any) or knows where I need to be looking in the forums?

Cheers, Steve.

User avatar
aliasmask
RPTools Team
Posts: 9031
Joined: Tue Nov 10, 2009 6:11 pm
Location: California

Re: Boxed in/formatted text

Post by aliasmask »

If all you're looking to do is put a box around it you can use <table border=1 width="200"><tr><td>Your Text</td></tr></table> as a basic design.

I'm sure there is more than one framework or drop-in that puts boxes around the attack output, but I use a bastardized version of Lindsay's 3.5/Pathfinder framework. My framework only supports PF (ie changes I make don't consider 3.5 rules) and how I do the output is pretty complex, but boils down to this part of the code:

Code: Select all

[H: attackOutput = strformat('
   <tr style="border-width:1pt;border-style:solid;border-color:black;font-weight:bold">
      <td style="padding:0px 5px 1px 5px;color:black;white-space:nowrap;">%{attackLabel.tip}</td>
      <td style="padding:0px;color:blue;white-space:nowrap;">%{toHitText}</td>
      <td style="padding:0px 5px 0px 5px;color:#FF4500;white-space:nowrap;">%{damageLink}</td>
   </tr>
')]

[H: macro.return = json.toList(attackOutput,"")]
You can download my framework here: https://dl.dropboxusercontent.com/u/700 ... 8-15.cmpgn

Stv
Kobold
Posts: 2
Joined: Sat Mar 07, 2015 4:09 pm

Re: Boxed in/formatted text

Post by Stv »

Thanks for the pointer Alias, and also the quick reply.

Cheers, Steve.

Post Reply

Return to “MapTool”