XCOM 2
54 个评价
[WOTC]Truly Guaranteed Sitreps and Multiple Sitreps
   
奖励
收藏
已收藏
取消收藏
文件大小
发表于
更新日期
226.594 KB
2023 年 7 月 5 日 下午 4:47
2023 年 7 月 13 日 上午 11:49
9 项改动说明 ( 查看 )
您需要 DLC 才能使用该物品。

订阅以下载
[WOTC]Truly Guaranteed Sitreps and Multiple Sitreps

描述
What this is:
This mod is a substantial improvement over the older [WOTC] Multiple Sitreps 2.0: Guaranteed & Categories mod(at https://psteamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2068573223 ) in many aspects. While the old mod performs quite well in simple case like pulling several sitreps from hundreds of sitreps, it fails painfully in specific situations such as guaranteeing the appearance of specific sitreps. This is largely due to its over-reliance on RNG (Random Number Generation), messy code structure, and residual bugs (for instance, certain sitreps won't appear despite having their chance set at 100%).

Despite these shortcomings of the old mod, it's crucial to acknowledge that it laid the groundwork and offered valuable insights for the development of this new mod.

This new mod did an overhaul to the vanilla code structure, make code modular and change the code design to be more deterministic, hence achieving 100% reliability in guaranteeing sitreps.



How it works(simple version):

Simple, straightforward, reliable and much easier to understand than the original multiple sitreps mod
First, it shuffles how many sitreps will appear based on variable SitrepChance and SitrepAmount
Then it find all sitreps from the game, put them into a list, and shuffled them
Then if category is not enabled, it picks the first x number of sitreps
If categories are enabled, it checks each sitrep in the list one by one, making sure they are following the group requirement and your category chance requirement, until we have collected x number of sitreps or run towards the end of the list.


How it works(longer version)
Quick summary of the new sitrep pulling process:

The new code first did some RNG simulation to determine how many sitreps should be added to a mission using SitrepChance and SitrepAmount, and let's call this result "x".

SitrepChance is basically a variable that control the probability distribution of the number of sitreps being added to a mission, aka x. The minimum value for x is 0, and max value for x is SitrepAmount.
SitrepChance
value of x
=100
x will always be SitrepAmount
is high
more likely to get a high x
is low
more likely to get a low x
=0
x will always be 0

Then it find all sitreps from the game, put them into a list, and shuffled them using Fisher-Yates shuffle algorithm.
when running through the shuffled list and checking sitrep to determine if it can be added, the mod checks the following:
  • Regardless of if Categories is on or not, it check if the sitrep satisfy the map requirement which is inherent to specific map/plot and is not controlled by this mod.
  • if Categories is not "On", it ignores everything else and just picks the first x sitreps in the random list.
  • If Categories is "On",
    1. it first checks mutual exclusiveness as determined by the "Group" information,
    2. then it checks which categories the current sitrep being checked is in.
      (Note: this includes uncategorized category if you set UncategorizedInclude to "On". if you set it to "Off", it will ignore uncategorized sitreps")
    3. It then finds the corresponding category chance and rolls a dice against the chance to determine if this sitrep should be added.
The algorithm keeps going until x sitreps have been added OR the sitreps list has been run out(meaning all sitreps have been checked).

Default Behavior and Mod Config
By default this mod make you have a chance to have up to 3 vanilla sitreps(although the chance is very small), but you can have more or less sitreps and control each sitreps' chance, for both vanilla and modded sitreps. All setting can be configured in XCom_Sitrep_Categories.ini in mod's root directory, config folder. There are lots of comments and notes in XCom_Sitrep_Categories.ini to help people unfamiliar with the old Multiple Sitreps mod to understand how to set config for the new mod.

Simple Example
If you just want to guarantee 3 sitreps "a","b","c",
you can just delete everything in XCom_Sitrep_Categories.ini and copy paste the following into the file:

[SitrepsGuaranteedandMultiple.X2DownloadableContentInfo_SitrepsGuaranteedandMultiple]
SitrepAmount = 3
SitrepChance = 100
GuerillaOp = "On"
SupplyRaid = "On"
Council = "On"
ResistanceOp = "On"
LandedUFO = "On"
Retaliation = "On"
AlienNetwork = "Off"


Categories = "On"

Cat1Active = "On"
Cat1Amount = 1; <---CatNAmount is NOT used in the new sitrep pulling method
Cat1Chance = 100
+Cat1 = "SitRepNameA"
+Cat1 = "SitRepNameB"
+Cat1 = "SitRepNameC"

UncategorizedInclude = "Off"
UncategorizedAmount = 1
UncategorizedChance = 50

Note
You can find a nice list of sitreps name from various mod for use in XCom_Sitrep_Categories.ini in Nightninja's old multiple sitreps mod discussion page here:
https://psteamcommunity.yuanyoumao.com/workshop/filedetails/discussion/2068573223/2518023667600858057/
热门讨论 查看全部(1)
9
2024 年 4 月 24 日 下午 7:48
Config question thread
Inertia
60 条留言
Melan 7 月 6 日 上午 11:06 
While this one might be improved codewise, compared to the original, I fail to see it as an upgrade rather than a sidegrade.
Because you have removed the most important aspect of the whole Category system; The Category amount. This was a crucial component to put limits on things.
For example, the whole problem some users now have with multiple Raider factions on the same mission. This wouldn´t happen if the old Category Amount was still used.
william09703 2 月 24 日 上午 9:12 
Oh, I think I know why now. cuz the default setting for Categories is "on" somehow?
william09703 2 月 24 日 上午 2:07 
I can;t get this mod work as well. there is no other sitrep mods installed, which I don't quite understand why
Amogus 2024 年 10 月 26 日 上午 3:53 
Is it compatible with LW?
Haydern 2024 年 10 月 21 日 下午 1:19 
@Inertia I tried many things to make this mod works. Cleaned the config, new save, remove other mods, etc.: only the older version [WOTC] Multiple Sitreps 2.0: Guaranteed & Categories mod worked with me. Thanks anyway. I dont think was a conflict with sitreps or special maps, because i have done 6 or 7 missions.
Inertia  [作者] 2024 年 10 月 20 日 下午 8:15 
@Haydern could be due to sitreps conflicting with each other or some special map conflict that's outside the scope of this mod.
Haydern 2024 年 10 月 18 日 下午 1:07 
I did the changes on config to guarantee 3 sitreps "a","b","c", but i'm not getting 3 sitreps. The MOCX sitrep appears in most missions
Inertia  [作者] 2024 年 8 月 1 日 上午 9:19 
@LightenedDark
the old Multiple Sitreps 2.0 shouldn't be run along side this mod
LightenedDark 2024 年 7 月 29 日 下午 8:50 
I assume the old Multiple Sitreps 2.0 shouldn't be run along side this mod? I, too, have less than 3 sitreps on missions despite no changes to XCom_Sitrep_Categories.ini

Is there a compatibility problem I'm unaware of? I'm running all the stirep mods I could find: Advent Field Training, Sitrep Advent Forces, Faction Heroes Sitrp, More Mission Sitreps, Savage Abilities and Sitreps Core, and Savage Sitreps Tactical Troubles.
TheHolyLord57 2024 年 6 月 2 日 上午 1:14 
So I download this mod a booted up xcom in a fresh game, so far I've gone through 6 missions and not a single sitep has even shown up, much less 3. I haven't touched the mod besides installing it. Am I supposed to do something else?