Install
openclaw skills install arknights-operator-gachaGenerate an Arknights operator agent based on gacha probabilities. Use when user wants to create a random Arknights character agent with authentic lore and p...
openclaw skills install arknights-operator-gachaGenerate a random Arknights operator agent with authentic lore-based personality.
This skill uses a worker script + LLM generation architecture:
gacha_worker.py): Executes all deterministic tasks (roll, fetch, create, download)CRITICAL: Detect user language from their gacha command:
Store detected language and use it for ALL subsequent steps (SOUL.md writing, spawn task, etc.).
Run the deterministic worker:
result = exec(
"python3 ~/.openclaw/workspace/skills/arknights-operator-gacha/scripts/gacha_worker.py",
timeout=120
)
Worker performs:
https://arknights.fandom.com/wiki/Operator/{N}-star
mrfz-wtable table to extract operator info{operator_name: {"avatar_url": "...", "detail_url": "..."}}openclaw agents addWorker output format:
{
"success": true,
"stars": 6,
"operator": {
"en_name": "Lin",
"cn_name": "林",
"avatar_url": "https://static.wikia.nocookie.net/.../Lin_icon.png",
"en_detail_url": "https://arknights.fandom.com/wiki/Lin",
"cn_detail_url": "https://prts.wiki/w/%E6%9E%97"
},
"agent_name": "lin",
"workspace": "~/.openclaw/workspace-lin",
"duplicate": false,
"dialogue_url": "https://arknights.fandom.com/wiki/Lin/Dialogue"
}
Note: The worker provides both English and Chinese URLs:
en_detail_url: Fandom wiki page (English lore)cn_detail_url: PRTS wiki page (Chinese lore)dialogue_url: Fandom Dialogue page (voice lines, always English)avatar_url: Operator icon from FandomIf duplicate: true:
If success: false:
If success: true:
Fetch lore from URLs provided by worker:
# Fetch English lore from Fandom (multiple subpages)
en_file = web_fetch(f"{result['operator']['en_detail_url']}/File") # Basic profile, stats, files
en_story = web_fetch(f"{result['operator']['en_detail_url']}/Story") # Story appearances, plot involvement
en_trivia = web_fetch(f"{result['operator']['en_detail_url']}/Trivia") # Trivia, relationships, misc info
# Fetch Chinese lore from PRTS
zh_lore = web_fetch(result["operator"]["cn_detail_url"])
# Fetch voice lines from Dialogue page
dialogue = web_fetch(result["operator"]["dialogue_url"])
Parse lore sections from both sources:
Generate comprehensive SOUL.md:
CRITICAL - Write SOUL.md in detected language
Structure:
Write to: [workspace]/SOUL.md
Fill in the [TO_BE_FILLED_BY_LLM] fields with actual Class and Faction from fetched lore.
cd ~/.openclaw/workspace-{agent_name}
git add -A
git commit -m "Add SOUL.md: {en_name} ({cn_name}) ({stars}★)"
Spawn the operator in a roleplay scenario consistent with Arknights game lore. In this universe, operators join Rhodes Island through standard recruitment channels and are unaware of the meta "gacha" system.
For Chinese users:
sessions_spawn(
task="你现在是罗德岛的一名干员,刚刚完成入职手续,前来向博士报到。用你最自然的口吻打招呼,展示你的性格特点。参考你的语音记录中的'干员报到'或'交谈'部分的语气。\n\n⚠️ 重要:直接输出角色台词即可,不要包含任何元叙述、解释性文字或场景描述。只说你作为干员应该说的话。",
agentId="{operator-name}",
mode="run",
timeoutSeconds=60
)
For English users:
sessions_spawn(
task="You are an operator of Rhodes Island who has just completed onboarding, now reporting to the Doctor. Introduce yourself naturally, showcasing your personality. Reference your 'Introduction' or 'Talk' voice lines for tone.\n\n⚠️ IMPORTANT: Output ONLY the character's dialogue. Do NOT include meta-commentary, explanations, or scene descriptions. Just speak as the operator would.",
agentId="{operator-name}",
mode="run",
timeoutSeconds=60
)
Report to user:
agentId="{agent_name}"The worker script (gacha_worker.py) implements:
.., /, \ in namesstatic.wikia.nocookie.net and media.prts.wikishell=False| Script | Purpose |
|---|---|
gacha_worker.py | Deterministic tasks (roll, fetch, create, download, commit) |
User Request
↓
Exec Worker Script
↓
Worker Output JSON (bilingual URLs)
↓
LLM Fetches EN+CN Lore → Generates SOUL.md
↓
Spawn Operator (报到)
↓
User sees operator greeting