lategame fps increase: delete "world pawns" from save file

Started by 14m1337, December 02, 2016, 08:39:03 AM

Previous topic - Next topic

14m1337

skully mentioned that deleting the world pawns could improve the late game fps. as this may be interesting to more than one or two rimworld players, I decided to start this thread instead of only PMing skully directly (which I did additionally to this thread - hoping he will give us some advice here)

Quote from: skullywag on November 20, 2016, 03:55:28 PM
I would suggest deleting all your worldpawns (dead and alive) from your save, leaving your faction leaders and anyone you care about(buried colonists etc) as these worldpawns eat ticks in late game colonies.
For example I found EVERY animal ive ever sold in there, that amounted to 100s of pigs...100s. All ticking...im looking into ways of automating this.


Quick_Silver - The One And Lonely
My posts may sometimes be filled with (sarcastic) humor - it's up to you to find it out on your own.
Usually drunk on Mondays from 21:00 to 03:00 CEST.

skullywag

Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Grishnerf

Born in Toxic Fallout
Drop-Pod Escape Artist

14m1337

now, to take the essential information from that thread ...

first, the savegame location, according to the RimWorld wiki (with a minor addition that's actually missing in the wiki):
Quotewindows button + R -> the run dialog will appear
type appdata and press enter
go to LocalLow --> Ludeon Studios --> Rimworld --> Saves

following is heavily inspired (not to say partly copied) from lc-soz' post in the thread linked in skully's post, I only added the seemingly new forced-alive entry and some comments/explanations to make things a bit more clear.
I WILL TAKE NO RESPONSIBILITY REGARDING LOST SAVE FILES - ALWAYS MAKE A BACKUP BEFORE EDITING ANYTHING !!


Step by step in NOTEPAD++ (should be similar with other editing tools, but notepad++ is freeware and very powerful):

NOTE: If you delete <pawnsalive> (and/or <pawnsForcefullyKeptAsWorldPawns>) it will be impossible to talk to others factions via comms console and probably they will never visit or attack again. I test force raid via developer tools and works, but still not sure if it would naturally come sometime soon.

0. MAKE A BACKUP OF YOUR SAVE.
1. Open your save file (this may take a while - the savegames are usually quite big)
2. Press Alt + 0 -> This will fold all levels
3. Search for <worldPawns>
4. Click on the plus in the left side of it (=> "unfold" <worldPawns>)
5. You will see (folded): <pawnsForcefullyKeptAsWorldPawns> , <pawnsAlive> and <pawnsDead>
6. Unfold <pawnsForcefullyKeptAsWorldPawns> => This seems to be the list of all pawns that are forced to be kept alive, like tribe leaders, relatives & animals
7. If you want, delete everything in here*, but keep in mind that this may make it impossible to talk to other factions via comms console and probably they will never visit or attack again. I personally suggest to only delete the animals' entries here. I'm having a deeper look in here at the moment.
8. Unfold <pawnsAlive> => This seems to be the list of other pawns, that already did spawn in your current game.
9. If you want, delete everything in here*, but keep in mind that this may make it impossible to talk to other factions via comms console and probably they will never visit or attack again. Trying to delete everything in here* resulted in being unable to load the savegame. I personally suggest to only delete the animals' entries here, as it is very time-consuming to find out which parameters are marking "unnecessary" pawns. I'm having a deeper look in here at the moment.
10. Unfold <pawnsDead> => This is the list of every pawn that already died.
11. You can quite safely delete everything between in here*, unless there are specific things that you still want listed, such as your own dead colonists that are buried and whose graves should be visitable in the future.
12. Save file and enjoy a hopefully playable rimworld

additional info: <pawnsForcefullyKeptAsWorldPawns> and <pawnsAlive> seem to be related to each other. I didn't have the time to find out the exact relations by now. Help appreciated.


*in here: betweeen an open-this-category tag like <pawnsDead> and the end-of-category tag like </pawnsDead>. instead of deleting everything between these two tags, you can simply replace the whole category (including the start and end tag) by (at least in this example) <pawnsDead />. this is the equivalent of saying "I know this category exists, but there is nothing here".
Quick_Silver - The One And Lonely
My posts may sometimes be filled with (sarcastic) humor - it's up to you to find it out on your own.
Usually drunk on Mondays from 21:00 to 03:00 CEST.

Bozobub

Good work!  I haven't hit that wall badly yet but, especially on higher difficulties and Cassandra, this can only be useful later on.  I badly want to see how my obscenely well-armed, bear-training hippie art colony fares years hence.  Or not, as "Fun™" happens.

Hopefully this will prod Tynan into finding a way to solve the problem properly ^^' .
Thanks, belgord!

14m1337

actually, I've found someone here in the forums who made savegame editor (that's only for editing colonists at the moment). I hope he will add this as feature to the editor.
Quick_Silver - The One And Lonely
My posts may sometimes be filled with (sarcastic) humor - it's up to you to find it out on your own.
Usually drunk on Mondays from 21:00 to 03:00 CEST.

