模组制作:修订间差异

本页面讲述的内容长期有效
(en)
(15:50, 22 April 2019‎ Dauth)
标签替换
第1行: 第1行:
{{Version|Timeless}}
{{Version|Timeless}}
{{Expand}}


Modding allows new features to be added into the game.
Modding allows new features to be added into the game.


== Army ==
== 游戏数据 ==
{{Box wrapper}}
* [[Commands]] - 用于动态地影响游戏
* [[Conditions]] - 用于执行命令/事件/决议/等等。只有当特定条件为真时
* [[Country list]] - 原版游戏中全部国家的基本信息,包括国家代码
* [[Modifier list]] - 影响游戏方方面面的脚本修正


=== Unit types ===
* 游戏预置脚本
<pre>
archers = {
   army = yes
   assault = yes
   is_second_rank = yes
  
   enable = yes
  
   maneuver = 1
   movement_speed = 2
   build_cost = 2
   build_time = 45
  
   light_infantry = 2.0
   heavy_infantry = 1.25
   cavalry = 0.75
   warelephant = 1.0
   horse_archers = 1.0
   archers = 1.0
}
</pre>


== Internal country management ==
* 游戏预置修正


=== Pops ===
* 总表
<pre>
freemen = {
   local_manpower = 0.05
   can_promote_to = citizen
   demotes_to = slaves
}
</pre>


=== Prices ===
{{End box wrapper}}
<pre>
freemen_promotion = {
   religious = 10
}


assault = {
== 工具与实用程序 ==
   manpower = 2
* [[forum:924764|Clausewitz Maya Exporter]] - 此工具允许更简便地创建3D模型(单位)用于较新的克劳塞维茨引擎游戏中的模组。
   military = 20
* [[forum:1056010|Notepad++ Syntax Highlighter]] - Notepad++语法高亮规则定义
}


