RPTools.net

Discussion and Support

Skip to content

It is currently Fri Sep 22, 2017 1:36 pm 




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. :)



Reply to topic  [ 6 posts ] 

Previous topic | Next topic 

  Print view

Author Message
 Offline
Kobold
 
Joined: Sat Dec 10, 2016 11:50 am
Posts: 1
 Post subject: GM Notes Style Tag
PostPosted: Sun Dec 11, 2016 3:53 pm 
Is it possible to specify CSS style in the GM Notes for a stamp on the object or hidden layer when viewed from the token layer?

E.g. I am trying to add nice box text to the notes from Lost Mines of Phandelver

I am setting the GM Notes to
Code:
<style>
.box-text {
  background-color: #EEEEEE;
}
</style>

<p>Whether the characters follow Gundren's map or receive directions to Wave Echo Cave from another source, their initial approach leads them to a narrow tunnel whose entrance is hidden within the Sword Mountain foothills.</p>

<p class="box-text">The entrance tunnel leads into a large-cavern supported by a natural pillar of rock and containing three stalagmites. In the western part of the cave, behind the column ofrock, are three bedrolls and a heap of ordinary supplies-sacks of flour, bags of salt, casks of salted meat, lanterns, flasks of lamp oil, pickaxes, shovels, and other gear. Amid the supplies, you see the body of a dwarf miner, dead for at least a week. The northeastern section of the cavern has collapsed, forming a ten-foot-wide, twenty-foot-deep pit. A sturdy hemp rope is tied off around a nearby stalagmite and dangles down the side of the pit, at the bottom of which is a rough-hewn tunnel heading northwest and east.
</p>

<p>This was the campsite of the Rockseekers. The dead dwarf is Tharden, Gundren's brother, who was killed by the Black Spider. Gundren's other brother, Nundro, was here as well and is currently the Black Spider's prisoner in area 20. The dwarves' supplies are potentially useful, but not particularly valuable. </p>

<p><strong>Open Pit:</strong> Climbing up or down the wall of the pit without a rope requires a successful DC 15 Strength (Athletics) check. A character who fails the check by 5 or more falls and takes Id6 bludgeoning damage per 10 feet fallen, landing prone at the bottom. The tunnel at the bottom of the pit leads northwest toward area 2 and east toward area 3.</p>

<h3 class="">TREASURE</h3>
<p>Tharden wears a pair of boots of striding and springing. In his haste to explore the rest of Wave Echo Cave, Nezznar overlooked them.
</p>


However, I don't see the style, just the text from between the style show up in the note itself.

Am I doing this wrong, or are style tags not allowed? I know I can manually specify the style on the element itself but that's pretty annoying since I am not writing this by hand and I can get the style tags for free but if I want to do more than just the background color keeping track of all the CSS styles on the element will be very annoying, so I am hoping I am just doing something wrong.

Thanks
Kasuko


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7859
Location: Bay Area
 Post subject: Re: GM Notes Style Tag
PostPosted: Mon Dec 12, 2016 12:05 am 
Textboxes have no html or css, but if you were copy the text from the gmnotes to a dialog or frame, then the css should work.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1661
Location: Chicagoland
 Post subject: Re: GM Notes Style Tag
PostPosted: Mon Dec 12, 2016 12:44 am 
That's not true actually. I use HTML in my Notes/GM notes in my setup. I haven't used CSS though and that could be a limitation. But if you were to just specify <html> or <font> tags, they will work.

In fact, even the name can have HTML. I use <h2> tags and font=green for the name so, like <h2><font color=green>B4. Torture Chamber (CR5)</font></h2> works (as it also does in the notes.

I add number stamps to the hidden layer with all the room text and It makes for much easier readability on my screen. :)

_________________
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
More information here: MapTool Nerps! Fork | TokenTool Nerps! Fork
Custom TokenTool (version 1.0b33): TokenTool.exe


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7859
Location: Bay Area
 Post subject: Re: GM Notes Style Tag
PostPosted: Mon Dec 12, 2016 12:48 am 
JamzTheMan wrote:
That's not true actually. I use HTML in my Notes/GM notes in my setup. I haven't used CSS though and that could be a limitation. But if you were to just specify <html> or <font> tags, they will work.

In fact, even the name can have HTML. I use <h2> tags and font=green for the name so, like <h2><font color=green>B4. Torture Chamber (CR5)</font></h2> works (as it also does in the notes.

I add number stamps to the hidden layer with all the room text and It makes for much easier readability on my screen. :)

I think we may be talking about 2 different things. If I put <html><b>Hello</b></html> in the GM Notes or a token, it shows only the text of the html code. If I print the GM Notes to the chat, dialog or frame, then the html will show the bold Hello from the notes.

_________________
Downloads:


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1661
Location: Chicagoland
 Post subject: Re: GM Notes Style Tag
