52PCGame

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1771|回复: 8

[日志新闻] Imperator Development Diary - 8th of April 日志45- 军队委任和达契亚

[复制链接]

128

主题

280

帖子

8003

积分

制置使

Rank: 14Rank: 14Rank: 14Rank: 14

积分
8003
威望
7998
金圆券
37222 PB
小红花
144
臭鸡蛋
2
法币
3396 FB

黄马褂

发表于 2019-4-9 16:31 | 显示全部楼层 |阅读模式
本帖最后由 cools0812 于 2019-4-10 16:39 编辑

https://forum.paradoxplaza.com/forum/index.php?threads/imperator-development-diary-8th-of-april.1165834/
本期主题为军队委任系统,如何mod这个系统,还有介绍达契亚(现代罗马尼亚和周边)的开局形


Hello and welcome to another Development Diary for Imperator Rome!

Today we will be talking about how you can assign your units Objectives that they will perform for you, and how to mod these. We will also give a summary of the starting situation in the Balkans and Dacia.

Unit Objectives
​


As you may have noticed in our streams automation is now an integral part of playing the game, should you want to. Unit objectives are a way to outsource the management of some armies to the AI, essentially using the same things that the AI itself uses to control its armies and navies. You can at any time select an objective for each army or navy under player control (or several units at once, in which case the objective applies separately to each one currently), which enables AI for said unit, making it automatically take actions almost as if it was controlled by an AI country.

We don’t see this as something you use for your main armies but it can be useful for any secondary armies or forces left behind to control or defend your country. Split/merging/consolidation/abilities are not used by objective units except specifically where it's a necessity.

The design goal with objectives to simplify the codebase on our end, expose unit behavior to modders in a modular fashion, and ultimately to provide the player with a greater amount of variation in NPC behavior.

While you may not want to sign away control of all of your armies to the AI the AI objectives makes it possible for you to let the AI handle some of your armies, while you focus on others.

Available objectives
  • Naval Landing: Functionally similar to EU4 auto transport. If there is at least one available navy which has had Naval Landing selected, clicking to an inaccessible city with an army will make this navy pick up that army and ship it to that city.
  • Independent Operations: Will turn on the regular army AI for this unit. Making it operate freely, attacking enemy armies, occupying enemy cities, etc.
  • Defend Border: Regular AI as above but stays within country's borders, effectively just doing defensive tasks.
  • Reconnaissance: Patrols across the country's borders reporting enemy movements.
  • Fight Rebels: Army will focus on destroying any armies owned by the Rebel tag (Slave Revolt stacks).
  • Keep in Reserve: Avoid contact with enemies while staying within country borders. Mostly because a common experience is MP is forgetting troops you're currently not using and having them destroyed when looking elsewhere.
  • Hunt Fleets: Search and destroy enemy fleets.

Special Unit Objectives

There are also many Unit Objectives that you cannot pick but that you may still encounter. Disloyal Generals will make use of a specific unit objective where they essentially do what they themselves want to. Making you unable to order them around or do things like send them to a certain death. Likewise Mercenaries that you do not pay will stop taking your orders and operate on their own.
There is also special logic for Slave Revolts, where rebel stacks will seek out the closest rich city to attempt to loot and set free more of their kin.

Another good thing about the Unit Objective AI system is how moddable it is. @Chaingun who created this system will now talk a bit about that before I then continue to summarize the last part of the map

Modding
Internally, many behaviors such as rebels, disloyal generals and units trying to join up with the target unit of the Recruit to Unit action are also represented as objectives and thus moddable to a degree.

Some objectives started out as hardcoded early in development and still are, but they are still present in the files so they can be tweaked by modders. We may in addition port non-objectives such as piracy, barbarian behavior to the objective system in the future, as well as e.g. subject stances from EU4. In fact, you could probably implement your own variation of subject stances in a mod already.

For those familiar with finite state machines, you may draw upon the comparison of a unit corresponding to a FSM and an objective to a state. Don’t worry if this is unfamiliar, it’s a very simple concept dressed in fancy words. What it means simply is, objectives are mutually exclusive and a unit will have precisely one at a time. Transitions from one objective to another can happen in these ways:

  • The player select a new objective from the GUI (requires interface_allow trigger to evaluate to true to be listed).
  • The objective is automatically switched to due to having a priority above zero (requires allow trigger to evaluate to true).
  • Code is hardcoded to switch to certain objectives (e.g. naval landings).

Since I’ve started to mention various script features, let’s take a look at an example script:

Code:
#Disloyal unit objective. Automatically switched to when unit commander goes disloyal.objective_disloyal = {    priority = 100 #If above 0, check allow and automatically switch to this objective if there are no objectives with higher priority allowed.     allow = {        exists = commander        OR = {            commander = {                loyalty <= 33            }            AND = {                unit_owner = {                    treasury < 0                }                commander = { is_mercenary = yes }            }        }    }    interface_allow = {        always = no    }     #Custom evaluation function.    mode = add #none/add/replace     #Custom evaluation function. Unit scope. Use scope:province to access the province being evaluated.    #Negative => better, positive => worse. If total sum exceeds 1 million unit will not go there. Beware fixed point overflow at 2 million...     pure_weight = yes     weight = {        modifier = {            trigger = {                scope:province = {                    NOT = { owner = root.unit_owner } #Prefer our homeland (since we want to revolt there).                }            }            add = {                value = 2000            }        }        modifier = {            trigger = {                scope:province = {                    AND = {                        owner = root.unit_owner                        this = root.unit_owner.capital_scope                    }                }            }            add = {                value = 1050000            }        }    }}
interface_allow and allow have already been mentioned. If any objective should be possible, allow should evaluate to true. However, if it needs to be invisible and not selectable by the player, the interface_allow should evaluate to false. An objective with greater than zero priority will also be automatically switched to whenever allow evaluates to true and there is no higher priority objective that takes precedence.

There is one very central concept that hasn’t been explained yet: Weights/scores/values. These basically represent how much a unit wants to go to a certain city, or more accurately given the scale where higher scores are worse, how much it doesn’t want to. For the AI inclined, this is basically a utility function.

So how do you mod the utility function? You can set the mode field to add your own value to the existing function (recommended) or replace for hardcore modding which completely ditches the existing function. Then, you can specify the weight per city with the weight field, where the not so aptly named scope: province represents the city being evaluated (the default scope is the unit).

It should further be mentioned that there’s a lot of hardcoded behavior behind the scenes by default, including hardcoded prioritization outside simple greedy value maximization. Quite often, to get sufficient control, it is necessary to set pure_weight = yes to disable this hardcoded prioritization if it doesn’t fit with whatever behavior you intend to accomplish. Example of this prioritization is whether to decide to siege or initiate battle depending on certain circumstances that are orthogonal to the utility function’s output.

What does the utility function score mean? Currently, anything greater than or equal to one million means the unit will not go to the location. Peaceful movements typically lie in the range of one hundred thousand, whereas sieges are usually about fifty thousand, and battles around twenty thousand.

Be aware that the weight scale might be changed in a future version as the one in use heralds from EU4 and has some issues in relation to fixed point overflow in modding.

You can visualize the weight scale by typing “mapmode ai” into the console and selecting a unit of yours (please make sure you let game tick a day first or it may crash). It will result in a color coded map with a tooltip like this:

&#8203;


While at this, I should explain that the regular utility function’s output aside from some other nonlocal factors will depend on what objective is currently is selected, whether the AI is enabled for the country (ai in console), and what role the army has been assigned by AI. A brief mention on unit roles: Armies are casually assigned as either siege armies or hunter killers where the latter will prioritize killing enemy armies more highly than besieging in the default configuration.

There is another concept you will probably come across while modding unit AI: Threat, which can be checked with the unit_threat trigger. The threat value is an influence map (sorry, another AI term) calculation. Currently it can only be seen in the Release D version in Steam by typing “ai.map threat” in console (will sort this out, we have a problem with engine hiding most debug commands in release). A threat value of 1.0 is an enemy the same size as the unit is fairly close, a value of 10 that enemies nearby are 10 times as strong, etc. A screenshot I had lying around from an old version:

&#8203;


So what objectives does the AI currently use? Only objective_null (the default, represents having no objective at all and means the unit is player controlled or controlled by regular AI) and objective_naval_landing which is used for AI naval transport and player autotransport. Objectives linked to code like naval landing has a lot of hardcoded magic inside it and will probably be quite difficult to modify in a sensible manner other than minor tweaks to the utility function.

Finally, a note on performance: When you script unit AI all bets are off whether you will be able to run it without causing performance degradation of the game. Tweaking the following defines can be useful:

MAX_UNITS_PER_TURN = 200
TACTICAL_DEPTH = 60

Use the "timing show" and "ai.pawns" console commands to find out what is causing slowness and how responsive the unit AI is. The AI has an internal execution time allocation system to process important units more frequently than non-important ones (as by size, vicinity to human players, time since last processing, etc.)

Thank you for listening. This is a merely a part of the AI and I haven’t touched into all details, but hopefully one that you will be able to create great mods despite the opaqueness.


Dacia & The Balkans

&#8203;


Lastly we turn to one of the last regions so far not covered by our Development Diaries. The Balkans!

Much like many of the regions we have covered in these diaries the Balkans and the greater Danubian region in the time of Imperator was primarily dominated by tribal entities. This is a region with strong influences from both the Hellenic world, and subject to a great influx of Celts. More directly this is a region that would come under pressure from the expanding Roman Republic and which was the frequent scene for Macedonian excursions, first under Alexander and the Argeads, but also from the successor kings such as Lysimachos in Thrace. It was also through this region that the Celtic peoples that settled in central Anatolia, the Galatians, came migrating, clashing with both locals and greeks alike.

The native inhabitants of the region, Illyrians in the west and Dacians in the east are divided into many smaller tribal states. As in other regions we have covered, a successful tribe may aspire to form a tribal federation, Dacia or Illyria.


Starting Countries:
&#8203;

  • Getia: The game’s largest Tribal state of Getians. Comparatively strong in its region but less densely populated that some of the neighbors to its south.
  • Tyrgetia: Small Getian tribe on the river Tyras (right next to a Hellenic City on the estuary state mentioned in an earlier diary).
  • Moesia: Settled tribe in Upper Thrace, medium power in the region and a potential danger to the kingdom of Thrace to its south and east. Not much is known about the Moesians before the end of this era when they encounter the Romans.
  • Triballia: Settled tribe along the Danube. In frequent conflict with the Getians and the Macedonians, both before and after our era.
  • Dardania: One of the stronger kingdoms of this region, Dardania has a history of meddling in the politics of all surrounding, including Macedon, which they have at times been a de facto had quite strong influence over. More recently however it has been a subject under Macedon. With Alexander’s death however Dardania is free and, like Taulantia to its south, quite likely to once again end up at odds with Macedon.
Celto-Pannonians:
By this time a number of Celtic tribes had already settled in the Pannonian basin and along the Danube. Not long from our start date Celtic peoples would also come to invade Macedon and Anatolia, eventually settling down to form a Galatian kingdom (something a Celtic Tribe that conquers land and relocates to Anatolia can also do in the game).
Nonetheless the Celto-Pannonian Tribes are not as numerous as either the Dacians and Getians to the east or the Illyrians to the west:
  • Dindaria
  • Tilataeia
  • Scordiscia
  • Cotinia
Illyrians:
The western Balkans and the Dalmatian coast is dominated by a number of Illyrian Tribes. Many of these have regular contact, both trade and diplomacy, with Italic and Greek states but are also home to a number of raiders and pirates which are not as well seen by their neighbors. Should the Illyrian tribes unite and form a greater Illyria they could become a more credible threat to their surroundings.
  • Armistia
  • Daorsia
  • Pieria
  • Delmatia
  • Libernia
  • Ditionia
  • Oxuaioia
  • Scordiscia
  • Breucia
  • Deuria
  • Ditionia
  • Libernia
  • Cataria
  • Cotinia
  • Iapodia
  • Istria
  • Abria

Dacian Tribes:
Not much is known of the origin of the Dacians, but like the Illyrians in the west this people was likely present here long before the start of our era. Dacian culture is broken up into a number of small tribal states that are all part of a greater Dacian identity. As mentioned they may eventually form a stronger united Dacia that could pose a bigger threat to their neighbors.
As divided as Dacia is however it also harbors a number of commodities such as large amounts of Iron, Precious and Base Metals.
  • Potulatensia
  • Bastia
  • Ratacensia
  • Buridavensia
  • Caucoensia
  • Ansamensia
  • Appulia
  • Albocensia
  • Saldensia

That was all for today! Next week we will be back with a slightly unusual diary. Diving down even deeper into the modding capabilities of Imperator and all the new things that modders will now be able to do to alter the game.




回复

使用道具 举报

7

主题

228

帖子

395

积分

中尉

Rank: 7Rank: 7Rank: 7

积分
395
威望
395
金圆券
1249 PB
小红花
2
臭鸡蛋
0
法币
0 FB
发表于 2019-4-9 20:04 | 显示全部楼层
太长了啃不动
回复

使用道具 举报

7

主题

134

帖子

308

积分

中尉

Rank: 7Rank: 7Rank: 7

积分
308
威望
308
金圆券
636 PB
小红花
1
臭鸡蛋
0
法币
0 FB
发表于 2019-4-10 14:38 | 显示全部楼层
不认识。。。。。感谢分享。
回复

使用道具 举报

128

主题

280

帖子

8003

积分

制置使

Rank: 14Rank: 14Rank: 14Rank: 14

积分
8003
威望
7998
金圆券
37222 PB
小红花
144
臭鸡蛋
2
法币
3396 FB

黄马褂

 楼主| 发表于 2019-4-10 16:38 | 显示全部楼层
牧游社 牧有汉化翻译

Imperator Development Diary - 8th of April
Trin Tragula, Imperator

Hello and welcome to another Development Diary for Imperator Rome!
大家吼啊,欢迎来到新一篇帝皇:罗马开发日志!

Today we will be talking about how you can assign your units Objectives that they will perform for you, and how to mod these. We will also give a summary of the starting situation in the Balkans and Dacia.
今天我们会谈一谈如何为你的部队分配将为你执行的目标Objective,以及其如何通过mod修改。我们还会概述一下巴尔干半岛和达契亚的开局情况。

Unit Objectives
部队目标


As you may have noticed in our streams automation is now an integral part of playing the game, should you want to. Unit objectives are a way to outsource the management of some armies to the AI, essentially using the same things that the AI itself uses to control its armies and navies. You can at any time select an objective for each army or navy under player control (or several units at once, in which case the objective applies separately to each one currently), which enables AI for said unit, making it automatically take actions almost as if it was controlled by an AI country.
可能你已经从我们的直播中观察到了,现在只要玩家们有此意愿,我们的游戏组成就将包含自动操作部分。部队目标Unit Objective就是将部分军队的管理外包给AI,本质上其将使用与AI控制陆军与海军时所使用的相同逻辑。你可以随时为控制下的每一支陆军或海军选择一个目标(或者同时选择多个单位,此时目标将同时各自适用于当前部队),这样将为上述单位启用AI控制,使它们像AI国家控制一样的自动行动。

