Timed Macro?

If you have searched the other User Creations subforums and an answer to your question has not been found, please post here!

Moderators: dorpond, trevor, Azhrei, Gamerdude

Post Reply
LastRose
Kobold
Posts: 10
Joined: Fri Apr 05, 2013 8:36 am

Timed Macro?

Post by LastRose »

Is there any way to make a macro add buff effects for a certain number of rounds, and once the rounds are over it turns everything back to normal? I have a buff that modifies a lot about my character, but I have forgotten once or twice to turn off the macro afterwards. It would be nice if I could set a timer on it so that once so many rounds have gone past it automatically comes off.

I'd rather put in hard work once, and be lazy for the rest of the time. Been studying random tutorials for the past 5-6 hours now, and have yet to come up with anything remotely close to what I want.

User avatar
wolph42
Winter Wolph
Posts: 9999
Joined: Fri Mar 20, 2009 5:40 am
Location: Netherlands
Contact:

Re: Timed Macro?

Post by wolph42 »

Yes that's possible, but it does require you to use amacro to advance initiative. When that macro runs you can check any effects with their timers and tien them off when done.
This does mean that you need to create awoken property where you keep track of the timers. Ideally it's a json array of json objects.
It's fairly possible that someone already coded this and that your can use that code to start with

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Timed Macro?

Post by aliasmask »

I believe something like this is in the 3.5/pathfinder framework by Lindsay. The macros can be found on the hour glass token on the lib map. What is does is add the effect to the initiative. There's also a custom initiative drop-in that does something similar.

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Timed Macro?

Post by JamzTheMan »

I'm in the middle of doing the same thing actually. Usually for short in-combat things like haste and such I could track by memory or writing down the round # or using Lindsey's "timer" macro, BUT things like Poison and Disease always drove me crazy...

So, for me (I run Pathfinder), I started with a simple calendar macro (tracks time/day) and used a unix style timestamp where it's "seconds since 1405", the starting year of our campaign. I have a bank of macro's that advance the time by 1 round (6 seconds), 1 minute, 10 minutes, 1 hour, 8 hours, and 24 hours. I also can mark a PC token so every time it moves it's "movement" outside of combat (eg for normal human, every 30ft) it advances the clock 1 round. During combat, the initiative macro advances the clock.

So give I now I have "timestamp", I can now store an "effect", say poison on the token, and it checks every initiative if the poison needs to be checked (I have a poison pop-up dialog now as well) and so on. I need to expand it now so outside of combat it checks, as well as expand it to diseases, spells, and other things... It's still a WiP and not set as a "drop-in" but happy to share. (it may be more complicated than what you are looking for though)
-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

LastRose
Kobold
Posts: 10
Joined: Fri Apr 05, 2013 8:36 am

Re: Timed Macro?

Post by LastRose »

I would love to see that. As a navigator in another game I have to track days passed in game. I will admit I have fudged the numbers at least 10-15 times because I forgot to pass write down the current passing of time in the google document. So when people ask I'm just like, "34 days have passed since the beginning of the campaign" -confidence faked-

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Timed Macro?

Post by JamzTheMan »

It's a little much to break up as it involves a few macros on my lib, some properties for the token, campaign macros & tables, here's my campaign file, you should be able to grab from it to get an idea... It's based on Pathfinder's Golarion calendar which is really just based on ours (right now, i'm not doing leap years though, i don't think that will make or break anything lol)

At the top I have the calendar docked above my campaign macros and below it the control macros that advance/rewind the calendar. I could have put the buttons on the frame but I found it easier to throw them on as campaign macros for now. Also that way the players can just have a small calendar view they use and they can manually note, "I cast my blah blah spell at 12:04 am and it'll last for 90 minutes so, 02:34 am...

You can stop there if you want grabbing basically the updateCalendar, displayCalendar, & calendarCSS macros. There's a reset Calendar macro as well as manual set of the calendar under the 2.7 Nerps! Misc Stuff...

For tracking Poisons & Diseases, you can follow the other macros to checkForPoison and checkForDisease macros which get called from updateCalendar outside of combat and in nerpsNextInit for during combat (I actually call checkInitTimers which calls the collection of timers to check)

When you add a new Poison/Disease, it's saved to the table and is available for use in the future again. Right now it only tracks PC's outside of combat (any token in combat is fair game and checked during initiative) and it only tracks one poison and one disease at a time. And they are separate macros that could really be combined and use arrays of jsons in the furture (wanted something to use now so I'm taking baby steps vs coding an all consuming feature). For now, 1 each is usually just fine for my uses.

It's still WIP but I think it's pretty bug free. I plan on adding "spell effects" next and/or "misc events"

Nerps Pathfinder 5.2.cmpgn
Calendar Macros
calendar-macros.PNG
calendar-macros.PNG (23.96 KiB) Viewed 6590 times
Poison & Disease Macros
Macros.png
Macros.png (44.25 KiB) Viewed 6590 times
Last edited by JamzTheMan on Wed Dec 14, 2016 4:16 pm, edited 1 time in total.
-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

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Timed Macro?

Post by JamzTheMan »

K, so I have it now set so all the "Conditions" run through the timer option! Setting it to 0 toggles the "Mod" as normal with no timer. Otherwise you can set a time in rounds/minutes/hours/days and at that time a popup will tell you the mod is automatically being turned off.

Got it JUST in time as a crazy fight with a huge gibbering mouther and 6 allip's forced me to track confusion & fascinated on the PC's for variable rounds...

Right now it's not "conforming" to Pathfinder rules though. It toggles off at the end of a characters initiative, where instead, if a PC is confused for 1 round on Round 7, init 5, it will last until Round 8 just before init 5. So, working on that... When I get it working I'll post a new update/link.

PS it works on spell mods too! Basically, any of "Mods" in LM's framework can be timed by passing additional parameters...
-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

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Timed Macro?

Post by JamzTheMan »

OK, so my "timer/calendar" is more mature now and is integrated with the framework (based on LM's framework modified here and there for my use).

All the "conditions" have macros and will prompt for a time and I have a few dozen spell macro's added. The timer can have a default time and/or time period (ie Rounds/Minutes/Hours/Days) and you can view the various spell macros to see how that is done. It's pretty straight forward. It's an extension of calling LM's "Mods" to be toggled on/off.

The timer ticks one round per initiative count in there is an Initiative/combat running. Otherwise you can advance the clock manually via macros (provided). You can also designate a token as a lead token, and whenever that token moves his "movement", it advances 1 round. Eg lead token is a halfling with a movement of 20. If he moves 60 feet, 3 rounds will pass. I assume during normal dungeon crawling, you are not making double moves. This is also just a convenience thing so time will pass without having to remember to manually do it out of combat.

It's based on Pathfinder calendar (which is based on real world calendar) but the months/days are just an array that can be changed. Behind the scenes I implemented a unix style timestamp and count the number of seconds since 4705 (or whatever your starting year is). It's been working out wonderfully! Nothing like having a reminder to check for Disease 3 days later (which may be 2 months real time!) or having that "resist fire 30" you casted 2 combats ago run out mid 3rd combat. :)

Nerps Pathfinder 5.2.cmpgn
-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

Post Reply

Return to “Requests for HELLLLP!”