Skip to content

Conversation

@Tick-git
Copy link

@Tick-git Tick-git commented Oct 27, 2024

Dear Testers,

Please read this: #508 (comment)

Hello :)
I'm new to modding but have a degree in computer science, along with general experience in game development, especially in Unity and its Netcode networking library. I'm very open to feedback and happy to make any code adjustments as needed.

I've spent considerable time playing RimWorld with this mod and the multifaction feature enabled, which has inspired me to improve the starting experience specifically for multifaction gameplay.

First commit:

General Updates:

  • Enhanced multifaction starting experience for Core, Biotech, and Ideology to mirror single-player starts.
  • Scenario selection is now available before creating a new faction.
  • Correct starting gear, possessions, research, and initial dialogue are now properly generated.

Bug Fixes:

  • Lost tribe factions can now be joined from the faction creation sidebar.
  • Multifaction start: Map fog correctly disappears after creating a new faction map.
  • Multifaction start: All scattered resources/items are now automatically forbidden after map generation (workaround in place; root cause still under investigation).
  • Biotech: ExoMech Remains generate now on the map.

Second commit:

Before: New multi-faction async maps are generated with the latest map time (maptick) of all maps.
Issues: Potentially starting in winter, the storyteller might send incidents immediately, etc.

Pullrequest: When creating a faction, a checkbox can be selected to start the map from zero ticks.

Tests:

Both commits have been loosely tested by me on a single machine, using two instances of RimWorld. I primarily focused on testing different scenarios and initial days in both the Core and Biotech dlc's and checked if ideology starts without an exception. I'll be conducting further testing by me and in a multiplayer session with friends, likely within the coming week.

ToDo:

I've included a few TODOs as comments in the code and plan to work on them next week.

Tick-git and others added 2 commits October 25, 2024 21:01
General Updates:

- Enhanced multifaction starting experience for Core, Biotech, and Ideology to mirror single-player starts.
- Scenario selection is now available before creating a new faction.
- Correct starting gear, possessions, research, and initial dialogue are now properly generated.

Bug Fixes:

- Lost tribe factions can now be joined from the faction creation sidebar.
- Multifaction start: Map fog correctly disappears after creating a new faction map.
- Multifaction start: All scattered resources/items are now automatically forbidden after map generation (workaround in place; root cause still under investigation).
- Biotech: ExoMech Remains generate now on the map.
Before: New multi-faction async maps are generated with the latest map time (maptick) of all maps.
Issues: Potentially starting in winter, the storyteller might send incidents immediately, etc.

Now: When creating a faction, a checkbox can be selected to start the map from zero ticks.

Now: On Faction creation a checkbox can be checked to start the map from zero ticks
@SokyranTheDragon SokyranTheDragon added 1.5 Fixes or bugs relating to 1.5 (Not Anomaly). multifaction Bugs or issues only in multifaction mode. labels Apr 1, 2025
@tupator4y
Copy link

thanks so much for this. are going to make it work with royalty and anomaly dlc ?

Copy link
Member

@notfood notfood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice, looking forward to the whole thing. The changes here are interesting.

@SweptWasTaken
Copy link
Member

I like this PR a lot. Multi-faction is a great way to play and this should make it so much less of a pain in the ass to get going.

@Tick-git
Copy link
Author

Tick-git commented Jun 3, 2025

Hey :)

Unfortunately, I haven’t made any further progress on it. It got a bit overwhelming - especially after we discovered an issue where i think the first faction got way less and weaker attacks compared to a singleplayer session with a equally wealthy colony. We found out that for this player the history wealth didn't match with the map wealth displayed in the statistic tab. We couldn’t pinpoint exactly when it started happening; we were a few sessions in when we just happened to notice it.

I wasn’t sure whether it was a general multifaction/async issue or something caused by my changes. That’s when I realized how slow and difficult it would be to properly test everything, which really took the wind out of my sails.

But I really appreciate the kind words you shared here - my friends and I had a lot of fun playing the mod, and I really enjoyed tweaking it a bit to suit our preferences. Today I browsed the discord a bit and found a few people that mention a similar problem like the one above. Maybe I’ll take another look at this PR sometime. :)

@ianleeder
Copy link

I'm watching this PR closely, as these features have all been an issue when playing multiplayer. My friends and I have often wanted to play Naked Brutality (1 colonist) or Biotech Mechanitor scenarios. I'd love to see it completed and merged. I'm so excited that I'll probably compile this and run it unmerged anyway.

Just adding wind to your sails 💨⛵

Tick-git added 2 commits June 12, 2025 18:20
- Improved usability of factionsidebar
=> Updated layout of the faction creator and chooser
=> Added Tooltips to explain new settings and why they are sometimes disabled

