Skip to content

API Query Item item_any

SolWayward edited this page Dec 22, 2025 · 2 revisions

gm.query.item_any

Endpoint: gm.query.item_any

Syntax

gm.query.item_any [search_terms...] [type_flags...] [tier_flags...] [sort:field[:order]]

Description

Search for items matching ANY of the specified types (OR logic). All other parameters work the same as gm.query.item. Useful for comparing different item types or finding alternatives.

Parameters

Parameter Type Required Description
search_terms string No Text to match against item name, ID, or tier
type_flags flags No Filter by item types using OR logic (see Type Flags below)
tier_flags flags No Filter by tier level (tier0 through tier6)
sort:field[:order] string No Sort results (see Sorting Options below)

Type Flags

Same as gm.query.item:

Weapons: weapon, 1h/onehanded, 2h/twohanded, ranged, bow, crossbow, polearm, thrown, shield

Ammunition: arrows, bolts

Armor: armor, head/headarmor, body/bodyarmor, leg/legarmor, hand/handarmor, cape

Mounts: mount, horsearmor

Other: food, trade/goods, banner, civilian, combat

Tier Flags

  • tier0 through tier6 - Filter by tier level

Sorting Options

  • sort:id - Sort by StringId (default)
  • sort:name - Sort alphabetically by name
  • sort:tier - Sort by tier level
  • sort:value - Sort by gold value
  • sort:type - Sort by item type category

Add :desc for descending order or :asc for ascending (default)

OR Logic Explanation

When using gm.query.item_any, the command matches items that have ANY of the specified type flags. For example:

  • gm.query.item bow crossbow (AND logic) - Finds items that are BOTH bows AND crossbows (usually none)
  • gm.query.item_any bow crossbow (OR logic) - Finds items that are EITHER bows OR crossbows

Examples

Find any ranged weapon:

gm.query.item_any bow crossbow

Find tier 4 one-handed OR two-handed weapons:

gm.query.item_any 1h 2h tier4

Find weapons OR armor:

gm.query.item_any weapon armor tier5

With sorting:

gm.query.item_any bow crossbow tier5 sort:value:desc
gm.query.item_any weapon armor sort:name

Compare armor pieces:

gm.query.item_any head body leg tier4 sort:value:desc

Find any mounted equipment:

gm.query.item_any mount horsearmor tier5 sort:name

Output

Success:

Found N item(s) matching ANY of [criteria]:
[StringId]    [Name]    Type: [Type]    Value: [Gold]    Tier: [Tier]

Notes

TIP: Use item_any to compare different weapon or armor types side-by-side.

TIP: Excellent for finding alternatives when a specific item type is not available.

Related Commands

Last Updated: 2025-12-16

Quick Links

🏠 Home | Quick Reference | Syntax Guide


Hero Commands
Clan Commands
Kingdom Commands
Settlement Commands
Item Commands
Troop Commands
Caravan Commands
Bandit Commands
Query Commands

Clone this wiki locally