I think you're in the realm of API scripts then. At a minimum, you could create a Character for each card played and link the represents automatically. If you named the card right, you could then pull the value out of the name and place it in an attribute. For that matter, an API script could take the number from the name and put it in the bar, allowing it to be referenced with @{selected|bar1} or some such. Here: on('ready',function(){
"use strict";
on('add:card',function(card){
_.defer(()=>{
let c=getObj('graphic',card.id);
if(! (c.get('bar1_value')+'').length ){
let cardOrig = getObj('card',c.get('cardid')),
num=cardOrig.get('name').match(/\d+/);
if(num.length){
c.set({bar1_value: parseInt(num[0],10)});
}
}
});
});
});
On adding a card to the table, if it doesn't have a value in bar1, this will find the first number (muli-digit is fine) in the cards name and place it in bar1. The numbers are persisted in when in a player's hand, but note that when you take a card to hand, the values are store based on the card id, not the graphic, so if you pick up two of the same card, the last card taken will dictate the value of the bars. (This is specific to Roll20, not this script.)