Spaces:
Running
Running
| title: PSCT to Lua | |
| emoji: π | |
| colorFrom: purple | |
| colorTo: blue | |
| sdk: gradio | |
| sdk_version: 5.6.0 | |
| python_version: 3.11 | |
| app_file: app.py | |
| pinned: false | |
| license: apache-2.0 | |
| short_description: Generate YGOPro Lua card scripts from English PSCT | |
| # PSCT β Lua | |
| Generate working YGOPro Lua card scripts from English PSCT (Problem-Solving | |
| Card Text). | |
| Backed by **Qwen2.5-Coder-7B-Instruct** fine-tuned (LoRA) on ~13,000 real | |
| card scripts from the `ygopro-scripts-master` repo, paired with their | |
| English text from `cards_en.cdb`. Scripts in the cookbook section of the | |
| [YGOPro Scripting Guide](https://github.com/ygopro/scripts) were | |
| oversampled (5Γ) so the model has strong priors for canonical patterns. | |
| ## How it works | |
| 1. You paste a card's English text into the textarea | |
| 2. The model produces a complete `cXXXX.initial_effect(c)` Lua script | |
| 3. You copy the script into your YGOPro `script/` folder | |
| ## Caveats | |
| - Runs on the free 2-vCPU CPU tier β **60-120 seconds per card**. | |
| - Output is a starting point β review before using in production. The model | |
| is ~85-95% accurate on simple cards (draw, destroy, search), ~60-75% on | |
| multi-clause cards. Boss monsters with archetype-specific bookkeeping are | |
| largely out of distribution. | |
| - Always verify by loading the generated script into YGOPro and probing | |
| the actual behavior in a duel. | |
| ## Reproducing | |
| The training pipeline lives at | |
| [github.com/serenade87/psct_to_lua](https://github.com/serenade87/psct_to_lua) | |
| (`extract.py` β `train.py` β `infer.py`). | |