tonsrd

is it possible to make a bat file or an exe that can do all steps with just a double click ( a super codder / modder / Dev ) that can delete the dead ???


14m1337

Quote from: tonsrd on December 03, 2016, 09:32:19 AM
is it possible to make a bat file or an exe that can do all steps with just a double click ( a super codder / modder / Dev ) that can delete the dead ???

this is what I'm aiming at with the coder I mentioned before. an easy way to clean up the world pawns, no matter if they are dead or alive. (yeah, this wordplay is intended)
Quick_Silver - The One And Lonely
My posts may sometimes be filled with (sarcastic) humor - it's up to you to find it out on your own.
Usually drunk on Mondays from 21:00 to 03:00 CEST.

14m1337

now, here's an information update about which pawns definitely should not be deleted:

first, look for <factionmanager> in your save file, expand to <allfactions> and then expand all factions there. there will be some spacers, mechanoids, and also the factions that you can see when you look up the factions ingame. the information we need here is contained in the <name> <loadid> and <leader> tags. especially the <leader>... they look like "Thing_Human733". make yourself a note of the leaders of "your" five factions. these are the ones that you should never delete!

I deleted all but these five pawns from <pawnsForcefullyKeptAsWorldPawns> and <pawnsAlive> in my actual savegame, and it really improved the game speed.

next step for me: looking for relatives of my colonists and not delete them :)
Quick_Silver - The One And Lonely
My posts may sometimes be filled with (sarcastic) humor - it's up to you to find it out on your own.
Usually drunk on Mondays from 21:00 to 03:00 CEST.

mumblemumble

I wonder if the above thing could be added as a performance option, marked to possibly limit / break features, at benefit of performance.

Does anyone know exactly what deleting the rest of it does???
Why to people worry about following their heart? Its lodged in your chest, you won't accidentally leave it behind.

-----

Its bad because reasons, and if you don't know the reasons, you are horrible. You cannot ask what the reasons are or else you doubt it. But the reasons are irrefutable. Logic.

MisterVertigo

Interesting thread. I haven't had too many issues with my main PC, but if I ever play RimWorld on my laptop again I could very likely run into this. Thank you for compiling all this info and posting!
"In vertigo you will be..."

"Relax, people. It's a teeny indie game; don't kill it with love." - Bozobub

14m1337

you'll be even more happy soon: I'm actually talking to DragonLord, who made a savegame editor... imagine what may happen soon yourselves ;)

by the way, what I can confirm as stated in the other thread linked by skullywag: if one deletes all <pawnsDead>, all the corpses on the map will disappear, even the ones that were hunted seconds ago. but these shouldn't take too much of your CPU power, as they are dead already ...
Quick_Silver - The One And Lonely
My posts may sometimes be filled with (sarcastic) humor - it's up to you to find it out on your own.
Usually drunk on Mondays from 21:00 to 03:00 CEST.

Grishnerf

Quote from: 14m1337 on December 08, 2016, 10:37:46 AM
you'll be even more happy soon: I'm actually talking to DragonLord, who made a savegame editor... imagine what may happen soon yourselves ;)


sounds nice, im too scared to alter anything atm on my current run :D
Born in Toxic Fallout
Drop-Pod Escape Artist

Tynan

A16 will do this automatically, so you shouldn't need to do this yourself in future.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

Grishnerf

Born in Toxic Fallout
Drop-Pod Escape Artist