Basic Conditions
Conditions use boolean placeholders to determine visibility:Condition Syntax
Boolean Placeholders
Use boolean placeholders directly:Negation
Invert conditions with!:
Comparison Operators
Compare numeric placeholders:String Comparisons
Compare string placeholders:Logical Operators
AND
Multiple conditions must all be true:OR
At least one condition must be true:Complex Logic
Combine operators with parentheses:Always Check Condition
By default, conditions are only checked when a popup is triggered. Enable continuous checking:always-check-condition: true:
- The popup will hide automatically when the condition becomes false
- Useful for status indicators that should disappear when conditions change
Conditional Layouts
Show different layouts based on conditions:Conditional Text
Display different text based on conditions:Creating Conditional Placeholders
Create boolean placeholders for use in conditions:Common Condition Patterns
Health Warnings
Status Effects
Environment-Based
Permission-Based
Time-Based
Advanced Conditional Logic
Range Checks
Multi-State Conditions
Combination States
Performance Considerations
Expensive Conditions
Avoid complex calculations in frequently-checked conditions:Always Check Condition
Usealways-check-condition sparingly:
Condition Caching
Placeholder values are cached per update cycle, so multiple conditions using the same placeholder are efficient:Debugging Conditions
Enable Debug Mode
Test Placeholders
Verify placeholder values:Common Issues
-
Condition always true/false
- Check placeholder registration
- Verify placeholder type matches usage
- Test placeholder values independently
-
Condition not updating
- Enable
always-check-condition: true - Verify trigger is firing
- Check placeholder updates on the right events
- Enable
-
Syntax errors
- Verify operator syntax (
&&,||,!) - Check parentheses are balanced
- Ensure string comparisons use quotes
- Verify operator syntax (
Examples
Combat HUD
Low Resource Warning
Achievement Unlock
Dimension-Specific HUD
Next Steps
Placeholders
Create custom placeholders
Triggers
Control when conditions are checked
Popups
Use conditions in popups
Layouts
Conditional layout display
