(创建页面,内容为“{{Version|1.12}} {{需要翻译|译者=霜泽图书馆}} Paradox allowed the creation of custom achievements to be displayed in the Career Profile of a player. The ability to create these achievements came with the Avalanche (1.12.1) release. __TOC__ Achievements are found in the career profile (in-game this button is called "Playthrough Overview"), images are available on the Paradox Forum. ==File structure== <pre> custom_achievements/ common/achievement…”) |
无编辑摘要 |
||
第84行: | 第84行: | ||
*[[forum:1544901|[3] Tutorial to write achievements files in your mod]] | *[[forum:1544901|[3] Tutorial to write achievements files in your mod]] | ||
{{Modding navbox}} | {{Modding navbox}} | ||
[[分类:Modding]] |
2024年8月28日 (三) 02:57的版本
此页面正在由 霜泽图书馆 翻译中
Paradox allowed the creation of custom achievements to be displayed in the Career Profile of a player. The ability to create these achievements came with the Avalanche (1.12.1) release.
Achievements are found in the career profile (in-game this button is called "Playthrough Overview"), images are available on the Paradox Forum.
File structure
custom_achievements/ common/achievements/ custom_achievements_achievements.txt gfx/achievements/ custom_achievement_test.dds custom_achievement_test_grey.dds custom_achievement_test_not_eligible.dds localization/english/ custom_achievements_l_english.yml
Coding syntax
File:Ambox outdated info.png | 这部分内容可能已不适合当前版本,最后更新于1.12。 |
- unique_id - This is mandatory and custom to your mod. It references the name of the cloudsavefile that will store the achievements
- custom_achievement_test/custom_ribbon_test - This is a unique identifier for your particular achievement.
- possible - This checks at the game's start whether a ribbon or achievement is possible to get in the playthrough. If false at the game's start, getting the achievement will never be impossible.
- This is similar to
allowed
in decisions or ideas, though it is evaluated at the game's start rather than before. - Some common triggers not used in the code example are tag checks (with either tag or original_tag) or ironman checks (
is_ironman = yes
).
- This is similar to
- happened - Once these conditions are met then the achievement is earned. (Usually instant to ~2 in-game hours)
- ribbon - (OPTIONAL) This is only required for ribbons. This allows you to change the colors of the ribbon utilizing RGB color code
unique_id = custom_achievements_123456 custom_achievement_test = { possible = { # classic triggers used in all vanilla achievements difficulty > 1 has_start_date < 1936.01.02 has_any_custom_difficulty_setting = no game_rules_allow_achievements = yes } happened = { date > 1936.01.02 } } custom_ribbon_test = { possible = { difficulty > 1 has_start_date < 1936.01.02 has_any_custom_difficulty_setting = no game_rules_allow_achievements = yes tag = ITA } happened = { date > 1936.01.02 } ribbon = { frames = { 1 1 1 1 } colors = { { 45.0 64.0 102.0 1.0 } { 154.0 73.0 107.0 1.0 } { 238.0 189.0 96.0 1.0 } { 211.0 181.0 128.0 1.0 } } } }
Icon
Images for achievements require three different images which are provided in gfx/achievements
. These do not require a spriteType in interface.
- custom_achievement_test.dds
- Refers to the colorized icon that is available should you complete the achievement.
- custom_achievement_test_not_eligible.dds
- Refers to the icon if it is not able to be earned during that playthrough.
- custom_achievement_test_grey.dds
- Refers to the icon if it is possible to be earned during that playthrough
Localization
Localization for the achievement is done in two loc keys. The suffix NAME refers to the title of the achievement and the DESC refers to the description that can be either some funny joke or how you describe to achieve the achievement.
custom_achievement_test_NAME: "Custom Achievement Title" custom_achievement_test_DESC: "Custom Achievement Description"
References
- [1] Achievements for mods
- [2] Tutorial to design ribbons in mod achievement
- [3] Tutorial to write achievements files in your mod
模组制作
文件 | 效果 • 条件 • 定义 • 修正 • 修正列表 • 作用域 • 本地化 • on action • 数据结构 (标记, 临时标记, 国家别名, 变量, 数组) |
脚本 | 成就修改 • AI修改 • AI focuses • 自治领修改 • 权力平衡修改 • 剧本/标签 (游戏规则)• 建筑修改 • 人物修改 • 修饰性TAG修改 • 国家创建 • 军队修改 • 决议制作 • 装备修改 • 事件修改 • Idea修改 • 意识形态修改 • 军工商修改 • 国策制作 • 资源修改 • Scripted GUI • 科技制作 • 单位修改 |
地图 | 地图 • 省份 • 补给区域 • 战略区域 |
图形图像 | 界面 • 图形资产 • 实体模型 • 后期特效 • 离子效果 • 字体 |
装饰性 | 肖像 • 命名列表 • 音乐 • 音效 |
其他 | 控制台指令 • 故障排除 • 模组结构 • 成就代码分析 • Mod相关 • Nudger修改 |