Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Example would be on item one, does it get rid of an unneccesary calculation?
===============================================
首先,我们需要知道的事情有:
1.这游戏所有的AND判断,都是从第一个条件开始,碰到一个false,后续的不再判断,包括隐藏的AND比如potential,possible
2.这游戏存在部分语句的性能较差,典型的是espionage_operation.operation_gpm_steal_relic.potential 里使用的opinion_level,跟所有跟megastructure有关的语句
3.部分地方的potential跟possible判断是每天执行的,比如casus_belli跟decision
4.同样,部分地方进行判断的对象比较多,比如decision是对所有的星球,casus_belli虽然是对所有的国家,但如果你在casus_belli里使用了需要对这个国家的所有船只甚至人口进行判断的句子,相当于你对整个游戏的所有船只甚至人口进行判断,哪怕每次判断占用的计算资源非常少,最后都将非常可观
5.但是,不管是对多少个对象进行判断,如果使用的是flag,那资源消耗均可以忽略不计
6.从3.6开始,所有没有MTTH的event均会被报错,这些均是需要进行现代化的语句
因此,这个mod做的事情主要是,使用控制台中的script_profiling语句,找出明显运行时间较长的语句,然后做如下的事情
1.改写语句。将opinion_level跟megastructure之类的计算性能比较差的语句换成效果接近的语句,或者将判断移到定时(非每天)执行的event并通过flag传导到casus_belli之类的每天执行的地方。但不管如何只是接近,因此可能会有结果上的损失。
2.调整AND语句中的语句顺序,将会导致结果减少最多同时不是性能较差的语句放前面,script_trigger系的均放最后。这个理论上不会导致结果上的损失。
3.将ai_weight中factor=0的放到possible中,因为ai_weight严格来说是OR语句不是AND语句。这个理论上不会导致结果上的损失。
4.(这个主要是LEX太旧了,没有现代化导致的)将部分没有MTTH的event改为每月发生一次。
另外 还顺便修正了两个Gigastructural Engineering & More (3.6)的疑似bug。
=============================================
First, we need to know the following things.
1. All the AND condition in this game start from the first condition, encounter a false, the subsequent ones are no longer judged, including hidden ANDs such as potential, possible
2. The game has some statements of poor performance, typically espionage_operation.operation_gpm_steal_relic.potential in the use of the opinion_level, and all the statements related to the megastructure
3. Some of the potential and possible judgments are executed daily, such as casus_belli and decision.
4. Similarly, some places have more objects for judgment, for example, decision is for all planets, and casus_belli is for all countries, but if you use a sentence in casus_belli that requires judgment on all ships and even population of this country, it is equivalent to judgment on all ships and even population of the whole game, even if each time Even if the computational resources used for each judgment are very small, it will be very significant in the end
5. However, no matter how many objects are judged, if flags are used, the resource consumption is negligible.
6. Since 3.6, all events without MTTH will be reported as errors, and these are the statements that need to be modernized.
So, what this mod does is to use the script_profiling statement in the console to find out which statements take longer to run, and then do the following
1. Rewrite the statements. Replace the statements that have poor computational performance like opinion_level and megastructure with statements that are close, or move the judgment to a timed (non-daily) event and pass it through flag to a daily execution like casus_belli. But no matter how it is just close, so there may be a loss in results.
2. Adjusting the order of the statements in the AND statement will result in the largest reduction in results while the statements that are not poor performers are placed first and the script_trigger ones are placed last. This will theoretically not lead to any loss in results.
3. Put the ones with factor=0 in ai_weight into possible, because ai_weight is strictly an OR statement, not an AND statement. This theoretically does not lead to loss of results.
4. (This is mainly caused by the fact that LEX is too old and not modernized.) Change some events that do not have MTTH to occur once a month.
In addition, two suspected bugs in Gigastructural Engineering & More (3.6) have been fixed in the meantime.