Stellaris

Stellaris

35 ratings
工业区划性能优化 Industrial District Performance optimization
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
251.357 KB
24 Sep, 2024 @ 6:56am
13 Nov, 2024 @ 7:30pm
7 Change Notes ( view )

Subscribe to download
工业区划性能优化 Industrial District Performance optimization

In 1 collection by アイドス
Gestalt Age 完形世界 兼容&扩展模组
6 items
Description
还原所有工业类区划的inline_scripts代码,以减少繁琐判定造成的性能消耗
调整调用is_catalytic_empire的scripted_trigger,以进一步降低占用

以下bug已经于10月1日的官方更新中被修复:

修正工业区划只为普通机械智能帝国(既不使用消费品也不催化加工)提供1个冶金岗位的bug
修正部分情况下理想城区划依旧为格式塔帝国提供双倍岗位的bug


Restore the inline_scripts code for all industrial class Districts to reduce performance consumption caused by cumbersome determinations.
Adjust scripted_trigger, which calls is_catalytic_empire, to further reduce the footprint.

The following bugs have been fixed in the official update on 1 October:

Fixed a bug where the Industrial Districts only provided 1 metallurgical jobs in the general Machine Intelligence Empire (neither using consumer goods nor catalytic processing)
Fixed a bug where in some cases Arcology Districts still provided double jobs for Gestalt Empire
12 Comments
mcherbert1551 28 Sep, 2024 @ 5:58pm 
you are a hero
wish paradox could pay people ti fix their game with this rapidity
万律天芳 26 Sep, 2024 @ 10:37pm 
@Nekotori
好的,应该是我这边漏掉更新导致的,不好意思打扰了
アイドス  [author] 26 Sep, 2024 @ 10:30pm 
@万律天芳
请检查mod文件是否为最新,不应该存在此问题
万律天芳 26 Sep, 2024 @ 10:21pm 
发现了个bug,mod中调用了无效的Scripted Variables(如@rw_maintenance_sr)。这些变量是在原版的区划代码(而非scripted_variables文件夹)中定义的,所以其他文件没法直接调用它们。这导致居住站和环世界上的工业区划没有建造时间、建造花费及维护费。
error.log中的一例报错提示:[persistent.cpp:46]: Error: "Malformed token: @rw_maintenance_sr, near line: 977
" in file: "common/districts/9999_district_industrial.txt" near line: 977
Salt farm Slave 26 Sep, 2024 @ 5:40am 
thx
疯蝎戮者 25 Sep, 2024 @ 8:45am 
感谢🙏
アイドス  [author] 25 Sep, 2024 @ 4:36am 
@万律天芳
工业区划的效果是:
-工厂规划 has_factory_designation = yes:2工匠岗位
-合金规划 has_foundry_designation = yes:2铸造岗位
-工业规划等其他类型:1铸造岗位 1工匠岗位

同一个岗位有多个变种,想要明确指定怎么替换就需要穷举,反而会增加判定量
冶金师、催化技师、铸造者、铸造子个体、催化子个体,这5个岗位都是冶金岗位
工匠、熟练技工、工匠子个体,这3个都是工匠岗位

会弄巧成拙喔?
万律天芳 25 Sep, 2024 @ 2:15am 
@Nekotori
好的, 非常感谢您的讲解!

此外, 设置"铸造"的殖民地区划时, 一般的工业区划会同时添加"工匠岗+1"和"工匠岗-1"的修正.
如果给判断"工匠岗+1"的条件追加一条"has_foundry_designation = no", 能否在实现相同效果的前提下, 进一步简化代码及提高性能?
アイドス  [author] 25 Sep, 2024 @ 1:41am 
@万律天芳
inline_script实质上是将脚本内容注入调用它的项目中,使代码变得简洁、易于修改。

原版工业区划的inline_script里包含机械星球、都市星球等特殊情况下额外岗位数量修正的判定,使环形区段、居住站区划等在调用它们后也要判定这些【结果不可能为 是 的项目】,还原之后这部分判定就可以省略。

此外,还有 殖民地规划类型造成岗位变更 的判定,这些inline_script把理想城列为排除条件,因为理想城区划细分为铸造和工厂两种,不需要变更岗位。这就导致调用这些判定的理想城区划显得多此一举——在一个只能建造于理想城的区划上判定行星不是理想城的情况。
千里云帆 25 Sep, 2024 @ 12:49am 
小鸟,你是我的超人口牙!:steamhappy: