群星
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
阅读
编辑
编辑源代码
查看历史
讨论
编辑“
Government modding
”
自由之民
(
讨论
|
贡献
)
2022年3月7日 (一) 22:40的版本
(文本替换 - 替换“Category:Modding]]”为“Category:模组制作]]”)
(
差异
)
←上一版本
|
最后版本
(
差异
) |
下一版本→
(
差异
)
警告:您正在编辑的是本页面的旧版本。
如果您发布该更改,该版本后的所有更改都会丢失。
警告:
您没有登录。如果您做出任意编辑,您的IP地址将会公开可见。如果您
登录
或
创建
一个账户,您的编辑将归属于您的用户名,且将享受其他好处。
反垃圾检查。
不要
加入这个!
{{Version|3.0}} The following guide contains information related to modding empire's government and things contained inside related folder. == Governments == Governments are automatically picked based on various factors for a flavor. They have few actual effects on gameplay. Vanilla uses civics, authorities and ethics to determine it. Governments are defined at "common/governments/xxx.txt". === Data Structure === {| class="wikitable mw-collapsible mw-collapsed" |- ! width="20%" | Property ! width="80%" | Description |- | '''ruler_title'''<br>'''ruler_title_female''' | Localisation keys to determine the ruler title, such as "President" or "King". If the female title is undefined, the title will never differ by gender. |- | '''heir_title'''<br>'''heir_title_female''' | Localisation keys to determine the heir title, such as "Prince". If the female title is undefined, the title will never differ by gender. |- | '''use_regnal_names = <yes/no>''' | If yes, the auto-generated ruler names will use regnal last names if the namelist of this species defined any. |- |'''dynastic_last_names = <yes/no>''' | If yes, the heirs will inherit the last word of the ruler's name for a last name. For example, a King named "Ohma Zi-O" may have an heir named "Grand Zi-O". |- | '''should_force_rename - <yes/no>''' | Force the empire that reformed into this government to randomize its empire name. AI only. |- | '''possible''' | A block of [[Conditions]] to determine if this government type can be applied to an empire. (Country scope) |- | '''weight''' | If an empire is eligible to multiple government types, one with the highest weight wins. Common government forms like Military Dictatorship should have lower weight than specific government forms like Blood Court. |- | '''leader_class = <governor/scientist/admiral/general>''' | If the first ruler of the empire is elected out, that ruler will become a leader of specified class, rather than just disappear. Electoral governments only. |- | '''election_candidates''' * '''modifier''' ** '''add = <int>''' ** [[Conditions]] (Leader scope) | A section to specify who should and how likely they should participate the ruler election. Not required; if not specified, all leaders can participate. Electoral governments only. Vanilla governments usually give the current ruler 100 weight and give weight to certain leader classes depending on the government itself, like Militarist governments usually allow only Admirals and Generals and Materialist governments usually allow only Scientists. |} === Empire Random Names === All vanilla empire random names are directly linked to Government Types, meaning that new random names must be defined for the new government types, or the randomly generated AI empires using your new government will NOT receive a name and the game might crash. Empire random names are defined at "common/random_names/xxx.txt". == Authorities == An Authority is how the empire distribute the internal political powers. An empire can only have one Authority. Authorities are defined at "common/governments/authorities/xxx.txt". === Data Structure === {| class="wikitable mw-collapsible mw-collapsed" |- ! width="20%" | Property ! width="16%" | {{icon|Democratic}} Democratic-like ! width="16%" | {{icon|Oligarchic}}{{icon|Corporate}} Oligarchic-like ! width="16%" | {{icon|Dictatorial}} Dictatorial-like ! width="16%" | {{icon|Imperial}} Imperial-like ! width="16%" | {{icon|Hive Mind}}{{icon|Machine Intelligence}} Immortal Ruler Authorities |- | '''playable''' | colspan=5 | A block of [[Conditions]] executed under global scope to determine should this Authority appear in the GUI. Vanilla game uses this to hide DLC Authorities from being played by people who didn't buy relevant DLC. Since this doesn't affect the AI, it's better to use together with '''random_weight'''. |- | '''possible''' | colspan=5 | A block of [[Government modding#Special Requirement Syntax|Special Requirement Syntax]] that determines is this Authority compatible. Ethics, country types and species classes can be checked here. If evaluated false, this Authority will be grayed out from the empire creation menu and government reform window. Tooltips is generated only if this statement evaluated false. |- | '''random_weight''' | colspan=5 | Defines how likely this is to be picked randomly if it's valid. |- | '''election_type''' | <code>election_type = democratic</code> Election candidates will include the current ruler and every faction leader and randomly generated fillers if necessary. | colspan=2 | <code>election_type = oligarchic</code> Election candidates will only include hired leaders. | colspan=3 style="text-align: center;" | {{icon|no}} |- | '''re_election_allowed = <yes/no>''' | colspan=1 | Vanilla Democratic authority has '''yes''' for this field and all other authorities have this field undefined. Allows the current Ruler to run again and possibly be re-elected. | colspan=4 style="text-align: center;" | {{icon|no}} |- | '''has_heir = <yes/no>''' | colspan=3 style="text-align: center;" | {{icon|no}} | <code>has_heir = yes</code> | style="text-align: center;" | {{icon|no}} |- | '''can_have_emergency_elections = <yes/no>'''<br>'''emergency_election_cost = <int>''' | style="text-align: center;" | {{icon|no}} | <code>can_have_emergency_elections = yes</code> This empire can initiate an emergency election at a cost of a number of {{iconify|Influence}} equal to <code>emergency_election_cost</code>. | colspan=3 style="text-align: center;" | {{icon|no}} |- | '''max_election_candidates = <int>''' | Vanilla Democratic authority has this undefined, making it to be the fallback '''-1''', which means no limit. | colspan=2 | Vanilla authorities have '''4''' for this property, making there to be up to 4 candidates. | colspan=2 style="text-align: center;" | {{icon|no}} |- | '''election_term_years = <int>'''<br>'''election_term_variance = <int>''' | colspan=2 | Determines how many years between elections. Actual election term is <code>election_term_years +/- election_term_variance</code>. | colspan=3 style="text-align: center;" | {{icon|no}} |- | '''uses_mandates = <yes/no>''' | Default no. If an authority has <code>election_type = democratic</code> but doesn't use mandates, this authority doesn't work properly. See [[Government#Mandates|Mandates]] and [[Mandate modding]] for details. | colspan=4 style="text-align: center;" | {{icon|no}} |- | '''has_agendas = <yes/no>''' | style="text-align: center;" | {{icon|no}} | colspan=4 | Default no. If this is toggled yes while the ruler is some sort of immortal, the empire will then have a permanent Agenda that can't be changed for the rest of the game. See [[Government#Agendas|Agendas]] and [[Agenda modding]] for details. |- | '''tags = { xxx yyy zzz }''' | colspan=5 | A set of localisation keys to briefingly describe the mechanics and effects of this authority other than modifiers. |- | '''country_modifier''' | colspan=5 | A block of [[Modifiers]] to be applied to the Empire. |- | '''traits = { trait_xxx trait_yyy }''' | colspan=5 | A list of species trait keys to be added to the primary species of this empire. In the empire creation menu, these traits can't be removed, but more can be added if there is enough trait points and trait picks. Government reforming doesn't add or remove these traits. |- | '''can_reform = <yes/no>''' | colspan=5 | Default yes. If no, empires can't reform into/out of this authority. |- | '''has_factions = <yes/no>''' | colspan=5 | Default yes. If no, this Empire can't have factions. However, vanilla factions also exclude the ethic {{iconify|Gestalt Consciousness}}, making it unclear will this property do what it says. |- | '''valid_for_released_vassal = <yes/no>''' | colspan=5 | Default yes. If no, a released vessal will never pick this Authority. |- | '''localization_postfix''' | colspan=5 | If specified as "_popopopo", a localisation key called "locacacaca" will be translated into "locacacaca_popopopo". <pre> l_english: locacacaca:0 "How can you be sure that you are not just an advanced chatbot?" locacacaca_popopopo:0 "I AM ADVANCED CHATBOT YOU LOSE" </pre> If there is somewhere that should display the former, it will now display the later. |} Other effects an Authority might also have, such as immortal rulers, are heavily integrated into other vanilla files as well as events. Use <code>has_authority = auth_xxx</code> to check the Authority of an Empire. == Civics and Origins == Civics are additional bonuses to the government of variable effects, some can even affect the playstyle. An empire can have any number of Civics (up to 3 if vanilla). Origins are Civics with <code>is_origin = yes</code> statement. Since an empire can only have one origin and it can't be changed mid-game, some of the fields for civics are irrelevant to Origins. Also, they have additional fields. They are defined at "common/governments/civics/xxx.txt". === Data Structure === {| class="wikitable mw-collapsible mw-collapsed" |- ! width="20%" | Property ! width="40%" | Civics ! width="40%" | Origins |- | '''is_origin = <yes/no>''' | style="text-align: center;" | {{icon|no}} | For obvious reason, this have to be set as <code>is_origin = yes</code>. |- | '''playable''' | colspan=2 | A block of [[Conditions]] executed under global scope to determine should this Civic or Origin appear in the empire creator and government reforming view. Vanilla uses this to hide DLC contents from being played by people who didn't buy relevant DLC. Since this doesn't affect the AI, it's better to use together with '''random_weight'''. |- | '''icon = <path of dds file>''' | Specifies an icon for this. Default icon path is <code>gfx/interface/icons/governments/civics/xxx.dds</code>. | Vanilla Origins always have this specified. |- | '''picture = <GFX key>''' | style="text-align: center;" | {{icon|no}} | Specifies a picture for this Origin that is shown in empire creation menu. |- | '''starting_colony = <planet class key>''' | Changes the empire's starting colony planet class regardless of the player's choice. This statement doesn't affect climate preference trait. | rowspan=2 | Origins have higher priority than civics. |- | '''habitability_preference = <planet class key>''' | Changes the empire's primary species' climate preference trait. |- | '''potential''' | A block of [[Government modding#Special Requirement Syntax|Special Requirement Syntax]] that determines is this Civic compatible. Incomptible Civics have no effect. If evaluated false, this Civic is hidden from the empire creation menu and government reform window, and if this Civic is already picked, it's rendered invalid without any tooltip. Vanilla use this to hide NPC-only civics and irrelevant civics for/from {{iconify|Hive Mind}}, {{iconify|Machine Intelligence}}, and {{iconify|Corporate}} authorities. | Origins that don't meet the potential requirements will be hidden from the Origin selection view, and if already chosen, the Origin selection will be set to the default origin Prosperous Unification. This field has no effect after the start of the game. |- | '''possible''' | A block of [[Government modding#Special Requirement Syntax|Special Requirement Syntax]] that determines is this Civic compatible. Incomptible Civics have no effect. If evaluated false, this Civic is grayed out from the empire creation menu and government reform window. This section will also generate a tooltip to tell the player what's the requirement of this Civic in empire creation menu and government reform window. | Origins that don't meet the possible requirements will still be visible and chosen but such empire design can't be saved. This field has no effect after the start of the game. |- | '''pickable_at_start = <yes/no>''' | Whether this civic can be selected when you are creating a new empire. If not, it can only be picked by government reforming. | rowspan=2 style="text-align: center;" | {{icon|no}} |- | '''modification = <yes/no>''' | Default yes. If no, an empire can't add or remove this Civic after the start of the game. Used for playstyle restrictive civics like {{iconify|Fanatic Purifiers}}. |- | '''random_weight''' | Defines how likely this is to be picked randomly if it's valid. Civics of stricter requirements tend to have higher random weight. If without this statement, a Civic or Origin will never be randomly selected. | An Origin of random weight 0 can sometimes still be selected by the AI. A more safe way is to remove the statement entirely. |- | '''modifier''' | A block of [[Modifiers]] to be applied to the Empire. If this Civic is considered incompatible, the Modifiers will be ignored. | A block of [[Modifiers]] to be applied to the Empire. These will always apply regardless of the Origin requirements. |- | '''description = <localisation key>''' | colspan=2 | A localisation key for effects description. This will be displayed before the modifier tooltips. |- | '''traits = { trait = trait_xxx trait = trait_yyy }''' | colspan=2 | A list of species trait keys to be added to the primary species of this empire. In the empire creation menu, these traits can't be removed, but more can be added if there is enough trait points and trait picks. Government reforming doesn't add or remove these traits. |- | '''has_secondary_species''' | colspan=2 | This Civic or Origin requires a secondary species. It's unclear what if more than one Civics that require a secondary species is selected at the same time. An Origin with a secondary species will override the secondary species for a Civic. |- | * '''title''' | colspan=2 | A localisation key for the title of the secondary species. {{iconify|Syncretic Evolution}} calls it "Syncretic Species". |- | * '''traits = { trait = trait_xxx trait = trait_yyy }''' | colspan=2 | A list of species trait keys to be added to the secondary species. In the empire creation menu, these traits can't be removed, but more can be added if there is enough trait points and trait picks. |- | '''can_build_ruler_ship''' | Default no. If set to yes, this empire can build old-school oversized ships for each ruler. Vanilla unused. | rowspan=6 style="text-align: center;" | {{icon|no}} |- | '''cost''' | How many civic points this will cost. Defaults to 1. Must be a positive integer. |- | '''swap_type''' | An entry that swaps civic name, flavor text and effect tooltip under certain condition. {{iconify|Devouring Swarm}} uses this to swap into Terravore. Unlike [[Tradition modding|Traditions]], the primary '''modifier''' block is NOT overwritten and there is NOT any local '''modifier''' block of swaps. |- | * '''name = <localistion key>''' | Changes the name and flavor text of this civic. |- | * '''description = <localisation key>''' | Changes the effect tooltip of this civic. |- | * '''trigger''' | A block of [[Conditions]] to check if this Civic swap should apply. Vanilla use "local_human_species_class = LITHOID" to swap Devouring Swarm for Lithoids. (Global scope) |- | '''advanced_start''' | rowspan=5 style="text-align: center;" | {{icon|no}} | Default no. If set to no, the empire can't have advanced starts. |- | '''preferred_planet_class_neighbor''' | Default yes. If set to no, the guaranteed habitable worlds will not be guaranteed to match the empire's climate preference. |- | '''non_colonizable_planet_class_neighbor''' | Default no. If set to yes, the empire can't have guaranteed habitable worlds regardless of the galaxy settings. |- | '''initializers = { xxx yyy zzz }''' | A list of keys of solar_system_initializer. The solar system initializer the player picked for this empire in the empire creation menu will be ignored. If specified, the empire won't have guaranteed habitable worlds anyway unless the initializer creates some based on the galaxy settings. |- | '''flags = { xxx yyy zzz }''' | This empire will have these country flags set at the start of the game. |} Implementions of other effects a Civic might also have, such as diplomatic restrictions, are integrated into other vanilla game files. Use '''has_valid_civic''' to check Civics. Most of the other effects an Origin might also have (for example, starting conditions), are implemented through [[Event_modding|Events]]. Use '''has_origin''' to check Origins. === Examples === ==== Civics ==== {{Collapse list | type='''Fanatic Purifiers''' | body= <pre> civic_fanatic_purifiers = { modification = no playable = { host_has_dlc = "Utopia" } potential = { ethics = { NOT = { value = ethic_gestalt_consciousness } } authority = { NOT = { value = auth_corporate } } } possible = { ethics = { value = ethic_fanatic_xenophobe OR = { value = ethic_militarist value = ethic_spiritualist } } civics = { NOR = { value = civic_barbaric_despoilers } } origin = { NOR = { value = origin_syncretic_evolution value = origin_common_ground value = origin_hegemon } } } random_weight = { base = 1000 modifier = { factor = 0 NOT = { host_has_dlc = "Utopia" } } } description = "civic_tooltip_fanatic_purifiers_effects" modifier = { ship_fire_rate_mult = 0.33 army_damage_mult = 0.33 starbase_shipyard_build_cost_mult = -0.15 country_naval_cap_mult = 0.33 } } </pre> }} {{Collapse list | type='''Driven Assimilator''' | body= <pre> civic_machine_assimilator = { potential = { authority = { value = auth_machine_intelligence } } possible = { civics = { NOR = { value = civic_machine_servitor value = civic_machine_terminator } } } modification = no random_weight = { base = 5 modifier = { factor = 0 NOT = { host_has_dlc = "Synthetic Dawn Story Pack" } } modifier = { # civic has no effect after galaxy generation, disable for random generation factor = 0 has_global_flag = game_started } } description = civic_tooltip_machine_assimilator_effects has_secondary_species = { # see game_start.11 title = civic_machine_assimilator_secondary_species traits = { trait = trait_cybernetic } } } </pre> }} {{Collapse list | type='''Devouring Swarm''' | body= <pre> civic_hive_devouring_swarm = { modification = no potential = { authority = { value = auth_hive_mind } } possible = { origin = { NOR = { value = origin_common_ground value = origin_hegemon } } } random_weight = { base = 5 } description = "civic_tooltip_devouring_swarm_effects" modifier = { country_starbase_influence_cost_mult = -0.5 ship_hull_mult = 0.25 ship_hull_regen_add_perc = 0.5 ship_armor_regen_add_perc = 0.5 army_damage_mult = 0.40 category_biology_research_speed_mult = 0.20 starbase_shipyard_build_cost_mult = -0.25 country_naval_cap_mult = 0.33 } swap_type = { name = civic_hive_devouring_swarm_lithoid description = "civic_tooltip_devouring_swarm_lithoid_effects" trigger = { local_human_species_class = LITHOID } } } </pre> }} ==== Origins ==== {{Collapse list | type='''Syncretic Evolution''' | body= <pre> origin_syncretic_evolution = { is_origin = yes icon = "gfx/interface/icons/origins/origins_syncretic_evolution.dds" picture = GFX_origin_syncretic_evolution playable = { host_has_dlc = "Utopia" } possible = { ethics = { NOT = { value = ethic_gestalt_consciousness } } civics = { NOT = { value = civic_fanatic_purifiers } } } description = civic_tooltip_syncretic_evolution_effects has_secondary_species = { # see game_start.11 title = civic_syncretic_evolution_secondary_species traits = { trait = trait_syncretic_proles } } advanced_start = yes random_weight = { base = 10 } } </pre> }} {{Collapse list | type='''Life Seeded''' | body= <pre> origin_life_seeded = { is_origin = yes icon = "gfx/interface/icons/origins/origins_life_seeded.dds" picture = GFX_origin_life_seeded starting_colony = pc_gaia habitability_preference = pc_gaia preferred_planet_class_neighbor = no playable = { host_has_dlc = "Apocalypse" } possible = { authority = { NOT = { value = auth_machine_intelligence } } } description = "civic_tooltip_life_seeded_effects" random_weight = { base = 5 } } </pre> }} == Special Requirement Syntax == The Civics use special requirement syntax and they don't accept regular [[Conditions]]. If it was implemented the other way, since incompatible Civics have no effect and a Civic can turn invalid literally anytime, it would be too performance intensive to check all empires for all civics everyday. All they can check are civics, ethics, authorities, origins, country types and species archetypes. A single row of statement consist of "value = " and the relevant object key. Logical operators, namely NOT, AND, OR, and NOR, can be used to group one or more statements of the same category together, with an optional "text" entry which replaces the auto-generated tooltip for the entire logical block, but they cannot nest with each other and they cannot cross the category. This is an example of this special syntax. possible = { authority = { OR = { ''# text specified here replaces auto-generated tooltips for this block'' text = civic_tooltip_dem_oli_dic value = auth_democratic value = auth_oligarchic value = auth_dictatorial } } ethics = { value = ethic_fanatic_pacifist NOR = { text = civic_tooltip_not_authoritarian value = ethic_authoritarian value = ethic_fanatic_authoritarian } } origin = { NOR = { value = origin_common_ground value = origin_hegemon } } species_archetype = { ''# Only species archetypes can be specified here'' value = LITHOID } } Nested logic blocks {{red|don't work}}. ethics = { OR = { AND = { value = ethic_fanatic_authoritarian value = ethic_militarist } AND = { value = ethic_authoritarian value = ethic_fanatic_militarist } } } Cross-category logic blocks {{red|don't work}} either. OR = { ethics = { value = ethic_materialist } authority = { value = auth_imperial } } {{Template:ModdingNavbox}} [[Category:模组制作]]
摘要:
请注意您对群星百科的所有贡献都被认为是在知识共享署名-非商业性使用-相同方式共享下发布,请查看在
群星百科:版权
的细节。如果您不希望您的文字被任意修改和再散布,请不要提交。
您同时也要向我们保证您所提交的内容是您自己所作,或得自一个不受版权保护或相似自由的来源。
未经许可,请勿提交受版权保护的作品!
为防止机器编辑,请完成下方验证
取消
编辑帮助
(在新窗口中打开)
本页使用的模板:
Template:0
(
编辑
)
Template:Clear
(
编辑
)
Template:Collapse list
(
编辑
)
Template:Color
(
编辑
)
Template:Icon
(
编辑
)
Template:Icon/c
(
编辑
)
Template:Icon/d
(
编辑
)
Template:Icon/f
(
编辑
)
Template:Icon/g
(
编辑
)
Template:Icon/h
(
编辑
)
Template:Icon/i
(
编辑
)
Template:Icon/m
(
编辑
)
Template:Icon/n
(
编辑
)
Template:Icon/o
(
编辑
)
Template:Icon/s
(
编辑
)
Template:Iconify
(
编辑
)
Template:ModdingNavbox
(
编辑
)
Template:Navbox
(
编辑
)
Template:Navboxgroup
(
编辑
)
Template:Planet modifier
(
编辑
)
Template:Red
(
编辑
)
Template:Ruby
(
编辑
)
Template:Version
(
编辑
)
×
登录
密码
记住登录
加入群星百科
忘记密码?
其他方式登录