Plo's Message Manager

These are tools and utilities that make it easier to run games. This includes Lib: macro tokens dropped into MapTool to manage the game, a conversion file for CharacterTool to allow use in MapTool, or just about anything else you can think of -- except graphics with macros and anything specific to a particular campaign framework. Those are already covered by the Tilesets subforum and the Links and External Resources forum.

Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice

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

Re: Plo's Message Manager

Post by aliasmask »

Depends on the application, but a built in way is to do: assetid-## which is the width. But if using an image tag, then specify height and width.

User avatar
Guy Dude
Giant
Posts: 124
Joined: Thu Apr 09, 2009 4:10 pm

Re: Plo's Message Manager

Post by Guy Dude »

couldnt figure out the assetid:## thing.


using this for a title, it doesnt accept percentages:
<img src="asset://blahblah" width=10 height=10>

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

Re: Plo's Message Manager

Post by aliasmask »

Oh, you can't put images in the title, I've tried. You can't (edit) use any html assuming you're talking about a title of a frame. You can't use percentages for height/width. The number should be in quotes and represent the number of pixels. The assetId-## is a shortcut format only used in a very few places in MT. The -## part is the width in pixels and the height sizes with the aspect ratio of image.
Last edited by aliasmask on Sat Jan 01, 2011 3:08 am, edited 1 time in total.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Plo's Message Manager

Post by Azhrei »

Yeah, I had originally envisioned modifying the asset id URL so that it could contain something like ?width=## and ?height=## but that turned out to be much more involved that I expected so I dropped that idea for 1.3.

User avatar
Guy Dude
Giant
Posts: 124
Joined: Thu Apr 09, 2009 4:10 pm

Re: Plo's Message Manager

Post by Guy Dude »

aliasmask wrote:Oh, you can't put images in the title, I've tried. You can't (edit) use any html assuming you're talking about a title of a frame. You can't use percentages for height/width. The number should be in quotes and represent the number of pixels. The assetId-## is a shortcut format only used in a very few places in MT. The -## part is the width in pixels and the height sizes with the aspect ratio of image.
It's not the title of the frame. I edited it so that all messages appear in the "Messages" frame.

Image
Image

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

Re: Plo's Message Manager

Post by aliasmask »

You can do this:

Code: Select all

<img src="[r: getTokenImage()]-100">
<!-- OR -->
<img src="[r: getTokenImage()]" height="100" width="100">

User avatar
Guy Dude
Giant
Posts: 124
Joined: Thu Apr 09, 2009 4:10 pm

Re: Plo's Message Manager

Post by Guy Dude »

aliasmask wrote:You can do this:

Code: Select all

<img src="[r: getTokenImage()]-100">
<!-- OR -->
<img src="[r: getTokenImage()]" height="100" width="100">
wouldnt that do the same thing as
Guy Dude wrote:using this for a title, because it doesnt accept percentages:
<img src="asset://blahblah" width=100 height=100>

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

Re: Plo's Message Manager

Post by aliasmask »

Guy Dude wrote:
aliasmask wrote:You can do this:

Code: Select all

<img src="[r: getTokenImage()]-100">
<!-- OR -->
<img src="[r: getTokenImage()]" height="100" width="100">
wouldnt that do the same thing as
Guy Dude wrote:using this for a title, because it doesnt accept percentages:
<img src="asset://blahblah" width=100 height=100>
Right, but it's not percentages, just pixels. Also, using the built in method, it will scale it correctly while the height/width doesn't scale. So, if you don't know the dimensions and it's not square, then you would see a distortion. So, if the height is 200px and width=100px, putting -100 will look good while height/width=100 would not.

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Plo's Message Manager

Post by Azhrei »

aliasmask wrote:You can't use percentages for height/width.
I just used this and it worked:

Code: Select all

[h: img = getTokenImage()]
<img src="[r: img]" width="200%"> 
Is that somehow different from what you tried?

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

Re: Plo's Message Manager

Post by aliasmask »

Azhrei wrote:
aliasmask wrote:You can't use percentages for height/width.
I just used this and it worked:

Code: Select all

[h: img = getTokenImage()]
<img src="[r: img]" width="200%"> 
Is that somehow different from what you tried?
I tried this on an impersonated token to no avail:

Code: Select all

[frame("D"):{<img src="[r: getTokenImage()]" width="200%"><br><img src="[r: getTokenImage()]" width="50%">}]

User avatar
Azhrei
Site Admin
Posts: 12086
Joined: Mon Jun 12, 2006 1:20 pm
Location: Tampa, FL

Re: Plo's Message Manager

Post by Azhrei »

aliasmask wrote:I tried this on an impersonated token to no avail:
Heh, I should've checked my original image sizes. lol

It seems my original image was 100px and the one in the chat window is limited to 40px. So when I tried mine and an image came up that appeared to be twice as large, I figured the "200%" was working. It isn't. :roll:

Not sure why it isn't, except that there are a few CSS attributes that fail for specific HTML elements. I know width failed for some elements, margin fails for others, and float fails for all of them. But I don't remember the specific combinations.

Oh well. Not something that will be fixed in 1.3 if it's embedded in the Java library.

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

Re: Plo's Message Manager

Post by aliasmask »

On an unrelated note. This is a way to have an image and have a zoom of image after you mouse over it:

Code: Select all

[frame("D"):{<img alt="<html><img src='[r: getTokenImage())]'></html>" src="[r: getTokenImage()]-50">}]

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

Re: Plo's Message Manager

Post by aliasmask »

I thought it may be useful if Players could take notes during the game as well with this tool so I did a little mod to allow it.
/// Updates \\\

Code: Select all

v1.1 Updates
* Changed campaign button name to NOTES
* Updated code so Players can use.
* GM can view/edit player notes by selecting "PC" token and clicking NOTES button
* GM can view/edit campaign notes by selecting "NPC" token and clicking NOTES button
* Added image to View Notes so GM will know which token is being updated
Attachments
Message Manager v1.1 MT1.3b86.rptok
MT 1.3b86
(210.73 KiB) Downloaded 118 times

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

Re: Plo's Message Manager

Post by aliasmask »

I was having a problem with the gm options and selecting or not selecting tokens on other maps, so I did this update:
||| Updates |||

Code: Select all

v1.1 Updates
* Changed campaign button name to NOTES
* Updated code so Players can use.
* GM can view/edit player notes by selecting "PC" token and clicking NOTES button
* GM can view/edit campaign notes by selecting "NPC" token and clicking NOTES button
* Added image to View Notes so GM will know which token is being updated

1.1a fixed edit bug
1.1b fixed not being on same map as lib and using open frame while not selecting a token (gm only function)
Let me know if you find any bugs. btw, not being able to add/edit message while you're not on the map of the token is not an error. I just haven't created a nice descriptive error message for that yet.
Attachments
MessageManager 1.1b.rptok
(210.97 KiB) Downloaded 143 times

Post Reply

Return to “Drop-In Macro Resources”