setGM/Notes() getGM/Notes() tokenID parameter

If you have an idea for a new feature, please discuss it in the main MapTool forum first, then post a summary of the discussion here. Use the first Sticky as a template.

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

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

setGM/Notes() getGM/Notes() tokenID parameter

Post by celestian »

So I was planning to use the GM notes section to "log" certain things for tokens but it seems you have to "select" the token you want to do this with... while I can do that I'd like to request a parameter on the function like the other get/set() functions (tokenID).

I want to create a "logit()" function and then use it in various macros (on various tokens).

Yes I can get the existing "Selected" then force select of the token I want to log to...in the UDF but, it just would be a lot simpler and cause less issues down the road, if we had a "tokenID" parameter in the set/get notes functions.

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

Re: setGM/Notes() getGM/Notes() tokenID parameter

Post by wolph42 »

first part: im not following you, are you talking about Wiki: switchToken() ?

and yes it would be easier if there was an optional parameter for get/setNotes to set tokID. But for now we have switchToken.

User avatar
RPTroll
TheBard
Posts: 3159
Joined: Tue Mar 21, 2006 7:26 pm
Location: Austin, Tx
Contact:

Re: setGM/Notes() getGM/Notes() tokenID parameter

Post by RPTroll »

Added as task 15.8 to https://docs.google.com/spreadsheets/d/ ... sp=sharing
15.8 Add tokenId to get/set GmNotes Macros Open http://forums.rptools.net/viewtopic.php?f=26&t=25887
ImageImage ImageImageImageImage
Support RPTools by shopping
Image
Image

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

Re: setGM/Notes() getGM/Notes() tokenID parameter

Post by aliasmask »

You can also do this:

[H, token(tokenId): setNotes("blah")]

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

Re: setGM/Notes() getGM/Notes() tokenID parameter

Post by celestian »

aliasmask wrote:You can also do this:

[H, token(tokenId): setNotes("blah")]
Oh, that works. I only have one question. Is there a way to do something like this?

Code: Select all

[previous = token("Lib:Log"): getGMNotes()]
I tried the above and it didn't seem to like it. What I am hoping to do is get the "previous" entries and then

Code: Select all

[H, token("Lib:Log"): setGMNotes(previous+" "+macro.args)]

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

Re: setGM/Notes() getGM/Notes() tokenID parameter

Post by aliasmask »

Well, it kind of depends. Obviously, GM notes are only accessible by the GM, so it needs to be a trusted macro and probably needs to be on the lib token. Another problem is that lib token will need to be on the current map. So, your example should work given those 2 factors.

I would probably use variables on the lib token to hold that info, but have a mouseover event write from the variable to the gm notes if that's where you want it.

ie

*writeGMNotes(never displayed): [H: udf.writeGMNotes()]

But that seems awkward to me. I use my own GM note system for running modules.

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: setGM/Notes() getGM/Notes() tokenID parameter

Post by JamzTheMan »

Did you try this? (untested but makes sense to me...)

Code: Select all

[token("Lib:Log"): previous = getGMNotes()]
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

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

Re: setGM/Notes() getGM/Notes() tokenID parameter

Post by celestian »

JamzTheMan wrote:Did you try this? (untested but makes sense to me...)

Code: Select all

[token("Lib:Log"): previous = getGMNotes()]
Hah! Works. Thanks ;)

That's a funny little trick, great to know!

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: setGM/Notes() getGM/Notes() tokenID parameter

Post by Jagged »

Code for setGM/Notes() getGM/Notes() submitted for 1.4

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: setGM/Notes() getGM/Notes() tokenID parameter

Post by JamzTheMan »

since the those functions existed, I assume you just added the id param?
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: setGM/Notes() getGM/Notes() tokenID parameter

Post by Jagged »

You've got me worried now, I am going to have to double check!

Notes had a separate class rather than sit in TokenProperties, so I moved the functions to TokenProperties, but forgot to clean up the redundant code :(

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: setGM/Notes() getGM/Notes() tokenID parameter

Post by JamzTheMan »

Jagged wrote:You've got me worried now, I am going to have to double check!

Notes had a separate class rather than sit in TokenProperties, so I moved the functions to TokenProperties, but forgot to clean up the redundant code :(
src\main\java\net\rptools\maptool\client\functions\TokenNoteFunctions.java?
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: setGM/Notes() getGM/Notes() tokenID parameter

Post by Jagged »

Yes.

If there is some reason why people would prefer to have a separate class for this rather than have it sit with the other token properties, I am happy to reconfigure it.

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: setGM/Notes() getGM/Notes() tokenID parameter

Post by JamzTheMan »

ah ok, sorry, misread the post. Did you add the id as a parameter as well?
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
Jagged
Great Wyrm
Posts: 1306
Joined: Mon Sep 15, 2008 9:27 am
Location: Bristol, UK

Re: setGM/Notes() getGM/Notes() tokenID parameter

Post by Jagged »

Yes.

Post Reply

Return to “Feature Requests”