RPTools.net

Discussion and Support

Skip to content

It is currently Tue Dec 12, 2017 6:51 pm 






Reply to topic  [ 3 posts ] 

Previous topic | Next topic 

  Print view

Author Message
User avatar  Online
Cave Troll
 
Joined: Sun Mar 22, 2015 2:57 pm
Posts: 44
 Post subject: Is this even possible?
PostPosted: Mon Nov 27, 2017 1:50 pm 
I'm developing a more complicated Damage macro for Pathfinder. I'm planning to take into account various things that complicate the calculations (e.g., DR). As a specific example, I want to have a check box in my input that allows the GM to note if this attack ignores DR or not.

I can get that check box in, and I have no concerns about the coding to take DR out of the total damage dealt. I was wondering if there is any way to set up the Input call so it deactivates the "Does this ignore DR" check box when DR == 0. Basically, I'd like to have the option not available if the selected token doesn't have any DR to ignore.

All in all, this is not a big deal at all - nothing that I can think of would break my code if the options are set incorrectly. It is more my desire for a clean interface than any real practical considerations. I poked around in the macro functions, and I didn't see anything that seemed to be a likely path forward with this. However, before I gave up my search I figured I'd poll the wisdom of the crowd on this.


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Mon May 10, 2010 11:59 am
Posts: 1722
Location: Chicagoland
 Post subject: Re: Is this even possible?
PostPosted: Tue Nov 28, 2017 4:06 pm 
The current frameworks (including mine) do this without issue (mine even goes as far as prompting for fast healing/regeneration as well and let you turn regen off for a turn, etc).

All you need to do is look for your DR property on the token first. If there is no DR set your checkbox off or even hide it.

Although, what I do is simply instead display a input box and below it list all the DR's/ER's as you may have more than one like DR 5/good, DR 10/magic.

_________________
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork


Top
 Profile  
 
 Offline
Cave Troll
 
Joined: Sun Jan 24, 2010 3:07 pm
Posts: 45
 Post subject: Re: Is this even possible?
PostPosted: Sat Dec 02, 2017 7:23 pm 
You could assemble your input string from parts that are conditional, setting them to nothing when not required.

Code:
[inputDR=if(DR==0,'', '## checkbox input string thing for DR')]
[inputX =if(X==0, '', '## checkbox input string thing for X' )]
[inputY =if(Y==0, '', '## checkbox input string thing for Y' )]

[abort(input('someInputThatIsAlwaysPresent'+inputDR+inputX+inputY))]


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

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 2 users online :: 1 registered, 0 hidden and 1 guest (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: TheIneffableCheese and 1 guest





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

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman