Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > Hero Lab Discussion
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
winterstew
Junior Member
 
Join Date: Nov 2016
Posts: 13

Old November 15th, 2016, 07:07 AM
Is there a way to trigger an external process with arguments from Hero Lab? Alternatively sending an HTTP GET or POST to a custom URL while passing selected arguments.

I use a simple virtual table top system I put together displayed on my TV as our game board, and I would like to have a Condition change to a hero in Hero Lab be reflected in my VTT. I can write either a Python script to send a SQL statement to my database server or an HTTP GET/POST to my web server to accomplish this; however I would need Hero Lab to trigger the action and pass some simple data like some sort of HeroID and the Condition(s) with selection state.

Is something like this possible? I am sure it would be possible as a Custom Output of the whole portfolio, but that seems a bit much. I wouldn't want to have to output the whole portfolio every time a goblin dies, or a PC get nauseated. I just want a command to be issued when a condition changes. I have just purchased and started using Hero Lab so I am very novice. I have read through the manual and parts of the authoring kit Wiki, but I could not tell if this is possible.
winterstew is offline   #1 Reply With Quote
winterstew
Junior Member
 
Join Date: Nov 2016
Posts: 13

Old December 21st, 2016, 01:01 AM
I was able to write a procedure (called from each Condition) to modify the pChkName.
It pulls a mapId (as stored in state.value[mapId] via a Mechanic), the heroname, and the condition then concatenates them into a custom URL. This is used to then wrap the pChkName with the {url} modifier. So now every time I click on a condition, it toggles the flag on my virtual table top.
winterstew is offline   #2 Reply With Quote
Jamz
Senior Member
 
Join Date: Aug 2005
Location: Chicagoland
Posts: 397

Old December 24th, 2016, 10:06 AM
would you mind sharing the code? I did even know this was possible?

-Jamz

RPTools.net | MapTool Discord Invite

Download Latest MapTool Release | Download Latest TokenTool Release
Jamz is offline   #3 Reply With Quote
winterstew
Junior Member
 
Join Date: Nov 2016
Posts: 13

Old December 28th, 2016, 07:10 AM
Here is my .user file with my code.

If whatever VTT you are using supports a method to change conditions directly via URL HTTP GET you should be able to make this work with some changes in the LinkCkName procedure. I use my own (DragonberryPi) which runs on a raspberry pi server on my LAN.

The most kludgey part of this is that I have to define the mapID in the .user file so I have to change it and re-compile anytime I change maps.

If anyone knows of a way to add a portfolio global (Like the publisher id) which I can set in the main window, save with the portfolio, and access from the procedure, let me know. I would like to be able to save mapIDs with the portfolios
Attached Files
File Type: email winterstew_conditions.user (48.6 KB, 3 views)
winterstew is offline   #4 Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 12:06 AM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.