GenKitty said: I'd like to use the status symbol icons in my powercards, so i could do something like --Dazed Condition:| @ The creature is unable to act normally. A dazed creature can take no actions, but has no penalty to AC. and replace the @ with the status icon for something. Is this possible, HB? That sounds like it would be really cool... (I think you know where this is going... =D) !power {{
--name| Status Test %%pink%%
--Dazed Condition:| %%half-haze%% The creature is unable to act normally. A dazed creature can take no actions, but has no penalty to AC.
}}
Code changes: New function at about line 882: function statusSymbol(symbol,altForReplace){
var statuses = [
'red', 'blue', 'green', 'brown', 'purple', 'pink', 'yellow', // 0-6
'skull', 'sleepy', 'half-heart', 'half-haze', 'interdiction',
'snail', 'lightning-helix', 'spanner', 'chained-heart',
'chemical-bolt', 'death-zone', 'drink-me', 'edge-crack',
'ninja-mask', 'stopwatch', 'fishing-net', 'overdrive', 'strong',
'fist', 'padlock', 'three-leaves', 'fluffy-wing', 'pummeled',
'tread', 'arrowed', 'aura', 'back-pain', 'black-flag',
'bleeding-eye', 'bolt-shield', 'broken-heart', 'cobweb',
'broken-shield', 'flying-flag', 'radioactive', 'trophy',
'broken-skull', 'frozen-orb', 'rolling-bomb', 'white-tower',
'grab', 'screaming', 'grenade', 'sentry-gun', 'all-for-one',
'angel-outfit', 'archery-target'
],
statusColormap = ['#C91010', '#1076c9', '#2fc910', '#c97310', '#9510c9', '#eb75e1', '#e5eb75'],
i;
symbol = altForReplace||symbol;
if(_.contains(statuses,symbol)){
i=_.indexOf(statuses,symbol);
if(i<7) {
return '<div style="width: 22px; height: 22px; border-radius:100%; display:inline-block; margin: 0; border:0; background-color: '+statusColormap[i]+'"></div>';
}
return '<div style="width: 24px; height: 24px; display:inline-block; margin: 0; border:0; cursor: pointer;padding:0;background-image: url(\'<a href="https://app.roll20.net/images/statussheet.png\');background-repeat:no-repeat;background-position" rel="nofollow">https://app.roll20.net/images/statussheet.png\');background-repeat:no-repeat;background-position</a>: '+((-34)*(i-7))+'px 0px;"></div>';
}
return '';
}
Line to call it in the formatters at about line 945: .replace(/%%(.*?)%%/g,statusSymbol)