Text Tags

From SC2Mapster Wiki
Jump to: navigation, search

Text tags


<img path="Assets\Textures\tutorialmouseleftbuttondown.dds" alignment="absolutemiddle" width="20" height="20" color="ff00ff" />
<img path="Assets\Textures\storm_social_statusIcon_Available.dds" texcoords=".25,.25,.75,.75" height="16" width="16" alignment="bottom"/>


  • uppermiddle (default)
  • absolutemiddle
  • bottommidle

Text wrap

Instructs to NOT to wrap the text inside the tags.

<w>something that should be printed as one line</w>
Button/Tooltip/K5DropPods=Delivers Primal Zerg forces with timed life to the battlefield. Drop-Pods contain <w><d ref="Effect,K5DropPodZerglings,SpawnCount * 5"/> Zerglings,</w> <w><d ref="Effect,K5DropPodRoach,SpawnCount * 5"/> Roaches,</w> and <w><d ref="Effect,K5DropPodInitialPlacement1,SpawnCount * 5"/> Hydralisks.</w>

New line

Inserts new line.



<s val="stylename">text</s>


Colored text. Value in an RGB (Red, Green Blue) format.

Allowed syntax:


(hexadecimal) or


(decimal, with dot as delimiter)

<c val="ff0000">red text</c>


ArmyUpgrade/Description/BioAcids=<s val="Army_BulletPoint_Orange"><ul indent="2" text="•"><li/>Baneling gains +10 Damage</ul></s><n/><s val="Army_Description">Potency of Baneling acid spray is bolstered easily. Less than one hundred mutations are required. Resulting Bio Acids dissolve contacted matter more thoroughly.</s>



This thing apparently insert invisible white space.. the difference appears to be that it can get some special treatment under some circumenstances?


how to prevent label ' ... ' from becoming ' ...'

Label Options exposes two flag that seem to relate: IgnoreSpaceTags | StripSpaceTags

e_gameUIStringBattleChatConversationReceivedFormat=[%sender%] to [%destination%]:<sp/>
e_gameUIStringBattleChatConversationSentFormat=To [%destination%]:<sp/>
e_gameUIStringBattleChatPartyReceivedFormat=[%sender%] to [%destination%]:<sp/>
e_gameUIStringBattleChatPartySentFormat=To [%destination%]:<sp/>
e_gameUIStringBattleChatPrivateSentFormat=To [%recipient%]:<sp/>


HoloPanel/TitleLobbyPlayers=%numPlayers% <lang rule="plural">PLAYER,PLAYERS</lang> IN LOBBY


Higlights first letter

UI/GameMenuRestart_Control=<h/>Restart Mission


Resolves hotkey binding, and formats it properly

<k val="HeroSelect1"/>

UI/TutorialAttackTextTag=Press<k val="Marine,Attack,0,4"/> then
UI/TutorialBlinkTextTag=Press<k val="Stalker,Blink,2,0"/> then

Map/LoadingHelp/ZZerus3=You can use hotkeys to quickly access Kerrigan's abilities.<n/>Her first three active abilities are always bound to "<c val="ffff00"><k val="K5Kerrigan,PrimalSlash,2,0"/></c>," "<c val="ffff00"><k val="K5Kerrigan,PsiStrike,2,1"/></c>," and "<c val="ffff00"><k val="K5Kerrigan,PrimalHeal,2,2"/></c>."



needs testing

<a name="WebsiteUrl" href="%href%">%url%</a>
<a name="GameContentlink" href="%type%,%id%">[%name%]</a>
<a name="ChannelName" href="%rawChatName%">%chatName%</a>
<a name="AchievementId" href="%presenceId%;%achievementId%">%achievementName%</a>
<a name="InviteToParty" href="%presenceId%"><c val="57b4ff">[Invite to Party]</c></a>
<a name="PresenceId" href="%presenceId%">%userName%</a>
<a name="LobbyLink" href="%presenceId%,%arg1%">[%arg2%]</a>

Data reference

Things that can be referenced:

  • Data catalog definitions
  • Score values
  • Galaxy variables
  • Behavior stack count
  • Upgrade level
  • EffectArray from an upgrade
  • Unit count


Referencing galaxy variable. Can properly display lots of various types - point, region, unit etc.

<d GalaxyVar="libNtve_gv__BB_Title"/>

For int|fixed types one may want to use $GalaxyVar$ operator within ref attribute, as it allows to perform arithmetic operations with other operands.

<d ref="$GalaxyVar:gv_test1$*1.01" precision="2" />

Referencing array elements

It’s probably impossible to reference array elements, unless trigger debugger is enabled

<d GalaxyVar="libNtve_gv_screenButtonsHoverImage [ 6]" />
<!-- space before '[' is important -->
<!-- index within '[]' must be padded with spaces if size of an array is larger than element we're adressing. in case above array size is 51, thus 'XX' -->


<d GameValue="MapName"/>
<d Player="1" GameValue="PlayerRace"/>
<d Player="1" GameValue="PlayerName"/>
<d Player="1" GameValue="PlayerFoodCap"/>
<d Player="1" GameValue="PlayerClanTag"/>


Number of units of X type currently on the map

<d Player="1" UnitCount="Marine"/>


Built-in and user defined score values

<d Score="APMAverage" Player="1"/>


Stack count of behavior X on currently selected unit.

<d ref="$BehaviorStackCount:AscendantSacrificeSelfBuff$"/>


Remaining duration of behavior X on currently selected unit.

<d ref="$BehaviorRemainingDuration:MedicMedivacDropshipAcceptingPassengers$"/>


<d ref="$UpgradeLevel:MasteryNovaPrimaryAbilityImprovement$"/>


<d ref="$UpgradeLevel:MasteryAbathurToxicNestDamageAndRespawn$*$UpgradeEffectArrayValue:MasteryAbathurToxicNestDamageAndRespawn:Effect,ToxicNestExplodeDamage,Amount$"/>

Nested references

D-ref tag can also be nested in values of other text tags, to show its true power. The trick is to use square brackets ([ ]) and single quotation marks (' ') to not break XML parser (similar to the way BBCode works). That is [d ref='stuff'/] instead of <d ref="stuff"/>

Text color based on a value provided by global variable

<c val="[d GalaxyVar='gv_dynamicColor'/]">abc</c>

Referencing multiple values within d-ref itself

One can reference another values within ref parameter to perform arithmetic operations and other things not possible by a single level reference.

<d ref="[d Score='UnitsKilledCount' player='current'/] / [d Score='UnitsKilledCount' player='2'/]" precision="2"/>

Other examples

<d time="[d ref='Behavior,FenixMojoScoutAirStun,Duration'/]"/>

Tag attributes

ref [str]

Special $ functions.
Some of them can also be used directly as parameters, omitting ref

  • $BehaviorStackCount:__BehaviorName__$
  • $BehaviorRemainingDuration:__BehaviorName__$
  • $UpgradeLevel:__UpgradeName__$
  • $UpgradeEffectArrayValue:__UpgradeName__:__index__$
  • $GalaxyVar:__variablename__$
  • $Score:__scorename__$

Data catalog values


player [int|string]

current or actual player index

precision [int]

amount of decimal places to display

time [int]

will format given value as time, i.e. 4.9s

needs more testing, example:
Drains <d ref="3 / time='1'"/>

GalaxyVar [string]

GameValue [string]

Score [string]

UnitCount [string]