英白拉多:罗马
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
帮助
译名手册
字词转换
编辑指南
编辑规范
练手沙盒
资助我们
资助我们
×
欢迎访问英白拉多:罗马百科!
注册一个账号
,一起参与编写吧!这里是
当前的工程
。
全站已采用新UI,任何使用上的问题请点击
这里
。欢迎所有对百科感兴趣的同学加入QQ群:
497888338
。
阅读
查看源代码
查看历史
讨论
查看“基因修改”的源代码
←
基因修改
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{Version|1.2}} Genes in Imperator define the various parts that make up character portraits. They are seperated into gene types (such as accessories), which contain one or more categories (such as clothing), which can include gene sets (such as Greek clothing). This hierarchy allows modders to add not only new sets, but also entirely new genes. The gene sets defined within the genes file are used in the ethnicities file. This makes cultural clothing, hairstyles, skin colours and much more possible. Genes have the ability to be marked as inheritable, allowing their children a chance of having the same gene selection. [[File:Genes-cwtools.jpg|thumb|right|The 00_genes.txt, as seen using the CWTools extension for Visual Studio Code]] Creating new genes.txt files isn't supported, so modders are required to copy and edit the vanilla 00_genes.txt file. This is due to the way genes are structured, with the categories only being read once by the game and overwriting one another. == Basics == The genes data is contained within the 00_genes.txt file located in the game/common/genes folder. While editing the file can be done in any text editor, a [[Modding#Tips_.26_Guidelines | proper text editor]] is recommended. Using Notepad++ or Visual Studio Code with the CWTools Extension will allow modders to easily contract and expand sections of code and more easily spot missing brackets. The 'reload' commands in Imperator allow modders to easily test changes to the genes without restarting the game. To do this, the user must first ensure their game has the correct launch parameters added to allow use of the console. To do this; right-click the game on Steam, choose Properties, Set Launch Options, add "-debug_mode -develop" (without quotes). pressing ` (tilde) in-game will bring up the console. Typing "reload genes" (without quotations) will load any changes made to the genes file since starting up the game. == General structure == [[File:Gene-structure-overview.jpg|thumb|right|General overview of the structure of the 00_genes.txt file.]] The genes are contained in a hierarchy which separates the various parts of a portrait into logical sections. Most gene entries must iterate upon an 'index' number. Gene categories can be seen in the portrait editor in-game, accessible by typing "pe" (without quotations) in the console. * '''Gene Type''' - The highest level of gene. Each new entry does not require an index number. Contains one or more gene categories. <br> ''Example: Accessory Genes - contains all clothing, hairstyles, beards etc.'' ** '''Gene Category''' - Each new category iterates upon an index number shared by all other categories, regardless of Gene Type. They also have the option of being inheritable or not. Contains one or more gene sets. <br> ''Example: hairstyles / index = 95 / inheritable = no - contains all hairstyle gene sets, use the unique index number of 95 and are not inherited by children.'' *** '''Gene Sets''' - Each gene set iterates upon an index number only used within that particular gene category. Contains one or more set entries. <br> ''Example: roman_hairstyles / index = 1 - contains the set entries that Roman portraits will use in-game.'' **** '''Set Entries''' - Each set entry defines who will use the contained objects, generally based on gender and age. Also contains weighted odds for specific objects being chosen. <br> ''Example: male / 6 = male_hair_roman_1 - tells male romans to use male_hair_roman_1'' == Technical descriptions == === Indices === Gene categories and gene sets make use of index numbers, starting from ''index = 0''. Gene categories globally use the same index sequence, while gene sets have a unique index sequence per category. Using the same index number twice for a category or set will cause only one to be loaded in-game. This is the main reason why making a new genes file isn't possible, as it will overwrite index numbers. === Weighted random selections === === Commented example === == Practical examples == === Creating a new clothing set === <pre> indian_clothes = { index = 25 # must be unused in the clothing section # ### here you add in the clothing pieces as defined in gfx\portraits\accessories, the numbers mark the proportion of the piece appearing with respect with the rest of them ### male = { 1 = male_clothes_indian_1 1 = male_clothes_indian_1_color2 1 = male_clothes_indian_1_color3 1 = male_clothes_indian_1_color4 1 = male_clothes_indian_1_color5 1 = male_clothes_indian_1_color6 1 = male_clothes_indian_1_color7 1 = male_clothes_indian_1_color8 1 = male_clothes_indian_1_color9 1 = male_clothes_indian_1_color10 1 = male_clothes_indian_2 1 = male_clothes_indian_2_color2 } female = { 1 = female_clothes_indian_1 1 = female_clothes_indian_1_color2 1 = female_clothes_indian_1_color3 1 = female_clothes_indian_1_color4 1 = female_clothes_indian_2 1 = female_clothes_indian_2_color2 1 = female_clothes_indian_2_color3 1 = female_clothes_indian_2_color4 1 = female_clothes_indian_3 1 = female_clothes_indian_3_color2 1 = female_clothes_indian_3_color3 1 = female_clothes_indian_3_color4 } boy = { 1 = boy_clothes_1 1 = boy_clothes_1_color2 1 = boy_clothes_1_color3 1 = boy_clothes_1_color4 } girl = { 1 = girl_clothes_1 1 = girl_clothes_1_color2 1 = girl_clothes_1_color3 1 = girl_clothes_1_color4 } } </pre> === Creating a new gene === {{Modding navbox}} [[Category:模组制作]] [[en:Genes_modding]]
本页使用的模板:
Template:Clear
(
查看源代码
)
Template:Modding navbox
(
查看源代码
)
Template:Navbox
(
查看源代码
)
Template:Navboxgroup
(
查看源代码
)
Template:Version
(
查看源代码
)
返回
基因修改
。
×
登录
密码
记住登录
加入英白拉多:罗马百科
忘记密码?
其他方式登录