Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Kelven

#1
UPDATE
=====

Original post title: Starting new game with same modlist, new game has consistent 3 second lag spikes
Mod that was causing the lag spikes: [FSF] Growable Grass

Took me over 5 hours to go through 294 mods to find the culprit. As stated in the original post below, I had NO issues with these mods in my previous game. Why this one would start causing lag spikes on a brand new game, yet work totally fine when I load my old save, is really odd.



ORIGINAL POST
==========

TL;DR version:

1 - What the circumstances were.
   Started brand new game with existing mod list from previous, working game.
   
2 - What happened.
   Game lags for 3 seconds on a very consistent basis (every 33 seconds on normal speed, 13 seconds on fast speed, 3-4 seconds on very fast speed)
   
3 - What you expected to happen.
   The game NOT to have lag spikes, as the previous game with the exact same mod list did not lag.

4 - Log File/Mod List
   I uploaded a few logfiles at various points. The first one is when first starting up Rimworld, the Debug Log auto-opened for this. The second one is right after world generation of a new game, the Debug Log auto-opened for this. The last is after running the new game for a few minutes on fast speed, the Debug Log did NOT auto-open for this, but I figured having a log here might also be a good idea.

Hugslib log on Rimworld startup: https://gist.github.com/211de3fffb60fbd08c6924e49934e01b
Hugslib log on new game world generation: https://gist.github.com/HugsLibRecordKeeper/9962b7f999f82abb8c27920e52e2d0ef
Hugslib log in new game, after running the game for a few minutes: https://gist.github.com/HugsLibRecordKeeper/5607461ce1bc228ebe7ff2b285c7b443

Full Modlist (manual sorting): https://rentry.co/rzq6a
Full Modlist (RimPy auto-sorting): https://rentry.co/4qyyu

Non-TL;DR version:

I recently abandoned my previous playthrough and started a new game, with the same mod list (294 mods). However, upon starting a brand new game, I'm getting consistent 2-3 second lag spikes every 33 seconds. I load up my old save, and it runs smooth. Brand new save? 3 second lag spikes every 33 seconds on speed 1. (Every 13 seconds on speed 2, and every 3-4 seconds on speed 3).

I'm using a smaller world gen and smaller local map size so those shouldn't be the issue... I've tried multiple new games, and all of them have these constant lag spikes.

I've tried starting multiple new games with various vanilla storytellers, map sizes, world gen options, etc... and they all have these lag spikes when playing. It's just so weird, cause it's the exact same mod list in the same order as my old save... and I can STILL load my old save and it runs smooth (well, as smooth as a 10 year old colony with 20 pawns on a large map).

I've tried doing a manual load order using various guides on what to place where, and also RimPy's auto-sort... nothing helps.

I have Dubs Performance Analyzer but I have absolutely no idea how to use it.

Can anyone offer me any tips on how to track down what is causing these lag spikes?
#2
Help / Re: Will help mod the game.
April 04, 2020, 10:41:16 AM
If you take mod requests, I'd absolutely love if you'd be able to do an "unofficial update" of the 1.0 Material Filter mod on Steam Workshop.

Being able to separate clothes based on material means I can safely have clothes I make to level up crafting and sell in my trade beacon stockpile, while keeping my GOOD devilstrand/hyperwave in a seperate stockpile for my colonists to use. As well as being able to make outfits that are ONLY certain materials.
#3
Quote from: Napoleonite on March 08, 2020, 07:22:57 PM
That mostly depends on the mod, what mod? Personally I'd advise you not to do this for a C# mod unless it's a really small mod.

One of my mods uses rather nested LINQ with lazy values and etc. It's near impossible for a non-coder to fix this if that code throws any kind of error.

Hell, even quite some 1.1 mods have odd warnings and errors even after their original creator updated them who have knowledge of both and still partially failed.
Not to mention how many inefficient implementations I found using ILSpy in other people's mods and they ARE coders. Maybe you can fix it but create some serious performance issue that you'll notice way later or cause serious damage to your savegames.

The mod is Material Filter, Workshop link: https://steamcommunity.com/sharedfiles/filedetails/?id=1541305730&searchtext=material+filter

I've mostly given up at this point lol. I haven't taken a coding course since high school, and that was in the late 90's, so while I understand the basics of what stuff SHOULD be doing, there's no way in hell I'll be able to fix this myself.
#4
Since I'm sure all mod authors hate all the "1.1 when?" comments that appear on their mod's Steam workshop page, instead of being "that guy",  I decided to instead try and convert a mod from 1.0 to 1.1 myself. How hard could it be? /s

Anywho, what I've done so far is copy the mod into a new folder, downloaded dnSpy, exported the mod's .dll into a new VS19 project, opened that in VS19, then started following the "Updating RimWorld from 1.0 to 1.1" here: https://gist.github.com/pardeike/08ff826bf40ee60452f02d85e59f32ff

So following that page, I've got the project open in VS19, but obviously that website assumes that the reader has not only coding knowledge, but knowledge of their own project as well. I have neither, since it's not my mod. I got all the 62 Unity dlls added as references (since I don't know which I need, might as well put them all in...?) But now... what? I got VS19's error list for this project up, and it has 45 errors and 2 warnings, but I have no idea where to go now.

I was HOPING I could stumble my way through this with the help of the site linked above, hoping that it'd just be adding support for Harmony by changing a reference somewhere, but I guess it won't be that easy. The mod I'm trying to update isn't a very extensive mod (it just adds a material filter to storages), so I was hoping it would be fairly simple to work out.

So I guess my question is... is my approach to this all wrong? Without taking an extensive online coding course, is this something I could actually do with extremely limited coding knowledge?