[Pathfinder] TR's Toolbar v1
Moderators: dorpond, trevor, Azhrei, giliath, Gamerdude, jay, Mr.Ice, lmarkus001
Forum rules
Discussion regarding lmarkus001's framework only. Other posts deleted without notice!
Discussion regarding lmarkus001's framework only. Other posts deleted without notice!
Re: TR's Pathfinder Toolbar
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
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
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
- Attachments
-
- Toolbar.cmpgn
- (1.98 MiB) Downloaded 480 times
Re: TR's Pathfinder Toolbar
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?aliasmask wrote:I may go with form submit buttons with images because they're more responsive when clicked, but not necessarily better looking.
Re: TR's Pathfinder Toolbar
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.Sir Flak wrote: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?aliasmask wrote:I may go with form submit buttons with images because they're more responsive when clicked, but not necessarily better looking.
Code: Select all
<input type="submit" value="<html><img src="assetId" height=xx width=xx></html>"></html>
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: TR's Pathfinder Toolbar
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...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.
Re: TR's Pathfinder Toolbar
Yeah, I did the same thing under the Notepad++ link.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: TR's Pathfinder Toolbar
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
Thanks for the tip.aliasmask wrote: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.Sir Flak wrote: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?aliasmask wrote:I may go with form submit buttons with images because they're more responsive when clicked, but not necessarily better looking.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.Code: Select all
<input type="submit" value="<html><img src="assetId" height=xx width=xx></html>"></html>
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>
Re: TR's Pathfinder Toolbar
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.
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: TR's Pathfinder Toolbar
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.
Is there any way to speed this up or make it more efficient?
Thanks,
Skester
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" ) ]
Thanks,
Skester
Re: TR's Pathfinder Toolbar
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))]
Downloads:
- Notepad++ MapTool addon
- RPEdit details (v1.3)
- Coding Tips: Modularity and Design
- Videos: Macro Writing Tools
Re: TR's Pathfinder Toolbar
Just checked the form data.
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.
I'll give it a try. Thanks!
Skester
Code: Select all
{"Flanking":"on","wCombatExpertise":"on","FOB":"on","wKiDodge":"on","CM":"0","MyAction":"Action"}
And add in Value='1' on my forms so I don't have to change the rest of the macro to deal with on.
I'll give it a try. Thanks!
Skester
Re: TR's Pathfinder Toolbar
I'd like to use this toolbar, but I'm having a few problems:
Edit: I tracked this down to a bug in MapTool. Nothing wrong with the toolbar!
- 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.
Edit: I tracked this down to a bug in MapTool. Nothing wrong with the toolbar!
- Attachments
-
- toolbar2 test.cmpgn
- (2.21 MiB) Downloaded 304 times
Last edited by withlyn on Thu Jul 28, 2011 5:16 pm, edited 1 time in total.
Re: TR's Pathfinder Toolbar
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.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.
Re: TR's Pathfinder Toolbar
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.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.