群星模组 Paradox Script 实现
stellaris-implement
将《群星》(Stellaris)模组设计转化为具备防御性的 Paradox Script 代码。
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 65
- Forks
- 0
01 前言 Front Matter
- name
- stellaris-implement
- description
- Translate Stellaris mod designs into defensive Paradox Script.
03 SKILL.md 正文
Objective
Translate a design (ADR) into high-quality, defensive Paradox Script (.txt). The engine is fragile: assume every scope is null, every target is missing, and every bracket is unbalanced until proven otherwise.
Rules
- Generate one file content block at a time.
- Write the logic; never leave placeholders such as
# logic goes here. - Indent with tabs (standard Paradox) or 4 spaces, consistently.
1. Files
Create the files in the manifest, all under src/, each starting with the standard header:
# ==============================================================================
# MOD: [Mod Name]
# FILE: [Relative Path from src/]
# PURPOSE: [Brief Description]
# ==============================================================================
If a file contains events, its first functional line is namespace = [NS], matching the project prefix defined in init.
2. Logic
Write PDX script from the design pseudocode:
-
Never run an effect on a scope without checking that it exists:
if = { limit = { exists = owner type = country } owner = { ... } } -
Inside iterators (
every_system,random_planet), always uselimit = { }in the effect block to prevent scope leaks that affect the wrong target. -
No magic numbers: a value used more than twice becomes a
@scripted_variablesentry, e.g.cost = @[NS]_tier1_cost, defined at the top of the file or incommon/scripted_variables. -
Never write raw English text in
titleordesc:title = "[NS]_event_1_title" # TODO: LOC.
3. Self-Check
Before output, verify:
{and}balance; an imbalance causes silent crashes.- No “curly quotes” exist; only standard ASCII
"". - For every
add_modifier = [NS]_mod,common/modifiers/[NS]_modifiers.txtis planned.
Output
# ==============================================================================
# MOD: Stellaris Expanded
# FILE: events/[NS]_anomaly_events.txt
# ==============================================================================
namespace = [NS]
# [NS].1 - The Discovery
country_event = {
id = [NS].1
title = "[NS]_event_1_title" # TODO: LOC
desc = "[NS]_event_1_desc" # TODO: LOC
picture = GFX_evt_mining_station
is_triggered_only = yes
trigger = {
exists = owner
owner = { is_ai = no }
}
immediate = {
owner = {
log = "DEBUG: [NS].1 fired for [This.GetName]"
add_resource = {
minerals = @[NS]_reward_tier_1
}
}
}
option = {
name = "[NS]_event_1_opt_a" # TODO: LOC
custom_tooltip = "[NS]_event_1_opt_a_tt"
}
}
04 同仓库更多 Skills
工作流运行时验证
workflow-runtime
在将 CLI、扩展、提供程序或模型分配给工作流角色之前,先验证技能或工作流的发现能力、完全自主的工具执行能力,以及任务形态的具体化。
工作流成果审查
workflow-reviewer
依据 BOSS 规格说明和证据,审查批量实现的输出。
工作流故障修复
workflow-rescue
通过一次果断的行动解决反复出现的工作流失败。
多智能体工作流编排
workflow-orchestrator
运行风险自适应的开发、评审、多智能体和发布工作流,具备运行时预检、有限重试、存活检查、写入隔离以及有证据支撑的交接能力。
工作流失败仲裁
workflow-judger
仲裁反复出现的任务失败,并决定是合并、返工还是升级处理。
工作流状态验证
workflow-doctor
在任何角色对活动工作流状态执行操作之前,先对其进行验证。