effect · clr_project_flag
Definition
- Supported scope:
SPECIAL_PROJECT - Supported target:
none
Description
clear project flag
clr_project_flagSPECIAL_PROJECTnoneclear project flag
实战内容由 AI 生成,并已对照 vanilla 命令词表校验 —— 请当作起点而非权威依据。上方的定义节才是游戏自带文档原文。
clr_project_flag 用于在特殊项目(Special Project)的生命周期管理中,清除先前通过 set_project_flag 打上的状态标记,常见于阶段切换时重置旧阶段标记、或在项目完成/中断时清理临时标志。例如,当一个原型研究阶段结束后,清除代表"正在加速研究"的标记,防止后续条件判断错误触发。
# 当项目完成某阶段后,清除临时加速标记
SPECIAL_PROJECT = {
complete_prototype_reward_option = {
option = {
effect = {
clr_project_flag = accelerated_phase_active
}
}
}
}
[has_project_flag](/wiki/trigger/has_project_flag):在清除标记前,通常先用此触发器确认标记存在,避免无意义的操作或逻辑混乱。[set_project_flag](/wiki/effect/set_project_flag):两者互为逆操作,set 负责打标记,clr 负责撤销,常在阶段切换时成对出现。[modify_project_flag](/wiki/effect/modify_project_flag):当需要更新标记的值而非简单清除时作为替代选择,理清"清除"与"修改"的语义边界有助于避免逻辑错误。[add_project_progress_ratio](/wiki/effect/add_project_progress_ratio):项目进度推进后往往需要同步清除旧阶段标记,两者常出现在同一执行块中。[has_project_flag](/wiki/trigger/has_project_flag) 做前置检查,确保清除行为有实际意义。SPECIAL_PROJECT,新手容易在 country 或 state scope 下误用此命令,导致脚本解析失败或效果静默不执行,需确认所在执行块已正确进入特殊项目 scope。Hands-on notes are AI-generated and checked against the vanilla command vocabulary — treat them as a starting point, not authoritative reference. The definition above is the game's own documentation.
clr_project_flag is used in the lifecycle management of Special Projects to clear status markers previously set via set_project_flag. It is commonly employed when resetting old phase markers during phase transitions, or cleaning up temporary flags when a project completes or is interrupted. For example, after a prototype research phase concludes, clearing the marker representing "accelerated research in progress" prevents subsequent condition checks from triggering incorrectly.
# After a project completes a phase, clear the temporary acceleration flag
SPECIAL_PROJECT = {
complete_prototype_reward_option = {
option = {
effect = {
clr_project_flag = accelerated_phase_active
}
}
}
}
[has_project_flag](/wiki/trigger/has_project_flag): Before clearing a flag, it is standard practice to first use this trigger to confirm the flag exists, avoiding meaningless operations or logical inconsistencies.[set_project_flag](/wiki/effect/set_project_flag): These two effects are inverse operations—set applies the flag while clr revokes it, and they commonly appear in pairs during phase transitions.[modify_project_flag](/wiki/effect/modify_project_flag): When you need to update a flag's value rather than simply clearing it, consider this as an alternative. Clarifying the semantic boundary between "clearing" and "modifying" helps avoid logical errors.[add_project_progress_ratio](/wiki/effect/add_project_progress_ratio): After advancing project progress, it is often necessary to synchronously clear old phase flags. These two effects frequently appear in the same execution block.[has_project_flag](/wiki/trigger/has_project_flag) for validation, ensuring the clearing action has actual significance.SPECIAL_PROJECT—beginners often mistakenly use this command under country or state scope, resulting in script parsing failures or silent execution failures. Always verify that the execution block has correctly entered the special project scope.