We don't see this as something you use for your main armies but it can be useful for any secondary armies or forces left behind to control or defend your country. Split/merging/consolidation/abilities are not used by objective units except specifically where it's a necessity.
俺们寻思这不是给你主力部队用的玩意,但这对置之不理或留在后方守家的二线部队非常有用。除非特别需要,不然拥有目标的部队不会使用拆分、合并、整合或部队能力。

The design goal with objectives to simplify the codebase on our end, expose unit behavior to modders in a modular fashion, and ultimately to provide the player with a greater amount of variation in NPC behavior.
目标机制的设计目的在于简化代码库,以模块化方式将部队行为表现给Mod作者们,并最终为玩家提供更大量的多样化NPC行为。(然后就能抄了)

While you may not want to sign away control of all of your armies to the AI the AI objectives makes it possible for you to let the AI handle some of your armies, while you focus on others.
虽然你可能不希望把全部军权移交给AI,但AI目标可以让AI处理你的部分军队,而你则可以专注于其他军队。

Available objectives
可用目标

Naval Landing: Functionally similar to EU4 auto transport. If there is at least one available navy which has had Naval Landing selected, clicking to an inaccessible city with an army will make this navy pick up that army and ship it to that city.
海军登陆:功能上类似EU4的自动运输。如果有至少一支可用海军选择了海军登陆,那么为军队点击一个不可进入的城市将使这支海军装载该陆军并将其运送到这座城市。

Independent Operations: Will turn on the regular army AI for this unit. Making it operate freely, attacking enemy armies, occupying enemy cities, etc.
独立行动:将为所选单位启用常规的陆军AI。这将使其自由操作,攻击敌军,占领地方城市等等。

Defend Border: Regular AI as above but stays within country's borders, effectively just doing defensive tasks.
防守边界:和上述相同的常规AI,但只会止步于国境线前,有效地执行防守任务。

Reconnaissance: Patrols across the country's borders reporting enemy movements.
侦察敌情:跨越边境进行巡查,并报告敌军动向。

Fight Rebels: Army will focus on destroying any armies owned by the Rebel tag (Slave Revolt stacks).
镇压叛乱:陆军会专注于消灭任何带有叛军标记的军队(奴隶起义军)。

Keep in Reserve: Avoid contact with enemies while staying within country borders. Mostly because a common experience is MP is forgetting troops you're currently not using and having them destroyed when looking elsewhere.
留作预备:留在国境以内避免接触敌军。这个功能存在的主要原因是多人游戏时人们总是会忘记有些当前不使用的军队,而在关注其他地方时这些部队就会白给而被摧毁掉。

Hunt Fleets: Search and destroy enemy fleets.
猎杀舰队:搜寻并摧毁敌方舰队。

Special Unit Objectives
特殊部队目标

There are also many Unit Objectives that you cannot pick but that you may still encounter. Disloyal Generals will make use of a specific unit objective where they essentially do what they themselves want to. Making you unable to order them around or do things like send them to a certain death. Likewise Mercenaries that you do not pay will stop taking your orders and operate on their own.
还有很多部队目标是你不能使用但仍然会遇到的。不忠诚的将军将使用特殊的部队目标以求不受君命。这会让你无法对其下令或者做一些诸如逼他们送死的事情。同样地,你不再付薪水的雇佣兵也将停止接受你的命令并独立运作。

There is also special logic for Slave Revolts, where rebel stacks will seek out the closest rich city to attempt to loot and set free more of their kin.
奴隶起义也有特殊逻辑,叛军将寻找最近的富裕城市,试图进行劫掠并释放更多他们的同志。

Another good thing about the Unit Objective AI system is how moddable it is. @Chaingun who created this system will now talk a bit about that before I then continue to summarize the last part of the map.
部队目标AI系统的另一个好消息是其非常容易MOD化。创建这个系统的@Chaingun现在会谈谈这些内容,然后我再继续概述最后的地图部分。

Modding
模组编辑

Internally, many behaviors such as rebels, disloyal generals and units trying to join up with the target unit of the Recruit to Unit action are also represented as objectives and thus moddable to a degree.
从内部来说,许多行为诸如叛乱分子、不忠将军和在征募到部队Recruit to Unit行动中试图与目标部队汇合的军队都将用目标机制来表现,所以它们在某种程度上是可模组编辑的。

Some objectives started out as hardcoded early in development and still are, but they are still present in the files so they can be tweaked by modders. We may in addition port non-objectives such as piracy, barbarian behavior to the objective system in the future, as well as e.g. subject stances from EU4. In fact, you could probably implement your own variation of subject stances in a mod already.
有些目标起始于开发早期的硬编码,而其现在依旧如此,但它们仍然存在于文件中,所以可让MOD作者进行调整。此外我们还可能将海盗、蛮族行为等非目标移植到目标系统中,就像EU4的附庸指令。事实上,你可能已经在Mod中实现了自己的多种附庸指令。

