Veg 2.32 Bug: Auto-applying states IF token is selected
Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice
Veg 2.32 Bug: Auto-applying states IF token is selected
One of the highlights of the new framework is the "Click to toggle" states options. Very cool.
With a power that has a "Click to toggle" state attached: Any token currently selected by any player at the table receives the state WITHOUT CLICKING THE LINK
Situation:
1) Player A, B, and C have selected their own token.
2) Player D executes a power macro that has a "Click to Toggle" option (Slowed, for example).
3) The slowed state is then applied to Tokens A, B, and C (and possibly any tokens the DM has selected)
Steps to Replicate:
1) Have two or more players logged into MT.
2) Have Player A select a token.
3) Have Player B execute a power with a Click to Toggle state. (Result: Auto Application)
WILL NOT REPLICATE:
1) As above, 2 players in MT
2) Player A selects a token
3) Player B impersonates a different token.
4) Player A executes a power with state (Result: No auto application)
Bug?
With a power that has a "Click to toggle" state attached: Any token currently selected by any player at the table receives the state WITHOUT CLICKING THE LINK
Situation:
1) Player A, B, and C have selected their own token.
2) Player D executes a power macro that has a "Click to Toggle" option (Slowed, for example).
3) The slowed state is then applied to Tokens A, B, and C (and possibly any tokens the DM has selected)
Steps to Replicate:
1) Have two or more players logged into MT.
2) Have Player A select a token.
3) Have Player B execute a power with a Click to Toggle state. (Result: Auto Application)
WILL NOT REPLICATE:
1) As above, 2 players in MT
2) Player A selects a token
3) Player B impersonates a different token.
4) Player A executes a power with state (Result: No auto application)
Bug?
Re: Veg 2.32 Bug: Auto-applying states IF token is selected
just out of curiosity, but how do you do that? (code wise I mean).
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
- Veggiesama
- Dragon
- Posts: 619
- Joined: Wed Aug 29, 2007 1:18 am
Re: Veg 2.32 Bug: Auto-applying states IF token is selected
GREAT CATCH. There is no way I would have found that bug by myself.
It was a wild goose chase, but I found the culprit. Wasn't a problem with the code at all. Turns out the properties of one of my macro buttons was screwed up.
Fixed for 2.33, but if you want to fix it right now, click on Lib:Veg, scroll down to the toggleStates button under the powerMacros group (it's in red, very last one). Right click the macro button, edit it, and UNCHECK the box that says "Auto Execute"
It was a wild goose chase, but I found the culprit. Wasn't a problem with the code at all. Turns out the properties of one of my macro buttons was screwed up.
Fixed for 2.33, but if you want to fix it right now, click on Lib:Veg, scroll down to the toggleStates button under the powerMacros group (it's in red, very last one). Right click the macro button, edit it, and UNCHECK the box that says "Auto Execute"
My D&D 4e Campaign Framework — My Shadowrun 4e Campaign Framework
RPGA#: 5223846427 — Skype: Veggiesama — Fear the ferret.
RPGA#: 5223846427 — Skype: Veggiesama — Fear the ferret.
Re: Veg 2.32 Bug: Auto-applying states IF token is selected
Have I earned my "Junior Veg Assistant" Merit badge yet? I feel bad that a majority of the posts so far have been 1) by me and 2) saying "great work but......"
- Veggiesama
- Dragon
- Posts: 619
- Joined: Wed Aug 29, 2007 1:18 am
Re: Veg 2.32 Bug: Auto-applying states IF token is selected
Cleaned up my code a little to demonstrate (hopefully the formatting isn't too distracting):wolph42 wrote:just out of curiosity, but how do you do that? (code wise I mean).
Put toggleState on a library token (let's call it Lib:Token):
Code: Select all
<!-- Veggiesama's toggleState macro, MapTool B70 -->
[H: state = macro.args]
[H: currentStatus = getState(state)]
[H: setState(state, !currentStatus)]
Code: Select all
<!-- Veggiesama's showMacroLink macro, MapTool B74 -->
[H: state = "Your state's name here"]
[H: lib = "Lib:Token"]
<table><tr bgcolor='#D6D7C6'><td><i>
Click to toggle
</i></td>
<td>
<img height=15 width=15 src='[R: getStateImage(state)]'></img>
</td><td><b>
[R: macroLink(state, "toggleState@"+lib, "none", state, "selected")]
</b></td>
<td><i>
on Selected Target(s)
</i></td></tr></table>
My D&D 4e Campaign Framework — My Shadowrun 4e Campaign Framework
RPGA#: 5223846427 — Skype: Veggiesama — Fear the ferret.
RPGA#: 5223846427 — Skype: Veggiesama — Fear the ferret.
- Veggiesama
- Dragon
- Posts: 619
- Joined: Wed Aug 29, 2007 1:18 am
Re: Veg 2.32 Bug: Auto-applying states IF token is selected
Heheh. No sweat, though. More bug reports => more fixed bugs => better framework. Besides, I need the exercise.MHolman wrote:Have I earned my "Junior Veg Assistant" Merit badge yet? I feel bad that a majority of the posts so far have been 1) by me and 2) saying "great work but......"
My D&D 4e Campaign Framework — My Shadowrun 4e Campaign Framework
RPGA#: 5223846427 — Skype: Veggiesama — Fear the ferret.
RPGA#: 5223846427 — Skype: Veggiesama — Fear the ferret.
Re: Veg 2.32 Bug: Auto-applying states IF token is selected
that's it? Which part makes it 'you don't need to click the link' ?Code: Select all
[R: macroLink(state, "toggleState@"+lib, "none", state, "selected")]
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: Veg 2.32 Bug: Auto-applying states IF token is selected
Piggybacking on what the poster above me asked (sort of):
I designed a new state in GIMP. It has been added to the campaign properties. What is the easiest/most straightforward way to make it so that my new state can be toggled through the Power Macro interface?
In other words: How can I add my states to the wonderful list/G.U.I. that you and Ady build?
I designed a new state in GIMP. It has been added to the campaign properties. What is the easiest/most straightforward way to make it so that my new state can be toggled through the Power Macro interface?
In other words: How can I add my states to the wonderful list/G.U.I. that you and Ady build?
- Veggiesama
- Dragon
- Posts: 619
- Joined: Wed Aug 29, 2007 1:18 am
Re: Veg 2.32 Bug: Auto-applying states IF token is selected
I'm not sure I follow.wolph42 wrote:that's it? Which part makes it 'you don't need to click the link' ?
For what it's worth, I had no idea Wiki: macroLink() did any sort of auto-executing until I read the fine print of its wiki page's introduction a few hours ago.
The wiki still left some to be desired, so I unearthed a post where Craig talked about the function here. Still didn't solve my problem, but I stumbled across the "Auto Execute" checkbox on my own.
Anyway, it's a weird function. Seems like two functions rolled into one (1. clickable macro text, 2. auto-execution of macros on other people's machines). Anyway, enough complaining.
It's so easy you'll smack yourself. Add it like normal to the campaign properties, double-click on Lib:Veg. Under properties, look for the properties named STATES_****** (where *** is main, quarry, etc.). Add your new state's name to the list. All done.MHolman wrote:In other words: How can I add my states to the wonderful list/G.U.I. that you and Ady build?
My D&D 4e Campaign Framework — My Shadowrun 4e Campaign Framework
RPGA#: 5223846427 — Skype: Veggiesama — Fear the ferret.
RPGA#: 5223846427 — Skype: Veggiesama — Fear the ferret.
Re: Veg 2.32 Bug: Auto-applying states IF token is selected
Hope this has not been discussed, if so please forgive and you may point me in the right direction. I have a monk, and one of his powers, flurry of blows, does damage by the trigger of hitting. I went to set up a power for this but couldn't figure out how to simple apply the damage without actually making an attack roll. Is there a way to create a power without an attack roll and only damage? Thanks.
--DOC
Re: Veg 2.32 Bug: Auto-applying states IF token is selected
Without a separate line of code (which, if I recall, is rather complex), the framework does not support automatic application of damage (if that is what you're asking for).Doc_Waldo wrote:Hope this has not been discussed, if so please forgive and you may point me in the right direction. I have a monk, and one of his powers, flurry of blows, does damage by the trigger of hitting. I went to set up a power for this but couldn't figure out how to simple apply the damage without actually making an attack roll. Is there a way to create a power without an attack roll and only damage? Thanks.
However, to create a macro that simply outputs a damage calculation....here are two options that you could use.
Option 1) Do everything as normal for creating an Attack Power macro. Do NOT put anything into the "Primary Attack" section (or any other attack). On execution, select whatever lines you want displayed. In the Custom Code tab, select "Has custom code" and put something to the effect of:
</i> The larget takes damage equal to [3+StrBonus]. <br> If the target wasn't targeted by the triggering attack. the damage increases by 2/4/6"
MAKE THE POWER SUPPLEMENTAL
Option 2) Do NOT use the Create Macro interface. Instead, on a blank spot of your selection screen, right click and select "Add new macro" from the menu. The desired macro might look something like this:
<b> Centered Flurry of Blows</b> does [3+StrBonus] additional damage. <br> If the target wasn't targeted by the triggering attack, the damage equals [3+StrBonus+2/4/6)
This macro is very light and will process quickly. It will not have all the bells and whistles, but it'll get the job done and is very useful for simple calculations like Hunter's Quarry damage, Sneak Attack, and Flurry of Blows where all that matters is a rudimentary damage calculation.
- Veggiesama
- Dragon
- Posts: 619
- Joined: Wed Aug 29, 2007 1:18 am
Re: Veg 2.32 Bug: Auto-applying states IF token is selected
Yes, I'd recommend that you make FoB into a Supplemental power, and write how much damage to deal in Custom Code. The "code" doesn't have to be any more complex than [StrBonus+3], as MHolman mentioned.
My D&D 4e Campaign Framework — My Shadowrun 4e Campaign Framework
RPGA#: 5223846427 — Skype: Veggiesama — Fear the ferret.
RPGA#: 5223846427 — Skype: Veggiesama — Fear the ferret.
Re: Veg 2.32 Bug: Auto-applying states IF token is selected
Great. I do really like the area for the extra coding, very forward thinking.
--DOC