Skip to content

MDPro4 Sacred Book ​

MDPro4 / YGOPro / Rush Duel scripting

Start with one card. Learn the engine around it.

Follow the guided curve for a first card. When you already know the engine, jump straight to an exact API call or search every local script for a proven pattern.

first activated effectc55144522.lua
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)

Beginner Curve ​

New to Lua? Take the short Lua Essentials lesson first.

Follow the curve from left to right. The first-card lesson hands off to card data and script wiring before the activation-flow and debugging stages.

Choose Your Branch ​

Reference ​

Credits & Support ​

Created and documented by Senator John.

If Sacred Book helped you learn scripting, build a card, or find the right local pattern faster, consider supporting the work on Ko-fi.

Documentation inspiration

Credit to the YGOPro Scripting Wiki and Glitchy for wiki notes and scripting explanations that helped inspire this learning reference.

Upstream YGOPro projects

MDPro4 builds on the YGOPro ecosystem, including Fluorohydride/ygopro, Fluorohydride/ygopro-core, and Fluorohydride/ygopro-scripts.