For those familiar with finite state machines, you may draw upon the comparison of a unit corresponding to a FSM and an objective to a state. Don't worry if this is unfamiliar, it's a very simple concept dressed in fancy words. What it means simply is, objectives are mutually exclusive and a unit will have precisely one at a time. Transitions from one objective to another can happen in these ways:
对于那些熟悉有限状态机的人,你可以利用对应于有限状态机的部队与对应于状态的目标之间的比较。如果你不熟悉也不用担心,它只是个看起来花哨的简单概念。简单来说,目标之间是互斥的,一个部队只能同时拥有一个目标。从一个目标到另一个目标之间的转变可以通过这些方式实现:

The player select a new objective from the GUI (requires interface_allow trigger to evaluate to true to be listed).
玩家从GUI中选择一个新目标(要求interface_allow触发器评估为true才能列出)。

The objective is automatically switched to due to having a priority above zero (requires allow trigger to evaluate to true).
由于优先级高于0(要求allow触发器评估为true),目标会被自动切换。

Code is hardcoded to switch to certain objectives (e.g. naval landings).
代码被硬编码切换到某些目标(例如海军登陆)。

Since I've started to mention various script features, let’s take a look at an example script:
由于我已经开始提到各种脚本功能,那就让我们来看一个示例脚本(感兴趣的读者请去原文页面阅读):

[color=inherit !important][backcolor=rgba(246, 246, 246, 0.88)]Imperator Development Diary - 8th of April&#8203;forum.paradoxplaza.com
interface_allow and allow have already been mentioned. If any objective should be possible, allow should evaluate to true. However, if it needs to be invisible and not selectable by the player, the interface_allow should evaluate to false. An objective with greater than zero priority will also be automatically switched to whenever allow evaluates to true and there is no higher priority objective that takes precedence.
我们在之前已经讲过interface_allow跟allow了。如果某项目标可行的话,allow则将评估为true。然而如果某项目标不能为玩家看见以及所选择的话,interface_allow则将评估为false。只要allow为true并且没有其他优先级更高的目标排在前面的话,将自动切换至任何优先级大于零的目标。

There is one very central concept that hasn't been explained yet: Weights/scores/values. These basically represent how much a unit wants to go to a certain city, or more accurately given the scale where higher scores are worse, how much it doesn't want to. For the AI inclined, this is basically a utility function.
我们还需要解释另外一项非常核心的概念:权重/分数/价值。总而言之,它代表的是一支部队前往某座特定城市的意愿程度,或者更准确地说,它能根据等级说明得分更高的城市其实(在AI看来)更加糟糕,即部队不愿意前往该地区的程度。对于有倾向性的AI而言,这基本上是一个效用函数。

So how do you mod the utility function? You can set the mode field to add your own value to the existing function (recommended) or replace for hardcore modding which completely ditches the existing function. Then, you can specify the weight per city with the weight field, where the not so aptly named scope: province represents the city being evaluated (the default scope is the unit).
所以你要怎样为这效用函数做MOD呢?你可以设定状态字段,并把你自己设定的值添加到现有的函数中(推荐这样做),或者弄个替代原本硬编码的模组,也就是说把现有的函数全盘替换。然后你就可以在权重字段中专门设定每座城市的权重了。函数里面命名得不是特别准确的scope: province代表着被估值的城市(默认作用域是部队)。

It should further be mentioned that there's a lot of hardcoded behavior behind the scenes by default, including hardcoded prioritization outside simple greedy value maximization. Quite often, to get sufficient control, it is necessary to set pure_weight = yes to disable this hardcoded prioritization if it doesn't fit with whatever behavior you intend to accomplish. Example of this prioritization is whether to decide to siege or initiate battle depending on certain circumstances that are orthogonal to the utility function's output.
值得进一步再提的是,默认设定中还有很多没有说明白的硬编码程序行为,包括除简单的数值最大化以外的硬编码优先级。通常而言,如果当前权限与任何玩家希望达成的程序行为不相符的话,玩家有必要把pure_weight设定为true以获取足够的权限,最终禁用此硬编码优先级。此优先级的例子包括到底选择围城还是发起战斗,这都取决于某些特定的与效用函数的输出数值成正相关的环境。

What does the utility function score mean? Currently, anything greater than or equal to one million means the unit will not go to the location. Peaceful movements typically lie in the range of one hundred thousand, whereas sieges are usually about fifty thousand, and battles around twenty thousand.
效用函数分数指的是什么呢?目前,所有大于等于一百万分数的都意味着部队不会前往这个地方。和平的、不涉及武力争端的移动通常分数在十万上下,而围城的分数约为五万,战斗大概是两万。

Be aware that the weight scale might be changed in a future version as the one in use heralds from EU4 and has some issues in relation to fixed point overflow in modding.
不过你们要留意,由于目前正在使用的权重等级将率先在EU4中使用,而且在制作模组时存在一些问题可能导致在固定点溢出,因此在未来的版本中,权重等级可能还会改动。

