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

RimWorld 1.5 #429

Open
4 of 5 tasks
Zetrith opened this issue Mar 15, 2024 · 7 comments
Open
4 of 5 tasks

RimWorld 1.5 #429

Zetrith opened this issue Mar 15, 2024 · 7 comments
Labels
1.5 Fixes or bugs relating to 1.5 (Not Anomaly).

Comments

@Zetrith
Copy link
Member

Zetrith commented Mar 15, 2024

An issue tracking Multiplayer's support of RW 1.5. There's going to be a separate issue for Anomaly when it releases but we can make notes here.

Note that the new multithreaded renderer is not an issue as it never executes in parallel with the simulation.

@SokyranTheDragon SokyranTheDragon added the 1.5 Fixes or bugs relating to 1.5 (Not Anomaly). label Mar 30, 2024
@SokyranTheDragon
Copy link
Member

PawnColumnWorker_Designator:SetValue and PawnColumnWorker_Sterilize:SetValue syncing will need to be reworked. These two will now display a confirmation dialog under specific circumstances, and work as they previously did under others. Sync methods declared here.

@SokyranTheDragon
Copy link
Member

SokyranTheDragon commented Apr 10, 2024

Since there's no Anomaly issue yet:

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.

Moved to #444

@SokyranTheDragon
Copy link
Member

It looks like we'll need a session and patches for Dialog_EnterPortal. Looks like it may be a non-Anomaly feature (doesn't seem like there's DLC checks on it).

@twothe
Copy link

twothe commented Apr 13, 2024

Having severe issues with caravans on encounter maps since 1.5.

  • Caravan reform turns into forming a completely new carvan, as in: they have to unload and re-load everything
  • Constant desyncs, especially if members got wounded

Desync-178.zip

@Knniff
Copy link

Knniff commented Apr 14, 2024

I had problems when trying to capture anomalies as well as trying to do a role change. When trying to setup the role change ritual it was impossible to drag the respective colonists to their roles(spectator/the one receiving the role).

@SokyranTheDragon
Copy link
Member

It seems that stopping research is not synced (along with the 2 dev mode gizmos, which I'm pretty sure were reported ages ago).

@mantis
Copy link

mantis commented Jul 20, 2024

It seems that stopping research is not synced (along with the 2 dev mode gizmos, which I'm pretty sure were reported ages ago).

Have been hitting this - you (@SokyranTheDragon) reported it @ #290 - assuming there might also be something to do to handle anomalyKnowledge and currentAnomalyKnowledgeProjects that exist

SokyranTheDragon added a commit to SokyranTheDragon/Multiplayer that referenced this issue Aug 25, 2024
This change is primarily to fix `PawnColumnWorker_Designator` and `PawnColumnWorker_Sterilize` displaying confirmation dialogs, which caused issues as pressing the checkbox would open the dialog for all players and the dialogs themselves weren't synced. I've mentioned this issue in rwmt#429.

The first change is to stop syncing `PawnColumnWorker_Designator.SetValue` and `PawnColumnWorker_Sterilize.SetValue`, as those could display confirmation dialogs. Instead of those 2 methods, we instead sync:
- `DesignationManager.AddDesignation`
  - This one is not needed, but was included for consistency (and may come in handy for mod compat, it can be safely removed if desired)
- `DesignationManager.RemoveDesignation`
  - Called from `PawnColumnWorker_Designator.SetValue` when value is false
- `PawnColumnWorker_Designator.DesignationConfirmed`
  - This method calls `DesignationManager.AddDesignation` (along with another method), which is why that specific method is not needed
- `PawnColumnWorker_Sterilize.AddSterilizeOperation`
- `PawnColumnWorker_Sterilize.CancelSterilizeOperations`

This required adding extra sync worker delegates for `Designation` and `DesignationManager`.

By not syncing the `SetValue` method, it allows for a potential multiple calls to the other synced methods which generally don't have checks if the state already matches. This requires additional patches that cancel execution if it would cause issues (`PreventPawnTableDesignationErrors`, `PreventPawnTableMultipleSterilizeOperations`).

Finally, by not syncing the `SetValue` methods we don't call `SetDirty` on the pawn tables. To fix this I've added a method (`TryDirtyCurrentPawnTable`) which is called in post invoke for the synced methods, as well as after syncing designators, to cause the tables to re-sort their values. This will cause the tables to be re-sorted in a few extra situations (like when a different player modifies designators outside of pawn tables). It may be expanded to include more methods to cause the tables to be re-sorted when they normally wouldn't be in vanilla (if we so desire). Alternatively, this could be reduced or removed if we don't want it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.5 Fixes or bugs relating to 1.5 (Not Anomaly).
Projects
None yet
Development

No branches or pull requests

5 participants