TeamMoonstorm / Starstorm2

A Port/Continuation of the Risk of Rain 1 mod: Starstorm.
GNU General Public License v3.0
26 stars 31 forks source link

Multiplayer broken on non-hosts with out of sync configs #426

Closed itsschwer closed 5 months ago

itsschwer commented 5 months ago

Using Starstorm 2 in multiplayer with mismatched configs (only tested with enabling/disabling Runshroom) causes runs to become significantly bugged, especially for non-host players.

Apparent symptoms

Steps to reproduce

(Symptoms occur regardless of which player is host)

  1. Player A launches with Starstorm 2's default configs
  2. Player B launches with a modified config

    # /config/Starstorm 2/SS2.Main.cfg (excerpt)
    
    [Monsters]
    
    Runshroom = false
  3. Player A starts a multiplayer lobby
  4. Player B joins Player A's multiplayer lobby
  5. Start run

Other

No symptoms occur if both Player A and Player B have the same config settings (e.g. both have Runshroom enabled or both have Runshroom disabled), or if both players have Starstorm 2 disabled.

May be related to #120 raw link

Nebby1999 commented 5 months ago

I'm marking this as a feature because we do not support something like this where both client and hosts have different configs.

Always make sure that configs matches when playing multiplayer, this is a universal fact and not an issue persay, so i'm closing this with this comment.

Hevia commented 5 months ago

A solution for you and your friends is to use different profiles. One for multiplayer together and another for Starstorm 2 single player with your own config changes

itsschwer commented 5 months ago

Ah, I see. I've been accustomed to server-side/host-only mods which solely depend on the host's config. Is a similar approach not possible / too difficult for content mods like Starstorm 2 (at least for disabling/enabling monsters? potentially also items and/or interactables? — may already work for disabling fog events (need to retest))?

Alternatively, since the cause of the issues was non-obvious to me, would it be possible to try indicate to the player/lobby when/that mismatched configs may cause unintended behaviour?

Thanks!

Hevia commented 5 months ago

Nebby might have a different opinion but afaik it would be difficult and maybe not possible but never say never. It would detract from content dev time for something that is challenging to test at scale with a small dev team. It isnt something we have plans to support. Even small unassuming new pieces of content like a DOT can have a variety of assets tied to it that makes testing such a system a nightmare

For the second question. This is also error prone. Ideally something like this is natively supported by R2API or Risk of Options. Another mod author ThinkInvis has a config check system iirc for their mods and it is very prone to errors and false positives (from my experience at least). I do agree this would be a great user experience addition and I'd be willing to investigate it maybe after SS2 reaches 1.0 (which reaching that itself is not something we think we can do in 2024), but it would be a low priority dev item for now unless someone else on the team chooses to pick it up.

Nebby1999 commented 5 months ago

Yeah it's basically impossible to do it in a way that isn't simulating CBT

Unsure if enemies could be synced, but even then I would not be surprised if the combat director expects the same list of enemies to be populated in it's DCCS, so removing it from the DCCS pool could cause issues. The other option is to just not add it to the body catalog, which causes this issue.

Items is basically impossible, the safest option is to have the item itself have a tier of none, but then it'd cause a desync regardless when it comes to the tiers the server sees, and the actual tier the client has.

Overall, yes, it's basically impossible to do, and chances are it's just not worth it when one can indeed just have two profiles, one for singleplayer and one for multiplayer.

itsschwer commented 5 months ago

Would sending a reminder to check that SS2 configs match as a chat message when a player connects to the lobby be a reasonable stopgap?

Either way, thanks for the detailed responses — cheers!

Hevia commented 5 months ago

Possibly yeah we'll chat and see what we can do