Skip to main content

Widget tags

The tags that draw a picture or a control rather than lay out or write text.

img​

AttributeRequirementDefaultConstraints/Notes
pathRequirednonePath to the image resource.
Base AttributesOptionalnoneInherits all common base attributes.
Code Example
<img path="d:/ymir work/ui/example/banner.png" />

image


button.button​

AttributeRequirementDefaultConstraints/Notes
typeRequired buttonnoneButton type identifier.
targetOptional (either call or target+value must be set)noneThe variable the button will set once clicked.
valueOptional (either call or target+value must be set)noneThe value the button will set to the target variable.
callOptional (either call or target+value must be set)noneThe function to call when the button is pressed. Function must be registered in the Jinja Context
pathRequirednoneImage path template for button states.
tooltip-textOptionalnoneTooltip text.
Base AttributesOptionalnoneInherits 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') />

image


button.dynamic​

AttributeRequirementDefaultConstraints/Notes
typeRequired dynamicnoneButton type identifier.
targetOptional (either call or target+value must be set)noneThe variable the button will set once clicked.
valueOptional (either call or target+value must be set)noneThe value the button will set to the target variable.
callOptional (either call or target+value must be set)noneThe function to call when the button is pressed. Function must be registered in the Jinja Context
textRequirednoneDisplay text on the button.
widthRequirednoneButton width.
heightRequirednoneButton height.
Base AttributesOptionalnoneInherits 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') />

image

slot-item​

AttributeRequirementDefaultConstraints/Notes
vnumRequirednoneItem identifier.
countOptional1Quantity; defaults to 1 if not provided.
socketsOptionalnoneSockets data, evaluated from string to list/tuple if provided.
valuesOptionalnoneValues data, evaluated from string to list/tuple if provided.
Base AttributesOptionalnoneInherits all common base attributes.
Code Example
<slot-item vnum="101", count="2" values="[100, 100, 100, 100]"/>

image


slot-skill​

AttributeRequirementDefaultConstraints/Notes
vnumRequirednoneSkill identifier.
gradeRequirednoneSkill grade.
levelRequirednoneSkill level.
Base AttributesOptionalnoneInherits all common base attributes.

Skill grade-level conversion

Grade valueConventional Level
01-20
1M1-M20
2G1-G20
3P
Code Example
<slot-skill vnum="3" grade="1" level="3"/>

image


slot-card​

AttributeRequirementDefaultConstraints/Notes
imageRequirednoneImage path for the card.
levelOptionalnoneCard level.
tooltip-textOptionalnoneTooltip text for additional info.
Base AttributesOptionalnoneInherits 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" />

image

atlas-info​

AttributeRequirementDefaultConstraints/Notes
Base AttributesOptionalnoneInherits all common base attributes.
scale-xOptionalnoneScale factor in the x-direction.
scale-yOptionalnoneScale factor in the y-direction.
fit-sizeOptionalnoneDesired size for fitting content.
CAUTION

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>

image


atlas-waypoint​

AttributeRequirementDefaultConstraints/Notes
xRequirednoneX-coordinate position.
yRequirednoneY-coordinate position.
tooltip-textOptionalnoneTooltip for the waypoint.
colorOptionalnoneColor specification.
CAUTION

Parent Constraint: Must be placed within an <atlas-info>.


atlas-marker​

AttributeRequirementDefaultConstraints/Notes
xRequirednoneX-coordinate position.
yRequirednoneY-coordinate position.
tooltip-textOptionalnoneTooltip for the marker.
typeOptionalnoneType of marker lable: BOSS, DOMAIN.
colorOptionalnoneColor specification.
CAUTION

Parent Constraint: Must be placed within an <atlas-info>.

progress​

AttributeRequirementDefaultConstraints/Notes
maxOptional0Maximum count value for progress.
countOptional0Current progress count.
colorOptional"gauge_bpass"Color for the progress indicator.
tooltip-textOptionalnoneTooltip text (should include two %d placeholders).
Base AttributesOptionalnoneInherits all common base attributes.
CAUTION

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>

image


progress-checkpoint​

AttributeRequirementDefaultConstraints/Notes
countRequirednoneCheckpoint count value.
tooltip-textOptionalnoneTooltip info (should contain one %s placeholder).
CAUTION

Parent Constraint: Must be placed inside a <progress>.


conflict-bar​

AttributeRequirementDefaultConstraints/Notes
leftOptional0Integer value of the left side.
rightOptional0Integer value of the right side.
left-colorOptionalgauge_bpassGauge texture of the left side.
right-colorOptionalgauge_yellowGauge texture of the right side.
tooltip-textOptionalnoneTooltip text. Up to two %d tokens are filled, in order, with the left share and the right share in percent.
Base AttributesOptionalnoneInherits 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.

CAUTION

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​

AttributeRequirementDefaultDescription
mob-vnumOptionalnoneMob identifier; must be provided if item-vnum is not set.
item-vnumOptionalnoneItem identifier; must be provided if mob-vnum is not set.
camera-moveOptionalfalseBoolean-like value enabling camera movement.
motion-indexOptional0Motion index to set.
camera-eyeOptionalnoneA tuple of three values representing the camera's eye position.
camera-targetOptionalnoneA tuple of three values representing the camera's target position.
camera-upOptionalnoneA tuple of three values representing the camera's up vector.
backgroundOptional"d:/ymir work/ui/game/myshop_deco/model_view_background.sub"Path to background image/texture.
Base AttributesInheritednoneSee common base attributes.
CAUTION

Exactly one of mob-vnum or item-vnum must be provided.

Code Example
<model width="100" height="100" item-vnum="109" camera-move="True" />

image

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.

ValueNameDescription
0NAME_NONENo specific motion.
1NAME_WAITWaiting or idle motion.
2NAME_WALKWalking animation.
3NAME_RUNRunning animation.
4NAME_CHANGE_WEAPONChanging weapon animation.
5NAME_DAMAGEFront damage animation.
6NAME_DAMAGE_FLYINGFront flying damage animation.
7NAME_STAND_UPStanding up from front damage animation.
8NAME_DAMAGE_BACKBack damage animation.
9NAME_DAMAGE_FLYING_BACKBack flying damage animation.
10NAME_STAND_UP_BACKStanding up from back damage animation.
11NAME_DEADDeath animation.
12NAME_DEAD_BACKDeath animation from a back attack.
13NAME_NORMAL_ATTACKNormal attack animation.
14-21NAME_COMBO_ATTACK_1 to NAME_COMBO_ATTACK_8Combo attack animations.
22NAME_INTRO_WAITIntro screen idle.
23NAME_INTRO_SELECTEDIntro screen selected.
24NAME_INTRO_NOT_SELECTEDIntro screen not selected.
25NAME_SPAWNSpawn animation.
26NAME_FISHING_THROWFishing rod throwing animation.
27NAME_FISHING_WAITWaiting for a bite animation.
28NAME_FISHING_STOPStopping fishing animation.
29NAME_FISHING_REACTReacting to a bite animation.
30NAME_FISHING_CATCHCatching a fish animation.
31NAME_FISHING_FAILFailing to catch a fish animation.
32NAME_STOPStopping motion.
33NAME_SPECIAL_1Special/NPC motion 1. (skill)
34NAME_SPECIAL_2Special/NPC motion 2. (skill)
35NAME_SPECIAL_3Special/NPC motion 3. (skill)
36NAME_SPECIAL_4Special/NPC motion 4. (skill)
37NAME_SPECIAL_5Special/NPC motion 5. (skill)
38NAME_SPECIAL_6Special/NPC motion 6. (skill)
39NAME_SPAWN_REMOTEServer-triggered spawn.
50NAME_SKILLSkill start.
51+NAME_SKILL_ENDSkill end (variable).
67NAME_CLAPClapping animation.
68NAME_CHEERS_1Cheers animation 1.
69NAME_CHEERS_2Cheers animation 2.
70NAME_KISS_START to NAME_KISS_WITH_SHAMANKissing animations.
74NAME_FRENCH_KISS_START to NAME_FRENCH_KISS_WITH_SHAMANFrench kissing animations.
78NAME_SLAP_HIT_START to NAME_SLAP_HIT_WITH_SHAMANSlap hit animations.
82NAME_SLAP_HURT_START to NAME_SLAP_HURT_WITH_SHAMANSlap hurt animations.
86NAME_DIGDigging animation.
87NAME_DANCE_1 to NAME_DANCE_6Dance animations.
93NAME_DANCE_ENDDance animation end.
103NAME_CONGRATULATIONCongratulation motion.
104NAME_FORGIVEForgive motion.
105NAME_ANGRYAngry motion.
106NAME_ATTRACTIVEAttractive motion.
107NAME_SADSad motion.
108NAME_SHYShy motion.
109NAME_CHEERUPCheer up motion.
110NAME_BANTERBanter motion.
111NAME_JOYJoyful motion.
112NAME_MAX_NUMMaximum number of motions.