Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anomaly DLC #444

Open
Zetrith opened this issue Apr 16, 2024 · 7 comments
Open

Anomaly DLC #444

Zetrith opened this issue Apr 16, 2024 · 7 comments
Labels
anomaly Fix or bugs relating to Anomaly (Not 1.5)

Comments

@Zetrith
Copy link
Member

Zetrith commented Apr 16, 2024

Issue tracking bugs and unsynced features from the Anomaly DLC.

@Zetrith Zetrith added the anomaly Fix or bugs relating to Anomaly (Not 1.5) label Apr 16, 2024
@SokyranTheDragon
Copy link
Member

SokyranTheDragon commented Apr 16, 2024

Copied from #429:

RimWorld.GameConditionManager+MapBrightnessTracker:Tick uses Time.deltaTime to change the map's brightness. This is then used by RimWorld.GameConditionManager in MapBrightness, BrightnessChanging, and DarknessVisible properties.

I believe that this will cause some issues:
- MapBrightness is used by RimWorld.ThoughtWorker_SwallowedByDarkness and RimWorld.GameCondition_UnnaturalDarkness
- BrightnessChanging is used by RimWorld.WeatherDecider

So I believe we'll need to replace the call to Time.deltaTime in here with something else that's safe for MP.

Should be fixed by #453

@SokyranTheDragon SokyranTheDragon mentioned this issue Apr 16, 2024
5 tasks
@SokyranTheDragon
Copy link
Member

SokyranTheDragon commented May 6, 2024

RimWorld.CompObelisk_Abductor:GenerateLabyrinth seems to desync due to using LongEventHandler.QueueLongEvent with doAsynchronously set to true.

Just to clarify - the desync happens due to the map that was generated being different for each of the players.

@SokyranTheDragon
Copy link
Member

SokyranTheDragon commented May 9, 2024

RimWorld.UndercaveMapComponent:MapComponentTick uses current map checks, after which it calls RNG. We'll need to push/pop RNG (or make a different patch to fix it).

All the RNG ticks are graphical FX only.

@SokyranTheDragon
Copy link
Member

SokyranTheDragon commented May 12, 2024

Addendum to the previous comment I made:

Majority of what happens in RimWorld.UndercaveMapComponent:MapComponentTick is graphical or sound effects. However there's an exception to this.

When a player is specifically looking at the map containing this component, and the cave is currently collapsing, it will cause rocks to spawn on the map (Verse.RoofCollapserImmediate:DropRoofInCells). This specific call is found after 2 current map checks (one of them being most likely redundant).

I see 3 possible solutions here:

  • Disable the falling rocks mechanic in Multiplayer, push/pop RNG for the component ticking
    • The falling rocks have low gameplay impact, as there's an additional check to prevent them from falling near player-controlled Pawns - however, they could still crush enemy Pawns
  • Always enable the graphical effects on the map, even if not currently looking at that specific map
    • This will still require us to push/pop the RNG, as some of the RNG calls happen after check if something is visible in the current view rect
    • This will have unnecessary performance impact, as it will trigger graphical effects on maps which aren't visible
  • Modify the method to specifically always trigger the rock collapse even if not looking at the map, while pushing/popping the RNG for the remainder of the method
    • It will require the most work when compared to other solutions
    • This solution will have lower performance impact than always assuming the player is looking at this specific map

@SokyranTheDragon
Copy link
Member

This is most likely a non-Anomaly issue, but dropping it here as I only noticed it on anomaly entities.

The additional graphic attachments (at least that's what I assume those are) are disconnected from the pawn and instead drawn quite far away from where they're supposed to be. Converting the same save file to SP and testing displays the proper graphics.

MP example

NoctolMP1
NoctolMP2

SP example

Noctol1
Noctol2

@SokyranTheDragon
Copy link
Member

A potential issue with Multifaction, which I've mentioned in #496, is that the state of anomaly is global rather than local (GameComponent_Anomaly). This will cause some issues with Anomaly in Multifaction, like only having 1 monolith (the GameComponent only stores one of them if more were to be spawned), only 1 player being able to experience Anomaly ending (since, again, this is tied to the monolith and its map).

@rmarkus231
Copy link

Unnatural corpse teleporting desyncs multiplayer due to random value not being synced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
anomaly Fix or bugs relating to Anomaly (Not 1.5)
Projects
None yet
Development

No branches or pull requests

3 participants