维多利亚3
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
×
欢迎访问维多利亚3百科!
注册一个账号
,一起参与编写吧!这里是
当前的工程
。
全站已采用新UI,任何使用上的问题请点击
这里
。欢迎所有对百科感兴趣的同学加入QQ群:
497888338
。
阅读
查看源代码
查看历史
讨论
查看“定义域”的源代码
←
定义域
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{Version|1.0}} 定义域是实在的实例,如果想知道如何筛选准确的定义域,请查看[[事件目标]],如果想知道定义域的类型,查看[[#Types of scope]] === 深入介绍 === 正如其他p社游戏一样,Vic3也有ROOT,PREV,THIS,FROM这些定义域。 For specific scope, it starts with certain letter, such as var,p,s,c,law_type. Using them with <code>:</code> followed by ceratain name can call the scope, e.g, <code>s:STATE_MINNESOTA</code> call a state_region scope names STATE_MINNESOTA. Scope can be linked by [[Event targets]], they are series of function to linked to output scopes from input scopes. <code>s</code> is an [[Event targets]], also it requires data, therefore it must followed by <code>:</code> than the ceratain name to call the scope. Due to <code>s</code> is global link [[Event targets]], It can be used independentlly. <code>region_state</code> is not global link so it sould follow by <code>.</code> after a state_region scope. By <code>.</code> can quickly link scopes. The most common example is <code>s:STATE_MINNESOTA.region_state:USA</code>, firstly is state_region scope than by <code>.</code> link to state. Further, add one more <code>.</code> is possible, just like <code>s:STATE_MINNESOTA.region_state:USA.var:usa_state_flag_block</code> However, some of scope can not be quickly switch, due to the parent scope is uncertain. diplomatic_play usually is uncertain scope, and then [[Event targets]] should be considered <syntaxhighlight lang=perl> random_diplomatic_play = { # random,every are to used in really effect, any is to used in trigger # random,every and any is all uncertain, can not use . to link next scope limit = { is_war = yes } initiator = { change_infamy = 5 } # initiator is event target of diplomatic_play, it outputs a country } </syntaxhighlight> Here are detailed example of scope happends: <syntaxhighlight lang=perl> example_event.1 = { type = country_event # It means that, root is the country which happend the event, instead of state. random_diplomatic_play = { limit = { is_war = yes any_scope_play_involved = { THIS = ROOT # THIS is the current scope, in there the THIS is any_scope_play_involved } NOR = { # not or initiator = ROOT # initiator and target is the event target of diplomatic_play target = ROOT } } initiator = { # this scope can only used in diplomatic scope save_scope_as = initiator_scope # therefore, it should be save to be handled in other scopes } target = { save_scope_as = target_scope } if = { limit = { ROOT = { is_diplomatic_play_enemy_of = scope:initiator_scope } } # to judge on ROOT scope if = { limit = { scope:initiator_scope = { infamy >= infamy_threshold:infamous } } # now we handdle saved scope in other scope ROOT = { change_infamy = 5 } } ROOT = { set_owes_obligation_to = { country = scope:target_scope setting = yes } } remove_target_backers = { ROOT } # remove_target_backers can only effects on diplomatic_play scope. # however, this effect just can display, it do not really make ROOT exit the war, it is frustrating. } } } </syntaxhighlight> === 地区定义域 === First of all, let me clear up the difference between a and a mere . 首先,有必要甄别"state region"和"state"的区别 用{{Flag|西班牙}}为例, 其拥有一个名为 "STATE_GRANADA"的"state region". "STATE_GRANADA"被{{Flag|西班牙}}和{{Flag|大不列颠}}同时拥有, "STATE_GRANADA" 也因此裂成了两个 "split state". {{Flag|大不列颠}}有一个 "British STATE_GRANADA" 而 {{Flag|西班牙}}也有一个 "Spianish STATE_GRANADA". 整一块"state region" STATE_GRANADA 就变成了两个叫做 "British STATE_GRANADA" 和 "Spianish STATE_GRANADA"的”states“. “state”的名称由占有地块相对数量决定,比如说{{Flag|西班牙}}有 STATE_GRANADA的绝大多数地块,因此"Spianish STATE_GRANADA"直接就叫做"STATE_GRANADA" 这是模组制作中一个很重要的概念,一言以蔽之: # 地理性质的,一整块的称为"state region" # 国家对"state region"占有的部分称为 "state",无论这个国家拥有全部还是部分。 举例子来说: <syntaxhighlight lang=perl> s:STATE_AMAZONAS = { # 这是地理意义上的state region add_homeland = brazilian } s:STATE_AMAZONAS.region_state:BRZ = { # 这是这是巴西占有的state set_state_type = incorporated } </syntaxhighlight> A list of all the vanilla state regions is available [[List_of_state_regions|here]], and is useful to easily find the tag you need. To learn how to change state traits you may wanna check out the workshop mod "More State Modifiers". ==== State triggers ==== WIP === Building scope === Although technically there is a building scope, in practice, game logic that involves buildings is done indirectly through the state scope. Here's an example I use in one of my mods. Check if a specific country, in a specific state region it owns, has a specific building in level 2. <syntaxhighlight lang=perl> c:SIA = { any_scope_state = { state_region = s:STATE_NORTH_BORNEO any_scope_building = { is_building_type = building_sulfur_mine level >= 2 } } } </syntaxhighlight> The letter to scope buildings is "'''b'''". However it's uses are very limited and is mostly used for basic world building. <syntaxhighlight lang=perl> if = { limit = { exists = state.b:building_sulfur_mine } add = state.b:building_sulfur_mine.level } </syntaxhighlight> ==== Building triggers ==== *is_building_type = building_sulfur_mine *level >= 2 === Culture scope === Culture scope seems to work in a similar fashion to buildings scope, indirectly referenced. However has more use cases. Scoping to a culture you use the letters "'''cu'''", for example: <syntaxhighlight lang=perl> state_region = { is_homeland = cu:greek } </syntaxhighlight> ==== Culture triggers ==== * is_homeland = cu:greek === Interest Group scope === Scoping to an interest group you use the letters "'''ig'''", for example: <syntaxhighlight lang=perl> ig:ig_landowners = { remove_ideology = ideology_paternalistic # example of game logic add_ideology = ideology_republican_paternalistic } </syntaxhighlight> The different interest groups tags are: {| class="wikitable" ! Pretty name !! Tag name |- | Armed Forces || ig_armed_forces |- | Devout || ig_devout |- | Industrialists || ig_industrialists |- | Intelligentsia || ig_intelligentsia |- | Landowners || ig_landowners |- | Petite bourgeoisie || ig_petty_bourgeoisie |- | Rural Folk || ig_rural_folk |- | Trade unions || ig_trade_unions |} ==== IG triggers ==== * is_in_government = yes === Market Good scope === Scoping to a market good you use the letters "'''mg'''", for example: <syntaxhighlight lang=perl> mg:tools = { save_scope_as = cool_tools # game logics } </syntaxhighlight> ==== MG triggers ==== * market = { mg:tools = { market_goods_delta >= 10 } } ==== Types of scope ==== none value bool flag country technology technology_status culture state province pop pop_type building building_type interest_group market market_goods interest_marker strategic_region diplomatic_action diplomatic_pact diplomatic_play diplomatic_relations character state_region war theater religion institution institution_type law law_type journalentry trade_route decree commander_order commander_order_type front battle interest_group_trait ideology goods canal_type country_definition civil_war state_trait country_creation country_formation hq objective battle_side political_movement combat_unit party shipping_lane {{Modding navbox}} [[Category:Modding]]
本页使用的模板:
Template:Clear
(
查看源代码
)
Template:Flag
(
查看源代码
)
Template:Flag core
(
查看源代码
)
Template:Modding navbox
(
查看源代码
)
Template:Navbox
(
查看源代码
)
Template:Navboxgroup
(
查看源代码
)
Template:国旗
(
查看源代码
)
Template:版本
(
查看源代码
)
返回
定义域
。
×
登录
密码
记住登录
加入维多利亚3百科
忘记密码?
其他方式登录