首页所有页面

死亡模组制作


As of patch 2.6, death reasons and text displayed on succession screen have become moddable.

Death reasons

Death reasons are defined in folder common/death/.

The format is:

<death_reason> = {
	long_desc = DEATH_REASON_DESC
	sound_list = {
		female = {
			"female_violent_death_01"
		}
		male = {
			"male_violent_death_01"
		}
	}
}

All are optionals, except for long_desc:

Configuration key Type Description
violent bool
long_desc key Localization key. Ex: DEATH_BY_MURDER_UNKNOWN (died under suspicious circumstances).
  • In case a killer is specified(e.g. death = { death_reason = death_battle killer = FROM}), the variable $KILLER$ will have its name.
  • death_trait is a bit special, as it will inject variable $TRAIT_DEATH$ in localization, with the <trait_name>_death text, defined for traits that reduce heath.
can_nokiller bool
murder_unknown bool
sound bool If set to no, killing someone with that reason will not cause a death sound.
sound_list list<sfx> Female and male lists of death sounds.
  • For custom death sounds, sound files are placed in the sound folder and referenced by sound.sfx, within the interface folder.
execution bool
death_date_desc key Changes the text shown when hovering over someone's age. Useful for death reasons like "Went to China" that aren't really outright dying.

Execution methods

When executing someone, an execution method is randomly determined from the execution methods defined in the common/execution_methods folder. They are written in execution_method blocks. Each execution method must contain a death reason defining the sound and description of the death. They also contain a weight multiplier to determine which of the available death reasons are used. Finally, they contain a trigger. If the trigger evaluates to false, the execution method is not available.

Within the weight_multiplier and trigger blocks, FROM is the executioner and ROOT is the executed.

Example

execution_method = {
    death = death_execution_bear
    weight_multiplier = {
        factor = 50
        modifier = {
            factor = 8
            FROM = { trait = hunter }
        }
        modifier = {
            factor = 3
            FROM = { trait = cruel }
        }
    trigger = {
        FROM = {
            capital_scope = {
                NOR = {
                    region = world_india
                    region = world_africa
                }
            }
        }
    }
}

Succession screen

Some flavor text appears on succession screen with:

  • an epitaph of deceased ruler
  • a presentation of the heir

This is configured in common/death_text and common/heir_text respectively.

death_text_proud = {
	weight_multiplier = {
		factor = 10
	
		modifier = {
			factor = 0
			OR = {
				NOT = { trait = proud }
				is_wicked = no
			}
		}
	}
}
heir_text_traits_falconer = {
	weight_multiplier = {
		factor = 25
	
		modifier = {
			factor = 0
			is_adult = no
		}
		modifier = {
			factor = 0
			NOT = {
				trait = falconer
			}
		}
	}
}
相关页面 (55)

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