ygopro-script

Provides YGOPro Lua API reference for card script research, implementation, and comparison.

1|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/ZisIsNotZis/ygoskill --skill ygopro-script-zisisnotzis
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ygopro-script
Source: https://github.com/ZisIsNotZis/ygoskill/tree/main/ygopro/script
Command: npx skills add https://github.com/ZisIsNotZis/ygoskill --skill ygopro-script-zisisnotzis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing YGOPro card scripts requires deep knowledge of the ocgcore Lua API across Card, Effect, Group, Duel, and Debug objects, and that knowledge is scattered across C++ source files and procedure.lua. This Skill consolidates the full API surface into navigable reference documents so AI-assisted script work stays accurate. ## Core Features & Use Cases - Complete Lua API Reference: Covers Card getters/checks/actions, Effect creation and callbacks, Group filtering and selection, Duel state control, and Debug field setup, sourced from ocgcore scriptlib headers. - Constants and Effect Codes: Documents locations, positions, types, attributes, races, reasons, summon types, effect types, flags, events, categories, and reset conditions from constant.lua. - Summoning Procedure Helpers: Details Auxiliary.AddSynchroProcedure, AddXyzProcedure, AddFusionProc variants, Ritual, Link, Pendulum, and Gemini procedures from procedure.lua. - Use Case: When implementing a custom card script, look up the exact signature of Duel.SpecialSummon or card:RegisterEffect, then wire condition, cost, target, and operation callbacks with correct event codes. ## Quick Start Ask the AI to look up the YGOPro Lua API for registering a trigger effect on a card and explain the required callback signatures.

Frequently Asked Questions about ygopro-script

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I register a card effect in YGOPro Lua scripting?▼

Create the effect with Effect.CreateEffect(card), configure it with setters like SetType, SetCode, SetRange, and SetOperation, then call card:RegisterEffect(effect). The registration returns an effect ID you can use for later reference.

How do I write condition, cost, target, and operation callbacks for YGOPro effects?▼

All callbacks receive e, tp, eg, ep, ev, re, r, rp. Condition returns a boolean, cost uses chk==0 to test payment and chk~=0 to pay, target sets operation info via Duel.SetOperationInfo, and operation resolves the effect with no return value.

What is the difference between EFFECT_TYPE_TRIGGER_O and EFFECT_TYPE_TRIGGER_F?▼

EFFECT_TYPE_TRIGGER_O (0x0080) is an optional trigger the player can choose to activate, while EFFECT_TYPE_TRIGGER_F (0x0200) is a mandatory trigger that activates automatically. Both are commonly combined with EFFECT_TYPE_SINGLE or EFFECT_TYPE_FIELD.

How do I add a Synchro or Xyz summoning procedure to a custom card?▼

Use Auxiliary.AddSynchroProcedure(c, f1, f2, minc, maxc) with tuner and non-tuner filters, or Auxiliary.AddXyzProcedure(c, f, lv, ct) with a material filter, rank level, and material count. These register EFFECT_SPSUMMON_PROC with the matching summon type.

How can I set up a test field state for YGOPro AI or script debugging?▼

Call Debug.ReloadFieldBegin(flag), place cards with Debug.AddCard, configure players with Debug.SetPlayerInfo, optionally pre-set relationships via Debug.PreEquip or Debug.PreSummon, then finish with Debug.ReloadFieldEnd.

What are the limitations of the Group selection functions in YGOPro scripts?▼

Group:Select and FilterSelect yield to the engine and require a valid player id plus min/max bounds, returning nil if canceled. RandomSelect does not yield, and mutation methods like AddCard or Merge only work on non-read-only groups.