RimWorld

RimWorld

Not enough ratings
Lagless Lamps - C#
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.5
File Size
Posted
Updated
8.857 MB
Apr 21 @ 2:18am
Apr 27 @ 2:54pm
4 Change Notes ( view )

Subscribe to download
Lagless Lamps - C#

Description
Updated 4/27/25: Check Changelog for Details

A successor to Lag Free Lamps by NECEROS and Infinite Torches by okradonkey.
Inspired by Optimization: Meats by SeoHyeon

This is for the people who want to do low tech runs without bogging down their computer with all the ticking light sources. Removes the refuelable comp from low tech light sources (default) or slow down the refuelables comp tick.

Comp Delay:
The vanilla refuelable comp calculates fuel every tick, with harmony, the recalculation can be delayed to every user configured tick. The default is every 10 ticks, which means fuel is calculated 10 less often. Fuel consumption is scaled to tick interval so fuel should still last the same amount of time.

Other tick intervals can be set but I don't know if it will affect the game in any other ways.

This affects all things with the refuelable comp except turrets since those calculate fuel after every shot.

Comp Removal:

Removes the refuelable comp to things that fit the following criteria:

  • is a building
  • isn't a turret
  • is not a production building
  • has the refuelable comp
  • has the glower comp
  • if it's a heatpusher, heatPerSecond is below a threshold (which can be changed via mod settings)
  • doesn't consume or generate electricity

Also features two lists that you can use to exclude things from comp removal and comp delaying
neverRemove - Any light sources you want to exclude from comp removal
neverDelay - Anything that has the refuelable comp that should not be scaled to tick interval such as turrets or things that reduce fuel per use.

Safe to add and remove midgame but switching from Remove to Delay requires a restart.

Listing for modders

<Patch> <Operation Class="PatchOperationFindMod"> <mods> <li>Lagless Lamps - C#</li> </mods> <match Class="PatchOperationSequence"> <operations> <li Class="PatchOperationAdd"> <!--Adding an item that should always keep its refuelable comp--> <xpath>Defs/LaglessLamps.ForcedListDef[defName = "neverRemove"]/thingDefs</xpath> <value> <li MayRequire="Ludeon.RimWorld.Ideology">Autobong</li> </value> </li> <li Class="PatchOperationAdd"> <!--Adding an item that should never have its refuelable comp delayed--> <xpath>Defs/LaglessLamps.ForcedListDef[defName = "neverDelay"]/thingDefs</xpath> <value> </value> </li> </operations> </match> </Operation> </Patch>

A copy of this patch can also be found in the mod folder.

GitHub[github.com]
Popular Discussions View All (3)
1
Apr 30 @ 7:38pm
PINNED: Whitelist Suggestions
Jsin0
0
Apr 24 @ 11:23pm
PINNED: Bug Reports
Jsin0
0
Apr 24 @ 11:23pm
PINNED: General Suggestions
Jsin0
23 Comments
BOYCOTT S-T-E-A-M! Apr 28 @ 2:46am 
Only tested very briefly, but the update seems to have fixed my issue as well. Torches are lit again and functioning. The problem of them showing as burnt out and needing refueled, but unable to be automatically or manually refueled has been resolved. Thanks again for the update and awesome mod!
Jsin0  [author] Apr 27 @ 7:03pm 
I'll definitely look into that next
Annabellee Apr 27 @ 6:44pm 
Question would be there be a way to add/remove from the patch and unpatch list from the mod menu?
Jsin0  [author] Apr 27 @ 6:32pm 
@Frezlin I'm glad to hear that!
Frenzlin Apr 27 @ 4:48pm 
New update fixed my issue!
LoopKat Apr 27 @ 4:09pm 
Actually, letting it run a little longer, both comp removal and delay seem to reach a peak of about 115-120tps now, though delay seems to reach that peak slightly more consistently and sometimes peaks up to 130 (which comp removal does not do)
LoopKat Apr 27 @ 4:04pm 
@Jsin0 Just checked with the latest version and that seems to have fixed it. Tps is now pretty much on par with the other mod, hovering somewhere between 90-105 under the same zoom and speed conditions. For this and my previous comment, all mod settings for this C# mod were left at default

Switching from comp removal to delay (both at default settings), the average tps increases slightly to about 100-120
Jsin0  [author] Apr 27 @ 3:16pm 
@LoopKat, do you still see that after the update? If so, is that with comp removal or delay?
Frenzlin Apr 25 @ 7:12pm 
I think the latest update messed something up. I loaded a save and all my torches had a fuel requirement, but couldn't actually be refueled. This applied to newly built torches as well. It was working fine before the update
LoopKat Apr 25 @ 5:37pm 
Very strange behavior out on the modded Rim today. I've been using Lag Free Torches and More for a while and decided to try swapping it out for this. On a pretty late game colony, I was getting about 100tps on 3x speed while fully zoomed out, but switching to this mod tanks it down to about 50tps. Ironically, using neither mod actually nets me about +50tps. I only have a handful of torches in my colony (a blood torch + some braziers from Dark Ages: Crypts and Tombs), so maybe that has something to do with it, but it's strange that there's so much more overhead from this mod in my particular setup