The reason your other command series works (the one that I rejiggered into a single command) is because you rebuilt your inline roll every time. That is, there was no randomness to it, so every time you built it it would be the same. With an actual roll (like what you're looking to do in the problematic macro), you have to preserve that value. Roll values don't persist between separate messages (so it won't last between your token-mod command and your template command), but you can combine all of this into a single command and extract the value as needed. !{&eval}token-mod --ids @{target|Qui guérir|token_id} --set bar1_value|+[[1d8+1]].value!{&/eval} &{template:npcaction} {{rname=Soins du Marteau de Guerre}} {&if ([ResourceCheck]@{Galy|repeating_resource_$2_resource_left} > 0)}!modbattr --name Galy --silent --evaluate --repeating_resource_$2_resource_left|-1!!!{&end} {{description={&if ResourceCheck}Galy utilise le pouvoir du Marteau de Guerre et offre $[[0]].value PV à @{target|Qui guérir|token_name}{&else}Galy ne peut plus utiliser le pouvoir du Marteau de Guerre avant un repos long.{&end}}}{&simple} That puts the TokenMod command in a plugger block to send it separately. The inline roll in that portion will be executed (and the data stored) in the top level/original message, so when we issue the TokenMod command, we have to have already extracted the value from the roll (with .value ). Finally, the '+' of the setting operation and the '!' at the end of the setting syntax tell TokenMod to add the roll value without going over the max for bar1. I'm not sure if you need the second .value (in the ChatSetAttr portion of the command line), but probably. With this going through the ZeroFrame loop first, you aren't going to send the CSA command until after ZeroFrame has squashed the original message (using {&simple} ) and re-issued one that will hit the chat. A couple of things to think about: 1) There had been a bug with TokenMod in the version that checked whether the bar was linked to a character sheet or not (if it was linked, TM would set the attribute instead of modifying the bar value). I'm not sure if Aaron has gotten the time to correct that bug, so you might have to make sure you're using a previous version of TM (and I apologize for not knowing what that version is). If, when you back down the version, you need to differentiate whether this is a character-token (with a linked bar1) or a mook (with an unlinked bar1), you can use an {&if} block to read the bar1_link: {&if '@(@{target| Qui guérir|token_id}.bar1_link)' = ''} ... no link, use token-mod syntax ... {&else} ...linked, so use ChatSetAttr syntax ... {&end} (quotation marks/apostrophes provide markers for the parser in case nothing is there, so must be included) All of that can go in the EVAL block so long as the roll value is extracted using the .value syntax. It doesn't matter if APILogic runs before Plugger (it typically doesn't). It will either run in the original message (simplifying what Plugger is sending down to either just the TM syntax or just the CSA syntax), or it will run in the Plugger outbound message (removing the extraneous portion there). Since you are using the targeting statement to get the token id, that will populate immediately. 2) Your template currently reports the amount of the rolled healing, but that might have been more than could be used (since you're capping at the max of the bar). If you wanted to, you could report the total rolled in this fashion (as currently constructed), but then offer a "how much could be used" roll that would do the math. You could put that in a nested IF block in your report. Here is the new bit: {&if $[[0]].value > [[ @{target| Qui guérir|bar1|max}- @{target| Qui guérir|bar1}]].value }, dont seulement $[[1]].value ont pu être appliqués{&end} And then here is that embedded in your current IF block: {{description={&if ResourceCheck}Galy utilise le pouvoir du Marteau de Guerre et offre $[[0]].value PV à @{target|Qui guérir|token_name} {&if $[[0]].value > [[ @{target| Qui guérir|bar1|max}- @{target| Qui guérir|bar1}]].value }, dont seulement $[[1]].value ont pu être appliqués{&end} {&else}Galy ne peut plus utiliser le pouvoir du Marteau de Guerre avant un repos long.{&end}}}