Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
MythicMobs MythicMobs
  • Project overview
    • Project overview
    • Details
    • Activity
  • Issues 132
    • Issues 132
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • MythicCraft
  • MythicMobsMythicMobs
  • Issues
  • #1660

Closed
Open
Created Jul 14, 2024 by Lxlp@LxlpDeveloper

Allow Custom Placeholders with Conditions to return a random value

Summary

As of now, writing something like

pathinggoal:
  test:
    Conditions:
    - variableequals{var=global.tier;val=0} true
    Value:
    - Tier2
    - Tier3
    - Tier4
    - Tier5
    - Tier6
    - Tier8
  Default:
  - Tier1
  - Tier2
  - Tier3
  - Tier4
  - Tier5
  - Tier6
  - Tier8

Will not return a random value from within the list, but the list itself in the string format [ element1, element2, element3, ... ], unlike custom placeholder without conditions

Implementation

Since that functionality might be used by someone already, for retrocompatibility's sake i suggest the addition of a Random or Values (with the s) field which, if specified, will return a random value between the ones listed. If only Value is used, it will continue with the current behavior

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking