Jump to content

Recommended Posts

On 1/16/2022 at 1:12 PM, PhantomWarp said:

I tried this will no luck. It seems animal/colonist pregnancy/birthing is just not working. 

Just keeping an eye on this as I'm having the same problem and can't figure it out at all. I completely redid my modlist, cut it down by half. 

Link to comment

Okay, just had a bit of a wild goose chase figuring out how to solve this for myself, so I just wanted to leave a short guide on how to make incestuous colonies more viable here for if and when others come looking for that information.

 

First the part I already knew: go to RimWorld/Data/Core/Defs/PawnRelationDefs/PawnRelations_FamilyByBlood.xml, change the incestOpinionOffset to deal with the negative Incestuous opinion, and change romanceChanceFactor for attraction, of different relations.

incestOpinionOffset is a signed integer that determines how opinions of others is altered toward someone in an incestuous relationship, and romanceChanceFactor is, as the variable name suggests, a factor that adjusts how romantically and sexually viable related pawns consider each other. romanceChanceFactor of 1 is default, less than 1 is less attraction, higher than 1 is more attracted.

 

Now, the part I did not know until moments ago: go to RimWorld/Mods/RJW/Defs/PawnRelationDef/PawnRelation_Beast.xml and do the same thing there.

I remembered having seen that file before when I stumbled upon it again and not being sure what its classes referred to (and the comments in the xml seems to indicate I am not alone in this), but I had some opinion debuffs active even after editing PawnRelations_FamilyByBlood.xml, and changing PawnRelation_Beast.xml fixed that.

Edited by MadGenuis
Link to comment
10 hours ago, crow_mw said:

Hello Ed86, thank you for your continuous support for RJW. Some months ago we have talked about optimizing the method that calculates stats for bed whoring bonuses. Unfortunately in current version this method is still causing performance problems.

Maybe that feature wasn't as good an idea as I thought it was ?

 

I wonder if you can cache the role of a room and only update bed stats if it changes to/from brothel.

Or maybe scrap updating on room changes entirely, beds get updated eventually.

In my games, I didn't have any performance problems with room updates, I wonder what kind of maps some players have (or might there be other mods involved that make recalculations more expensive?). Not pointing fingers, just curious, maybe something could be done after all.

Edited by nugerumon
Link to comment
11 hours ago, crow_mw said:

Hello Ed86, thank you for your continuous support for RJW. Some months ago we have talked about optimizing the method that calculates stats for bed whoring bonuses. Unfortunately in current version this method is still causing performance problems.

 

obraz.png.51d5d70918f96a3fb3335d65fa4f6827.png

i dont remember what we were talking half year ago, but all that i see here is that your game way too optimized

 

image.png

mine is latency 100-200 times less

Link to comment
On 1/24/2022 at 6:21 PM, Zebruh said:

Animal cooldown slider seems broken because my roosters and hens have been on a sex rampage nonstop for an ingame year, the henhouse is completely coated in white sploches no matter how much I clean, and I forgot what silence sounds like over all the splooging, though the bar is set to 2 day cooldown. Im using the latest version of almost everything on LL from that google doc with all the 1.3 forks

You using wild animal sex? I accidentally had that installed and realised it was overriding my permissions

Link to comment

I have noticed an issue between Rimjobworld and Alpha Animals. Crepuscular Beetles in example which are added by Alpha Animals lay eggs by design, but Rimjobworld causes them to lay extra regular ones,  causing a massive influx of food. Is there a simple way to switch of rimjobworlds addition or would that require a patch to fix that?

Link to comment
On 1/25/2022 at 11:24 AM, Ed86 said:

i dont remember what we were talking half year ago, but all that i see here is that your game way too optimized

mine is latency 100-200 times less


Sorry, but could you explain to me what you mean 'way too optimized'? It is still early game (2nd year) and I stopped being able to go at 3x speed. The bed patch was the main contributor. During play I observe this method cost changes depending on circumstances, and can go crazy if room walls get broken. On my screenshot is spikes up to 15ms, which can already be felt.

If this cannot be addressed or it is not worthwhile to invest in this, than ok. I'm merely reporting what I see in my game.

Edited by crow_mw
Link to comment

Hey there!
Pregnancy doesn't seem to happen or at least the hediff "pregnancy early-stage"  doesn't last 10 seconds. 

The feature is enabled, they're adults (age 24, so not old), they have no other hediff other than the genitalia. I noticed @Jessah is having a similar problem but I'm not sure what's going on or how to troubleshoot besides doing what he did - cut my mod list to pieces (which didn't fix the issue.)

 

Is anyone that handles the development have an idea or a way that I can help with finding a solution?

Link to comment
On 1/26/2022 at 7:25 PM, crow_mw said:


Sorry, but could you explain to me what you mean 'way too optimized'? It is still early game (2nd year) and I stopped being able to go at 3x speed. The bed patch was the main contributor. During play I observe this method cost changes depending on circumstances, and can go crazy if room walls get broken. On my screenshot is spikes up to 15s, which can already be felt.

If this cannot be addressed or it is not worthwhile to invest in this, than ok. I'm merely reporting what I see in my game.

i doubt you can notice 0.015s lag

 

i def didnt see my game freezing for 6 seconds

why do you think its bed patch and not vanilla doing its vanilla things when you break wall

anyway i dont see issue

Link to comment
On 1/27/2022 at 12:05 PM, garniu said:

So I set in RJW sex settings rimming to 1 and fellatio to 100 but the only sex act that keeps getting selected for rape is still rimming. I downgraded to RJW 4.8.2 and there it works perfectly.

Screenshot_5.png

Screenshot_4.png

It's because you don't have any sex options available for girls (assuming by the name). Unless they have penises they can't do fellatio, cunnilingus is the female equivalant to fellatio

Link to comment
3 hours ago, Puffy Bue said:

It's because you don't have any sex options available for girls (assuming by the name). Unless they have penises they can't do fellatio, cunnilingus is the female equivalant to fellatio

Forgot to mention that they have penises i downgraded to rjw 4.8 to test if it was bugged too but no on 4.8 it works normally with futa

Link to comment
On 10/1/2021 at 2:28 AM, Ed86 said:

TLDR:

 

What it says is:

Oops someone fucked up, i expect rjw.SexProps.sexType, but its not there

Whose fault is that?

(wrapper dynamic-method) rjw.JobDriver_Sex.rjw.JobDriver_Sex.Orgasm_Patch1(rjw.JobDriver_Sex)
Solution?

-open hugslog

-search for mod that harmonypatches JobDriver_Sex.Orgasm

-remove mod or use version of mod designed for that version of rjw

-...

-profit


Thanks for posting this! Helped me figure out that I had an issue with sexperiance. 

Link to comment
On 1/26/2022 at 6:25 PM, crow_mw said:

If this cannot be addressed or it is not worthwhile to invest in this, than ok. I'm merely reporting what I see in my game.

 

Try attached RJW dll, put in rjw/1.3/Assemblies, overwrite existing. In my (limited) testing, I made a room toggle go from 0.3ms to 0.1ms, I'm curious if it's more effective in your game.

RJW.zip

If it works well I'll make a pull request. (actually I already made it)

 

15 hours ago, StrikeEnergy said:

That aside, was thinking to do some work on the mod, so i want to ask that if i have some question about how some stuff work or how to do some things, you could help me?

It's probably best if you join the discord then.

Or you could ask in this thread, but I have the impression most knowledgeable people aren't very active here.

It also depends where you start (prior experience) and what you want to do (tweak some xml numbers or dive into C#?).

Edited by nugerumon
Link to comment
9 hours ago, StrikeEnergy said:

Discord could be a good place where to start, and its link whould appriciated, the only thing that make me kinda worried is if i will have enough time in the future to be active enough.

Also i'm more of "get a good idea" guy rather than "make a good idea" guy...

Link is in the first post of this thread (mod description of RJW) also its in my signature.

Link to comment

A heads up for whoever does the race compatibility patch there seems to be some issues with the popular Revian Race mod. Regardless of pregnancy settings Revian pregnancies result in female Revians 100% of the time regardless of whomever/whatever the father is. I'm certain the problem isn't my mod list because I went into dev mode the test on Human pawns, Ratkin pawns, and Kurin pawns and everything was fine. Thank you for all the patches you have so far.

Link to comment
1 hour ago, Hamptneyhambart said:

A heads up for whoever does the race compatibility patch there seems to be some issues with the popular Revian Race mod. Regardless of pregnancy settings Revian pregnancies result in female Revians 100% of the time regardless of whomever/whatever the father is. I'm certain the problem isn't my mod list because I went into dev mode the test on Human pawns, Ratkin pawns, and Kurin pawns and everything was fine. Thank you for all the patches you have so far.

because its female only race?

Link to comment
On 1/28/2022 at 9:06 PM, nugerumon said:

 

Try attached RJW dll, put in rjw/1.3/Assemblies, overwrite existing. In my (limited) testing, I made a room toggle go from 0.3ms to 0.1ms, I'm curious if it's more effective in your game.

RJW.zip 230.92 kB · 4 downloads

If it works well I'll make a pull request. (actually I already made it)

 

 


Thank you for taking time to look into it. I have experimented a bit with you build on my current save. The results are unfortunately a bit inconclusive. Setup - this is a third year colony, 9 colonists and some animals. Slightly less than 200 mods.

On the current game state, the performance from before your build looks as follows:

Spoiler


Before.png.0a7565aa824a841cda10456371af35f8.png

 

3 ms avg time/update, fairly irregular.

With your build it initially looks as one would expect:

Spoiler

After-1.png.32df29a8a19604aca1e027da16f68b8d.png


Initial warm up, which leads to higher avg times, but eventually dropping. Unfortunately, soon the game starts throwing exceptions and as those are heavy, the performance dwindles.

Spoiler

After-3.png.4d9fe76c3bd5fdc7791ab4774793dded.png


We are back to 3.2 ms / update average, but caused by large spikes.

This is the log with exceptions (and modlist for reference): https://gist.github.com/HugsLibRecordKeeper/9f7415f004ae2fc7361b235f7ec1ea96 


The exceptions in question:

 
Spoiler
System.InvalidOperationException: Sequence contains no elements
at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00010] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
at (wrapper dynamic-method) rjw.Building_Bed_Patch+Room_UpdateRoomStatsAndRole_Patch.rjw.Building_Bed_Patch+Room_UpdateRoomStatsAndRole_Patch.Postfix_Patch0(Verse.Room)
at (wrapper dynamic-method) Verse.Room.Verse.Room.UpdateRoomStatsAndRole_Patch1(Verse.Room)
at Verse.Room.get_Role () [0x00008] in <f2d2a994b972449b95534f171b6e3647>:0
at VanillaMemesExpanded.MapComponent_RoomsInMap.MapComponentTick () [0x00145] in <6b81da8626af45e299bfca57e3a48b6c>:0
at (wrapper dynamic-method) Verse.MapComponentUtility.Verse.MapComponentUtility.MapComponentTick_Patch0(Verse.Map)

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)

 


This leads to obvious suspicion, that the issues I'm experimenting are related to conflict with VE - Memes. Now we enter the realm of removing mods from running save, so the results can be not very representative. However, after removal of VE -Memes some exceptions still occur but apparently less often, resulting in lower average times (1.5 ms).

 

Spoiler

NoVeMemes.png.66afb6be541e10ede84e2f041e630ff8.png

 

An exception example w/o VE - Memes:

Spoiler


Exception in Verse.AI.JobDriver.TryActuallyStartNextToil: System.InvalidOperationException: Sequence contains no elements
  at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00010] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at rjw.Building_Bed_Patch+Room_UpdateRoomStatsAndRole_Patch.Postfix (Verse.Room __instance) [0x0007c] in <f7f6b19391a244bb9e44642866b35ce0>:0
     - transpiler Dubwise.DubsProfiler: IEnumerable`1 Analyzer.Profiling.MethodTransplanting:Transpiler(MethodBase __originalMethod, IEnumerable`1 instructions, ILGenerator ilGen)
  at Verse.Room.UpdateRoomStatsAndRole () [0x000e7] in <f2d2a994b972449b95534f171b6e3647>:0
     - postfix rjw: Void rjw.Building_Bed_Patch+Room_UpdateRoomStatsAndRole_Patch:Postfix(Room __instance)
  at Verse.Room.GetStat (Verse.RoomStatDef roomStat) [0x00008] in <f2d2a994b972449b95534f171b6e3647>:0
  at Verse.GenRecipe+<MakeRecipeProducts>d__0.MoveNext () [0x001dd] in <f2d2a994b972449b95534f171b6e3647>:0
     - transpiler net.avilmask.rimworld.mod.CommonSense: IEnumerable`1 CommonSense.RandomIngredients+GenRecipe_MakeRecipeProducts_CommonSensePatch:CleanIngList(IEnumerable`1 instrs)
     - transpiler PerformanceOptimizer.Main: IEnumerable`1 PerformanceOptimizer.Optimization_FasterGetCompReplacement:Transpiler(IEnumerable`1 instructions, MethodBase method)
  at System.Collections.Generic.List`1[T]..ctor (System.Collections.Generic.IEnumerable`1[T] collection) [0x00077] in <eae584ce26bc40229c1b1aa476bfa589>:0
  at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x00018] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at Verse.AI.Toils_Recipe+<>c__DisplayClass3_0.<FinishRecipeAndStartStoringProduct>b__0 () [0x000ad] in <f2d2a994b972449b95534f171b6e3647>:0
  at Verse.AI.JobDriver.TryActuallyStartNextToil () [0x0023a] in <f2d2a994b972449b95534f171b6e3647>:0
     - transpiler net.pardeike.rimworld.lib.harmony: IEnumerable`1 VisualExceptions.ExceptionsAndActivatorHandler:Transpiler(IEnumerable`1 instructions, MethodBase original)


Some other mods are still present in a stacktrace, but bearing in mind we have just modified the Building_Bed_Patch, this is the most suspicious culprit.

For comparison the same screen from the save, if I remove whole RJW>

 

Spoiler

NoRJW.png.e3d5014e2b5c4ab36783df5d82839593.png

 

Obviously, comparing the TPS after removing entire RJW is not fair, but the game offers at least 40 TPS more now. Note also, that really heavy stuff, like drawing colonist bars with moods and needs or the Interaction Bubbles are in 0.2 ms/tick averages territory.

 

Please note, that even if the method gets below 1 ms average, lets say 0.9 ms average, it is still too much. In order to run 360 TPS (3x speed), each update must be executed within 2.77 ms. A simple patch consuming 1/3rd of this limit on an early game colony, likely indicates, that it will be impossible to get to 3x or even 2x speed later on (especially if time scales with amount of beds). 0.1 ms like in your testing is much more bearable, but as you have stated in your previous post, it would be enough if the recalculation happened ... almost never.

I wonder how often is the patch called in your setup. In the screenshots above, it hovers around 0.2 calls / update on average. This is likely per-bed and there are 24 beds in my colony. This is on average one call per bed per 100 updates - if we were running on normal speed (60 ticks / second), each bed gets recalculated every 1.6 seconds.  EDIT: each call to this patch is an iteration over all beds in colony. So if we are running at normal speed (60 ticks / sec), we recalculate this value for all beds in colony ~12 times per second.

Thank you one more time for taking time to improve the performance. TL;DR: is that it is hard to evaluate how much this patch helped, as it causes game to throw exceptions and with exceptions the performance is still suffering.
 

 


 

Edited by crow_mw
Link to comment

I have found my old PR when I was looking at this problem several months ago. https://gitgud.io/Ed86/rjw/-/merge_requests/174

 

I was arguing there, that the whole Room_UpdateRoomStatsAndRole_Patch is only needed to update the room stats during the pause. Outside of a pause the value is eventually updated in CalculatePriceFactor() itself (this is also what was stated in comments for Room_UpdateRoomStatsAndRole_Patch() and CalculatePriceFactor() - the whole 'force' flag). So the patch was to 'force' recalculations only during a pause (where performance is not important). But since that is a bit hacky, the PR was eventually retracted. I do not know if this still holds for current version of code, but perhaps this is an angle from which this could be approached?

(also reviewing that patch now I see that each Room_UpdateRoomStatsAndRole_Patch() is an iteration over all beds in colony...)

Link to comment
1 hour ago, crow_mw said:

(also reviewing that patch now I see that each Room_UpdateRoomStatsAndRole_Patch() is an iteration over all beds in colony...)

It should only update all beds in the room that is updated. Do you have all beds in a large room that often changes?

I still have no idea what kind of setup leads to such high execution times.

 

As my savegame is rather old, I had to make a quick setup for testing, where I basically threw a dozen beds in a large-ish room, but I don't have many mods running and there isn't much else in that room.

 

2 hours ago, crow_mw said:

The exceptions in question:

That was a stupid oversight, trying to use a bed in a room that has no beds.

RJW.zip

Try now.

 

 

PS: could you have a look at this tab? Both with and without RJW loaded, please.

 

 

image.png.aea8a7d23331dacf2ed55e5dded7bcee.png

Edited by nugerumon
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use