You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
determines the order of these crumbles when RumbleTrigger.Awake is called. And RumbleTrigger.Awake contains this line of code crumbles.Sort((CrumbleWallOnRumble a, CrumbleWallOnRumble b) => (!Calc.Random.Chance(0.5f)) ? 1 : (-1));
We know when Level.LoadLevel is called, new Random(Session.LevelData.LoadSeed) is pushed onto the random stack, then all entities/triggers added to the scene, their Awake methods called, then this random is poped
So in most cases, this RumbleTrigger RNG is actually fixed
However, if there's a mod which hooks Level.LoadLevel to add a mod entity,
and the ModEntity calls Calc.Random in its Awake method, then the RNG of RumbleTrigger is affected
And there is such example, e.g. in Gallery Collab HeartSide, if you ever passed flag19, then a MaxHelpingHand.CustomizableGlassBlockController is added to each upcoming level, and this entity, calls Calc.Random. So in this case, if a team cooperate on this tas, each team member responsible for several flags, and no one knows there is such an issue. When they've done their work and try to put their tases together, a desync appears unexpectedly.
Now the issue is, should we fix this "desync"?
We can easily prevent this kind of desync by enclosing RumbleTrigger.Awake with a Push/PopRandom pair. However, this may cause most tases which rely on the order of crumble-blocks-breaking to desync. Or we manually search for all such kind of bad mod entities and patch them?
The text was updated successfully, but these errors were encountered:
RumbleTrigger
, which breaksCrumbleWallOnRumble
blocksdetermines the order of these crumbles when
RumbleTrigger.Awake
is called. AndRumbleTrigger.Awake
contains this line of codecrumbles.Sort((CrumbleWallOnRumble a, CrumbleWallOnRumble b) => (!Calc.Random.Chance(0.5f)) ? 1 : (-1));
We know when
Level.LoadLevel
is called,new Random(Session.LevelData.LoadSeed)
is pushed onto the random stack, then all entities/triggers added to the scene, theirAwake
methods called, then this random is popedSo in most cases, this
RumbleTrigger
RNG is actually fixedHowever, if there's a mod which hooks
Level.LoadLevel
to add a mod entity,and the ModEntity calls
Calc.Random
in itsAwake
method, then the RNG ofRumbleTrigger
is affectedAnd there is such example, e.g. in Gallery Collab HeartSide, if you ever passed flag19, then a MaxHelpingHand.CustomizableGlassBlockController is added to each upcoming level, and this entity, calls Calc.Random. So in this case, if a team cooperate on this tas, each team member responsible for several flags, and no one knows there is such an issue. When they've done their work and try to put their tases together, a desync appears unexpectedly.
Now the issue is, should we fix this "desync"?
We can easily prevent this kind of desync by enclosing RumbleTrigger.Awake with a Push/PopRandom pair. However, this may cause most tases which rely on the order of crumble-blocks-breaking to desync. Or we manually search for all such kind of bad mod entities and patch them?
The text was updated successfully, but these errors were encountered: