Return text from Ternary Operators

Savage Worlds attributes are values like Smarts=‘d6’ and Strength=‘d12+2’. I’m storing these as Smarts=6, Strength=12, StrengthBonus=2.

If the Bonus is 0, I want to hide it and not clutter up the display.


Preferred output:

Attributes: Agility d6, Smarts d6 (A), Spirit d10, Strength d12+6, Vigor d12
Skills: Athletics d8, Fighting d10, Intimidation d12, Notice d8, Stealth d6

Current output:

Attributes: Agility d6+0, Smarts d6+0 (A), Spirit d10+0, Strength d12+6, Vigor d12+0
Skills: Athletics d8+0, Fighting d10+0, Intimidation d12+0, Notice d8+0, Stealth d6+0

Ability code

This is how I have to script the Ability now:

Smarts is {Smarts} + {SmartsBonus}
Strength is {Strength} + {StrengthBonus}

But I’d like to be able to write:

Smarts is {Smarts} !( {SmartsBonus} <> 0 ? '+' {SmartsBonus} : '' )

If ternary operators could return text, I could write a weather Ability:

The temp is !( {1d3 == 1 ? 'Freezing, roll Vigor-2'  : 'Only damn cold, roll Vigor' } )