Good call. Yeah, I think when I wrote claim that I wasn't thinking straight. Anyway, that's definitely reproducible, I'm thinking with a click on the associated portrait, limited by ownership/GM status. Should not be overly hard to code that up.Raoden wrote:What about the ability to double-click on a token to center your view on it and select it? I like what we're doing here, but Rumble might be right -- the default Init panel has a lot of bells and whistles attached to it already.
Stand alone init frame [Dev]
Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice
Re: Stand alone init frame
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).
Re: Stand alone init frame
Can players even click it if you turn off Owner Permissions? I don't think so...aliasmask wrote:But I'm more worried about the players doing it rather than me.Raoden wrote:It's an ugly solution, but I suppose you could always just make a dummy Frame, make it tiny, and plop it over the default "Next" button.
Re: Stand alone init frame
Updated version with the click to center and select (works only in b68), appearance a little cleaner, and with some initial configurable display preferences.
- Attachments
-
- lib_init.rptok
- (675.09 KiB) Downloaded 71 times
-
- Add Token To Init.mtmacro
- (724 Bytes) Downloaded 69 times
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).
Re: Stand alone init frame
No new version quite yet, but I fiddled with this a bit more, and now have it set to allow individual user display settings including table width, picture size, etc. The GM settings are used until the player sets some of his own, saved according to their current player name.
I've also started setting up a suite of GM options for restricting information and access to what non-GM's can see. Still working on that one, but I think I'm making good progress.
Just a couple of issues have come to mind as I've been working on this:
1. The built-in init panel updates to all clients when changes happen. Any thought on how to do this efficiently and without sending out too much crap to the chatlog in the process?
2. Currently works via macroLink() in a frame, which requires an output parameter. Any thoughts on how best to all for something like the current function where players receiving init spits a message to the chatlog but npcs getting it does not?
I've also started setting up a suite of GM options for restricting information and access to what non-GM's can see. Still working on that one, but I think I'm making good progress.
Just a couple of issues have come to mind as I've been working on this:
1. The built-in init panel updates to all clients when changes happen. Any thought on how to do this efficiently and without sending out too much crap to the chatlog in the process?
2. Currently works via macroLink() in a frame, which requires an output parameter. Any thoughts on how best to all for something like the current function where players receiving init spits a message to the chatlog but npcs getting it does not?
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).
Re: Stand alone init frame
Typically, NPCs don't have owners... so I'd make an owner check and send message to owner(s) when it becomes it's turn... or just don't send a message if token is NPC. But, with the macroLink updates to the other players they will get a blank line anyway.
But, a way to do it without sending a link via chat would be to set mouseover call to update from a lib token. I'm not sure about the few event that are available like onChangeSelection but I think there is a onTokenChange or something like that could work. Changing a property of that token could trigger in the frame an update.
But, a way to do it without sending a link via chat would be to set mouseover call to update from a lib token. I'm not sure about the few event that are available like onChangeSelection but I think there is a onTokenChange or something like that could work. Changing a property of that token could trigger in the frame an update.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Stand alone init frame
Interesting idea, but wouldn't it only work if the Lib token in question is on the current map?aliasmask wrote:But, a way to do it without sending a link via chat would be to set mouseover call to update from a lib token. I'm not sure about the few event that are available like onChangeSelection but I think there is a onTokenChange or something like that could work. Changing a property of that token could trigger in the frame an update.
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G. K. Chesterton
Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0
- G. K. Chesterton
Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0
Re: Stand alone init frame
I'm thinking if any frame, server or client has onChangeToken() then all you need to do is update any token that client/server can see (I don't know if it updates for tokens you can't see) and then it will run whatever code you want. I've never used onChangeToken() before, so I'm a little sketchy on implementation, but in theory it should work. Since token changes happen alot, you'll need to make some checks at the beginning as to not tax your system. I would say put your code on a lib token. The first check would be to test for that lib token's updates. Then test a property on that lib token, perhaps updateInit = 0/1? Set to 1 when ever there is an init change using the macro button.... hmm I just had a thought. If we set on that lib currentInit = tokenid and mapInit = [getInitiativeToken()] and make the next check to see if those match, we wouldn't need a different NEXT button to hook in to it. There would definitely need to be some experimentation to see if it can work on a different a map than the lib file is on. But this sounds promising.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Stand alone init frame
Yeah, if anybody has definitive info on how (if it exists) the onChangeToken() or onTokenChange() functions work, that would be very handy. I'm thinking, since all the data is stored on the lib, then whenever anything changes on the lib it should update the frames. But I've tried onChangeToken("Lib:init") in place of onChangeSelection() (which works) and yet the frames aren't updating.
The good news: I've gotten a ton of cool stuff working, and even figured out how to report to all players if and only if a PC get initiative.
In short, it's really coming along, but if I can't get this auto-updating thing going, the panel will be all but useless.
HELP!!!!
EDIT: I found this page: http://lmwcs.com/rptools/wiki/User:Verisimilar/Projects
and this seems to suggest there's no () associated with onChangeToken. This implies to my mind that this will fire the macro whenever ANY token is changed, or else when the currently selected token is changed. If the former, could be a major performance issue. If the latter, I might have to find some workaround using selectTokens() or something. Hmmmm.
The good news: I've gotten a ton of cool stuff working, and even figured out how to report to all players if and only if a PC get initiative.
In short, it's really coming along, but if I can't get this auto-updating thing going, the panel will be all but useless.
HELP!!!!
EDIT: I found this page: http://lmwcs.com/rptools/wiki/User:Verisimilar/Projects
and this seems to suggest there's no () associated with onChangeToken. This implies to my mind that this will fire the macro whenever ANY token is changed, or else when the currently selected token is changed. If the former, could be a major performance issue. If the latter, I might have to find some workaround using selectTokens() or something. Hmmmm.
Last edited by plothos on Mon Jun 14, 2010 4:20 pm, edited 1 time in total.
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).
- CoveredInFish
- Demigod
- Posts: 3104
- Joined: Mon Jun 29, 2009 10:37 am
- Location: Germany
- Contact:
Re: Stand alone init frame
It should work exactly as onSelectionChange. There is no function - its a html header entry. See my sticky.
I did not play around with this more .. so no help from me further than this.
I did not play around with this more .. so no help from me further than this.
Re: Stand alone init frame
So ... it fires anytime any Token is changed?
"Fairy tales do not tell children the dragons exist. Children already know that dragons exist. Fairy tales tell children the dragons can be killed."
- G. K. Chesterton
Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0
- G. K. Chesterton
Wonderful HTML/CSS reference * Color Manager * Token Manager 2.0
Re: Stand alone init frame
Using onChangeToken now seems to work... mostly. It's updating and seems not to be firing too frequently, but it only works when you have a token selected. I added onChangeSelection as well, so that now it'll update when you select something, which will usually be required before do anything. And you'll still get updates when a PC gets init, even if your panel isn't updating. It's very awkward, and I'm worried about performance hits, but it's working okay.
Last edited by plothos on Mon Jun 14, 2010 4:47 pm, edited 1 time in total.
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).
Re: Stand alone init frame
Yeah, the way I have it set up it's firing based on changes to any token.Raoden wrote:So ... it fires anytime any Token is changed?
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).
Re: Stand alone init frame
Okay, here's the updated lib.
Features:
Features:
- 1. Tracks initiative of tokens and "events" which is intended for periodically recurring game elements like spell effects, evironmental elements, etc. Events can receive a "duration" which will decrease by 1 when the even receives initiative.
2. Entries can be bumped up or down, or resorted by manually changing their initiative count.
3. Display settings allow for customization, and are player-specific, so each player can set it up how they like it.
4. Player access settings allow the GM to limit what players can do and how much they see. If tokens or events are hidden from players, they show up in italics in the GM's panel as a reminder.
5. When a PC receives initiative all users get a notification, otherwise the panel is silent.
6. If a player has the panel open, it will update whenever a token or your selection changes, though you must have a token selected for this to occur.
7. Portraits are shown for tokens, if available, otherwise the token image is used.
8. Events show a big E instead, and non-event entries (i.e. mystery tokens and such, show a silhouette image).
9. Clicking a token's image will center the map on the token, and if using b68 or later will select said token as well (earlier version will not break, but will spit an undefined function message to the clicker's log).
- Attachments
-
- Display Init Panel.mtmacro
- (715 Bytes) Downloaded 78 times
-
- Add Token To Init.mtmacro
- (724 Bytes) Downloaded 65 times
-
- lib_init.rptok
- (678.02 KiB) Downloaded 69 times
Last edited by plothos on Mon Jun 14, 2010 5:13 pm, edited 1 time in total.
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).
- CoveredInFish
- Demigod
- Posts: 3104
- Joined: Mon Jun 29, 2009 10:37 am
- Location: Germany
- Contact:
Re: Stand alone init frame
I played a little bit around with onChangeToken. The id of the token changed is appended to the macro.args. It seems like its really concatenated to it as string. So when I set macro.args my self in the macroLinkText()-call it probably messes things up.
whatITried
Code: Select all
[frame("onChange"): {
<html>
<head>
<title>onChange</title>
[h: link = macroLinkText("onChange@CAMPAIGN", "none")]
<link rel='onChangeToken' type='macro' href='[r:link]'>
</head>
<body>
<pre>[r:macro.args]</pre>
</body>
</html>
}]
Re: Stand alone init frame
Playing around with this further, onChangeToken is a little wonky. I had a server and a client on the same PC. I would advance init and toggle back and forth between these to see if the frame was updated for the client. Just constantly advancing init usually but not always updated the client's panel. There seemed to be no rhyme nor reason to when it would fail to update. This is especially odd, since advancing init will always change the Lib's property "Initcount". Still, it's firing the vast majority of the time, and with selection changes also going on it seems to be working fairly well.
Also, I have yet to see it fail when a PC is reported to have init, so hopefully anytime anybody needs to move their token they'll get a fresh init panel. That's something, at least.
What I would really really like (attn. Azhrei!) is a function onChangeToken(id) that would let me specify a particular token that forces the updates.... and of course that reliably does it upon such changes.
Also, I have yet to see it fail when a PC is reported to have init, so hopefully anytime anybody needs to move their token they'll get a fresh init panel. That's something, at least.
What I would really really like (attn. Azhrei!) is a function onChangeToken(id) that would let me specify a particular token that forces the updates.... and of course that reliably does it upon such changes.
Drop-In Utilities:
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).
My Spell Manager for D&D3.5 and PFRPG
My Inventory Manager for D&D and PFRPG, but more generally useable than that.
My Message Manager -- My Top-Down D&D Token Images
and my Custom Initiative & Status/Spell-Effect Tracker (work in progress, but functional).