room numbering

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
FerretDave
Kobold
Posts: 22
Joined: Mon Feb 14, 2011 7:02 pm

room numbering

Post by FerretDave »

Greetings,
(3rd of a series of questions I need answers for, separate threads for clarity)

Having imported an image file from a PDF of a purchased map, all the room numbering has gone (must have been a separate layer in the PDF). I've read that adding numbered tokens (Torstan's Markers\Numbers and Letters) onto the hidden layer is the best approach, and allows room name (as the token name) and description to be added in as well.

The problem I've found is that I have to keep switching back to the hidden layer to mouseover and get the name, however if I put the tokens onto the object layer and make them 'GM visible only', they just get in the way of the PCs/NPCs.
Is there a different approach to this?
Ideally I'd use the text tool to add numbers directly, but those are player visible and I need to avoid that...

Also, I've got room numbers going up into hundreds - is there a larger set of numbered tokens already available or am I going to have spend some time with GIMP to create lots of tokens myself?

It would be nice if TokenTool had an option to enter text into a token image...

Cheers
Dave

User avatar
aliasmask
Deity
Posts: 8603
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: room numbering

Post by aliasmask »

What I've done in the past is make a lib file and put all the data on there. Usually a big list of descriptions in a macro. It's a bit more complicated than that, but essentially the same. Then I would have a generic token, visible to gm only and I would name it with the room number. In the campaign window I have a macro that would get the description from the lib token based on the token name and it would post it to chat. Optionally, I suppose you could post additional info for gm only in a frame popup. That way it takes care of describing the room to the players and will give you the relevant gm info to you in a movable popup. The best part is all the data is centrally located for easy entry. All you have to do is put down a generic token and rename it to the area you want to match your description. As you mentioned, PC tokens could get in the way, but you can move it slightly and once you get the popup, you don't have to mess with it anymore.

FerretDave
Kobold
Posts: 22
Joined: Mon Feb 14, 2011 7:02 pm

Re: room numbering

Post by FerretDave »

interesting, all the text in one place - how do you format that lib ? And is there any text size limit?
Could you share the macro please? I use MapTool for a face to face game, so don't need the chat window, but would like to understand how to get one token to lookup data elsewhere...

User avatar
aliasmask
Deity
Posts: 8603
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: room numbering

Post by aliasmask »

Well, what I currently have is heavily dependent upon other lib tokens namely libplayers. If I were to make it all on one lib token, I would change some things. I'll go ahead and toss out the key macros I use though and maybe you can do something with those.

This is the main macro. The token name should be something like A1 for the room id, but I generate output which can use the GM Name as the room description. am.play.output.room is my custom output macro but it essentially uses Wiki: broadcast(). So, you can come up with your own output method.

Code: Select all

<!-- lib.coc.description -->
[
H: info = getLibProperty("room."+token.name)]
[
H: title = getGMName()]
[
H, if(json.isEmpty(title)): title = "Room "+token.name]
[
H: description = json.get(info,"description")]
[
H, if(! json.isEmpty(description)): am.play.output.room(description,title)] 


I would probably simplify this by making the first "word" the room ID and the rest would be html until the end of line character. But this is how I did it for caves of chaos.

Code: Select all

<!-- lib.coc.initRoomDescriptions -->
[H: room = getProperty("room.A01")][H: setProperty("room.A01",json.set(room,"description","You enter a roughly cut tunnel that diverges ahead, offering two different paths. Several planks poke out of a pocket chamber to the northeast."))]
[H: room = getProperty("room.A02")][H: setProperty("room.A02",json.set(room,"description","Mound of garbage, waste, and offal foul the area."))]
[H: room = getProperty("room.A03")][H: setProperty("room.A03",json.set(room,"description","This storage area is filled with sacks, boxes, barrels, and piles of unidentifiable stuff, as well as a large wine cask.  The floor is covered with rotting, gnawed parts of humanoid bodies."))]
...


Just for giggles, this is my room output which is a part of my libplayers drop-in. This requires several other tokens and macros. But I include the html I use to format the output in this macro.

Code: Select all

[H: "<!-- output.room(chatText,tokenName,tokenImage) -->"]
[
H: chatText = arg(0)]
[
H, if(argCount() >= 2): tokenName = arg(1); tokenName = "Room"]
[
H, if(argCount() >= 3): tokenImage = arg(2); tokenImage = getImage("image:room")]
[
H: bgColor = "white"]
[
H: bgImage = getImage("image:fog")]
[
H: playerName = getPlayerName()]
[
H: chatText = replace(chatText,'"',"&quot;")]
[
H: chatText = "/rm"+chatText]
[
H: chatText = am.play.formatChatText(chatText,tokenName)]

[
H: output = strformat('
   <table style="padding:0px;border-style:solid;border-width:0pt;background-image:url(%s);background-color:%{bgColor};" width="100%%">
      <tr style="padding:0px;border-style:solid;border-width:1pt;" valign=top>
         <td width="40" style="padding-right: 5px"><img src="%{tokenImage}-50" alt="%{playerName}" /></td>
         <td style="margin-right: 5px;" width="100%%"><span id="icc">%{chatText}</span></td>
      </tr>
   </table>
'
,bgImage)]
[
H: am.play.output(output)] 


