Redrawing a player's frame
Moderators: dorpond, trevor, Azhrei
Redrawing a player's frame
Is it possible for the GM to have a player's frame (character sheet) redrawn from code.
In my situation each player has a frame showing his character sheet. On the sheet, the current movement mode is displayed on it (walk, climb, swim, etc) as well as the movement limit (30 feet, 15 feet, etc).
1. A player may chose to switch his movement to (e.g. from walking to climbing) by clicking on the climb check link on his PC sheet.
2. In the chat menu, his climb check roll is rolled and shown, as well as 2 GM only link buttons: Success & Failure.
3. If the GM clicks on the Success button, the players movement mode changes to Climb and his movement limit is set to 15 (feet per move action).
Is there a way to get the Player's character sheet frame to refresh itself after the GM clicks on the Success link?
In my situation each player has a frame showing his character sheet. On the sheet, the current movement mode is displayed on it (walk, climb, swim, etc) as well as the movement limit (30 feet, 15 feet, etc).
1. A player may chose to switch his movement to (e.g. from walking to climbing) by clicking on the climb check link on his PC sheet.
2. In the chat menu, his climb check roll is rolled and shown, as well as 2 GM only link buttons: Success & Failure.
3. If the GM clicks on the Success button, the players movement mode changes to Climb and his movement limit is set to 15 (feet per move action).
Is there a way to get the Player's character sheet frame to refresh itself after the GM clicks on the Success link?
- Bone White
- Great Wyrm
- Posts: 1124
- Joined: Tue Aug 23, 2011 11:41 am
- Location: Cornwall, UK
Re: Redrawing a player's frame
Yes, just call the frame again using the macro link. You can find information here Introduction_to_Dialogs_and_Frames
Re: Redrawing a player's frame
I guess I didn't make my self clear:
I know I can refresh a frame on the same machine by simply calling the macro that draws the frame, but I want the GM's action to refresh a frame on the Player's (a different person) computer.
Is there a way to send a command to another computer terminal to refresh it's frame (similar to broadcasting to a select audience).
I know I can refresh a frame on the same machine by simply calling the macro that draws the frame, but I want the GM's action to refresh a frame on the Player's (a different person) computer.
Is there a way to send a command to another computer terminal to refresh it's frame (similar to broadcasting to a select audience).
Re: Redrawing a player's frame
Yup. Broadcast a execlink to that PC. Read Wiki: broadcast() for more info
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: Redrawing a player's frame
I think that will do it.
Always a pleasure dealing with you gents.
Thanks.
Always a pleasure dealing with you gents.
Thanks.
Re: Redrawing a player's frame
Should I get same results of broadcast(link) with two clients running on one PC?
Re: Redrawing a player's frame
When you broadcast a link that has autoexecute checked it will auto run on all the client computer except the person who ran the macro. They will have to click the link. You can post to all other clients using Wiki: getAllPlayerNames() and subtract your name from list to avoid double post using Wiki: getPlayerName(). One way is like this.
The broadcast line posts "link" to the chat for the other clients and runs the link on your client. The "link" string value should have a macro link somewhere in there and the macro being called should have autoexec checked to run automatically for the other clients. Otherwise, they will have to manually click the link.
Code: Select all
[r: broadcast(link,json.difference(getAllPlayerNames("json"),json.append("",getPlayerName())),"json")]
[H: executeLink(link)]
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Redrawing a player's frame
note that i have a function available in the bag of tricks (link in sig) that deals with this. cant recall teh exact name of the function, but its documented in the manual.
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: Redrawing a player's frame
Thx for answers.
But this broadcast macro still doesn´t work. I dont have a clue, why.
-Autoexecute is chcecked.
-I´m using last version of MT (1.3.b90).
-I started two clients (Player1 and Player2) on my PC.
Macro should open new frame on client named Player2. But it still execute macro (open farame) on my (Player1) client.
Are there any other special options or is problem with my macro?
Wolph:
Searching in bag of trick was first thing which i did. Its function called: bot_execAllPlayers(). Anyway thx for your hard work wolph.
But this broadcast macro still doesn´t work. I dont have a clue, why.
-Autoexecute is chcecked.
-I´m using last version of MT (1.3.b90).
-I started two clients (Player1 and Player2) on my PC.
Macro should open new frame on client named Player2. But it still execute macro (open farame) on my (Player1) client.
Code: Select all
[h: broadcast(execLink(macroLinkText("FRAME@Lib:Token", "none", "", "Player2Token")),"Player2")]
Wolph:
Searching in bag of trick was first thing which i did. Its function called: bot_execAllPlayers(). Anyway thx for your hard work wolph.
Re: Redrawing a player's frame
bot_execAllPlayers()
indeed thats the function. And does it work when you use that?
indeed thats the function. And does it work when you use that?
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: Redrawing a player's frame
Nope, it made an -in body of roll- error.
I tried to make an lib:Token with update macro. And use example macro from Wiki: broadcast().
Error was occur anyway. (Doesn´t matter if macro update@lib:Token was blank, or not.) BoT was implemented right and function bot_execAllPlayer was defined. (I did it explicitly).
I tried to make an lib:Token with update macro. And use example macro from Wiki: broadcast().
Code: Select all
[h: bot_execAllPlayer("update@lib:Token", json.append("","Hello World", 2), "Player2", "all")]
Re: Redrawing a player's frame
can you link the campaign file here with your bot_execallplayers trial in it, so I can have a look?
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: Redrawing a player's frame
This wouldn't work because there is no output. If you create your link with macroLink you can then post it with broadcast and not use execLink. A link will show up in chat and execute on the other client, but the client who posted the link. You would have to click it yourself or use my code in an earlier post.Nertht wrote:Code: Select all
[h: broadcast(execLink(macroLinkText("FRAME@Lib:Token", "none", "", "Player2Token")),"Player2")]
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: Redrawing a player's frame
aliasmask:
Ah, ok. I inspired myself in Wiki: broadcast() tutorial, where stands:
Of course.
Download here
*Now I see, where can be a problem... Cause, I still speak, about direct running macro from my PC, without clicking on chat. Is it necessary players to click a link? Cause in that case, players can click it repeately and make a lot of mess. I thought, that direct running is possible with broadcast execLink.
Ah, ok. I inspired myself in Wiki: broadcast() tutorial, where stands:
wolph:Executing the macro 'update()' located at 'lib:Token', for the token 'Dragon' on the PC of user 'Tim':
[h: link = macroLinkText("update@Lib:Token", "none", "", "Dragon")]
[h: broadcast(execLink(link), "tim")]
Of course.
Download here
*Now I see, where can be a problem... Cause, I still speak, about direct running macro from my PC, without clicking on chat. Is it necessary players to click a link? Cause in that case, players can click it repeately and make a lot of mess. I thought, that direct running is possible with broadcast execLink.
Re: Redrawing a player's frame
itsNertht wrote:Nope, it made an -in body of roll- error.
I tried to make an lib:Token with update macro. And use example macro from Wiki: broadcast().Error was occur anyway. (Doesn´t matter if macro update@lib:Token was blank, or not.) BoT was implemented right and function bot_execAllPlayer was defined. (I did it explicitly).Code: Select all
[h: bot_execAllPlayer("update@lib:Token", json.append("","Hello World", 2), "Player2", "all")]
bot_execAllPlayers
if you correct that it works.
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