UltimateShop Wiki
  • 🎉Welcome
  • 🌏Other Language Wiki
  • 📦Info
    • ✅Requirements
    • ⚙️Install
    • 🔗Compatibility
    • 🛠️Configuration files
    • ⌨️Commands
    • 📊Data
    • 🚀Performance
    • ❓FAQ
    • 🆚Compare
  • 📋Format
    • 🛒Info of ItemFormat™
    • 📝ItemFormat™
      • Component Format
    • 💹EconomyFormat™
    • 🖼️Display Item Format
    • 🎬Action Format
    • ⚖️Condition Format
    • ➗Math Calculate Format
  • 🔌Menus
    • 🔲General Menus
    • 🔽Buy More Menus
    • 🛏️Bedrock Menus - Premium
    • 🥉Display Item Add Lore
  • 🛍️Shops
    • 📂Shops
    • 🛒Products
    • 💰Products Config: Single Thing
    • ♻️Product Config: Buy/Sell Times Reset
    • 📚Common Examples
    • 🌱Example: Stock (like in life)
    • 📅Example: Daily Shops
    • 🏆Example: Daily Rewards
  • 📍Placeholders
    • 🔧Built-in Placeholder
    • 🔀Random Placeholder - Premium
    • ⛓️Conditional Placeholder - Premium
    • 🔖Example: Discount
  • 💰Dynamic Prices
    • 🔄Dynamic Price
    • 🔴Dynamic Price Status - Premium
  • ✨Features
    • 🎨Color Code
    • 💴Easy Prices
    • 🪄Sell Stick - Premium
    • 💾Saved Item (Item Manager)
    • 🌍Localized Item Name - Premium
    • 🌐Multi Server Sync - Premium
    • 🔢Number Format
    • ✏️In-game Editor - Premium
    • 🎮Custom Click Event - Premium
    • 🔍Custom Item Match Method
    • 🔑Give Item Method
    • 💳Log Transaction - Premium
  • 💻Develop
    • Develop Guide
    • Events
    • Hook into UltimateShop
    • Can't do things
Powered by GitBook
On this page
  • Config
  • Use Placeholder
  • Reset Placeholder
  • Example: Random Price
  • Create new random placeholder
  • Set dynamic value in your product configs
  1. 📍Placeholders

🔀Random Placeholder - Premium

We added {random} built-in placeholder in premium version.

Config

All random placeholder configs are stored in random_placeholders folder. The file name is it's ID, for example: rotate.yml means it's ID is rotate. An example of it's config is like below:

reset-mode: TIMED
reset-time: '00:00:00'
elements:
  - 'A'
  - 'B'
  - 'C'
  • reset-mode/reset-time: Please view below to know.

  • element-amount: The amount of the element will picked. (Added in 3.1.0)

  • elements: The random element what placeholder will picked.

    • Support use ~ symbol means pick random number, for example, 5~100 means pick one random number from 5 to 100.

reset-mode: TIMED
reset-time: '00:00:00'
element-amount: 2
elements:
  - 'A'
  - 'B'
  - 'C'

Use Placeholder

Reset Placeholder

You can reset placeholder by setting reset-mode and reset-time option.

Supports below reset mode:

  • ONCE: Each time it is used, it will reset and is not applicable to the price, as the price seen by the player opening the store and the actual transaction result are calculated twice, so you cannot achieve price synchronization.

Example: Random Price

Create new random placeholder

In this example, we create a new random placeholder config called price.yml at random_placeholder folder.

reset-mode: TIMED
reset-time: '00:00:00'
elements:
# Random number from 5 to 100.
  - '5~100'

Set dynamic value in your product configs

Use {random_price} placeholder at any product's price config. Like I add this placeholder in this product:

items:
  A:
    price-mode: CLASSIC_ALL
    product-mode: CLASSIC_ALL
    products:
      1:
        material: coal
        amount: 1
    buy-prices:
      1:
        economy-plugin: Vault
        amount: '{random_price}' # <--- Changed line
        placeholder: '&6{amount} Coins'
        start-apply: 0
Previous🔧Built-in PlaceholderNext⛓️Conditional Placeholder - Premium

Last updated 3 months ago

Use {random_<ID>;;<Number>} placeholder to display it's value, like {random_daily;;2} will query daily random placeholder's second element picked. For more info, please view page. For example of this placeholder usage, please view page.

TIMER/TIMED/NEVER: Please view to know more. We will generate reset time after random placeholder be used once. The reset time will not automatically adjust based on configuration updates. If you set the reset time incorrectly, you will need to delete the corresponding data.

For more info, please view .

Placeholders
Daily Shop
this page
this page