You can visualize the weight scale by typing "mapmode ai" into the console and selecting a unit of yours (please make sure you let game tick a day first or it may crash). It will result in a color coded map with a tooltip like this:
你可以通过在控制台输入“mapmode ai”,并选中一支你的部队(请确保你先让游戏时间走一天,不然的话游戏可能会崩溃),从而使得权重等级可视化。结果会出现这样一张带有工具提示条的用颜色进行区分的地图:


While at this, I should explain that the regular utility function's output aside from some other nonlocal factors will depend on what objective is currently is selected, whether the AI is enabled for the country (ai in console), and what role the army has been assigned by AI. A brief mention on unit roles: Armies are casually assigned as either siege armies or hunter killers where the latter will prioritize killing enemy armies more highly than besieging in the default configuration.
说到这里,我有必要解释一下,除其它一些非局部因子之外,常规效用函数的输出将取决于当前选择的是哪一目标、AI(控制台AI)对该国家是否可用以及AI把何种角色委以部队。稍微再提一下部队角色:部队会被随机指派为攻城部队和猎杀部队。在默认设置之下,相比于围城,后者将把重心更加放在击杀敌军之上。

There is another concept you will probably come across while modding unit AI: Threat, which can be checked with the unit_threat trigger. The threat value is an influence map (sorry, another AI term) calculation. Currently it can only be seen in the Release D version in Steam by typing "ai.map threat" in console (will sort this out, we have a problem with engine hiding most debug commands in release). A threat value of 1.0 is an enemy the same size as the unit is fairly close, a value of 10 that enemies nearby are 10 times as strong, etc. A screenshot I had lying around from an old version:
在做有关AI部队的模组时,你还可能会遇见另外一项概念:威胁度。它能通过unit_threat触发器得到检查。威胁度的数值是一张影响图(不好意思又在说人工智能专业术语了)的计算结果。目前你只能在Steam上的Release D版本中输入“ai.map threat”才能见到它(我们现在面临着一个问题,在公开发行的时候游戏引擎会把绝大部分debug指令隐藏掉,我们会尽快解决这个问题的)。1.0的威胁度指的是敌军的规模与己方规模相对接近,10的威胁度指的是敌军差不多10倍强于玩家。这是一张我从旧版本就保留下来的截图:


So what objectives does the AI currently use? Only objective_null (the default, represents having no objective at all and means the unit is player controlled or controlled by regular AI) and objective_naval_landing which is used for AI naval transport and player autotransport. Objectives linked to code like naval landing has a lot of hardcoded magic inside it and will probably be quite difficult to modify in a sensible manner other than minor tweaks to the utility function.
所以AI现在用的是什么目标呢?只有objective_null(默认的,代表根本没有部队目标,并且意味着部队由玩家或常规AI控制),和用于AI海上运输和玩家的自动运输的objective_naval_landing。与代码相关的目标里还包含着很多硬编码,相比于对效用函数小修小改,想要以正常的方式对其做改动应该是比较困难的。

Finally, a note on performance: When you script unit AI all bets are off whether you will be able to run it without causing performance degradation of the game. Tweaking the following defines can be useful:
最后是关于实际性能的介绍:如果你编写部队AI的脚本,我们也不知道到底会发生些什么,有可能你的脚本可以运行而不会导致游戏性能下降。将以下的定义稍加改动说不定会起到效果:

MAX_UNITS_PER_TURN = 200
TACTICAL_DEPTH = 60

Use the "timing show" and "ai.pawns" console commands to find out what is causing slowness and how responsive the unit AI is. The AI has an internal execution time allocation system to process important units more frequently than non-important ones (as by size, vicinity to human players, time since last processing, etc.)
使用控制台命令"timing show"可以找出使游戏运行缓慢的原因;使用"ai.pawns"可以检查部队AI的响应性。AI有一个内置的执行时间分配系统,这样它就可以更频繁地处理相对来说更加重要的单位(重要性根据单位的规模、距人类玩家的距离以及距上次处理的时间等因素判断)。

Thank you for listening. This is a merely a part of the AI and I haven’t touched into all details, but hopefully one that you will be able to create great mods despite the opaqueness.
感谢聆听。这里,我所说的只是AI系统的一部分,还没有讲到所有的细节,不过就算有这么多未知的细节,希望你们仍然可以做出很棒的Mod。

Dacia & The Balkans
达契亚与巴尔干


Lastly we turn to one of the last regions so far not covered by our Development Diaries. The Balkans!
终于我们来到了还没有在开发日志中介绍过的地区之一:巴尔干!

