RimWorld

RimWorld

40 ratings
FasterRandomPlus
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.6
File Size
Posted
Updated
232.144 KB
Jun 28 @ 9:50am
Sep 10 @ 4:39am
32 Change Notes ( view )

Subscribe to download
FasterRandomPlus

Description
Speeds up RandomPlus rerolls, reducing 10,000 tries to about 1 second.
Fixes the slowdown that occurred when using the HAR (Humanoid Alien Races) mod.
Applies the same high-speed logic to both Normal and Fast (Beta) reroll modes.

If you understand Korean, please comment in Korean for a more accurate reply.

This mod uses RandomPlus and Harmony.


Known issue:
The gender filter is currently not working correctly. I’m busy and won’t be able to fix it for a while, so I recommend turning the gender filter off for now.


Source code:
https://github.com/ppuya13/FasterRandomPlus
69 Comments
Balensiad  [author] Oct 5 @ 12:13am 
@Tyrant
Yes, it's caused by the Biotech DLC.

Here's why the slowdown happened. In the original RandomPlus there's a feature that becomes a bottleneck: the routine that assigns a pawn's name and backstories. If I change the logic to modify only the gender with the current setup, you can get mismatches—like a male pawn ending up with a female name. To prevent that, I made it call that routine every time the gender changes, which brought the slowdown back. I did add some optimizations, but they weren't sufficient.

I do have a solution in mind, but I haven't had time to implement it lately.
Tyrant Oct 4 @ 1:03am 
@Balensiad Fair enough, I'm not familiar with playing the game without all the DLC. I'm assuming you're referring to Biotech?

Also, I noticed on the GitHub you tried to fix the gender filter but you had to revert it. Any idea why the rerolling slowed down so much?
Balensiad  [author] Sep 30 @ 10:17pm 
@Tyrant
Ah… your suggestion is excellent. Unfortunately, adding additional UI is beyond my current ability.
For the same reason, I haven’t addressed a long-standing request either—the RandomPlus issue where the Reroll Count isn’t shown unless a specific DLC is enabled.
I’m sorry I can’t accommodate this feedback.
Tyrant Sep 30 @ 3:33pm 
I suppose you have a point there. Ideally that should be relegated to its own slider bar so you could have Total Skill Points and High Skill Requirement or something.
Balensiad  [author] Sep 28 @ 9:38pm 
@Tyrant
Changing the logic is possible, but I’m reluctant to do so because I prefer not to alter the functionality of the original logic.
Also, the current logic isn’t useless—it can be used when you want a pawn with any single skill at ≥ N, regardless of which skill it is.
Tyrant Sep 28 @ 5:07pm 
Wow, that... seems completely useless. Any chance of changing that logic?
Balensiad  [author] Sep 28 @ 10:46am 
@Tyrant
Thank you for the report, and sorry for the late reply.
The 'Count Only Highest Attack' option—also in the original logic—means 'count only the single highest skill.'
So in the screenshot you provided, your filter is effectively 'pass if any single skill is 28 or higher.'
Because that condition is unattainable, the pawn will not pass the filter.
Tyrant Sep 25 @ 5:49pm 
I notice "Count Only Highest Attack" doesn't work correctly, this should be very easy to get a roll for, but having "Count Only Highest Attack" enabled is causing the checks to fail: https://steamcommunity.com/sharedfiles/filedetails/?id=3574822954
Balensiad  [author] Sep 25 @ 5:50am 
@Tyrant
Sorry for the late reply. You’re right—with this mod, Normal and Fast use the same algorithm.
Tyrant Sep 21 @ 9:54pm 
Does this make it so Normal and Fast are identical?