Stellaris Universal Gamerule Lib

If you liked this item, please rate it up on Steam Workshop page.

Author: _OAO_

Last revision: 12 Sep, 2023 at 09:06 UTC (5)

File size: 229.38 KB

On Steam Workshop

Description:

This MOD is mainly for modders, if you are just a player and see that a MOD requires this as a prerequisite item, then you only need to subscribe to it.

Features

This MOD provides a solution to the conflict problem caused by adding rules between community MODs, and adjusts most of the rules to rely on FLAG for judgment, so that MODs can adjust the use of rules more flexibly.

Operating principle:

– If trigger FLAG is not included, execute the vanilla conditional judgment
– If trigger FLAG is included but the rule condition FLAG is not included, the original condition is still executed
– If trigger FLAG and any conditional FLAG is included , the vanilla judgment logic is eliminated, and another logic judgment block is transferred
–If TRUE FLAG is used and there is no FLASE FLAG, the rule returns TRUE (applying the rule)
–If with FLASE FLAG, whether there is TRUE FLAG or not, return FLASE (disable rule)

Not all rules currently have these changes, some are set to always yes/no by vanilla, and I don’t think these should be changed.
Others are I’m not sure what they do, so there are no changes, but of course if someone happens to need to change these, I can add them.

advantage:
·It is less prone to conflict between rule implementations based on this mod.
·More flexibility to control the implementation of rules in the game without the need to write complex rule logic.
·This is easier to maintain than complex rule logic.
·Any in-game content can be interfered with without too much interference with the implementation of the vanilla rules.

shortcoming:
·Complex rule logic still requires modder to write events for FLAG control to achieve.
·Although the occurrence of conflicts can be reduced under this rule, it cannot be completely eliminated
-For example, MOD A and B add two FLAGs, one TRUE and one FALSE to the same country, and the final output will be FLASE.
–Therefore, it is recommended that each MOD should limit the application of the rules to its own unique content as much as possible.

About the Compatibility Pack

Obviously, this mod will conflict with all mods that modify the rules, and large mods that are already formed are obviously not necessarily willing to modify the rules they have built for a long time.
However, it is quite easy to create a compatibility pack between this mod and other mods, just replace the corresponding logic blocks completely:

Links to related compatibility packs:
UGRC Compatibility