send_gift = {
   scaled_gold = 0.2
}
</pre>
== Characters ==
=== Character interactions ===
<pre>
hold_triumph = {
   on_other_nation = no
   on_own_nation = yes
  
   sound = "event:/SFX/UI/Character/sfx_ui_character_hold_triumph"
  
   potential_trigger = {
     hidden:scope:target = {
       is_alive = yes
     }
   }
  
   allowed_trigger = {
     hidden:scope:actor = {
    
      
    
       can_pay_price = hold_triumph
      
       custom_tooltip = {
         text = "TRIUMPH_RECENTLY_HELD"
      
         NOT = { has_variable = triumph_recently_held }
       }
     }
     scope:target = {
       is_adult = yes
      
       days_since_last_victory < 720
     }
   }
  
   effect = {
     scope:actor = {
       pay_price = hold_triumph
      
       set_variable = {
         name = triumph_recently_held
         value = 1
         days = 365
       }
      
     }
  
     scope:target = {
       add_loyalty = loyalty_huge
       add_popularity = popularity_huge
     }
   }
  
}
</pre>
== Government ==
=== Senate support for an action ===
<pre>
####################################
# Declare War
####################################
declare_war = {
   approval = {
  
     military_party = {
       base = 0
       always_modifier = {
         add = 0.5
         has_civil_war = no
       }
       always_modifier = {
         add = {
           value = 0
           add = root.manpower_percentage
           max = 0.5
         }
       }
       always_modifier = {
         add = -0.3
         war = yes
       }
       always_modifier = {
         add = {
           value = 20
           subtract = root.has_war_exhaustion
           divide = 50
           max = 0.2
         }
       }
       #######generic
       always_modifier = {
         add = {
           value = 0.01
           multiply = military_senate_support_svalue
           max = 0.2
         }
       }
       always_modifier = {
         add = {
           value = 0.01
           multiply = root.current_ruler.martial
         }
       }
       always_modifier = {
         add = 0.15
         OR = {
           AND = {
             current_ruler = {
               num_of_friends >= 1
             }
             any_character = {
               is_friend = root.current_ruler
               is_party_leader_of = root.party:military_party
             }
           }
           current_ruler = {
             is_party_leader_of = root.party:military_party
           }
         }
       }
       always_modifier = {
         add = {
           value = 0
           if = {
             limit = {
               root.current_ruler = {
                 party = military_party
               }
             }
             add = 0.2
             add = {
               value = 0
               add = root.tyranny
               divide = 100
             }
             max = 0.4
           }
         }
       }
       always_modifier = {
         add = -0.15
         current_ruler = {
           num_of_rivals >= 1
         }
         any_character = {
           is_rival = root.current_ruler
           is_party_leader_of = root.party:military_party
         }
       }
       always_modifier = {
         add = 0.1
         government = aristocratic_republic
       }
     }
  
     civic_party = {
       base = 0
       always_modifier = {
         add = -0.5
         has_civil_war = yes
       }
       always_modifier = {
         add = 0.15
         NOT = { current_ruler = { has_same_culture_group_as = scope:target.current_ruler } }
       }
       always_modifier = {
         add = 0.15
         NOT = { current_ruler = { has_same_culture_as = scope:target.current_ruler } }
       }
       always_modifier = {
         add = {
           value = 20
           subtract = root.has_war_exhaustion
           divide = 100
           max = 0.1
         }
       }
       always_modifier = {
         add = 0.2
         scope:target = {
           is_tribal = yes
         }
       }
       #######generic
       always_modifier = {
         add = {
           value = 0.01
           multiply = civic_senate_support_svalue
           max = 0.2
         }
       }
       always_modifier = {
         add = {
           value = 0.01
           multiply = root.current_ruler.finesse
         }
       }
       always_modifier = {
         add = 0.15
         OR = {
           AND = {
             current_ruler = {
               num_of_friends >= 1
             }
             any_character = {
               is_friend = root.current_ruler
               is_party_leader_of = root.party:civic_party
             }
           }
           current_ruler = {
             is_party_leader_of = root.party:civic_party
           }
         }
       }
       always_modifier = {
         add = {
           value = 0
           if = {
             limit = {
               root.current_ruler = {
                 party = civic_party
               }
             }
             add = 0.2
             add = {
               value = root.tyranny
               divide = 100
             }
             max = 0.4 
           }
         }
       }
       always_modifier = {
         add = -0.15
         current_ruler = {
           num_of_rivals >= 1
         }
         any_character = {
           is_rival = root.current_ruler
           is_party_leader_of = root.party:civic_party
         }
       }
       always_modifier = {
         add = 0.1
         government = democratic_republic
       }
     }
     religious_party = {
       base = 0.1
       always_modifier = {
         add = -0.5
         has_civil_war = yes
       }
       always_modifier = {
         add = 0.2
         NOT = { current_ruler = { has_same_religion_as = scope:target.current_ruler } }
       }
       #######generic
       always_modifier = {
         add = {
           value = 0.01
           multiply = religious_senate_support_svalue
           max = 0.2
         }
       }
       always_modifier = {
         add = {
           value = 0.01
           multiply = root.current_ruler.zeal
         }
       }
       always_modifier = {
         add = 0.15
         OR = {
           AND = {
             current_ruler = {
               num_of_friends >= 1
             }
             any_character = {
               is_friend = root.current_ruler
               is_party_leader_of = root.party:religious_party
             }
           }
           current_ruler = {
             is_party_leader_of = root.party:religious_party
           }
         }
       }
       always_modifier = {
         add = {
           value = 0
           if = {
             limit = {
               root.current_ruler = {
                 party = religious_party
               }
             }
             add = 0.2
             add = {
               value = 0
               add = root.tyranny
               divide = 100
             }
             max = 0.4
           }
         }
       }
       always_modifier = {
         add = -0.15
         current_ruler = {
           num_of_rivals >= 1
         }
         any_character = {
           is_rival = root.current_ruler
           is_party_leader_of = root.party:religious_party
         }
       }
       always_modifier = {
         add = 0.1
         government = theocratic_republic
       }
     }
     mercantile_party = {
       base = 0.5
       always_modifier = {
         add = -0.5
         has_civil_war = yes
       }
       always_modifier = {
         add = -0.5
         trade_access_with = scope:target
       }
       always_modifier = {
         add = {
           if = {
             limit = {
               root.has_war_exhaustion <= 10
             }
             value = 10
             subtract = root.has_war_exhaustion
             divide = 50
             max = 0.2
           }
           else = {
             value = 0
             subtract = root.has_war_exhaustion
             add = 10
             divide = 25
             max = -0.4
           }
         }
       }
       #######generic
       always_modifier = {
         add = {
           value = 0.01
           multiply = mercantile_senate_support_svalue
           max = 0.2
         }
       }
       always_modifier = {
         add = {
           value = 0.01
           multiply = root.current_ruler.charisma
         }
       }
       always_modifier = {
         add = 0.15
         OR = {
           AND = {
             current_ruler = {
               num_of_friends >= 1
             }
             any_character = {
               is_friend = root.current_ruler
               is_party_leader_of = root.party:mercantile_party
             }
           }
           current_ruler = {
             is_party_leader_of = root.party:mercantile_party
           }
         }
       }
       always_modifier = {
         add = {
           value = 0
           if = {
             limit = {
               root.current_ruler = {
                 party = mercantile_party
               }
             }
             add = 0.2
             add = {
               value = 0
               add = root.tyranny
               divide = 100
             }
             max = 0.4
           }
         }
       }
       always_modifier = {
         add = -0.15
         current_ruler = {
           num_of_rivals >= 1
         }
         any_character = {
           is_rival = root.current_ruler
           is_party_leader_of = root.party:mercantile_party
         }
       }
       always_modifier = {
         add = 0.1
         government = oligarchic_republic
       }
     }
     populist_party = {
       base = 0.1
       always_modifier = {
         add = 0.15
         scope:target = {
           is_monarchy = yes
         }
       }
       #######generic
       always_modifier = {
         add = {
           value = 0.01
           multiply = populist_senate_support_svalue
           max = 0.2
         }
       }
       always_modifier = {
         add = 0.15
         OR = {
           AND = {
             current_ruler = {
               num_of_friends >= 1
             }
             any_character = {
               is_friend = root.current_ruler
               is_party_leader_of = root.party:populist_party
             }
           }
           current_ruler = {
             is_party_leader_of = root.party:populist_party
           }
         }
       }
       always_modifier = {
         add = {
           value = 0
           if = {
             limit = {
               root.current_ruler = {
                 party = populist_party
               }
             }
             add = 0.3
             add = {
               value = 0
               add = root.tyranny
               divide = 100
             }
             max = 0.6 
           }
         }
       }
       always_modifier = {
         add = -0.15
         current_ruler = {
           num_of_rivals >= 1
         }
         any_character = {
           is_rival = root.current_ruler
           is_party_leader_of = root.party:populist_party
         }
       }
     }
   }
  
   loyalty = {
     military_party = 0.1
     populist_party = -0.1
   }
  
   support = {
     civic_party = -1
     military_party = 3
     mercantile_party = -1
     populist_party = -1
   }
}
</pre>


== 杂项 ==
* [[校验码#影响校验码计算的文件|校验码]]




第564行: 第31行:
<references/>
<references/>


{{Modding navbox}}
[[Category:制作模组]]
[[Category:制作模组]]
[[en:Modding]]
[[en:Modding]]

2019年4月24日 (三) 13:31的版本


Modding allows new features to be added into the game.

游戏数据

  • Commands - 用于动态地影响游戏
  • Conditions - 用于执行命令/事件/决议/等等。只有当特定条件为真时
  • Country list - 原版游戏中全部国家的基本信息,包括国家代码
  • Modifier list - 影响游戏方方面面的脚本修正
  • 游戏预置脚本
  • 游戏预置修正
  • 总表

工具与实用程序


杂项


参考资料