All my macros are UDFs if you're confused by some of the function calls.

FerretDave
Kobold
Posts: 22
Joined: Mon Feb 14, 2011 7:02 pm

Re: room numbering

Post by FerretDave »

Thanks for that, I'll need to read up on Macros before I delve into that I think...

FerretDave
Kobold
Posts: 22
Joined: Mon Feb 14, 2011 7:02 pm

Re: room numbering

Post by FerretDave »

Renamed one of Torstans 'scroll' pictures to 'RM ' (for 'room'), and added that allowing the token name to be automatically renamed with an incrementing number.

Read that re-using one token repeatedly is *much* better than using lots of different tokens.

And once all the 'Room' tokens are on, the room numbers are there and the description can be added directly onto the Token, so I dont *need* the room number to refer back to the original adventure book anyway...

Akodo Makama
Giant
Posts: 249
Joined: Mon Apr 20, 2009 9:31 pm

Re: room numbering

Post by Akodo Makama »

FerretDave wrote:The problem I've found is that I have to keep switching back to the hidden layer to mouseover and get the name, however if I put the tokens onto the object layer and make them 'GM visible only', they just get in the way of the PCs/NPCs.
Is there a different approach to this?


Use the 'Notes' field on the token. When the token is not on the current layer, the text in that field will become visible in a popup when you click on the token. You can have general player notes (room is dark and covered in slime) and GM hidden notes (slime does 4d6 electric damage per round when trap is sprung). It also allows for simple HTML formatting (paragraphs, bold, tables): You can put all the room info in there and not have to look anything up in the PDF. Put it on the hidden layer for GM use only, or the background layer to allow players to see the notes intended for them. Either way, it won't interfere with tokens and movement.

FerretDave
Kobold
Posts: 22
Joined: Mon Feb 14, 2011 7:02 pm

Re: room numbering

Post by FerretDave »

Ah! so a click rather than a mouseover, but that works nicely, thank you.

Would be nice if a mouseover gave it's name regardless of the layer it's on, but I guess there was a design decision for that?

Akodo Makama
Giant
Posts: 249
Joined: Mon Apr 20, 2009 9:31 pm

Re: room numbering

Post by Akodo Makama »

FerretDave wrote:... I guess there was a design decision for that?

A lot of people (myself included) make maps by placing individual elements (like Torstan's Walls) repeatedly on the background and object layers. This lets us repeat the same image many times (saving both space in the file and time for the players to download), while still having a good-looking map. But, if every image showed it's name when mousing over it, there would constantly be names popping up and going away every time the mouse moved. Plus, players might be able to see where I put two four-space walls instead of one eight space wall, and deduce that there might be something worth investigating (especially if one is named "Hidden Door").

FerretDave
Kobold
Posts: 22
Joined: Mon Feb 14, 2011 7:02 pm

Re: room numbering

Post by FerretDave »

! oops! of course, that's a darn good point...

ok, perhaps an *option* to get the mouseover text displayed is more of what I'm after :-)

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

Re: room numbering

Post by Azhrei »

One thing being considered is a "build mode" vs. a "play mode". The GM would use build mode to create the maps and (maybe?) test what they look like from a client, but when they actually want to run the game they'd use play mode. This would allow play mode to reset things done in build mode (like FOW), could reset all maps to be Not Visible to players initially, and so on. It also would allow the toolbars to be more focused so that they wouldn't need to have every possible function on them and would similarly allow the same hotkey to be used for different things in different modes (not too sure about that last part; that could be confusing).

User avatar
aliasmask
Deity
Posts: 8603
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: room numbering

Post by aliasmask »

Azhrei wrote:One thing being considered is a "build mode" vs. a "play mode". The GM would use build mode to create the maps and (maybe?) test what they look like from a client, but when they actually want to run the game they'd use play mode. This would allow play mode to reset things done in build mode (like FOW), could reset all maps to be Not Visible to players initially, and so on. It also would allow the toolbars to be more focused so that they wouldn't need to have every possible function on them and would similarly allow the same hotkey to be used for different things in different modes (not too sure about that last part; that could be confusing).

That would be very useful. As I recall the plan was to have many layers and the gm would just define the layer type. So you could have 2 background layers, but one would be above the other. That would help with the existing drawing tools. I guess drawings would/could have multiple layers too?

User avatar
wolph42
Deity
Posts: 9779
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: room numbering

Post by wolph42 »

Azhrei wrote:One thing being considered is a "build mode" vs. a "play mode". The GM would use build mode to create the maps and (maybe?) test what they look like from a client, but when they actually want to run the game they'd use play mode. This would allow play mode to reset things done in build mode (like FOW), could reset all maps to be Not Visible to players initially, and so on. It also would allow the toolbars to be more focused so that they wouldn't need to have every possible function on them and would similarly allow the same hotkey to be used for different things in different modes (not too sure about that last part; that could be confusing).


keep in mind that there are gm's who like to do things on the fly, so changing the menu in 'use' mode might not be something entirely desirable. the other stuff sounds solid!

Post Reply

Return to “MapTool”