ygopro-script-build

Implements YGOPro Lua card effect scripts following API conventions and effect registration rules.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing YGOPro Lua card scripts requires precise knowledge of effect types, event codes, callback signatures, and API constants, and mistakes like wrong effect types or invented functions silently break card behavior. ## Core Features & Use Cases - Structured Implementation Workflow: Enforces old-style (cXXXXX) or new-style (s,id,o=GetID()) script structure with correct file naming as c<card_id>.lua. - Effect Registration Rules: Guides correct use of EFFECT_TYPE_, EVENT_ codes, Effect.CreateEffect, property flags, and per-effect registration for multi-effect cards. - Mistake Prevention: Lists common errors such as using EFFECT_TYPE_QUICK_O for counter traps, missing chkc checks, and incorrect LP cost handling. - Use Case: Given the card text of Solemn Judgment, produce a complete c41420027.lua script registering each distinct negation effect as a separate effect with correct conditions, costs, and operations. ## Quick Start Implement a YGOPro Lua script for the card text I provide, following the script-build workflow and verifying every function against the API references.

Frequently Asked Questions about ygopro-script-build

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

FAQPage Schema
How do I write a YGOPro Lua script for a card effect?▼

Read the card text, identify each effect's EFFECT_TYPE_* and EVENT_* code, create effects with Effect.CreateEffect(c), set Condition, Cost, Target, and Operation callbacks, then register with c:RegisterEffect(e). Save the file as c<card_id>.lua using the actual card password.

What is the difference between old style and new style YGOPro scripts?▼

Old style uses function cXXXXX.initial_effect(c) with callbacks like cXXXXX.condition, while new style uses local s,id,o=GetID() with function s.initial_effect(c) and s.condition callbacks. Both are valid, but bare unscoped function names must be avoided because all Lua functions share one global namespace.

Why does my counter trap script not activate in YGOPro?▼

Counter traps must use EFFECT_TYPE_ACTIVATE, not EFFECT_TYPE_QUICK_O, with EVENT_FREE_CHAIN or the appropriate event code. Also verify the effect is registered and that NegateActivation is used for chain negation rather than NegateSummon.

How do I handle targeting effects in YGOPro Lua scripts?▼

Set EFFECT_FLAG_CARD_TARGET in SetProperty and include a chkc check in the target function, such as if chkc then return chkc:IsLocation(...) end. Missing either the flag or the chkc check causes targeting to fail.

How do I implement an LP cost of half in a YGOPro script?▼

Use Duel.CheckLPCost(tp,Duel.GetLP(tp)//2) for the cost check and Duel.PayLPCost(tp,Duel.GetLP(tp)//2) for payment. Integer division is required, and you must never subtract LP directly or use a fixed number.