Skip to content

API Query Clan clan_any

SolWayward edited this page Dec 22, 2025 · 2 revisions

gm.query.clan_any

Endpoint: gm.query.clan_any

Syntax

gm.query.clan_any [search_terms...] [type_flags...] [sort:field[:order]]

Description

Search for clans using OR logic (matches ANY of the specified type criteria instead of ALL). Useful for broader searches across multiple clan types. Text search still applies to all results.

Parameters

Parameter Type Required Description
search_terms string No Text to search in clan names, IDs, and kingdom names
type_flags flags No Filter by clan types using OR logic (see Type Flags below)
sort:field[:order] string No Sort results by field (see Sorting Options below)

Type Flags

Status:

  • active - Active clans
  • eliminated - Destroyed/eliminated clans
  • empty - Clans with no heroes

Faction Types:

  • bandit - Bandit clans
  • nonbandit - Non-bandit clans
  • noble - Noble houses
  • minor - Minor faction clans
  • rebel - Rebel clans
  • mercenary - Mercenary clans
  • mafia - Criminal organizations
  • outlaw - Outlaw clans
  • nomad - Nomadic clans
  • sect - Religious sects

Relationships:

  • withoutkingdom - Clans without a kingdom
  • player - Player's clan

Sorting Options

  • sort:id - Sort by StringId (default)
  • sort:name - Sort alphabetically by name
  • sort:tier - Sort by clan tier
  • sort:gold - Sort by gold amount
  • sort:renown - Sort by renown
  • sort:kingdom - Sort by kingdom name
  • sort:heroes - Sort by number of heroes
  • sort:[type_flag] - Sort by any type flag

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

  • sort:gold:desc - Sort richest first
  • sort:renown:desc - Sort highest renown first

OR Logic Explanation

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

  • gm.query.clan bandit outlaw (AND logic) - Finds clans that are BOTH bandits AND outlaws
  • gm.query.clan_any bandit outlaw (OR logic) - Finds clans that are EITHER bandits OR outlaws

Examples

Find clans that are bandits OR outlaws:

gm.query.clan_any bandit outlaw

Find mercenaries OR rebels:

gm.query.clan_any mercenary rebel

Find eliminated OR empty clans:

gm.query.clan_any eliminated empty

Search with text filter and OR types:

gm.query.clan_any empire noble mercenary

Sort results by renown:

gm.query.clan_any noble mercenary sort:renown:desc

Find any non-traditional clan type:

gm.query.clan_any bandit mercenary rebel outlaw

Output

Success:

Found N clan(s) matching ANY of [criteria]:
[Name] ([StringId]) - Leader: [LeaderName], Kingdom: [KingdomName], Tier: [Tier], Renown: [Renown], Gold: [Gold], Heroes: [Count]

Notes

TIP: Use clan_any when you want to find multiple clan types in a single search.

TIP: Combine with text search to narrow OR results to specific kingdoms while keeping type flexibility.

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