
Hi all, Loving the use of Roll20 here, and this is the second campaign I'm starting up. Last year I ran a fun Rogue Trader game, and macros and API's helped immensely. First time posting in the forums about questions because I'm genuinely stuck, and apologies if this isn't the right place for this one. I'm setting up for running an Exalted 3e campaign in Roll20 and I'm trying to work out a few things that can definitely help with combat. I've got access to the API, so any help would be greatly appreciated! We've a couple of programmers in the group (including myself) but not javascript so we're doing okay doing minor editing of scripts and such but we're struggling with a couple of things. I feel I'm within short reach of this one and I've been googling for a couple of days now and keep going round in circles. So, the challenge: Withering damage adds initiative to the attacker and subtracts initiative from the target. Characters can spend initiative points to do funky actions as well, so it'd be great to just have it as a bubble value that's easily accessable. I can set up tokens with bar1 being the initiative value obtained by /roll ((@{selected|wits|current} + @{selected|awareness|current})d10>7cs10cf1sd +3) &{tracker} and sent to the tracker, (adding extras from the doubles granted by rolling 0's isn't much of a hassle); so far, so good What I'd really like is to have a script deliver withering damage from the selected token to the target token: the selected token gains the input amount, and the target loses the same amount. I'm using the AlterBar script in a macro for it: !alter @{selected|token_id} 1 +?{Damage|0} !alter @{target|token_id} 1 -?{Damage|0} So far, so good. It works. Here's where I'm stuck: I want the turn tracker to read the bar1 value for selected and targets after the value has changed so that the turn tracker updates with the new values, something like this: !alter @{selected|token_id} 1 +?{Damage|0} [[(@{selected|bar1|current}) &{tracker}]] !alter @{target|token_id} 1 -?{Damage|0} [[(@{target|target|bar1|current}) &{tracker}]] What's happening is that "selected" and "target" become the same token and they both get the value in the tracker for the target's bar1 value. (I'm guessing the click on the target icon causes it to become the selected one) A subsequent call to: [[(@{selected|bar1|current}) &{tracker}]] with each selected token sorts it out properly, but it'd be super cool if it could be done, with scripts, macros or otherwise. My question is this: How do I model the damage in such a way that the turn tracker reflects the moving initiatives? I'm also using exaltScript for the end of turn initiative sorting and will most likely end up using PowerCards for things later on too. Oh, and it'd also be cool to add a cumulative purple status icon for each incoming attack for the Overwhelming icon (additional -1 penalty per attack), but that, I feel is a different question. Many thanks in advance for anything that might help!