- Refactored FactionSidebar.cs a bit
I couldn’t find any way to generate the correct apparel for a "Lost Tribe" scenario start without creating a temporary faction. However, this temporary faction wasn’t deleted properly and some lingering references caused warnings during saving and loading.
@lunglav
Copy link

lunglav commented Jun 15, 2025

Tested for about 40 hours of play-time. Two people playing different factions. Heavily modded and using Royalty, Biotech, and Ideology. No additional desync stability issues besides those already present in the mod list we use from what I can tell

✔️ Second faction gets a separate tech tree. Works as expected even with mods that adds research options.
✔️ All scattered resources/items are now automatically forbidden for both factions.
✔️ Map fog correctly disappears after creating a new faction map.

❌ Second faction was not able to select a starting scenario or create their own ideology. I'm unsure as to what extent this is intended to work right now. Default to crash land.
❌ Can confirm that raids strength seems to be off, but we assumed that this was caused by some other mod until I read the post above.
❌ When the second player opens their tech tree this sometimes also opens the tech tree for the first player. Not sure if this is caused by this PR. Never seen this before.

In a while we will start a new session with less mods. Overall I would say that this PR takes multifaction start from unplayable to playable for modded games. Great work.

@Tick-git
Copy link
Author

@lunglav Big thanks for testing it :) ❤️

❌ Second faction wasn’t able to select a starting scenario or create their own ideology. It defaulted to Crashlanded. Not sure how much of that is supposed to work yet.

The scenario chooser is currently disabled for Royalty and Anomaly, since I don’t own those DLCs and can’t properly test them. I’m planning to add an option in the faction creation window to enable support for those two DLCs for testing purposes, so people can try it out without needing to modify any code.
However, this fork is based on the main branch, not the test release on Discord, so Anomaly won’t function correctly in this version.

❌ Can confirm that raid strength seems off, but we assumed it was from another mod until I saw the post above.

Did you have async time enabled during your session? From what I’ve read on discord, this issue doesn’t appear to be caused by my PR - it’s more likely related to async time, but i will look further into it.

❌ When the second player opens their tech tree, it sometimes also opens it for the first player. Not sure if this is related to the PR — never seen it before.

Thanks for reporting that! I’ll check into it.

We’ll be starting a new session soon with fewer mods. Overall, I’d say this PR took multifaction starts from unplayable to playable, even with mods. Great work.

Really glad to hear that. :) I’m planning a test session with friends soon as well, this time without async time, to get a clearer read on the raid strength issue.

@lunglav
Copy link

lunglav commented Jun 15, 2025

The scenario chooser is currently disabled for Royalty and Anomaly, since I don’t own those DLCs and can’t properly test them. I’m planning to add an option in the faction creation window to enable support for those two DLCs for testing purposes, so people can try it out without needing to modify any code.

Ok great! We did not test with anomaly. Will disable royalty next run. If you send me your steam handle I can gift you the expansions, as thanks for contributing to the project.

Did you have async time enabled during your session? From what I’ve read on discord, this issue doesn’t appear to be caused by my PR - it’s more likely related to async time, but i will look further into it.

We did not run async time. As I mentioned before we are using a few mods that may also contribute to this.

Moved the initialization of gameStartAbsTickMap into its property getter to ensure compatibility with old save files. This approach is more robust, as it handles edge cases where the value might be zero. Additionally, it avoids accessing TickManager during object construction.
@Tick-git
Copy link
Author

@lunglav
I really appreciate the offer and I’ve been thinking about it. I’d be happy to accept, but please don’t feel obligated at all - just the fact that you played the fork means a lot already.
You can reach me on Discord at Tick1993.

Tick-git added 2 commits June 24, 2025 18:05
Updated the scenario selection logic to restrict it only when the Anomaly mod is active, instead of both Royalty and Anomaly. Adjusted the tooltip message accordingly.
Discord messages Sokyran:

I think that Find.CurrentMap == null check could be skipped here if you change WorldRendererUtility.WorldRenderedNow to WorldRendererUtility.WorldSelected. At least the null CurrentMap check wasn't needed before.
https://github.com/Tick-git/Multiplayer/blob/03f6d2b7e1c704563810abe74d6df538738c7926/Source/Client/AsyncTime/AsyncTimePatches.cs#L149-L150

Is 2 constructors needed here? The second one already includes the default value of 0, so in that they already match what they do.
https://github.com/Tick-git/Multiplayer/blob/03f6d2b7e1c704563810abe74d6df538738c7926/Source/Client/AsyncTime/AsyncTimeComp.cs#L101-L111
@Tick-git
Copy link
Author

Tick-git commented Jun 24, 2025

