首页所有页面

宝物模组制作


Artifacts are part of free patch 2.7 and don't actually require Monks and Mystics expansion (though most vanilla artifacts are part of the expansion).

They allow classical-RPG concepts of treasury (stash) and equipable slots (inventory).

Artifacts

Variable Type Description Example
quality int quality = 2
flags List<string> Flags that can be checked with has_artifact_flag condition. flags = { chest hermetics very_rare }
active Character conditions Conditions for the artifact to be usable by a character. See is_artifact_active condition.
  • An artifact with an active trigger but without owner will never be considered active
  • An artifact without an active trigger will always be considered active, even if not owned.
  • ROOT is the owner and FROM is the artifact
active = {
  is_adult = yes
}
allowed_gift Character conditions Conditions for the trigger artifact_can_be_gifted_to.
stacking bool If no, can only have a single copy of this artifact in one's possession. Defaults to "yes". stacking = no
indestructible bool Whether destroy_artifact has any affect. Defaults to "no". indestructible = yes
picture gfx Defines the gfx name, typically GFX_<artifact_name>

2 images are needed:

  • 118x118px for GFX_<artifact_name>
  • 59x59px for GFX_<artifact_name>_small
picture = "GFX_strange_chest"
<modifier> Character modifiers Modifiers given by the artifact when it is equipped.
martial = 2
monthly_character_piety = -2
tech_growth_modifier = 0.05
combat_rating = 2
slot string Associated slot to equip the artifact. New slots can be added dynamically. slot = crown

Localization:

  • <artifact_name>: name of the artifact
  • <artifact_name>_desc: description of the arftifact
  • <slot>: name of the equipment slot

Pictures:

  • The pictures are set in C:\Users\Your user name\Documents\Paradox Interactive\Crusader Kings II\gfx\interface\inventory\artifacts

Example for mods: C:\Users\Your user name\Documents\Paradox Interactive\Crusader Kings II\mod\A Game of Thrones\gfx\interface\inventory\artifacts

  • The link between the GFX code and the picture is in Vanilla file interface/domestic_treasury.gfx
  • You can use artifact backgrounds (arti_bg.dds, arti_bg_glow.dds, arti_bg_small.dds, and arti_bg_glow_small.dds) in gfx/interface/inventory/artifacts to make artifacts that follow the style of the vanilla artifacts

Slots

Artifacts can be equipped or unequipped. Number of equipped artifacts are limited by dynamic "slots":

slots = {
	weapon = 1
	ceremonial_weapon = 1
	scepter = 1
	crown = 1
	wrist = 1
	neck = 1
	torso = 1
	library = 4
}

Artifact spawns

Determines the generation of artifacts at the begining of a game.

Variable Type Description Example
max_amount int How many artifacts do we hand out? Default is 4,294,967,295 max_amount = 1
spawn_date date What date should it claim to have been created? Note that this could be in the future; the spawn chance should be handled in spawn_chance. If a date at or before 1.1.1 is used, it'll state "Unknown Date". spawn_date = -1.1.1
spawn_chance MTTH Decides whether an artifact spawn should execute or not. Range is 0-100. Default behaviour is to always spawn.
# 50% chance to execute an artifact spawn
spawn_chance = {
	value = 50
}
weight MTTH Character scope, evaluates a potential artifact holder score, which is then used for randomizing who gets an artifact. Default behavior is for everyone to have the same chance.
# Only christians have a chance of getting an artifact
weight = {
	value = 0
	additive_modifier = {
		value = 100
		religion_group = christian
	}
}
artifacts clause List of keys and MTTH for which artifact is spawned.
# 50% chance that the person will get a golden_platypus
artifacts ={
	golden_platypus = {
		value = 1
	}
	crystal_platypus = {
		value = 1
	}
}

Migrate from traits

Here is the equivalence to replace traits into artifacts:

Behavior Trait Artifact
Possession has_trait = xxx has_artifact = xxx
Creation add_trait = xxx add_artifact = xxx
Destruction remove_trait = xxx destroy_artifact = xxx
Transfer
FROM = {
	remove_trait = xxx
}
ROOT = {
	add_trait = xxx
}
random_artifact = {	
	artifact_type = xxx
	transfer_artifact = {
		from = FROM
		to = ROOT
	}
}
Uniqueness xxx = { cached = yes } trait, and xxx = { always = yes } ?

References

相关页面 (59)

ArtifactsConditionsEU4转档器模组制作MTTHModifiersMonks and MysticsPatch 2.7Steam创意工坊事件模组制作作用域修正内阁成员模组制作决议模组制作剧本模组制作单位模组制作历史模组制作另类开局模组制作图形模组制作地图外政权模组制作地图模组制作头衔模组制作奇观模组制作宗教模组制作定义宣战理由模组制作家族模组制作小地图模组制作建筑模组制作指令控制台指令政体模组制作故障排除文化模组制作朝贡国类型模组制作本地化条件模组制作死亡模组制作法律模组制作游戏规则模组制作特质模组制作界面模组制作疾病模组制作目标模组制作盾徽模组制作省份模组制作社团模组制作科技模组制作称号模组制作继承模组制作编辑游戏存档肖像模组制作脚本荣誉头衔模组制作血脉模组制作角色模组制作贸易路线模组制作音乐模组制作验证器