在《Crusader王2》中添加或更改音乐相当简单。
Two things are needed in the Crusader Kings II\music folder:
To convert to ogg format, VLC media player can be used:
从2.7倍补丁开始,采样率必须达到44100 Hz,否则歌曲会有沙哑的声音,或者游戏里似乎不再播放。
在基础游戏中,音乐文件定义为 songs.txt, which is located in the Crusader Kings II\music folder. Music which is added by DLCs such as Hymns of Abraham or Songs of the Caliph is defined in a .txt file within the music folder of DLC's zip file. Songs are defined using a similar system to events.最简单的是基础游戏中的,看起来大致如下:
song = {
name = "crusaderkings2_maintitle.ogg"
song_name = "Crusader Kings 2 Maintitle"
chance = {
modifier = {
factor = 1
}
}
volume = 0.48
}
Each song has:
name, which corresponds to the .ogg file being used.song_name, which can be displayed to the playerfactor within a chance 该条款定义了该游戏被使用的可能性。基础游戏中的歌曲都是1的因子,而DLC中新增的歌曲则通常有更大的因子(因此它们的使用频率更高)。volume to adjust the audio level.
No music on start issue/bug since 2.7x:
可以根据某些条件改变歌曲播放的概率。大多数基于音乐的DLC都会添加专属于特定文化/文化群体或宗教/宗教群体的音乐。这是通过在修饰子句中添加条件来实现的。比如,这首歌 England Anno 1066 from the Songs of Albion DLC uses the following code:
song = {
name = "englandanno1066.ogg"
chance = {
factor = 2
modifier = {
factor = 0
NOT = { culture = english }
NOT = { culture = saxon }
}
}
}
这赋予了其概率因子2(即比基础游戏中某条赛道更有可能被使用),但仅在玩家角色是英格兰人或盎格鲁-撒克逊人时,将因子乘以0(2 × 0 = 0),从而限制玩家游戏。
The conditions 所用的触发器与活动中使用的相同,因此可以非常复杂,也可以基于非常特定的触发条件。
The free Songs of Yuletide DLC uses the clause NOT = { real_month_of_year = 11 } 将非十二月的任何月份的感染概率降至0。
The songs in Songs of the Holy Land 每个带有两个修饰子句:如果当前没有crusade,则将基因子(此处为5)乘以0.1(5 × 0.1 = 0.5);另一个则乘以2(5 × 2 = 10),如果 满足 is crusade,玩家目前在目标王国(例如crusade中率军或在目标王国内的首都)。
song = {
name = "ascalon.ogg"
chance = {
factor = 5
modifier = {
factor = 0.1
has_called_crusade = no
}
modifier = {
factor = 2
crusade_target = {
ROOT = {
location = {
kingdom = {
title = PREVPREVPREV
}
}
}
}
}
}
}
| 历史 | 角色 • 家族 • 省份 • 头衔 • 剧本 |
| 脚本 | 指令 • 条件 • 作用域 • 修正 • 事件 • 决议 |
| 常规 | 定义 • 游戏规则 • 另类开局 • 宗教 • 文化 • 政体 • 特质 • 血脉 • 科技 • 法律 • 建筑 • 宣战理由 • 朝贡国 • 单位 • 目标 • 疾病 • 死亡 • 荣誉头衔 • 社团 • 宝物 • 地图外政权 • 内阁成员 • 贸易路线 • 继承 • 奇观 • 称号 |
| 图像/音效/本地化 | 地图 • 图形 • 盾徽 • 肖像 • 界面 • 小地图 • 音乐 • 本地化 |
| 其他 | 故障排除 • 验证器 • 控制台指令 • 编辑游戏存档 • Steam创意工坊 • EU4转档器模组制作 |
ConditionsDLCDLC filesEU4转档器模组制作Event moddingMusicSteam创意工坊事件模组制作作用域修正内阁成员模组制作决议模组制作剧本模组制作单位模组制作历史模组制作另类开局模组制作图形模组制作地图外政权模组制作地图模组制作头衔模组制作奇观模组制作宗教模组制作定义宝物模组制作宣战理由模组制作家族模组制作小地图模组制作建筑模组制作指令控制台指令政体模组制作故障排除文化模组制作朝贡国类型模组制作本地化条件模组制作死亡模组制作法律模组制作游戏规则模组制作特质模组制作界面模组制作疾病模组制作目标模组制作盾徽模组制作省份模组制作社团模组制作科技模组制作称号模组制作继承模组制作编辑游戏存档肖像模组制作脚本荣誉头衔模组制作血脉模组制作角色模组制作贸易路线模组制作验证器