Dear Testers,

  • You can download this fork here: https://github.com/Tick-git/Multiplayer/releases
  • Anomaly is not fully supported
  • I did not use any mods other than Prepatcher, Harmony, and the official DLCs
  • I tested everything as well as I could, but bugs may still occur
  • if you run into any bugs, please contact me on Discord: Tick1993. Feel free to send me any errors, even if they seem unrelated to my changes. If the issue isn't caused by my fork, I’ll create a proper report for it.
    ♥♥ Please note that this helps immensely. ♥♥

Bug Report

You can enable Developer Mode in the options menu, which will automatically open the console when an error occurs. Errors will be shown in red in the log

To report a bug, please do the following (⚠Some steps must be done directly after the bug occurs⚠):

Press Windows Key + R and type %appdata%, then navigate to:
...\AppData\LocalLow\Ludeon Studios\RimWorld by Ludeon Studios

From there, please send me the following files:

  • Player.log and Player-prev.log
    These are important. Note that they are overwritten constantly, so you need to save them immediately after the bug occurs. Make sure to close RimWorld before grabbing the files, as I'm not sure if RimWorld writes them while it's still running.
  • Your save file from the MpReplays folder
  • Any related desync information from the MpDesyncs folder
  • Mod list

Fixes for #Known-Issues from Discord

Issues with Multifaction

  • All multifaction players except the host start with the default scenario of three (3) normal Pawns
  • All multifaction players except the host start with no research

Issues with Multifaction and DLCs

  • (Biotech DLC) only the starting colony will have the ancient exostrider (mechanitor corpse). Additionally, mechanitor ship/complex quests require triggering or losing the ancient exostrider, so they may not appear for anyone besides the starting faction.

Fixes for issues appeared while developing:

  • Lost tribe factions can now be joined from the faction creation sidebar.
  • Multifaction start: Map fog correctly disappears after creating a new faction map.
  • Multifaction start: All scattered resources/items are now automatically forbidden after map generation (workaround in place; root cause still under investigation).
  • Possessions from character creator are scattered as well
  • Reset maptick to zero and to start time to default.

Tests

Setup:

  • Two instances of RimWorld launched on a local machine and connected via LAN
  • No mods used except Prepatcher, Multiplayer, and DLCs (excluding Anomaly)
  • Played primarily through the first in-game day, performing standard starting actions

Results:

  • Creating a new Lost Tribe start on both host and client led to a map desync partway through the first day, but it stabilized afterwards (played it first 3-4 days)
  • Everything else functioned correctly

Reported Issues

  • A user on Discord reported a desync followed by being unable to select their faction. Unfortunately, I couldn’t get enough details to reproduce the issue or confirm if it was caused by changes in this fork. They were using a mod with a scenario named Basic Lost Tribe, and the desync occurred about one hour into the game. I did a longer Test playthrough in response to this report, but everything went smoothly in my test. Just wanted to mention it anyway.
  • In a longer test from a while back, raid strength seemed off, possibly for the host. Another user confirmed experiencing this, but suspected it could be due to their heavily modded setup rather than this fork specifically. I've seen similar complaints about raid strength discrepancies on Discord, which suggests this may be a general issue with the multiplayer mod rather than a result of my changes.
  • When the second player opens their tech tree this sometimes also opens the tech tree for the first player. Not sure if this is caused by this PR. Never seen this before.

@Tick-git Tick-git marked this pull request as ready for review June 24, 2025 17:32
@notfood notfood changed the base branch from master to dev July 1, 2025 15:51
@notfood notfood merged commit 3bfa487 into rwmt:dev Jul 1, 2025
1 check passed
@Tick-git Tick-git mentioned this pull request Jul 11, 2025
Tick-git added a commit to Tick-git/Multiplayer that referenced this pull request Jul 14, 2025
Due to changes in rwmt#508, an Exorider is now spawned on every newly generated multifaction map. However, this also caused a Monolith to be generated each time, resulting in multiple Monoliths appearing and causing issues.

This update adds a Harmony patch to GenStep_Monolith.GenerateMonolith to skip Monolith generation if one already exists.
notfood pushed a commit that referenced this pull request Jul 15, 2025
Due to changes in #508, an Exorider is now spawned on every newly generated multifaction map. However, this also caused a Monolith to be generated each time, resulting in multiple Monoliths appearing and causing issues.

This update adds a Harmony patch to GenStep_Monolith.GenerateMonolith to skip Monolith generation if one already exists.
notfood pushed a commit that referenced this pull request Jul 21, 2025
Due to changes in #508, an Exorider is now spawned on every newly generated multifaction map. However, this also caused a Monolith to be generated each time, resulting in multiple Monoliths appearing and causing issues.

This update adds a Harmony patch to GenStep_Monolith.GenerateMonolith to skip Monolith generation if one already exists.
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). multifaction Bugs or issues only in multifaction mode.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants