Page 2 of 4

Re: TR's Pathfinder Toolbar

Posted: Sun Aug 08, 2010 2:36 pm
by toyrobots
I'll see about adding days some time this week, but for tonight, I have to GM (woe is me!)

Re: TR's Pathfinder Toolbar

Posted: Fri Nov 19, 2010 6:03 pm
by toyrobots
Hi everyone!

I have done zero interesting new work with this toolbar, because school has been brutal.

However, there were some bugs in the healing code and other spots that I fixed a few months ago and I just never uploaded the fixed version... I'm not even sure what was broken it was so long ago.

Anyway, here's the version I've been using for a while, it appears to have the bigs fixed.

Let me know if you're using it what you think, although judging by the lack of complaints about the broken last version, I wonder if anyone is using it...

-owen

Re: TR's Pathfinder Toolbar

Posted: Tue Jan 11, 2011 11:14 pm
by Sir Flak
aliasmask wrote:I may go with form submit buttons with images because they're more responsive when clicked, but not necessarily better looking.
I'm curious how that would work. I like the responsiveness of the buttons as well (ie if I don't have the dialog in focus when I click and it still goes off) I've not had much success in controlling <input type="image" since it appears to not let you scale the image. Can you put an image on a regular submit button? If so what does the html look like? Can you scale it with width/height?

Re: TR's Pathfinder Toolbar

Posted: Wed Jan 12, 2011 12:01 am
by aliasmask
Sir Flak wrote:
aliasmask wrote:I may go with form submit buttons with images because they're more responsive when clicked, but not necessarily better looking.
I'm curious how that would work. I like the responsiveness of the buttons as well (ie if I don't have the dialog in focus when I click and it still goes off) I've not had much success in controlling <input type="image" since it appears to not let you scale the image. Can you put an image on a regular submit button? If so what does the html look like? Can you scale it with width/height?
Instead of using an image for the link, it would be a submit button with an image. There are a couple of ways to do that, but putting html in the value of the submit it how I have done it.

Code: Select all

<input type="submit" value="<html><img src="assetId" height=xx width=xx></html>"></html>
Because the built in button format are really skewed 12px margin, I used tinyLaf and default.theme to change that to 4px so button look a little better with text and images.

Re: TR's Pathfinder Toolbar

Posted: Wed Jan 12, 2011 12:46 am
by Azhrei
aliasmask wrote:Because the built in button format are really skewed 12px margin, I used tinyLaf and default.theme to change that to 4px so button look a little better with text and images.
Rumble posted a replacement Default.theme that fixes the button margins. Not sure if it's portable to anything other than Windows but if he didn't hard-code fonts it should be...

Re: TR's Pathfinder Toolbar

Posted: Wed Jan 12, 2011 3:19 am
by aliasmask
Yeah, I did the same thing under the Notepad++ link.

Re: TR's Pathfinder Toolbar

Posted: Wed Jan 12, 2011 10:31 am
by Azhrei
Oh, maybe it was actually yours then. Sorry, I get lost sometimes with all of the "Dragon"-level and above posters. ;)

Re: TR's Pathfinder Toolbar

Posted: Wed Jan 12, 2011 11:04 pm
by Sir Flak
aliasmask wrote:
Sir Flak wrote:
aliasmask wrote:I may go with form submit buttons with images because they're more responsive when clicked, but not necessarily better looking.
I'm curious how that would work. I like the responsiveness of the buttons as well (ie if I don't have the dialog in focus when I click and it still goes off) I've not had much success in controlling <input type="image" since it appears to not let you scale the image. Can you put an image on a regular submit button? If so what does the html look like? Can you scale it with width/height?
Instead of using an image for the link, it would be a submit button with an image. There are a couple of ways to do that, but putting html in the value of the submit it how I have done it.

Code: Select all

<input type="submit" value="<html><img src="assetId" height=xx width=xx></html>"></html>
Because the built in button format are really skewed 12px margin, I used tinyLaf and default.theme to change that to 4px so button look a little better with text and images.
Thanks for the tip.

I just tested it and it works (except you need to swap in single quotes around the asset). The only thing weird about it is when you click the button, the passed macro args are a big long asset string. I can work with it though.

Example Functional code for others who are curious:

Code: Select all

[H: Image=getTokenImage()]
<input type="submit" name="save"  value="<html><img src='{Image}' height=32 width=32><html>"></input>
I do have your default theme. I guess mac uses will just have an uglier tool bar if its not portable to them.

Re: TR's Pathfinder Toolbar

Posted: Thu Jan 13, 2011 12:50 am
by aliasmask
If you're worried about what is submitting, don't check the value, but check for the name. You can put values in other input fields (ie type=hidden). Generally speaking, there are at least two ways to handle form submits. First, the whole form is submitted and the value of submit isn't relevant. The other is you have multiple types of submits or multiple forms going to the same processing page. You can either use the value of a same named submit button, hide a value within a tag of the submit value and pull it out with regex (strfind) or check for the existence of a variable name.

Re: TR's Pathfinder Toolbar

Posted: Fri Jan 21, 2011 11:19 am
by skester
I think my Forms are the point that slows down my macros the most. My Form display changes depending on class and feats, but it's the same Form calling the same macro to process the form. Therefore it checks for quite a bit of data before continuing.

Code: Select all

[h: FormData = macro.args ]

[h: useDice = json.contains( FormData, "useDice" ) ] 
[h: FRA = json.contains( FormData, "FRA" ) ] 
[h: Flanking = json.contains( FormData, "Flanking" ) ] 
[h: FE = json.contains( FormData, "FE" ) ] 
[h: FE2 = json.contains( FormData, "FE2" ) ] 
[h: FE3 = json.contains( FormData, "FE3" ) ] 
[h: FE4 = json.contains( FormData, "FE4" ) ] 
[h: FE5 = json.contains( FormData, "FE5" ) ] 
[h: Smite = json.contains( FormData, "Smite" ) ] 
[h: BSmite = json.contains( FormData, "BSmite" ) ] 
[h: PowerAttack = json.contains( FormData, "PowerAttack" ) ] 
[h: Charge = json.contains( FormData, "Charge" ) ] 
[h: wTwoWeaponFighting = json.contains( FormData, "wTwoWeaponFighting" ) ] 
[h: UseSecondary = json.contains( FormData, "UseSecondary" ) ] 
[h: FOB = json.contains( FormData, "FOB" ) ] 
[h: KFOB = json.contains( FormData, "KFOB" ) ] 
[h: ArcaneStrike = json.contains( FormData, "ArcaneStrike" ) ] 
[h: FightingDefensive = json.contains( FormData, "FightingDefensive" ) ] 
[h: wCombatExpertise = json.contains( FormData, "wCombatExpertise" ) ] 
[h: RacialHatred = json.contains( FormData, "RacialHatred" ) ] 
[h: StunningFist = json.contains( FormData, "StunningFist" ) ] 
[h: TA = json.contains( FormData, "TA" ) ] 
[h: MFRA = json.contains( FormData, "MFRA" ) ] 
[h: MFRAW=0]
[h: LayOnHands = json.contains( FormData, "LayOnHands" ) ]
[h: wSneak = json.contains( FormData, "Sneak" ) ] 
[h: wKiDodge = json.contains( FormData, "wKiDodge" ) ] 
[h: zMonsterWeapon = json.contains( FormData, "wMonsterWeapon" ) ] 
[h: Demoralize = json.contains( FormData, "Demoralize" ) ] 
[h: isMonster = json.contains( FormData, "isMonster" ) ] 
[h: CombatMan = json.contains( FormData, "CM" ) ] 
Is there any way to speed this up or make it more efficient?

Thanks,
Skester

Re: TR's Pathfinder Toolbar

Posted: Fri Jan 21, 2011 12:51 pm
by aliasmask
One trick is to dump the json as a string property list. Just be careful about ; in your data. If you don't have that, then it's safe to do. Otherwise, depending on what it represents, you can do a replace first.

Code: Select all

[H: varsFromStrProp(json.toStrProp(FormData))]

Re: TR's Pathfinder Toolbar

Posted: Fri Jan 21, 2011 2:38 pm
by skester
Just checked the form data.

Code: Select all

{"Flanking":"on","wCombatExpertise":"on","FOB":"on","wKiDodge":"on","CM":"0","MyAction":"Action"}    
So, I guess I set all my variables to 0, make sure the forms data sent over is the same as the variable names, then run that which would change all the 0s to "On" (for the Checkboxes).

And add in Value='1' on my forms so I don't have to change the rest of the macro to deal with on. :D

I'll give it a try. Thanks!

Skester

Re: TR's Pathfinder Toolbar

Posted: Fri Jul 15, 2011 5:44 pm
by withlyn
I'd like to use this toolbar, but I'm having a few problems:
  • Whenever initiative passes to a new token on a map other than the initial map (GM Screen), Maptool freezes. (If there is only one token in the initiative, this is not a problem.)
  • If I add a new map to the campaign, add a token to the map, and save the campaign, it will freeze on reload.
Both these errors occur in both B63 and B86. I'm using Ubuntu 10.04 with Sun Java 6 update 26. The (non-working) saved campaign file is attached.

Edit: I tracked this down to a bug in MapTool. Nothing wrong with the toolbar!

Re: TR's Pathfinder Toolbar

Posted: Thu Jul 28, 2011 12:10 pm
by Ozman51
toyrobots wrote:
To put it into another campaign file, save a copy of the Lib:PathfinderRPG token, the button image tokens (there are several of these in stacked) and the campaign properties. Then drop the lib and image tokens in your new campaign, and load the new properties. As long as you have the Libs, Images, and props, you're good to go.

All the properties are hidden and accessed through getProperty() and setProperty(), which is why you only see the one prop in the campaign props. They get initialized when you run the "setup token" button, so nothing will work until you have set up the token.
I am very interested in trying this but also very new to using MapTools as anything than just mapping software. I have all of the Tokens exported but am unclear on how to save a copy of the properties and then in turn import them into my campaign.

Re: TR's Pathfinder Toolbar

Posted: Thu Jul 28, 2011 5:21 pm
by withlyn
Ozman51 wrote:I am very interested in trying this but also very new to using MapTools as anything than just mapping software. I have all of the Tokens exported but am unclear on how to save a copy of the properties and then in turn import them into my campaign.
In the MapTools menu, go to Edit->Campaign Properties, and click "Export" near the lower left of the dialog box. "Import" is right next to it.