Widget tags
The tags that draw a picture or a control rather than lay out or write text.
img
| Attribute | Requirement | Default | Constraints/Notes |
|---|---|---|---|
| path | Required | none | Path to the image resource. |
| Base Attributes | Optional | none | Inherits all common base attributes. |
Code Example
<img path="d:/ymir work/ui/example/banner.png" />
button.button
| Attribute | Requirement | Default | Constraints/Notes |
|---|---|---|---|
| type | Required button | none | Button type identifier. |
| target | Optional (either call or target+value must be set) | none | The variable the button will set once clicked. |
| value | Optional (either call or target+value must be set) | none | The value the button will set to the target variable. |
| call | Optional (either call or target+value must be set) | none | The function to call when the button is pressed. Function must be registered in the Jinja Context |
| path | Required | none | Image path template for button states. |
| tooltip-text | Optional | none | Tooltip text. |
| Base Attributes | Optional | none | Inherits all common base attributes. |
path is expected to be a parametrized path to the images used for normal, over and clicked state.
UCHTML will then substitute normal hover and selected to the parameter of the string.
Example:
path="d:/ymir work/ui/example/group_b_{}.tga"
become
d:/ymir work/ui/example/group_b_normal.tga
d:/ymir work/ui/example/group_b_hover.tga
d:/ymir work/ui/example/group_b_selected.tga
And each of the images need to exist in order to render the button.
Code Example
<button type="button" path="d:/ymir work/ui/example/group_d_{}.tga" target="bar" value="123" />
<button type="button" path="d:/ymir work/ui/example/group_d_{}.tga" call="interfacemodule.OpenSomething('argument') />
button.dynamic
| Attribute | Requirement | Default | Constraints/Notes |
|---|---|---|---|
| type | Required dynamic | none | Button type identifier. |
| target | Optional (either call or target+value must be set) | none | The variable the button will set once clicked. |
| value | Optional (either call or target+value must be set) | none | The value the button will set to the target variable. |
| call | Optional (either call or target+value must be set) | none | The function to call when the button is pressed. Function must be registered in the Jinja Context |
| text | Required | none | Display text on the button. |
| width | Required | none | Button width. |
| height | Required | none | Button height. |
| Base Attributes | Optional | none | Inherits all common base attributes. |
Code Example
<button type="dynamic" height=50 width="100" text="bla" target="foo" value="packed_query:GROUP_D" />
<button type="dynamic" height=50 width="100" text="bla" call="interfacemodule.OpenSomething('argument') />
slot-item
| Attribute | Requirement | Default | Constraints/Notes |
|---|---|---|---|
| vnum | Required | none | Item identifier. |
| count | Optional | 1 | Quantity; defaults to 1 if not provided. |
| sockets | Optional | none | Sockets data, evaluated from string to list/tuple if provided. |
| values | Optional | none | Values data, evaluated from string to list/tuple if provided. |
| Base Attributes | Optional | none | Inherits all common base attributes. |
Code Example
<slot-item vnum="101", count="2" values="[100, 100, 100, 100]"/>
slot-skill
| Attribute | Requirement | Default | Constraints/Notes |
|---|---|---|---|
| vnum | Required | none | Skill identifier. |
| grade | Required | none | Skill grade. |
| level | Required | none | Skill level. |
| Base Attributes | Optional | none | Inherits all common base attributes. |
Skill grade-level conversion
| Grade value | Conventional Level |
|---|---|
0 | 1-20 |
1 | M1-M20 |
2 | G1-G20 |
3 | P |
Code Example
<slot-skill vnum="3" grade="1" level="3"/>
slot-card
| Attribute | Requirement | Default | Constraints/Notes |
|---|---|---|---|
| image | Required | none | Image path for the card. |
| level | Optional | none | Card level. |
| tooltip-text | Optional | none | Tooltip text for additional info. |
| Base Attributes | Optional | none | Inherits all common base attributes. |
Code Example
<slot-card align="center" image="d:/ymir work/ui/skill/pet/pet_skill_7.sub" level="20" tooltip-text="Hound" />
atlas-info
| Attribute | Requirement | Default | Constraints/Notes |
|---|---|---|---|
| Base Attributes | Optional | none | Inherits all common base attributes. |
| scale-x | Optional | none | Scale factor in the x-direction. |
| scale-y | Optional | none | Scale factor in the y-direction. |
| fit-size | Optional | none | Desired size for fitting content. |
Allowed Children: Only <atlas-waypoint> and <atlas-marker>.
Code Example
<atlas-info map="61" scale-x="0.5" scale-y="0.5" margin-x="17" margin-top="10">
<atlas-waypoint x="250" y="700" tooltip-text="test waypoint" />
<atlas-marker x="700" y="250" type="DOMAIN" tooltip-text="test something" />
<atlas-marker x="400" y="400" type="BOSS" tooltip-text="test foo" />
</atlas-info>
atlas-waypoint
| Attribute | Requirement | Default | Constraints/Notes |
|---|---|---|---|
| x | Required | none | X-coordinate position. |
| y | Required | none | Y-coordinate position. |
| tooltip-text | Optional | none | Tooltip for the waypoint. |
| color | Optional | none | Color specification. |
Parent Constraint: Must be placed within an <atlas-info>.
atlas-marker
| Attribute | Requirement | Default | Constraints/Notes |
|---|---|---|---|
| x | Required | none | X-coordinate position. |
| y | Required | none | Y-coordinate position. |
| tooltip-text | Optional | none | Tooltip for the marker. |
| type | Optional | none | Type of marker lable: BOSS, DOMAIN. |
| color | Optional | none | Color specification. |
Parent Constraint: Must be placed within an <atlas-info>.
progress
| Attribute | Requirement | Default | Constraints/Notes |
|---|---|---|---|
| max | Optional | 0 | Maximum count value for progress. |
| count | Optional | 0 | Current progress count. |
| color | Optional | "gauge_bpass" | Color for the progress indicator. |
| tooltip-text | Optional | none | Tooltip text (should include two %d placeholders). |
| Base Attributes | Optional | none | Inherits all common base attributes. |
Allowed Children: Only <progress-checkpoint>.
Code Example
<progress width=150 max="10" count="3" tooltip-text="Progress test %d/%d">
<progress-checkpoint count="5" tooltip-text="Checkpoint at %d"></progress-checkpoint>
<progress-checkpoint count="7"></progress-checkpoint>
</progress>
progress-checkpoint
| Attribute | Requirement | Default | Constraints/Notes |
|---|---|---|---|
| count | Required | none | Checkpoint count value. |
| tooltip-text | Optional | none | Tooltip info (should contain one %s placeholder). |
Parent Constraint: Must be placed inside a <progress>.
conflict-bar
| Attribute | Requirement | Default | Constraints/Notes |
|---|---|---|---|
| left | Optional | 0 | Integer value of the left side. |
| right | Optional | 0 | Integer value of the right side. |
| left-color | Optional | gauge_bpass | Gauge texture of the left side. |
| right-color | Optional | gauge_yellow | Gauge texture of the right side. |
| tooltip-text | Optional | none | Tooltip text. Up to two %d tokens are filled, in order, with the left share and the right share in percent. |
| Base Attributes | Optional | none | Inherits all common base attributes. |
A tug-of-war bar between two values. The slider sits in the middle when both are equal and the left side fills left / (left + right) of the bar; with both at zero it sits at 50%. It is not tied to a feature: any two numbers work. Inside a reactive zone it follows the values when they change.
Should not contain any child elements.
Code Example
<conflict-bar width="auto" left="{{ past_score }}" right="{{ future_score }}" left-color="gauge_yellow" right-color="gauge_blue" tooltip-text="Past {{ past_score }} (%d%%) vs Future {{ future_score }} (%d%%)"/>
model
| Attribute | Requirement | Default | Description |
|---|---|---|---|
| mob-vnum | Optional | none | Mob identifier; must be provided if item-vnum is not set. |
| item-vnum | Optional | none | Item identifier; must be provided if mob-vnum is not set. |
| camera-move | Optional | false | Boolean-like value enabling camera movement. |
| motion-index | Optional | 0 | Motion index to set. |
| camera-eye | Optional | none | A tuple of three values representing the camera's eye position. |
| camera-target | Optional | none | A tuple of three values representing the camera's target position. |
| camera-up | Optional | none | A tuple of three values representing the camera's up vector. |
| background | Optional | "d:/ymir work/ui/game/myshop_deco/model_view_background.sub" | Path to background image/texture. |
| Base Attributes | Inherited | none | See common base attributes. |
Exactly one of mob-vnum or item-vnum must be provided.
Code Example
<model width="100" height="100" item-vnum="109" camera-move="True" />
Motion Index Reference
The motion-index attribute controls the animation of the model being displayed. These values correspond to the EName enum in the source code.
| Value | Name | Description |
|---|---|---|
| 0 | NAME_NONE | No specific motion. |
| 1 | NAME_WAIT | Waiting or idle motion. |
| 2 | NAME_WALK | Walking animation. |
| 3 | NAME_RUN | Running animation. |
| 4 | NAME_CHANGE_WEAPON | Changing weapon animation. |
| 5 | NAME_DAMAGE | Front damage animation. |
| 6 | NAME_DAMAGE_FLYING | Front flying damage animation. |
| 7 | NAME_STAND_UP | Standing up from front damage animation. |
| 8 | NAME_DAMAGE_BACK | Back damage animation. |
| 9 | NAME_DAMAGE_FLYING_BACK | Back flying damage animation. |
| 10 | NAME_STAND_UP_BACK | Standing up from back damage animation. |
| 11 | NAME_DEAD | Death animation. |
| 12 | NAME_DEAD_BACK | Death animation from a back attack. |
| 13 | NAME_NORMAL_ATTACK | Normal attack animation. |
| 14-21 | NAME_COMBO_ATTACK_1 to NAME_COMBO_ATTACK_8 | Combo attack animations. |
| 22 | NAME_INTRO_WAIT | Intro screen idle. |
| 23 | NAME_INTRO_SELECTED | Intro screen selected. |
| 24 | NAME_INTRO_NOT_SELECTED | Intro screen not selected. |
| 25 | NAME_SPAWN | Spawn animation. |
| 26 | NAME_FISHING_THROW | Fishing rod throwing animation. |
| 27 | NAME_FISHING_WAIT | Waiting for a bite animation. |
| 28 | NAME_FISHING_STOP | Stopping fishing animation. |
| 29 | NAME_FISHING_REACT | Reacting to a bite animation. |
| 30 | NAME_FISHING_CATCH | Catching a fish animation. |
| 31 | NAME_FISHING_FAIL | Failing to catch a fish animation. |
| 32 | NAME_STOP | Stopping motion. |
| 33 | NAME_SPECIAL_1 | Special/NPC motion 1. (skill) |
| 34 | NAME_SPECIAL_2 | Special/NPC motion 2. (skill) |
| 35 | NAME_SPECIAL_3 | Special/NPC motion 3. (skill) |
| 36 | NAME_SPECIAL_4 | Special/NPC motion 4. (skill) |
| 37 | NAME_SPECIAL_5 | Special/NPC motion 5. (skill) |
| 38 | NAME_SPECIAL_6 | Special/NPC motion 6. (skill) |
| 39 | NAME_SPAWN_REMOTE | Server-triggered spawn. |
| 50 | NAME_SKILL | Skill start. |
| 51+ | NAME_SKILL_END | Skill end (variable). |
| 67 | NAME_CLAP | Clapping animation. |
| 68 | NAME_CHEERS_1 | Cheers animation 1. |
| 69 | NAME_CHEERS_2 | Cheers animation 2. |
| 70 | NAME_KISS_START to NAME_KISS_WITH_SHAMAN | Kissing animations. |
| 74 | NAME_FRENCH_KISS_START to NAME_FRENCH_KISS_WITH_SHAMAN | French kissing animations. |
| 78 | NAME_SLAP_HIT_START to NAME_SLAP_HIT_WITH_SHAMAN | Slap hit animations. |
| 82 | NAME_SLAP_HURT_START to NAME_SLAP_HURT_WITH_SHAMAN | Slap hurt animations. |
| 86 | NAME_DIG | Digging animation. |
| 87 | NAME_DANCE_1 to NAME_DANCE_6 | Dance animations. |
| 93 | NAME_DANCE_END | Dance animation end. |
| 103 | NAME_CONGRATULATION | Congratulation motion. |
| 104 | NAME_FORGIVE | Forgive motion. |
| 105 | NAME_ANGRY | Angry motion. |
| 106 | NAME_ATTRACTIVE | Attractive motion. |
| 107 | NAME_SAD | Sad motion. |
| 108 | NAME_SHY | Shy motion. |
| 109 | NAME_CHEERUP | Cheer up motion. |
| 110 | NAME_BANTER | Banter motion. |
| 111 | NAME_JOY | Joyful motion. |
| 112 | NAME_MAX_NUM | Maximum number of motions. |