Much like many of the regions we have covered in these diaries the Balkans and the greater Danubian region in the time of Imperator was primarily dominated by tribal entities. This is a region with strong influences from both the Hellenic world, and subject to a great influx of Celts. More directly this is a region that would come under pressure from the expanding Roman Republic and which was the frequent scene for Macedonian excursions, first under Alexander and the Argeads, but also from the successor kings such as Lysimachos in Thrace. It was also through this region that the Celtic peoples that settled in central Anatolia, the Galatians, came migrating, clashing with both locals and greeks alike.
像我们之前的日志中介绍过的地区一样,在帝皇:罗马的时代,巴尔干地区和大多瑙河地区主要被一些部落实体所控制。这个地区既受到希腊化世界的强烈影响,又有大量凯尔特人涌入。更迫切的是,这个区域会受到不断扩张的罗马共和国的压力,这也是这一地区遭受马其顿入侵时的常态,先是亚历山大大帝和阿吉德王朝,再是继业者诸王例如色雷斯的利西马科斯Lysimachos in Thrace。有大量的凯尔特人移民,即最后定居在安纳托利亚中部的加拉太人经过这个区域,他们与本地人以及希腊人都产生了冲突。

The native inhabitants of the region, Illyrians in the west and Dacians in the east are divided into many smaller tribal states. As in other regions we have covered, a successful tribe may aspire to form a tribal federation, Dacia or Illyria.
这个地区的原住民有西边的伊利里亚人以及东边的达契亚人。他们被分为许多小型部落国家。与我们介绍过的其他地区相似,一个成功的部落会寻求建立一个部落联盟:达契亚Dacia或者伊利里亚Illyria。


Starting Countries:
起始国家:

Getia: The game's largest Tribal state of Getians. Comparatively strong in its region but less densely populated that some of the neighbors to its south.
基提亚:游戏中基提亚人最大的一个部落国家。在其所在的地区相当强大,但是与其南方的邻国相比人口较为稀疏。

Tyrgetia: Small Getian tribe on the river Tyras (right next to a Hellenic City on the estuary state mentioned in an earlier diary).
提拉戈提亚:提拉斯河River Tyras(今德涅斯特河)附近的一个小基提亚部落(它与之前日志中提到过的一个在提拉斯河口处的希腊城市相邻)。

Moesia: Settled tribe in Upper Thrace, medium power in the region and a potential danger to the kingdom of Thrace to its south and east. Not much is known about the Moesians before the end of this era when they encounter the Romans.
默西亚:上色雷斯地区的一个定居部落,是本地区的一个中等强权,是它东南方的色雷斯王国的潜在危险。我们对这个时代的默西亚人没有什么了解,直到他们后来与罗马人打交道为止。

Triballia: Settled tribe along the Danube. In frequent conflict with the Getians and the Macedonians, both before and after our era.
提里瓦伊:多瑙河畔的定居部落。在我们时代的之前以及之后,它都与基提亚人和马其顿人时常发生冲突。

Dardania: One of the stronger kingdoms of this region, Dardania has a history of meddling in the politics of all surrounding, including Macedon, which they have at times been a de facto had quite strong influence over. More recently however it has been a subject under Macedon. With Alexander’s death however Dardania is free and, like Taulantia to its south, quite likely to once again end up at odds with Macedon.
达尔达尼亚:这个地区最强大的王国之一。在史上,达尔达尼亚常常干涉周边国家的内政,包括马其顿。有时它对马其顿有着事实上的强大影响。然而在最近的一段时间里,它都是马其顿的一个附庸国。不过在亚历山大大帝去世之后,达尔达尼亚重归自由。与南边的陶兰提亚Taulantia一样,达尔达尼亚可能会再次与马其顿开启争端



回复

使用道具 举报

128

主题

280

帖子

8003

积分

制置使

Rank: 14Rank: 14Rank: 14Rank: 14

积分
8003
威望
7998
金圆券
37222 PB
小红花
144
臭鸡蛋
2
法币
3396 FB

黄马褂

 楼主| 发表于 2019-4-10 16:39 | 显示全部楼层
Celto-Pannonians
凯尔特-潘诺尼亚

By this time a number of Celtic tribes had already settled in the Pannonian basin and along the Danube. Not long from our start date Celtic peoples would also come to invade Macedon and Anatolia, eventually settling down to form a Galatian kingdom (something a Celtic Tribe that conquers land and relocates to Anatolia can also do in the game). Nonetheless the Celto-Pannonian Tribes are not as numerous as either the Dacians and Getians to the east or the Illyrians to the west:
在这个时代,大量凯尔特部落定居在了潘诺尼亚盆地、多瑙河岸边。在我们的开始日期之后不久,凯尔特人会开始入侵马其顿以及安纳托利亚,最终定居下来并建立加拉太王国(游戏中的凯尔特部落如果征服了安纳托利亚的土地并定居于此,也可以成立这个王国)。尽管如此,凯尔特-潘诺尼亚部落不管是与东边的达契亚、基提亚人相比,还是与西边的伊利里亚人相比,都显得数量稀少。

Dindaria 丁达里亚
Tilataeia 提拉特里亚
Scordiscia 斯克迪西亚
Cotinia 科提里亚

Illyrians
伊利里亚

The western Balkans and the Dalmatian coast is dominated by a number of Illyrian Tribes. Many of these have regular contact, both trade and diplomacy, with Italic and Greek states but are also home to a number of raiders and pirates which are not as well seen by their neighbors. Should the Illyrian tribes unite and form a greater Illyria they could become a more credible threat to their surroundings.
巴尔干西部和达尔马提亚海岸被一些伊利里亚人部落所统治。很多部落都与意大利和希腊的国家有定期的贸易与外交接触。但是同时它们也是劫掠者与海盗们的故乡,不过这点还没有被它们的邻国正视。一旦伊利里亚部落统一起来并建立一个大伊利里亚,他们就能成为周边国家更切实的威胁。

Armistia 艾米斯提亚
Daorsia 达罗西亚
Pieria 皮埃里亚
Delmatia 德尔马提亚
Libernia 利比尼亚
Ditionia 迪特尼亚
Oxuaioia 欧艾欧亚
Scordiscia 斯科迪西亚
Breucia 布罗伊西亚
Deuria 德里亚
Ditionia 迪特尼亚(蠢驴重复了)
Libernia 利比尼亚(蠢驴重复了)
Cataria 加泰里亚
Cotinia 科廷尼亚
Iapodia 拉波迪亚
Istria 伊斯特里亚
Abria 阿比里亚

Dacian Tribes
达契亚部落

Not much is known of the origin of the Dacians, but like the Illyrians in the west this people was likely present here long before the start of our era. Dacian culture is broken up into a number of small tribal states that are all part of a greater Dacian identity. As mentioned they may eventually form a stronger united Dacia that could pose a bigger threat to their neighbors.
关于达契亚人的起源,我们所知甚少。但是与西边的伊利里亚人相似,他们在我们游戏开始的时代之前很久可能就已经在这里了。达契亚文化被拆分成很多小型的部落国家,它们都是大达契亚认同的一部分。就像先前讲的一样,它们可以成立更强大的统一的达契亚,成为邻国更强大的威胁。

As divided as Dacia is however it also harbors a number of commodities such as large amounts of Iron, Precious and Base Metals.
虽然达契亚被拆成了这样,但其蕴藏着大量资源,例如大量的铁、珍贵金属和基本金属的矿藏。

Potulatensia 普图拉特西亚
Bastia 巴斯提亚
Ratacensia 拉塔辛西亚
Buridavensia 布里达文西亚
Caucoensia 高科恩西亚
Ansamensia 安萨门西亚
Appulia 阿普里亚
Albocensia 阿博森西亚
Saldensia 萨登西亚

That was all for today! Next week we will be back with a slightly unusual diary. Diving down even deeper into the modding capabilities of Imperator and all the new things that modders will now be able to do to alter the game.
这就是今天日志的全部内容!下周我们会带来一篇稍有不同的日志。我们将深入帝皇:罗马的Mod承载能力,以及Mod制作者可以对游戏做出的各种更改。


翻译:子炎君 斯普特尼克 一个幽灵
校对:万豪顿 三等文官猹中堂


评分

参与人数 1威望 +60 金圆券 +120 小红花 +1 收起 理由
hell--fire + 60 + 120 + 1 你的发言很精彩,谢谢;

查看全部评分

回复

使用道具 举报

91

主题

2410

帖子

8521

积分

制置使

Rank: 14Rank: 14Rank: 14Rank: 14

积分
8521
威望
8496
金圆券
51599 PB
小红花
262
臭鸡蛋
34
法币
7045 FB

P社游戏达人	大设计师勋章国庆节建军节植树节建国日勋章

发表于 2019-4-11 09:10 | 显示全部楼层
从军队委任系统看,这个游戏在mod方面有很大潜力
回复

使用道具 举报

148

主题

2555

帖子

6968

积分

上校

Rank: 12Rank: 12

积分
6968
威望
6968
金圆券
3639 PB
小红花
85
臭鸡蛋
18
法币
0 FB

黄马褂

发表于 2019-4-12 08:56 来自手机 | 显示全部楼层
虽然有点没看懂。但是感觉军队委任,仿佛可以造成兵变。。感觉很有意思。。就像陈桥兵变一样黄袍加身。。所以中国皇帝都忌讳手握重兵的将军。。而CK2和欧陆4带兵的将军都没有威胁
回复

使用道具 举报

18

主题

253

帖子

403

积分

上尉

Rank: 8Rank: 8Rank: 8Rank: 8

积分
403
威望
403
金圆券
1610 PB
小红花
1
臭鸡蛋
1
法币
0 FB
QQ
发表于 2019-4-18 15:42 | 显示全部楼层
军队终于可以委任了,这一直都是我的梦想啊,以前玩P社游戏就一直苦于不能委任军队,累的半死,这是真的吧?不要骗我啊。。
回复

使用道具 举报

18

主题

253

帖子

403

积分

上尉

Rank: 8Rank: 8Rank: 8Rank: 8

积分
403
威望
403
金圆券
1610 PB
小红花
1
臭鸡蛋
1
法币
0 FB
QQ
发表于 2019-4-18 15:48 | 显示全部楼层
就冲着这个军队委任,这游戏必须买
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|52PCGame

GMT+8, 2024-4-19 13:34 , Processed in 0.065417 second(s), 17 queries , Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表