十字军之王3
ParaWikis
Notice
: Undefined index: HTTP_ACCEPT_LANGUAGE in
/data/wwwroot/www.parawikis.com/skins/Liberty/LibertyTemplate.php
on line
185
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
帮助
译名手册
字词转换
编辑指南
编辑规范
练手沙盒
资助我们
×
欢迎访问十字军之王3百科!
注册一个账号
,一起参与编写吧!这里是
当前的工程
。
全站已采用新UI,任何使用上的问题请点击
这里
。欢迎所有对百科感兴趣的同学加入QQ群:
497888338
。
阅读
编辑
编辑源代码
查看历史
讨论
编辑“
事件模组制作
”
157.254.193.26
(
讨论
)
2023年6月14日 (三) 12:44的版本
(
→按照英文wiki补充并翻译
)
(
差异
)
←上一版本
|
最后版本
(
差异
) |
下一版本→
(
差异
)
警告:您正在编辑的是本页面的旧版本。
如果您发布该更改,该版本后的所有更改都会丢失。
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
{{version|Timeless}} {{需要翻译}} {{需要完善}} Events are the meat of every well-rounded mod; smaller and larger bits of story that can happen to a player during the campaign. ==位置== 事件属于位于[[模组结构#Mod文件夹|root Mod folder]]正下方的<code>Events</code>目录中的.txt文件。每个文件可以容纳任意多个事件。<code>events</code>目录也可以有包含自己事件文件的子文件夹(如果愿意的话)。 == 结构 == 整体结构与[[CKII:Event_modding|CK2的事件]]相似,语法进行了一些调整,并添加了大量的额外功能,其中许多是可选的。以下是最基本的事件(其中每个元素会在后面的小节中提到): <syntaxhighlight lang="coffeescript"> namespace = example example.1 = { desc = example.1.desc option = { name = example.1.a } } </syntaxhighlight> 好了!将这段代码添加到你的模组中,在游戏内控制台输入"event example.1"来触发它,你就会得到一个可用的事件!这就是一个最基本的事件结构,其他的内容都是可选的,但是它们在完善事件时是必须的。以下是一个更为详细的活动示例(仅包含基础内容): <syntaxhighlight lang="coffeescript"> ## 这是一个基础事件,可将其作为其他事件的基础(参考)。不过,您可能希望先删除这段注释垃圾。 superexample.1337 = { # 请使用注释(比如这个!)在此处填写事件名称,这样其他模组编写者就可以在不知道ID的情况下找到你正在处理的事件。 type = character_event title = "A Modding Example Worthy of Kings" # 专业提示:在编写时,你可以使用字符串,稍后再用本地化替换它。 desc = birth.1003.b # 对于Sublime用户而言,有一个非常出色的功能,即“在文件中查找”,非常适用于查找代码。 theme = mental_break left_portrait = root option = { # 在选项中使用注释来说明选项的内容或功能(例如:“不,我谴责你这个异端!”或“与孩子进行决斗”),这与事件标题的做法相似,这是一个很好的习惯。 name = stewardship_domain_special.1424.a } } </syntaxhighlight> === ID 和命名空间 === 命名空间(Namespaces)可以是任何由字母和数字组成的字符串(不包含'.'字符),并且用作前缀,形式为 <code><namespace>.<id></code> 。ID是对于一个事件的唯一标识。<br> 如果一个事件文件使用一个命名空间,那么它必须在文件开头声明 <code>namespace = <namespace></code> 。对每个使用该命名空间的文件都需要进行声明。 === 旗帜 === 这些是决定你的事件种类和外观的顶级变量。它们有一组有限的取值。 {| class="wikitable" |- ! Flag !! 意义 !! 可能的取值 |- | type || 事件的类型决定了根(root)的范围(scope)。 || * character_event * letter_event * none (当一个事件完全不使用作用域时) * empty (一个无角色事件必须的触发器。注意:这意味着输入 type = empty ) |- | hidden || 将此设置为true,事件将不会显示;它将在后台执行。适用于进行对玩家并不立即相关的维护事件。 || true, false |} == 人物肖像 == 在《十字军之王3》中,人物肖像是3D的,而且还有动画啦!肖像由不同的肖像位置列表和动画列表决定。 === 人物肖像定位 === [[File:Example event.png|thumb|left|人物肖像效果]] {| class="wikitable" |- ! Portrait Position !! Description |- | left_portrait || 在事件框的左侧显示肖像。 |- | right_portrait || 在事件框的右侧显示肖像。 |- | lower_left_portrait || 在事件框的左下方显示肖像。 |- | lower_center_portrait || 在事件框的正下方显示肖像。 |- | lower_right_portrait || 在事件框的右下方显示肖像。 |} 这是一个同时使用所有人物肖像位置的示例,附效果截图: <pre> example_event.1001 = { left_portrait = { character = ROOT # Whoever this is scoped to will show up in this event window position, exhibiting the chosen animation. animation = fear # Take note that characters with SOME genetic traits (for example, gigantism, dwarfism) that change their character models have different animations, and if you assign one of THOSE animations to a character that does not have that model, crashes may occur. } right_portrait = { character = ROOT animation = scheme } lower_left_portrait = { character = ROOT } lower_center_portrait = { character = ROOT } lower_right_portrait = { character = ROOT } } </pre> 肖像可以使用以下参数: {| class="wikitable" |- ! 参数 !! 描述 !! 示例 |- | character|| 展示哪个角色的肖像 ||<code>character = scope:event_target</code> |- | animation|| 角色将显示哪种动画 ||<code>animation = anger</code> |- | triggered_animation|| 如果符合条件,人物将显示这种动画。如果不符合,将显示以<code>animation = </code>语句设置的动画。 ||<pre>triggered_animation = { trigger = {} animation = fear }</pre> |- | triggered_outfit|| 设置事件中使用的服装 ||<pre>triggered_outfit = { trigger = {} outfit_tags = no_clothes (also accepts multiple tags, in the format outfit_tags = { tag1 tag2 } remove_default_outfit = yes/no }</pre> |- | hide_info|| 避免显示人物的任何信息 (提示文字, 盾徽, clicks等). 只会显示人物肖像 ||<code>hide_info = yes/no</code> |} === Animations === {|class="wikitable" |- !colspan="4"|Animation |- | admiration | anger | beg | boredom |- | disapproval | disbelief | disgust | dismissal |- | ecstasy | fear | flirtation | flirtation_left |- | grief | happiness | idle | love |- | newborn | pain | paranoia | personality_bold |- | personality_callous | personality_compassionate | personality_content | personality_coward |- | personality_cynical | personality_dishonorable | personality_forgiving | personality_greedy |- | personality_honorable | personality_irrational | personality_rational | personality_vengeful |- | personality_zealous | prison_dungeon | rage | sadness |- | schadenfreude | scheme | severelyinjured | severelywounded |- | shame | shock | sick | stress |- | war_attacker | war_defender | war_over_win | worry |} == Themes == {| class="wikitable" |- !colspan="4"|Theme |- | abduct_scheme | alliance | bastardy | battle |- | befriend_scheme | claim_throne_scheme | corruption | crown |- | culture_change | death | default | diplomacy |- | diplomacy_family_focus | diplomacy_foreign_affairs_focus | diplomacy_majesty_focus | dread |- | dungeon | dynasty | education | fabricate_hook_scheme |- | faith | family | feast_activity | friend_relation |- | friendly | generic_intrigue_scheme | healthcare | hunt_activity |- | hunting | intrigue | intrigue_intimidation_focus | intrigue_skulduggery_focus |- | intrigue_temptation_focus | learning | learning_medicine_focus | learning_scholarship_focus |- | learning_theology_focus | love | lover_relation | marriage |- | martial | martial_authority_focus | martial_chivalry_focus | martial_strategy_focus |- | medicine | mental_break | mental_health | murder_scheme |- | party | pet | physical_health | pilgrimage_activity |- | pregnancy | prison | realm | recovery |- | rival_relation | romance_scheme | secret | seduce_scheme |- | seduction | skull | stewardship | stewardship_domain_focus |- | stewardship_duty_focus | stewardship_wealth_focus | sway_scheme | unfriendly |- | vassal | war | witchcraft |} Individidual elements of the theme can be overridden using <code>override_background</code>, <code>override_icon</code>, <code>override_sound</code>, and <code>override_environment</code>. ==== Backgrounds ==== {| class="wikitable" !colspan="4"|Background |- | alley_day | alley_night | armory | army_camp |- | battlefield | bedchamber | burning_building | corridor_day |- | corridor_night | council_chamber | courtyard | docks |- | dungeon | farmland | feast | gallows |- | garden | market | market_east | market_india |- | market_tribal | market_west | physicians_study | sitting_room |- | study | tavern | temple | temple_church |- | temple_generic | temple_mosque | temple_scope | terrain |- | terrain_activity | terrain_scope | throne_room | throne_room_east |- | throne_room_india | throne_room_mediterranean | throne_room_scope | throne_room_tribal |- | throne_room_west | wilderness | wilderness_desert | wilderness_forest |- | wilderness_forest_pine | wilderness_mountains | wilderness_scope | wilderness_steppe |} === Environments === When you've selected a background, the appropriate environment is automatically selected. Only overwrite it when necessary. {| class="wikitable" !colspan="3"| Environment |- | environment_body | environment_council | environment_cw_east_main |- | environment_cw_east_spouse | environment_cw_east_throneroom_main | environment_cw_east_throneroom_spouse |- | environment_cw_india_main | environment_cw_india_spouse | environment_cw_india_throneroom_main |- | environment_cw_india_throneroom_spouse | environment_cw_mediterranean_main | environment_cw_mediterranean_spouse |- | environment_cw_mediterranean_throneroom_main | environment_cw_mediterranean_throneroom_spouse | environment_cw_tavern |- | environment_cw_tavern_spouse | environment_cw_tribal_main | environment_cw_tribal_spouse |- | environment_cw_west | environment_cw_west_spouse | environment_event_alley |- | environment_event_alley_day | environment_event_armory | environment_event_battlefield |- | environment_event_bedchamber | environment_event_church | environment_event_corridor_day |- | environment_event_courtyard | environment_event_desert | environment_event_docks |- | environment_event_dungeon | environment_event_farms | environment_event_feast |- | environment_event_forest | environment_event_forest_pine | environment_event_gallows |- | environment_event_garden | environment_event_genericcamp | environment_event_market_east |- | environment_event_market_tribal | environment_event_market_west | environment_event_mosque |- | environment_event_mountains | environment_event_sittingroom | environment_event_standard |- | environment_event_steppe | environment_event_study | environment_event_study_physician |- | environment_event_tavern | environment_event_temple | environment_event_throne_room_west |- | environment_frontend_east_heir | environment_frontend_east_main | environment_frontend_east_secondary |- | environment_frontend_india_heir | environment_frontend_india_main | environment_frontend_india_secondary |- | environment_frontend_mediterranean_heir | environment_frontend_mediterranean_main | environment_frontend_mediterranean_secondary |- | environment_frontend_tribal_heir | environment_frontend_tribal_main | environment_frontend_tribal_secondary |- | environment_frontend_west_heir | environment_frontend_west_main | environment_frontend_west_secondary |- | environment_head | environment_hud | environment_portrait_editor |- | environment_shoulders | environment_standard | environment_torso |- | environment_war_overview | |} == Trigger == This is an additional requirement for an event to work. === on_trigger_fail === Runs when the trigger fails. == Description == Explain how a description can be composed of multiple strings; with stuff like first_valid, and all the alternatives. == Immediate == This is a block of effect script: it will be ran ''immediately'' as your event is triggered, before the title, description, portraits, are even evaluated let alone rendered. This block is useful for setting variables and saving scopes to use in your text or for portraits; or for functional effects that you want to happen without the player having any control over it. "has happened" tooltip. == Options == Options within events are able to be pressed by the user. Each event may have any number of options, including none at all (a common example includes hidden events). Each option in defined in the main event block, like so: <pre> example.1 = { [...] option = { # option info } [...] } </pre> The table below describes available keys within the <code>option</code> block: {| class="wikitable" ! Key ! Required ! Description ! Example |- | name | Yes | Points to a localization key for the event option button text. | name=example.1.a |- | (effects) | No | Any [[effect]]s that the option may have can be written directly in the <code>option</code> block. | play_music_cue = mx_cue_banquet |- | trigger | No | Defines a [[trigger]] that has to be fulfilled for the option to be valid and thus available to the user. Not to be confused with the [[#Trigger|main event trigger]]. | <pre> trigger = { has_trait = shy } </pre> |- | show_as_unavailable | No | If the option is invalid, but this trigger is, the option will be shown, but disabled. This behavior is also influenced by the EVENT_OPTIONS_SHOWN_HIDE_UNAVAILABLE define. | <pre> show_as_unavailable = { short_term_gold < medium_gold_value } </pre> |- | trait | No | If the player has the given trait, show it on the left side of the option. Hovering over it will say the option is available because of the trait. This is only providing flavor, and does not actually affect the functionality of the option. | trait = honest |- | skill | No | Show the chosen skill on the left side of the option. Hovering over it will say the option is available because of your high skill. This is only providing flavor, and does not actually affect the functionality of the option. | skill = prowess |- | add_internal_flag | No | Can take the values "special" or "dangerous". The key "special" highlights the option as yellow, "dangerous" highlights the option as red. This is only providing flavor, and does not actually affect the functionality of the option. | add_internal_flag = special |- | highlight_portrait | No | Highlights the event portrait of this character while this option is hovered. This is in addition to the automatic highlighting when hovering an event option that has an effect that affects portrait characters. | highlight_portrait = scope:custom |} == After == This is a block of effect script that runs after the event has ran its course and an option has been chosen. Won't do anything if the event has no options (for hidden events, for example). == Widgets == What types of widgets are there, with screenshots for each of what they look like. == On_actions == {{Expand|with=An explanation on what on_actions are, and how and for what they are used.}} On_actions are divided into two main types: # Those that are called from code. # Those that are called from script. === On_actions from code === {| class="wikitable sortable" width="100%" ! width="15%" | Name ! width="15%" | Description ! width="25%" | From code ! width="20%" | Expected scope ! width="20%" | Other |- |on_prestige_level_loss | |Yes |None | |- |on_rank_down | |Yes |None | |- |on_weight_changed | |Yes |Character | |- |on_faith_monthly | |Yes |Faith | |- |on_knight_combat_pulse | |Yes |Character | |- |on_war_invalidated | |Yes |None | |- |on_war_transferred | |Yes |Character | |- |on_divorce | |Yes |None | |- |on_leave_court | |Yes |Character | |- |on_guest_ready_to_move_to_pool | |Yes |Character | |- |on_guest_arrived_from_pool | |Yes |Character | |- |on_siege_completion | |Yes |Character | |- |on_war_won_attacker | |Yes |Casus belli | |- |on_alliance_added | |Yes |None | |- |on_pregnancy_mother | |Yes |Character | |- |on_raid_action_start | |Yes |None | |- |on_county_faith_change | |Yes |Landed Title | |- |on_title_gain_usurpation | |Yes |None | |- |on_release_from_prison | |Yes |Character | |- |random_yearly_playable_pulse | |Yes |Character | |- |on_raid_action_completion | |Yes |Army | |- |on_death | |Yes |Character | |- |on_birth_father | |Yes |None | |- |on_betrothal_broken | |Yes |None | |- |on_war_white_peace | |Yes |None | |- |three_year_playable_pulse | |Yes |Character | |- |on_defeat_raid_army | |Yes |Army | |- |on_army_enter_province | |Yes |Character | |- |on_join_court | |Yes |Character |- |on_fired_from_council | |Yes |Character | |- |on_raid_loot_delivered | |Yes |Army | |- |on_pregnancy_ended_mother | |Yes |None | |- |on_title_lost | |Yes |None | |- |on_title_gain | |Yes |Character | |- |on_character_culture_change | |Yes |Character | |- |on_birth_child | |Yes |Character | |- |on_holy_order_hired | |Yes |None | |- |on_great_holy_war_invalidation | |Yes |Great Holy War | |- |on_combat_end_loser | |Yes |Combat Side | |- |on_concubinage | |Yes |None | |- |on_commander_combat_pulse | |Yes |Character | |- |random_yearly_everyone_pulse | |Yes |Character | |- |five_year_everyone_pulse | |Yes |Character | |- |on_perks_refunded | |Yes |None | |- |quarterly_playable_pulse | |Yes |None | |- |on_prestige_level_gain | |Yes |None | |- |on_faith_created | |Yes |Character | |- |on_holy_order_new_lease | |Yes |None | |- |on_title_gain_inheritance | |Yes |None | |- |on_game_start | |Yes |None | |- |on_character_faith_change | |Yes |Character | |- |on_combat_end_winner | |Yes |Combat Side | |- |on_courtier_decided_to_move_to_pool | |Yes |Character | |- |on_culture_era_changed | |Yes |None | |- |on_birthday | |Yes |Character | |- |on_faith_conversion | |Yes |Character | |- |on_raid_action_weekly | |Yes |None | |- |on_explicit_claim_gain | |Yes |Character | |- |on_courtier_ready_to_move_to_pool | |Yes |Character | |- |on_potential_great_holy_war_invalidation | |Yes |Great Holy War | |- |on_holy_order_destroyed | |Yes |None | |- |on_war_won_defender | |Yes |Casus belli | |- |yearly_global_pulse | |Yes |None | |- |on_great_holy_war_countdown_end | |Yes |GreaT Holy War | |- |yearly_playable_pulse | |Yes |Character | |- |three_year_pool_pulse | |Yes |Character | |- |on_pregnancy_father | |Yes |None | |- |on_piety_level_loss | |Yes |None | |- |on_piety_level_gain | |Yes |None | |- |on_siege_looting | |Yes |None | |- |on_title_destroyed | |Yes |None | |- |on_army_monthly | |Yes |None | |- |on_game_start_after_lobby | |Yes |None | |- |on_imprison | |Yes |Character | |- |on_birth_mother | |Yes |Character | |- |on_dynasty_created | |Yes |None | |- |on_alliance_removed | |Yes |None | |- |on_county_occupied | |Yes |None | |- |on_rank_up | |Yes |None | |- |on_vassal_become_powerful | |Yes |None | |- |on_join_war_as_secondary | |Yes |Character | |- |on_explicit_claim_lost | |Yes |Character | |- |on_alliance_broken | |Yes |None | |- |on_natural_death_second_chance | |Yes |None | |- |on_leave_council | |Yes |Character | |- |on_county_culture_change | |Yes |None | |- |on_war_started | |Yes |None | |- |on_marriage | |Yes |Character | |- |on_great_holy_war_participant_replaced | |Yes |Character | |- |five_year_playable_pulse | |Yes |Character | |- |on_birth_real_father | |Yes |None | |- |on_game_start_with_tutorial | |Yes |None | |} === On_actions from script === {{Expand}} == Strategy == === Triggering the event === {{Expand}} Should probably become its own page. === Techniques and design patterns === {{Expand}} Pinging events, message events. Other fancy ideas. {{Modding navbox}} [[Category:模组制作]] [[en:Event modding]]
摘要:
请注意您对十字军之王3百科的所有贡献都被认为是在知识共享署名-非商业性使用-相同方式共享下发布,请查看在
十字军之王3百科:版权
的细节。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源。
未经许可,请勿提交受版权保护的作品!
为防止机器编辑,请完成下方验证
取消
编辑帮助
(在新窗口中打开)
本页使用的模板:
Template:Ambox 2020
(
编辑
)
Template:Clear
(
编辑
)
Template:Expand
(
编辑
)
Template:Hover box
(
编辑
)
Template:Modding navbox
(
编辑
)
Template:Navbox
(
查看源代码
)(受保护)
Template:Navboxgroup
(
编辑
)
Template:Version
(
查看源代码
)(受保护)
Template:悬停
(
编辑
)
Template:需要完善
(
编辑
)
Template:需要翻译
(
编辑
)
×
登录
密码
记住登录
加入十字军之王3百科
忘记密码?
其他方式登录