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.
Is this even possible?
Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice
- JamzTheMan
- Great Wyrm
- Posts: 1872
- Joined: Mon May 10, 2010 12:59 pm
- Location: Chicagoland
- Contact:
Re: Is this even possible?
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.
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
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork
- bubblobill
- Giant
- Posts: 167
- Joined: Sun Jan 24, 2010 3:07 pm
Re: Is this even possible?
You could assemble your input string from parts that are conditional, setting them to nothing when not required.
Code: Select all
[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))]
Bubblobill on the forum.
@Reverend on the MapTool Discord Server
Responsible for less atrocities than most... I do accept responsibility for these though: SmartDoors, Simple d20 Framework - barebones, Drop-in: All 3.5 SRD Monsters, Drop in: Simple Character Editor, Battletech Framework
@Reverend on the MapTool Discord Server
Responsible for less atrocities than most... I do accept responsibility for these though: SmartDoors, Simple d20 Framework - barebones, Drop-in: All 3.5 SRD Monsters, Drop in: Simple Character Editor, Battletech Framework