RPTools.net

Discussion and Support

Skip to content

It is currently Fri Jul 21, 2017 9:40 am 






Reply to topic  [ 1 post ] 

Previous topic | Next topic 

  Print view

Author Message
 Offline
Dragon
 
Joined: Sun Feb 20, 2011 3:14 pm
Posts: 354
 Post subject: Activate State and show condition text on mouseover?
PostPosted: Tue Aug 09, 2016 2:44 pm 
For years I have been using a macro that I came up with that will add a state image on the token but also add text to the portrait image when you mouseover the token. The text is the rules description for the state condition. Here is an example of the Blinded condition state and the rules for being blinded in 3.5e:

Attachment:
state_example.jpg
state_example.jpg [ 228.25 KiB | Viewed 274 times ]


I am far from being programming savvy and I'm sure the way that I am doing this is extremely clunky. Here is the code that I am using in the campaign properties:

Code:
*Blinded:[R, IF(getState("Blinded") == 1): "1/2 speed, -2 AC, no Dex AC, -4 Search," ; ""]
* :[R, IF(getState("Blinded") == 1): "-4 Str/Dex skills, 50% miss on attacks" ; ""]


The macro button code I am using looks like this:
Code:
[h: SelectedTokens=getSelected()]
[FOREACH(TokenID, SelectedTokens, " "), CODE:
{[h: NewState=if(getState("Blinded",TokenID)==1,0,1)]
[h: setState("Blinded",NewState,TokenID)]
}]
[H: abort(0)]


The more conditional descriptions that I use that involve the text entering on two lines, the more spaces I have to add at the beginning of the second line of code. For example, my code for the Slow condition has a lot of spaces in the beginning of the second line of code:
Code:
*Slowed:[R, IF(getState("Slowed") == 1): "Take only 1 standard or move action," ; ""]
*                     :[R, IF(getState("Slowed") == 1): "1/2 speed, -1 attacks, -1 AC, -1 Ref" ; ""]


All these years later, I am now considering changing how I use my conditional state macros. I currently have a macro button for each condition. I would now like to add a lot of new State macros for spell conditions (Bless, Bane, Protection Spells, etc, etc). I would like to add text to the profile image mouseover again to describe these effects.

I no longer want a macro for each state. Instead, a single macro that will popup a list of all my states with the ability to turn a state on or off (ability to turn multiple states on/off) would be better I believe. Also, an easier way to get the state descriptive text to appear on the token portrait mouseover would be great. Now that I know more about what MT can do, I'm wondering if this type of thing is better accomplished using the Tables or something? Would I type in all of my conditional text in a table and have the macro reference that table in order to display the text in the portrait window area?

It would be great if someone could help me get this set up. I am really not good at coding and pointing me to the wiki pages as if I can do this on my own has never worked for me. Could anyone help me out here?


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 1 post ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 3 guests





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman