Slinging Dialog Boxes
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
Slinging Dialog Boxes
I was wondering if there was a way for one person could send a dialog box to another. Say, if a player had a macro which rolled dice. When they used the macro, it would open a dialog box for the GM to enter in a secret modifier, then return the entire result to the chat window... Things along those lines?
People are like a box of chocolates... yum...
Re: Slinging Dialog Boxes
I've never done it, except for on accident, but you can print a Wiki: macroLink() to chat and if the autoexec is checked for that macro, it will run the macro automatically for other users (but not yourself). I used to print a link to a spell for chat output so other can see the spell reference, but they said whenever it displayed the window would open automatically. I didn't realize this in development because it would not open for me that way.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Slinging Dialog Boxes
Short answer is "No, not trivially."
Long answer is what aliasmask says - macroLinks can do it, and if you structure your macros around that process, it can work.
Editorial comment: I would kill for this feature. I'd implement it myself but I'm not sure how to pipeline a command to a client. And, I'm sure, it wouldn't be like "Oh, just change this function to this one."
Long answer is what aliasmask says - macroLinks can do it, and if you structure your macros around that process, it can work.
Editorial comment: I would kill for this feature. I'd implement it myself but I'm not sure how to pipeline a command to a client. And, I'm sure, it wouldn't be like "Oh, just change this function to this one."
Re: Slinging Dialog Boxes
Isn't this pretty much what Lindsay's Handouts utility does?
"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: Slinging Dialog Boxes
Has this feature been suggested to development? Seems like a very useful module. If I could con my friend into creating it, I would, but Symantec keeps him so busy, he doesn't even have time to work on his own programs.Rumble wrote:Short answer is "No, not trivially."
Long answer is what aliasmask says - macroLinks can do it, and if you structure your macros around that process, it can work.
Editorial comment: I would kill for this feature. I'd implement it myself but I'm not sure how to pipeline a command to a client. And, I'm sure, it wouldn't be like "Oh, just change this function to this one."
What is 'Lindsay's Handouts utility'?
People are like a box of chocolates... yum...
Re: Slinging Dialog Boxes
I don't know if Lindsay's handouts does this - if you want to sling an input to another user, the assumption with input is that it's halting macro processing until said input is received.
As for "has it been suggested," I'm sure it has. One problem is that the devs were (IIRC) concerned with the potential to "spam" dialogs on another person's machine, but I don't know how valid that concern is.
As for "has it been suggested," I'm sure it has. One problem is that the devs were (IIRC) concerned with the potential to "spam" dialogs on another person's machine, but I don't know how valid that concern is.
Re: Slinging Dialog Boxes
Here. I haven't played around with it enough yet to explain anything to you, though.THUDGUN wrote:What is 'Lindsay's Handouts utility'?
And I wasn't thinking about the part where the Input dialog freezes the macro process until it's answered. I'm pretty sure Lindsay's don't do that; they just pop a dialog up on the other player's screen. The macro (if any) would continue.
"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: Slinging Dialog Boxes
Rumble wrote:I don't know if Lindsay's handouts does this - if you want to sling an input to another user, the assumption with input is that it's halting macro processing until said input is received.
As for "has it been suggested," I'm sure it has. One problem is that the devs were (IIRC) concerned with the potential to "spam" dialogs on another person's machine, but I don't know how valid that concern is.
I would hope that it would be easy to restrict traffic to just those people actually in the game, and if one of your players spams others, there's a boot feature...
People are like a box of chocolates... yum...
Re: Slinging Dialog Boxes
THUDGUN wrote:Rumble wrote:I don't know if Lindsay's handouts does this - if you want to sling an input to another user, the assumption with input is that it's halting macro processing until said input is received.
As for "has it been suggested," I'm sure it has. One problem is that the devs were (IIRC) concerned with the potential to "spam" dialogs on another person's machine, but I don't know how valid that concern is.
I would hope that it would be easy to restrict traffic to just those people actually in the game, and if one of your players spams others, there's a boot feature...
Oh, it is limited to those players. In fact, with trusted macros, you could restrict the ability to do so to only trusted macros (or make it a trusted function) so that the GM has final arbitration over how it works. Given the existing input function, it should be simple for someone experienced to fire the dialog to the right location. I just don't have enough knowledge of how one would execute macro code on another client to do it (it might be trivial, even).
Re: Slinging Dialog Boxes
I would think that would depend on how it's implemented. While I as a GM would love to have the ability to cause dialog boxes to pop up on my player's screens, I can't see any real use for the same as a player that can't be achieved by other means. So implementing such a feature for GMs only seems a reasonable work around.Rumble wrote:As for "has it been suggested," I'm sure it has. One problem is that the devs were (IIRC) concerned with the potential to "spam" dialogs on another person's machine, but I don't know how valid that concern is.
And after all, a player could do something similar right now with the existing chat window - programming up a macro to whisper a block of text to another player and repeatedly hitting it is quite do able now, and could be used to seriously "spam" another player. Yet I haven't seen any complaints here on how to deal with something like that.
Re: Slinging Dialog Boxes
I think the concern was not just how much you could spam the other player, but their computer. If one player has a computer that's already barely able to handle the campaign's framework, then having other players tax your computer more by making it run Input() functions or show Dialogs could be quite annoying.
I agree, though, that it's not something I'm terribly concerned about. I don't think it would get abused.
But I think this feature is do-able via current macros, so rather than changing MapTool to add it in, I think someone just needs to program a Drop-In Resource that creates the User-Defined Functions we need. Consulting programming geniuses like Lindsay or zEal may be required along the way.
I agree, though, that it's not something I'm terribly concerned about. I don't think it would get abused.
But I think this feature is do-able via current macros, so rather than changing MapTool to add it in, I think someone just needs to program a Drop-In Resource that creates the User-Defined Functions we need. Consulting programming geniuses like Lindsay or zEal may be required along the way.
"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: Slinging Dialog Boxes
It is doable. The essence is this (it was laid out by zEal a while back):
1. Macro 1 does some stuff, and then calls macro 2 and ends (I believe execLink() is required to make it work that way, but it works).
2. Macro 2 sends a macro link (via whisper) to the desired player, which is automatically executed and displays an input dialog. Player completes the input, and hits okay.
3. Macro 2 calls Macro 3 and passes the information gathered to it, so the whole sequence can finish processing.
I've gotten some details wrong here, but I think that's the essence. Lemme see if I can find the original post on it. It does work. I've never used it because it's too much of a hassle since every such request requires three macros, so if there are 3 points that there might be input of that nature, you end up with a chain of 8 or 9 macros to finish the process (though I think you could use a switch function or something like that to streamline it).
1. Macro 1 does some stuff, and then calls macro 2 and ends (I believe execLink() is required to make it work that way, but it works).
2. Macro 2 sends a macro link (via whisper) to the desired player, which is automatically executed and displays an input dialog. Player completes the input, and hits okay.
3. Macro 2 calls Macro 3 and passes the information gathered to it, so the whole sequence can finish processing.
I've gotten some details wrong here, but I think that's the essence. Lemme see if I can find the original post on it. It does work. I've never used it because it's too much of a hassle since every such request requires three macros, so if there are 3 points that there might be input of that nature, you end up with a chain of 8 or 9 macros to finish the process (though I think you could use a switch function or something like that to streamline it).
- CoveredInFish
- Demigod
- Posts: 3104
- Joined: Mon Jun 29, 2009 10:37 am
- Location: Germany
- Contact:
Re: Slinging Dialog Boxes
The greatest problem on implementing this with macros is this: you cant wait for the input. So you have to write 3 different macros for each task.
1) GM does something that needs input from player A. Send macroLink to A to show input.
2) send macro to ask for value and send back macroLink to GM to proceed.
3) GM finishes that calculation with value from A
Consider that you might have to send the initial data you wanted to process as well. While this is doable it is .. hmm .. clumsy. And from a programmers way it isnt fun to code such functions. It might be possible to create some generic tool that helps you perform step 2 but you still have to split every simple macro in 2 parts.
It would be so much better to have a function like remoteInput(player, inputFields, ..) that would pause the macro until the value was given. Maybe that is a problem with such a function too .. freeze a program and wait for network responses sounds to me like inviting fatal crashes (okay, they could of course time out ...)
I think as well that this will never make it into 1.3 but i hope 1.4 will have something like that.
(Somekind of ninja'd)
1) GM does something that needs input from player A. Send macroLink to A to show input.
2) send macro to ask for value and send back macroLink to GM to proceed.
3) GM finishes that calculation with value from A
Consider that you might have to send the initial data you wanted to process as well. While this is doable it is .. hmm .. clumsy. And from a programmers way it isnt fun to code such functions. It might be possible to create some generic tool that helps you perform step 2 but you still have to split every simple macro in 2 parts.
It would be so much better to have a function like remoteInput(player, inputFields, ..) that would pause the macro until the value was given. Maybe that is a problem with such a function too .. freeze a program and wait for network responses sounds to me like inviting fatal crashes (okay, they could of course time out ...)
I think as well that this will never make it into 1.3 but i hope 1.4 will have something like that.
(Somekind of ninja'd)
Re: Slinging Dialog Boxes
What about a function that listens to the chat window for a certain string?
For instance, the GM is listening for certain string of text generated by macros the players use. Some code... That process calls a macro to pop up a dialog box for the GM to input data, then it process and spits out the result to chat...
Sounds clumsy... I don't know if you can have this listening function run all the time, or if the GM has to look for the string, and then enact the function himself...
Of course it would be easier to just do the math and say what the result would be, but I like solving problems. I'm not ready to solve this problem, I just am looking for possible avenues to research.
For instance, the GM is listening for certain string of text generated by macros the players use. Some code... That process calls a macro to pop up a dialog box for the GM to input data, then it process and spits out the result to chat...
Sounds clumsy... I don't know if you can have this listening function run all the time, or if the GM has to look for the string, and then enact the function himself...
Of course it would be easier to just do the math and say what the result would be, but I like solving problems. I'm not ready to solve this problem, I just am looking for possible avenues to research.
People are like a box of chocolates... yum...