【钢铁雄心IV】开发日志52改装
钢铁雄心4吧
全部回复
仅看楼主
level 12
IDW威震天 楼主
[阴险]怒![怒]抢![滑稽]发!
2016年04月15日 11点04分 1
level 12
IDW威震天 楼主
Hi everyone, this weeks diary is going to get really technical! We will be talking modding and improvements we have made for the modders in HOI4. This is also going to be a very long one :)
When starting out we decided we wanted to make HOI4 our most moddable game yet. That meant not hard coding things (HOI3 had a lot of hard coded logic and references to certain nations). In HOI4 all these things are in soft code, or part of scenario script setups making it a much better platform for cool mods. We have also decided to include the tool we use (more further down), and while it is provided as-is and not really polished compared to the real game its very useful. The game is also much better at letting you know when you have made mistakes and everything that can go wrong will usually let you know with logs etc.
Tools and Getting Started
Getting started with the creation of mods are now easier than ever before!
Using the launchers mod tool will allow you to create an empty mod for the game without any hassle and without even starting the game.
2016年04月15日 11点04分 3
level 12
IDW威震天 楼主
Then starting the game with the “--debug” flag will enable the “modder mode” that adds some extra sanity checks and enabling tools useful for modifying the game.
For example the in game Nudger tool that provides a simple interface to modify the properties of the map.
Here I created the awesome state of Östergötland by redistributing some provinces from Småland and tweaked the positions of the buildings.
The Nudger tool will then validate my changes and save them to the appropriate files for me and my mod, just in a few mouse clicks.
These files are of course human readable and can easily be edited with your favorite text editor for more advanced scripting or making smaller changes, most of the files (like state history setup) also have the option to be opened with a external program from the Nudger so you do not even need to find them in the filesystem.
2016年04月15日 11点04分 6
level 12
IDW威震天 楼主
Another thing we have put a lot of effort into is reloadability. You can reload interfaces (even automatically as the game will check if files are modified and you will see changes instantly ingame) as well as several game systems. For example focus trees will reload with your changes making it really quick and easy to work with making them and not forcing you to restart the game all the time.
Scripting & Language Improvements
One of the small help functions we’ve put in is the console command “trigger_docs”. This will print a list of all the triggers and effects we have in the game along with a small description of how they are used. We hope this can be a useful tool for new modders to find what they’re looking for and old modders to discover hidden possibilities. We of course still have the beloved debug dog to bark at you when something is wrong.
We’re continuously trying to improve the user-friendliness in our script language itself. Therefore we try to take the good practices that has been introduced in our other games and integrate them to all of our titles. One of the later additions that we’ve ported over is scripted effects and triggers which function is that you can basically macro that can be referenced in the various script files of the game that will execute a whole block of an effect or a trigger respectively.
2016年04月15日 11点04分 8
level 12
IDW威震天 楼主
An example of this could be that you might want to show one event option for Germany's neighbors that they are not in a faction with and a different event option for the rest of the world. This could be a common occurrence for all of your events and this would require all of those event options to have the following trigger:
any_neighbor_country = {
tag = GER
}
NOT = { is_in_faction_with = GER }
This could instead be created as a scripted trigger which we would define in the scripted_triggers folder in the game files as the following:
is_neighbor_not_in_german_faction = {
any_neighbor_country = {
tag = GER
}
NOT = { is_in_faction_with = GER }
}
2016年04月15日 11点04分 10
level 12
IDW威震天 楼主
Which could then be referenced in the different event option triggers as a one-line trigger (is_neighbor_not_in_german_faction = yes) in place of the multiple lines previously required.
As commonly used combinations of triggers and effects grow increasingly complex this script feature has two big functions. Firstly in that it decreases the amount of code duplication that would otherwise have been needed. And secondly it will also make the code easier to maintain since when you find yourself in the position that you have to change something in your common conditions for your events you could just add it inside the scripted trigger and just have to update one place instead of having to find all of the different places that would need to be updated.
Another great addition to the script language is the functionality of defining a particular scope as an event target inside an event or event chain, this feature has seen great usage in the script language of Crusader Kings II which always had an overload of scope changes.
2016年04月15日 11点04分 11
level 12
IDW威震天 楼主
The event targets makes it easier to reference different provinces and nations in the event text and execute effects on the correct targets without the need to have a huge amount of hidden bounce events to get the event scopes to evaluate correctly and keep track of different actors or locations. And if you want to get really creative you can try to combine these two script features and define event targets which you then use inside your scripted trigger or effect to have it act as a sort of sub-routine.
The AI
The AI in HOI3 was run though Lua scripts, but we decided to abandon these for several reasons in HOI4 (lack of lua knowledge at the company and low performance was the big ones). The AI is still however very moddable and has a lot of scripts to modify. I think its best to wait and talk about that in the dedicated dev diary on AI stuff I'll make SteelVolt write before release though :)
Next week we'll have Sideburnout talk about all things 2D art and interface for HOI4. See you then!
p.s whoever makes a Battletech mod first will forever live on in my heart.
2016年04月15日 11点04分 12
level 11
翻译君快上线
2016年04月15日 11点04分 13
level 11
[滑稽]
2016年04月15日 11点04分 14
level 10
MOD啊......这次又骗不到多少回复了估计[滑稽]大家都散了吧
2016年04月15日 11点04分 15
[怒]你的意思是要咱一个人翻译嘛!
2016年04月15日 12点04分
@IDW威震天 (╯‵□′)╯︵┻━┻先改HOI3去了。
2016年04月15日 12点04分
回复 IDW威震天 :[滑稽]我欣赏你的翻译能力
2016年04月15日 14点04分
@opytjk2 你是在...开玩笑嘛...[滑稽]
2016年04月15日 14点04分
level 12
IDW威震天 楼主
【依旧渣翻,希望各位不会嫌弃。[委屈]】
各位好,本周的日志将是一门真正的技术活儿!我们将介绍有关如何修改并修改HOI4的游戏模组。这次的介绍将会非~常~的~长~。:)
在刚开始的时候,我们希望将HOI4做成一个最棒的可塑造游戏,这也意味着我们不能弄出硬编码的东西(HOI3里有不少国家引用了太多的硬编码逻辑。)。【难道不是因为你们懒?[滑稽]】为了能给制作出酷炫mod提供一个良好的平台,在HOI4中这些东西都是软编码,或者是场景脚本设置的一部分。我们顺便决定(更进一步的)加入进我们所使用的一些工具。当然,虽然我们提供了这些东西,但跟真正精良的游戏制作工具相比还是逊色了一些,不过它还是很有用的。另外,当你在编写错误的时候,所有东西都会出现错误,也就是说这一次我们的游戏将能让你更早的发现这些错误。
制作工具以及开工:
这次开坑制作mods将比以往都更加的容易!
使用火箭筒mod制作工具可以允许你在不受干扰的情况,甚至不用打开游戏的情况下,为游戏创建一个空的mod文件。
2016年04月15日 12点04分 16
这个好评
2016年04月24日 05点04分
level 13
我想知道是否支持语言mod,好让汉化更容易[阴险]
2016年04月15日 12点04分 17
一直都支持语言mod
2016年04月15日 18点04分
还不死心啊 语言mod一直都是有的 只是P社内核不支持东亚语言[滑稽]
2016年04月16日 12点04分
level 12
日志好水
2016年04月15日 12点04分 18
level 9
mod制作工具dlc,$19.99[滑稽]
2016年04月15日 13点04分 19
[滑稽]
2016年04月15日 17点04分
1 2 3 尾页