无编辑摘要 |
|||
第56行: | 第56行: | ||
| {{icon|no}} | | {{icon|no}} | ||
|- | |- | ||
! [[Goods_modding| | ! [[Goods_modding| 商品]] | ||
| common/goods | | common/goods | ||
| {{icon|no}} | | {{icon|no}} | ||
第70行: | 第70行: | ||
| {{icon|no}} | | {{icon|no}} | ||
|- | |- | ||
! [[Technology_modding| | ! [[Technology_modding| 科技]] | ||
| game/common/technology/technologies | | game/common/technology/technologies | ||
| | | | ||
第76行: | 第76行: | ||
:Technologies, via 'unlocking_technologies' | :Technologies, via 'unlocking_technologies' | ||
|- | |- | ||
! [[Institution_modding| | ! [[Institution_modding| 析构]] | ||
| common/institutions | | common/institutions | ||
| {{icon|no}} | | {{icon|no}} | ||
第84行: | 第84行: | ||
| {{icon|no}} | | {{icon|no}} | ||
|- | |- | ||
! [[Laws_modding| | ! [[Laws_modding| 法律]] | ||
| common/laws | | common/laws | ||
| | | | ||
第102行: | 第102行: | ||
| {{icon|no}} | | {{icon|no}} | ||
|- | |- | ||
! [[Interest group modding| | ! [[Interest group modding| 利益集团]] | ||
| common/interest_groups | | common/interest_groups | ||
| | | | ||
第126行: | 第126行: | ||
: Building, via 'default_building' | : Building, via 'default_building' | ||
|- | |- | ||
! [[Building_modding| | ! [[Building_modding| 建筑]] | ||
| common/buildings | | common/buildings | ||
| | | | ||
第134行: | 第134行: | ||
|} | |} | ||
=== 参数 === | === 参数 === |
2022年11月16日 (三) 14:14的版本
模组可以更改游戏中的元素,也可以为游戏加入新特性。 相当多的东西被硬编码,不能被编辑,比如说新的地图模式和加入快捷键。
所有不使用到控制台指令的模组都可以使用成就
提示
- 不要直接在游戏文件里修改文件,不仅会破坏游戏而且修改的内容也会在游戏更新中被覆盖。
- 使用可以高亮语法的编辑器可以让模组制作事半功倍,下面是拥有对维多利亚3语法支持插件的编辑器:
- Visual Studio Code 是一个完备但是稍慢的文本编辑器,使用CwTools插件可以使其支持维多利亚3的语法
- Sublime Text 是非常快的编辑器,支持高亮语法,自动补全和文档查询,搭配维多利亚3插件Victoria 3 Tools使用
- 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.
- 以 "-debug_mode" 和 "-filewatcher" 指令可以开启调试模式,调试模式可以使用控制台和开发工具,同时也能热更改一些文件而不需要重启。
- 查看error.log以捕获bug,这种精确的记录对于模组制作者来说是一种可以判断为什么一些东西不工作的利器。文件位于Documents/Paradox Interactive/Victoria 3/logs
- 请备份,所有东西都可能会变坏所以需要备份。你可以手动备份也可以使用诸如GIt的版本控制工具、可以考虑使用Github来团队协作,如果你是初学者建议使用以Github Desktopi熟悉Git。
- 使用Use "script_docs" 和 "DumpDataTypes" 控制台指令可以在Documents/Paradox Interactive/Victoria 3/logs生成效果、条件、作用域和事件目标的记录。
- 如果你不清楚怎么做,可以在游戏文件搜索你需要搜索的单词,查找文件中的单词是写出没有错误的mod的一个快捷方法。
- 当你下载了你上传的Steam mod,在本地文件又有原本的Steam mod,Steam的mod不会运行。
- 括号要补全,这样才能使得代码都在一个层次内,正确的代码是可以让大括号在文本编辑器折起来的。漂亮的代码能够更好看清楚错误和增强可读性。
- 以#开头来进行注释,可以说明代码的用途,也可以注释掉暂时不需要用的代码。
实用的工具
- Pdx-Unlimiter 可以修改存档数据的实用工具
- Map data editor 基于jomini.js制作的用chrome启动的省份数据编辑器,可以可视化编辑history/states的数据
- Music Mod Creation Tool 顾名思义,这是一个音乐mod制作工具
模组指导
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.
Object type | 路径 | Dependencies |
---|---|---|
人群职业 | common/pop_types | |
商品 | common/goods | |
人群需求 | common/pop_needs |
|
时代 | common/technology/eras | |
科技 | game/common/technology/technologies |
|
析构 | common/institutions | |
法律组 | common/law_groups | |
法律 | common/laws |
|
意识形态 | common/ideologies |
|
利益集团特质 | game/common/interest_group_traits | |
利益集团 | common/interest_groups |
|
生产方式 | common/production_methods |
|
生产方式组 | common/production_method_groups |
|
建筑组 | common/building_groups |
|
建筑 | common/buildings |
|
参数
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.
Object type | Parameter | Parameter type | Required | Meaning |
---|---|---|---|---|
Trade goods | texture | string | good icon filepath | |
cost | integer | base good price | ||
category | keyword, one of:
|
which goods category it belongs to | ||
prestige_factor | integer | base prestige for being lowest rank leading producer:
specifically, holding the MIN_PRESTIGE_AWARD spot. | ||
traded_quantity | integer | how many goods are traded for each level of a trade route | ||
convoy_cost_multiplier | floating point number | how many times more convoys are needed to transport this good | ||
consumption_tax_cost | integer | 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 | the base technology cost for techs in this era | |
Technology | era | Technology Era | which era this technology belongs to | |
texture | string | technology icon filepath | ||
category | keyword, one of:
|
which category this technology belongs to | ||
modifier | country modifier | which immediate effects this technology has on your country
Example: Cotton Gin provides 25% cotton plantation throughput. | ||
unlocking_technologies | list of technologies | All prerequisite technologies. If empty, it has no prerequisites | ||
can_research | boolean | if 'no', makes it unavailable for normal research.
Example: Sericulture. |
参见
Modders Guides
参考文档 | 效果 • 条件 • 事件目标 • 定义域 •增益 • 变量 • Data types • 本地化 • Customizable localization |
脚本 | 脚本化函数 • 国家 • 决议 • 事件 • 日志 • 定义 • 外交 • 附属类型 • 修正 • Objectives • On actions |
游戏内概念 | 建筑 • Pop • 文化 • 宗教 • 利益集团 • 派系 • 科技 • 法律 • 机构 • 法令 • 货物 • 概念 |
地图 | 地图 |
图像 | 3D Models • Interface • Graphical Assets • Fonts • Flags |
音乐 | Music • Sound |
其他 | 控制台指令 • Checksum • 模组结构 • Troubleshooting |
指引 | 自定义国家 • 存档编辑 • 地图数据编辑 |