Skip to content

Tooltip Selectors

Bazaar tooltip configs under config/bazaar/tooltips/ can pull data from several different roots. Choosing the right one matters:

RootUse it forNotes
pokemonDisplay.*Stable normalized Pokemon tooltip fieldsBest first choice for most Pokemon tooltip work
pokemonJson.*Saved JSON-derived Cobblemon fieldsGood fallback when pokemonDisplay does not expose the field
pokemon.*Live runtime and NBT-backed accessAdvanced only; only works when a live Pokemon exists in the tooltip context
formatted.*Preformatted Bazaar display valuesPrice, expiry, current bid, buyout, etc.
listing.*Raw Bazaar listing model fieldsSeller, channel, listing type, ids, timestamps
attributes.*Flattened Bazaar attribute mapSpecies/form/moves/item-derived metadata

Wondering which root to use for hyper-trained data? Prefer pokemonDisplay.*.

Available selectors:

  • pokemonDisplay.hyperTrained
  • pokemonDisplay.hyperTrainedFlags.hp
  • pokemonDisplay.hyperTrainedFlags.atk
  • pokemonDisplay.hyperTrainedFlags.def
  • pokemonDisplay.hyperTrainedFlags.spa
  • pokemonDisplay.hyperTrainedFlags.spd
  • pokemonDisplay.hyperTrainedFlags.spe
  • pokemonDisplay.hyperTrainedFlags.any
  • pokemonDisplay.hyperTrainedCount
  • pokemonDisplay.hyperTrainedSummary

What they mean:

  • pokemonDisplay.hyperTrained is the aggregate set. In selector text contexts it stringifies as a comma-joined list of stat labels.
  • pokemonDisplay.hyperTrainedFlags.* are the ergonomic per-stat booleans.
  • pokemonDisplay.hyperTrainedFlags.any is a simple “does this Pokemon have any hyper-trained stat?” boolean.
  • pokemonDisplay.hyperTrainedCount is the count of hyper-trained stats.
  • pokemonDisplay.hyperTrainedSummary is the comma-joined label summary.

Copy-paste examples:

{ type = "selector", selector = "pokemonDisplay.hyperTrainedSummary", value = "<gray>Hyper Trained:</gray> <white>{value}</white>", hide-if-empty = true }
{ type = "text", value = "<gray>Hyper Trained Count:</gray> <white>{bazaar:selector:pokemonDisplay.hyperTrainedCount}</white>", show-if-molang = "q.tooltip.bool('pokemonDisplay.hyperTrainedFlags.any') == 1" }
{ type = "text", value = "<green>HP is Hyper Trained</green>", show-if-molang = "q.tooltip.bool('pokemonDisplay.hyperTrainedFlags.hp') == 1" }

In relevant tooltip contexts, Bazaar also injects a live restored pokemon object.

Practical examples:

  • pokemon.level
  • pokemon.tradeable
  • pokemon.persistentData.dexlives
  • pokemon.persistentData.some_nested_tag

Important nuance:

  • This only works where a live Pokemon exists in the tooltip context.
  • Prefer pokemonDisplay.* first for stable/common fields.
  • Prefer pokemonJson.* next when you need saved JSON-derived fields.
  • Use pokemon.* for advanced runtime or NBT-backed access.

In current Bazaar runtime paths, live pokemon is available in:

  • Pokemon sell/source picker preview tooltips
  • Pokemon listing tooltips resolved for a real player

It is not part of the default item tooltip contexts.

Copy-paste examples:

{ type = "text", value = "<gray>Level:</gray> <white>{bazaar:selector:pokemon.level}</white>" }
{ type = "selector", selector = "pokemon.persistentData.dexlives", value = "<gray>Dex Lives:</gray> <white>{value}</white>", hide-if-empty = true }

Bazaar’s selector resolver traverses Minecraft NBT directly. It supports:

  • CompoundTag
  • NBT collections/lists
  • numeric tags
  • string tags

That means paths like this work directly:

  • pokemon.persistentData.dexlives

And list-style traversal also works by numeric index when the underlying value is an NBT collection.

This support applies both to normal selectors and to the q.tooltip.* Molang bridge helpers described below.

Bazaar tooltip Molang exposes:

  • q.tooltip.str('path')
  • q.tooltip.num('path')
  • q.tooltip.bool('path')
  • q.pokemon

What they do:

  • q.tooltip.str('path') resolves any tooltip selector path as a string
  • q.tooltip.num('path') resolves any tooltip selector path as a number
  • q.tooltip.bool('path') resolves any tooltip selector path as a boolean
  • q.pokemon exposes Cobblemon’s live Pokemon#struct

Important nuance:

  • q.pokemon is only available when a live Pokemon exists in the tooltip context.
  • q.pokemon comes from Cobblemon’s native Molang-facing struct, not from Bazaar’s normalized pokemonDisplay.

Copy-paste examples:

{ type = "text", value = "<gray>Dex Lives:</gray> <white>{bazaar:molang:q.tooltip.num('pokemon.persistentData.dexlives')}</white>" }
{ type = "text", value = "<green>Hyper Trained HP</green>", show-if-molang = "q.tooltip.bool('pokemonDisplay.hyperTrainedFlags.hp') == 1" }
{ type = "text", value = "<gray>Level: <white>{bazaar:molang:q.pokemon.level}</white>" }

Use this order in practice:

  1. formatted.* when Bazaar already gives you a display-ready value
  2. pokemonDisplay.* for normalized Pokemon tooltip fields
  3. pokemonJson.* for saved JSON-derived fallback access
  4. attributes.* for flattened market metadata
  5. listing.* for raw Bazaar listing state
  6. pokemon.* only when you need live runtime or NBT-backed access

Examples by root:

{ type = "text", value = "<gray>Price:</gray> <green>{bazaar:selector:formatted.price}</green>" }
{ type = "text", value = "<gray>Species:</gray> <white>{bazaar:selector:pokemonDisplay.species}</white>" }
{ type = "selector", selector = "pokemonJson.PokemonOriginalTrainerName", value = "<gray>OT:</gray> <white>{value}</white>", hide-if-empty = true }
{ type = "selector", selector = "attributes.ability", value = "<gray>Ability Key:</gray> <white>{value}</white>", hide-if-empty = true }
{ type = "text", value = "<gray>Listing Type:</gray> <white>{bazaar:selector:listing.listingType}</white>" }

Where to Look in the Bundled Tooltip Files

Section titled “Where to Look in the Bundled Tooltip Files”

The strongest source examples today live in:

  • pokemon-preview.conf
  • pokemon-compact.conf
  • pokemon-full.conf

pokemon-preview.conf contains the shared DSL and selector rules. pokemon-full.conf is the richest live-Pokemon detail context. If you want to add advanced runtime-backed lines, start there.