setGM/Notes() getGM/Notes() tokenID parameter
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
setGM/Notes() getGM/Notes() tokenID parameter
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.
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.
Re: setGM/Notes() getGM/Notes() tokenID parameter
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.
and yes it would be easier if there was an optional parameter for get/setNotes to set tokID. But for now we have switchToken.
GETTING STARTED WITH MAPTOOLS - TUTORIALS, DOCS, VIDEOS, TOOLS, ETC
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
DISCORD (the new MT forum!)
My stuff
Excel Tools: Table and Light editors
MT Tools: Bag of Tricks: Tools for Maptool, Dungeon Builder I, Dungeon Builder II,onMouseOverEvent.
Frameworks: Dark Heresy, Rogue Trader, Deathwatch, Black Crusade, Only War, SET Card Game, RoboRally
Wiki: Debugging Tutorial, Speed Up Your Macros, Working With Two CODE Levels, Shortcut Keys, Avoiding Stack Overflow, READ THIS
Re: setGM/Notes() getGM/Notes() tokenID parameter
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
15.8 Add tokenId to get/set GmNotes Macros Open http://forums.rptools.net/viewtopic.php?f=26&t=25887
Re: setGM/Notes() getGM/Notes() tokenID parameter
You can also do this:
[H, token(tokenId): setNotes("blah")]
[H, token(tokenId): setNotes("blah")]
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: setGM/Notes() getGM/Notes() tokenID parameter
Oh, that works. I only have one question. Is there a way to do something like this?aliasmask wrote:You can also do this:
[H, token(tokenId): setNotes("blah")]
Code: Select all
[previous = token("Lib:Log"): getGMNotes()]
Code: Select all
[H, token("Lib:Log"): setGMNotes(previous+" "+macro.args)]
Re: setGM/Notes() getGM/Notes() tokenID parameter
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.
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.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: setGM/Notes() getGM/Notes() tokenID parameter
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
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
Re: setGM/Notes() getGM/Notes() tokenID parameter
Hah! Works. ThanksJamzTheMan wrote:Did you try this? (untested but makes sense to me...)
Code: Select all
[token("Lib:Log"): previous = getGMNotes()]
That's a funny little trick, great to know!
Re: setGM/Notes() getGM/Notes() tokenID parameter
Code for setGM/Notes() getGM/Notes() submitted for 1.4
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: setGM/Notes() getGM/Notes() tokenID parameter
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
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
Re: setGM/Notes() getGM/Notes() tokenID parameter
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
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
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: setGM/Notes() getGM/Notes() tokenID parameter
src\main\java\net\rptools\maptool\client\functions\TokenNoteFunctions.java?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
-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
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
Re: setGM/Notes() getGM/Notes() tokenID parameter
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.
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.
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: setGM/Notes() getGM/Notes() tokenID parameter
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
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork