Diagram Customization
Diagram appearance can be customized using attributes. This page provides an overview of customization capabilities.
See also
Block Archetypes
Hercules supports a number of block archetypes - predefined block shapes for different purposes. There’s no problem mixing blocks designed for different purposes in the same diagram.
Archetype is set with the diagram archetype attribute on the block record.
The following table contains archetypes supported by Hercules:
Archetype |
Appearance |
Purpose |
|---|---|---|
|
square |
General purpose |
|
rhomb |
General purpose |
|
hexagon |
General purpose |
|
trapeze |
General purpose |
|
barrel |
General purpose |
|
pentagon looking down |
General purpose |
|
pentagon looking left |
General purpose |
|
pentagon looking right |
General purpose |
|
pentagon looking up |
General purpose |
|
small square |
General purpose |
|
small rhomb |
General purpose |
|
small hexagon |
General purpose |
|
small trapeze |
General purpose |
|
small barrel |
General purpose |
|
small pentagon looking down |
General purpose |
|
small pentagon looking left |
General purpose |
|
small pentagon looking right |
General purpose |
|
small pentagon looking up |
General purpose |
|
box with caption and content |
General purpose |
|
AI behavior tree |
|
|
AI behavior tree |
|
|
AI behavior tree |
|
|
AI behavior tree |
|
|
AI behavior tree |
|
|
AI behavior tree |
|
|
AI behavior tree |
|
|
AI behavior tree |
|
|
AI behavior tree |
|
|
Mission flow |
|
|
Mission flow |
|
|
Mission flow |
|
|
Mission flow |
|
|
Mission flow |
|
|
Mission flow |
|
|
Mission flow |
|
|
Mission flow |
|
|
Mission flow |
|
|
Mission flow |
Warning
Mission blocks are supported mostly for backward compatibility. It is recommended to use general purpose blocks instead.
Icons
Hercules allows to associate an icon with a block. An icon is displayed both on the block shape and in the toolbox.
Mission and AI blocks have predefined icons, but they can still be overridden.
Hercules supports 3570 Fugue icons, available here: https://p.yusukekamiyamane.com/
Icon name can be set with an icon attribute and should be prefixed with fugue-:
[diagram archetype="box" icon="fugue-guitar']
Icon visibility can be toggled with show_icon attribute.
Special Fields
Diagram blocks have limited support for dynamic content - block field values can be displayed inside the block. This can be achieved using special_field attribute.
record AbilityAction.AbilityActionHeal[heal]
{
[diagram special_field="text"]
float amount;
}
Attribute [diagram special_field="text"] is supported by most blocks. It is valid on scalar fields, including optional, but not on collections.
The field value will be displayed inside the block.
Colors
General purpose blocks support color customization. This can be achieved using [diagram color="red"] attribute. The value of the attribute is the string containing
the color in one of the following formats:
Hex ARGB color string, for example
#FFFF0000is redOne of the predefined colors names (case insensitive), see the table below.
Connector colors can be altered the same way, using connector object attribute, for example:
[diagram connector=(name="IN" type=asset position="0,0.5" color="blue")]
When using connector categories, it is recommended that different categories use different colors.