PostPosted: Mon Dec 12, 2016 1:41 am 
Ok, if you "edit" the token, yes, you see the HTML/source code.

But, if you put said token on the Hidden layer, then hover over/click the stamp/object while on the token layer (what the user is trying to do) you get the text popup is in HTML.

Attachment:
Capture.JPG
Capture.JPG [ 61.51 KiB | Viewed 347 times ]


Attachment:
Capture2.JPG
Capture2.JPG [ 54.65 KiB | Viewed 347 times ]



Note: You can place the style inline and it works. I think that's about the best you can get away with for now...
Code:
<p style=" background-color: #EEEEEE;">The entrance tunnel leads into a large-cavern supported by a natural pillar of rock and containing three stalagmites. In the western part of the cave, behind the column ofrock, are three bedrolls and a heap of ordinary supplies-sacks of flour, bags of salt, casks of salted meat, lanterns, flasks of lamp oil, pickaxes, shovels, and other gear. Amid the supplies, you see the body of a dwarf miner, dead for at least a week. The northeastern section of the cavern has collapsed, forming a ten-foot-wide, twenty-foot-deep pit. A sturdy hemp rope is tied off around a nearby stalagmite and dangles down the side of the pit, at the bottom of which is a rough-hewn tunnel heading northwest and east.
</p>


FYI: I copy/paste all my text from PDF into the GM text and then run a macro to format/replace text to the HTML...

Code:
<!-- Format PDF Text
Jamz: Currently based on the Emerald Spire module
-->
[h: heroLabToken = findToken("herolab")]
[h: levelLetter = getNotes(heroLabToken)]

[h: currentLocations="( " + levelLetter + "[0-9]+)( |\\.|,)"]

[h: pcNotesOrig = getNotes()]
[h: gmNotesOrig = getGMNotes()]
[h: output="Notes Updated:"]
[h: newLine="<br>&nbsp;&nbsp;&nbsp;&nbsp;"]
 
[h: id = strfind(pcNotesOrig, "(^[A-Z][0-9]+\\. .*?(?=\\n))((\\n|.)*)")]
[h, IF(0<getFindCount(id)),CODE: {
  [h: newName=trim(getGroup(id, 1, 1))]
  [h: pcNotesOrig=trim(getGroup(id, 1, 2))]
  [h: setName(newName)]
  [h: output=output+"<br>Name: "+newName+", "]
}]

[h: pcNotes = replace(pcNotesOrig, "(?<=[^\\.])\\n", " ")]
[h: pcNotes = replace(pcNotes, "\\n", newLine)]
[h: pcNotes = replace(pcNotes, "(DC [0-9]+)", "<FONT COLOR=RED><b>\$1</b></FONT>")]
[h: pcNotes = '<HR><FONT COLOR=GREEN SIZE=5><I>&nbsp;&nbsp;&nbsp;&nbsp;"' + pcNotes + '"</I></FONT><HR>']

[h: gmNotes = replace(gmNotesOrig, "(?<=[^\\.])\\n", " ")]
[h: gmNotes = replace(gmNotes, "\\n", newLine)]
[h: gmNotes = replace(gmNotes, "(Traps:|Trap:|Creatures:|Creature:|Development:)", "<b>\$1</b>")]
[h: gmNotes = replace(gmNotes, "(DC [0-9]+)", "<FONT COLOR=RED><b>\$1</b></FONT>")]
[h: gmNotes = replace(gmNotes, currentLocations, "<FONT COLOR=PURPLE><b>\$1</b></FONT> ")]
[h: gmNotes = replace(gmNotes, "(Treasure:)", "<FONT COLOR=BLUE><b>\$1</b></FONT>")]
[h: gmNotes = replace(gmNotes, "(Quest:)", "<FONT COLOR=MAROON><b>\$1</b></FONT>")]
[h: gmNotes = replace(gmNotes, "(Story Award:)", "<FONT COLOR=GREEN><b>\$1</b></FONT>")]
[h: gmNotes = "<FONT SIZE=4>&nbsp;&nbsp;&nbsp;&nbsp;" + gmNotes + "</FONT>"]

[h: setNotes(pcNotes)]
[h: setGMNotes(gmNotes)]

[h: setLayer("HIDDEN")]

{output}
<br><br>
[r: strformat(pcNotes)]
[r: strformat(gmNotes)]

_________________
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
More information here: MapTool Nerps! Fork | TokenTool Nerps! Fork
Custom TokenTool (version 1.0b33): TokenTool.exe


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 7859
Location: Bay Area
 Post subject: Re: GM Notes Style Tag
PostPosted: Mon Dec 12, 2016 1:53 am 
Ah, yeah, you're right. I wasn't thinking about the popup.

_________________
Downloads:


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 6 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 2 guests





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman