Edicts modding

本頁面部分全部內容上次核對於2.7版本


This page is about how to modify existing and how to create new Edicts.

Edicts are defined at "common/edicts/xxx.txt".

Data Structure[編輯 | 編輯原始碼]

  • length = <int> - Days of the edict duration. If 0, this Edict immediately ends. If -1, this Edict lasts until manually toggled off.
  • resources - An Economy Unit that determines the cost of this edict. Only the "cost" field is wanted. If length is -1, the cost is paid again when deactivating.
  • prerequisites = { tech_xxx } - A list of Technology keys that determines the technology prerequisites of this edict.
  • show_tech_unlock_if - A block of Conditions. If evaluated false, this edict will not be shown in the technology tooltip of that technology.
  • modifier - A block of Modifiers to be applied to the empire for as long as this edict remain active.
  • potential - A block of Conditions that determines is this edict listed for this empire. (Country scope)
  • allow - A block of Conditions that determines can this edict be activated by this empire. (Country scope)
  • effect - A block of Effects to be executed when this edict become active. (Country scope)
    • There is NO effect block that can be executed when this edict is manually toggled off.
  • ai_weight - The higher it is, the more likely the AI will try to activate this edict.
  • edict_cap_usage - The number of Edict Capacities this Edict will use.

Vanilla Example[編輯 | 編輯原始碼]

This is the education campaign.

education_campaign = {
	length = @campaignDuration
	resources = {
		category = campaigns
		cost = {
			energy = @campaignCost
		}
	}

	modifier = {
		species_leader_exp_gain = 0.25
	}

	potential = {
		NOT = { has_ethic = ethic_gestalt_consciousness }
		has_technology = tech_planetary_unification
	}

	ai_weight = {
		weight = 0
		modifier = {
			weight = 1
			has_edict = healthcare_campaign
		}
	}
}

Instant Effect Edicts[編輯 | 編輯原始碼]

An edict with length = 0 and an effect work like an empire wide Decision. The modifier doesn't apply in this case.

# this instant effect edict costs 100 influence and provides 1000 unity.
one_time_effect_edict_example = {
	length = 0
	resources = {
		category = edicts
		cost = {
			influence = 100
		}
	}
	effect = {
		add_resource = {
			unity = 1000
		}
	}
}

The demerit is, it will instantly generate an "Edict Expired" notification.

相關的動態修改語句[編輯 | 編輯原始碼]

Conditions:

  • has_edict = <edict key> - Checks if the empire has this edict active.
帝國 帝國思潮政府 • 國民理念 • 起源承諾議程傳統 • 飛升天賦法令政策遺珍科技自定義帝國
人口 崗位派系
領袖 領袖領袖特質
物種 物種物種特質
行星 行星行星特徵 • 軌道礦藏建築 • 區劃行星決議
星系 星系恆星基地巨型結構蟲洞 • 星門地圖
艦隊 艦隊艦船 • 部件
地面戰 陸軍轟炸姿態
外交 外交 • 聯邦 • 星海共同體評價修正宣戰理由 • 戰爭目標
事件 事件異常現象特殊項目考古遺址
遊玩 遊玩定義研究 • 經濟遊戲開局
動態修改 動態指令效果觸發條件作用域修正變量AI
媒體/本地化 Maya 導出器圖形肖像旗幟事件圖片界面圖標音樂本地化
Other 控制台命令存檔編輯Steam 創意工坊模組製作教程