Skip to content

๐Ÿ”ฌ Diagnostics & Protocol โ€‹

Previous: Script APIใ€€ยทใ€€Next: Data Storage

When a skill "won't cast" or "casts but does nothing," QS offers two diagnostic commands (/qs protocol, /qs bridge) and a set of debug trace logs, working together with the SkillRuntimeProtocol protocol layer to pinpoint the problem. This chapter spells out the QS โ†” MythicMobs protocol contract, how to read the diagnostic output, and what each trace stage means. This document targets QS 1.0.22.

QS has only one runtime pipeline. The trace reflects the stages of this single pipeline; there are no multiple chains.


1. The protocol layer: SkillRuntimeProtocol โ€‹

The QS โ†’ MM forwarding sits behind a protocol layer that makes "identity / version / required fields / availability / failure reason" explicit:

Constant / MethodValue / Effect
PROTOCOL_ID"qinhskills:skill_cast_request"
PROTOCOL_VERSION1
requiredFields(){skillId, casterId}
isAvailable()Bridge id is non-empty and MythicMobs is available
compatibility()OK / BRIDGE_MISSING / MYTHIC_MISSING
validate(request)Validates the request, returns a List<String> of issues (empty list = valid)
describe()Returns a SkillRuntimeProtocolState snapshot

Compatibility logic โ€‹

Bridge unavailable               โ†’ BRIDGE_MISSING
Bridge available but MM not       โ†’ MYTHIC_MISSING
Both available                    โ†’ OK

Request: SkillCastRequest โ€‹

kotlin
data class SkillCastRequest(
    val skillId: String,
    val casterId: UUID,
    val targetId: UUID?,
    val context: Map<String, Any>,
)

The three checks in validate:

  • skillId is not blank
  • casterId is not the zero UUID (UUID(0,0))
  • context is not empty

The single execution outlet โ€‹

After protocol validation passes, there's only one outlet for actually "casting":

MythicExecutor.cast โ†’ MythicBukkit apiHelper.castSkill

QS itself does not draw particles or compute damage. SUCCESS only means QS successfully handed the request to MM; the actual outcome is determined by the MM skill. When MM isn't installed, it degrades to a placeholder message [QinhSkills] SkillName.


2. /qs protocol โ€‹

Prints a snapshot of the protocol layer (describe()):

[QS] protocol=qinhskills:skill_cast_request@v1
[QS] required=[skillId, casterId]
[QS] bridge=<bridgeId>, bridgeAvailable=true, mythic=true, ready=true
[QS] compatibility=OK

Line-by-line reading:

FieldMeaningWhen abnormal
protocolProtocol id + versionโ€”
requiredRequired fieldsโ€”
bridgeBridge implementation idempty string = bridge not registered properly
bridgeAvailableWhether the bridge is availablefalse โ†’ BRIDGE_MISSING
mythicWhether MM is availablefalse โ†’ MYTHIC_MISSING
readyOverall readiness (bridge && MM)false = skills won't produce real effects
compatibilityCombined compatibility codesee table above

Seeing compatibility=MYTHIC_MISSING: the QS side is fine โ€” go install / troubleshoot MythicMobs. Seeing BRIDGE_MISSING: the bridge itself didn't come up โ€” /qs reload first to re-sync the bridge.


3. /qs bridge โ€‹

Prints the bridge's live status:

[QS] bridgeId=<id>
[QS] bridgeAvailable=true
[QS] lastRequest=fire_wave
FieldMeaning
bridgeIdThe current bridge implementation identifier
bridgeAvailableWhether the bridge is available
lastRequestThe skill id forwarded most recently (null if none)

lastRequest is very handy: a player presses a key and says nothing happened โ€” check whether it refreshed to the corresponding skill id here. If it did = the request reached the bridge (the problem is on the MM side); if it didn't change = the request never reached the bridge (the problem is in gating/routing/triggering).


4. debug trace logs โ€‹

Enable in config.yml:

yaml
debug: true

Once enabled, each cast prints a tagged trace by pipeline stage, making it easy to see "where it got stuck":

TagStage
[QI]QI-side entry (item trigger)
[EVENT]QISkillUseEvent gateway fires the event
[PARSE]Payload normalization, skill id resolution
[ROUTE]Graph resolution, node selection (opener/continuation/combo)
[GATE]Gate checks item by item (unlock/cooldown/charges/GCD/resource/blood-sacrifice/conflict/condition/cast_mode)
[EXEC]Hand off to MythicExecutor for execution
[POST]Post-processing (enter CD, spend cost, post_js)
[FALLBACK]Took the QiListener backstop path
[BYPASS]Always logged (unaffected by the debug switch); indicates the reason a stage was skipped

[BYPASS] is logged whether or not debug is on, specifically recording "why a stage didn't run." When troubleshooting "the skill mysteriously won't cast," look here first.

Typical troubleshooting paths โ€‹

SymptomWhich trace to check
Keypress does nothing at allWhether [QI] / [EVENT] appear
EVENT appears but no EXEC[GATE] โ€” which gate item blocked it
EXEC happened but no effect/qs bridge lastRequest + the mythic field of /qs protocol
Combo won't chain[ROUTE] โ€” whether the node's require_state matches
Placeholder returns emptyWhether the skill's profile state exists (see Data Storage)

QS has 11 subcommands total (/qs, aliases /qskills /qskill); the diagnostics-related ones are:

CommandPermissionNotes
/qs reloadqinhskills.adminReload definitions/graph/routing + sync the MM bridge
/qs protocolqinhskills.useProtocol-layer snapshot
/qs bridgeqinhskills.useBridge status + lastRequest
/qs info <skill>qinhskills.useSkill definition details
/qs list [player]qinhskills.useList skills with unlock/level/cooldown

โš ๏ธ There are no commands like /qs test or /qs gen. Capabilities marked "planned / internal" in the text are currently not exposed. Diagnostics rely solely on /qs protocol, /qs bridge, and the trace from debug: true.


Further reading โ€‹

  • Events โ€” the trace's [EVENT] stage maps to QISkillUseEvent
  • API โ€” each CastResult code maps to a gating stage
  • Data Storage โ€” the source of cooldown/charge state