维多利亚3
ParaWikis
最新百科
都市天际线2百科
英雄无敌3百科
维多利亚3百科
奇妙探险队2百科
罪恶帝国百科
英白拉多:罗马百科
热门百科
群星百科
欧陆风云4百科
十字军之王2百科
十字军之王3百科
钢铁雄心4百科
维多利亚2百科
ParaWikis
申请建站
ParaWikis
ParaCommons
最近更改
随机页面
加入QQ群
工具
链入页面
相关更改
特殊页面
页面信息
页面值
×
欢迎访问维多利亚3百科!
注册一个账号
,一起参与编写吧!这里是
当前的工程
。
全站已采用新UI,任何使用上的问题请点击
这里
。欢迎所有对百科感兴趣的同学加入QQ群:
497888338
。
阅读
查看源代码
查看历史
讨论
查看“模组制作”的源代码
←
模组制作
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{Version|pre-release}} Modding allows to change elements of the game or add new features. Certain things are hardcoded, i.e. not available for modding, such as changing map modes or adding new hotkeys. All mods will be achievement compatible unless they utilize console commands. == Tips == * Create a mod instead of directly modifying the game files, as they will be overwritten with any game update * Use a good text editor that has syntax highlighting and other useful features like find in files. The following programs are free and currently have plugins to support Victoria 3 scripting: *# [https://www.sublimetext.com/ Sublime Text] is very fast and has syntax, completion, and documentation support with the plugin found here: [https://github.com/dementive/Victoria3Tools Victoria 3 Tools] *# [https://code.visualstudio.com/ Visual Studio Code] is a slower but feature rich editor that has a fan-made plugin called CWTools that is found here: [https://marketplace.visualstudio.com/items?itemName=tboby.cwtools-vscode CwTools] *# [https://notepad-plus-plus.org/ Notepad++] is another good lightweight editor but it has no fan made plugins that support Victoria 3 specifically. Choosing Perl as your language syntax will give satisfactory syntax highlighting. * Start the game with "-debug_mode" and "-filewatcher" options to use the console, dev tools, and automatically reload changed files without having to restart the game. * Use the error.log to catch any bugs, it is extremely useful the logging is very accurate and is one of the greatest tools modders have for debugging things that are not working. It is located next to the mod folder in Documents/Paradox Interactive/Victoria 3/logs * Backup your work, things can go wrong and it is always good to have a backup. Either do it manually or use a version control system like Git. Also consider using GitHub for team collaboration. If you are new to Git a program like [https://desktop.github.com/ Github Desktop]is great for beginners. * Use "script_docs" and "DumpDataTypes" console commands in the game to generate other logs with event effects, triggers and scopes. * If you are unsure of how to do something, search through the base game files for words you know you need to use. Finding in files is one of the most important tools to quickly write bug free mods. * Remove your local mod when you subscribe to the Steam version, otherwise it won't work. * Indent properly, so that opening and closing brackets are on the same level. Proper formatting will allow you to fold blocks of code, help spot any mistakes and make it easier to read. * Add comments, starting with #, to remember later how things works, to navigate easier or to disable parts of code without deleting them. ==Modding Guides== [[New country modding|Countries modding]] [[Event modding]] [[Journal modding]] [[Modifier modding]] == Game object reference == === Dependency and Folder Structure === If you want to add a new game object, you will need to keep in mind which more fundamental objects it depends on, and how to organize the files so the game recognizes it. All paths are relative to the 'game' folder inside your Victoria 3 install directory, as that is where all scriptable parts of the game are located. Note: objects with no dependencies may still reference primitive objects (numbers, strings etc) or core game concepts, but no object type that mods can edit or define, only change the parameter value of. Nested references, especially within modifiers, are generally also not counted, since modifiers can have arbitrary dependency relations. {| class="mildtable sortable mw-collapsible" ! Object type ! Path ! Dependencies |- ! Professions | common/pop_types | {{icon|no}} |- ! [[Goods_modding|Trade goods]] | common/goods | {{icon|no}} |- ! Needs | common/pop_needs | : Trade goods, via 'default' : Trade goods, via 'goods' inside 'entry' |- ! Eras | common/technology/eras | {{icon|no}} |- ! [[Technology_modding|Technologies]] | game/common/technology/technologies | :Eras, via 'era' :Technologies, via 'unlocking_technologies' |- ! [[Institution_modding|Institutions]] | common/institutions | {{icon|no}} |- ! Law groups | common/law_groups | {{icon|no}} |- ! [[Laws_modding|Laws]] | common/laws | :Institutions, via 'institution' :Law groups, via group :Laws, via 'disallowing_laws' :Laws, via 'possible_political_movements' |- ! Ideologies | common/ideologies | : Law groups, as parameters : Laws, via law group parameter mappings |- ! Interest group traits | game/common/interest_group_traits | {{icon|no}} |- ! [[Interest group modding|Interest groups]] | common/interest_groups | : Interest group traits, via 'traits' : Ideologies, via 'ideologies' |- ! Production methods | common/production_methods | : Technologies, via 'unlocking_technologies' : Laws, via 'disallowing_laws' : Production methods, via 'unlocking_production_methods' |- ! Production method groups | common/production_method_groups | : Production methods, via 'production_methods' |- ! Building groups | common/building_groups | : Building groups, via 'parent_group' : Building, via 'default_building' |- ! [[Building_modding|Buildings]] | common/buildings | : Building groups, via 'building_group' : Technology, via 'unlocking_technologies' : Production method groups, via 'production_method_groups' |} === Parameters === When creating a game object, you generally need to follow a specific pattern. Here are the parameters for various game objects, what they mean, which are required, and what type of value to enter. {| class="mildtable sortable mw-collapsible" ! Object type ! Parameter ! Parameter type ! Required ! Meaning |- !rowspan=7| Trade goods | texture | string | {{icon|yes}} | good icon filepath |- | cost | integer | {{icon|yes}} | base good price |- | category | keyword, one of: : staple : industrial : luxury : military | {{icon|yes}} | which goods category it belongs to |- | prestige_factor | integer | {{icon|yes}} | base prestige for being lowest rank leading producer: specifically, holding the MIN_PRESTIGE_AWARD spot. |- | traded_quantity | integer | {{icon|no}} | how many goods are traded for each level of a trade route |- | convoy_cost_multiplier | floating point number | {{icon|no}} | how many times more convoys are needed to transport this good |- | consumption_tax_cost | integer | {{icon|no}} | how much authority it costs to levy a consumption tax note: absence of this parameter implies no consumption tax can be levied |- ! Technology Era | technology_cost | integer | {{icon|yes}} | the base technology cost for techs in this era |- !rowspan=6| Technology | era | Technology Era | {{icon|yes}} | which era this technology belongs to |- | texture | string | {{icon|yes}} | technology icon filepath |- | category | keyword, one of: : production : military : society | {{icon|yes}} | which category this technology belongs to |- | modifier | country modifier | {{icon|no}} | which immediate effects this technology has on your country Example: Cotton Gin provides 25% cotton plantation throughput.<br/> Unlocked buildings, production methods, laws, etc are specified<br/> from the unlocked object, not the unlocking technology. |- | unlocking_technologies | list of technologies | {{icon|no}} | All prerequisite technologies. If empty, it has no prerequisites |- | can_research | boolean | {{icon|no}} | if 'no', makes it unavailable for normal research. Example: [[Production_technology#Sericulture|Sericulture]]. |} ==See also== [[Console commands]] [[On actions]] === Modders Guides=== [[User:Gr3st3r|Grester's Compendium]] {{Modding navbox}} [[Category:Modding]] [[en:Modding]]
本页使用的模板:
Template:Clear
(
查看源代码
)
Template:Modding navbox
(
查看源代码
)
Template:Navbox
(
查看源代码
)
Template:Navboxgroup
(
查看源代码
)
Template:图标
(
查看源代码
)
Template:版本
(
查看源代码
)
返回
模组制作
。
×
登录
密码
记住登录
加入维多利亚3百科
忘记密码?
其他方式登录