RimWorld

RimWorld

96 ratings
Lagless Lamps - C#
2
3
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.5, 1.6
File Size
Posted
Updated
502.830 KB
21 Apr @ 2:18am
20 Jul @ 7:26pm
17 Change Notes ( view )

Subscribe to download
Lagless Lamps - C#

Description
Updated 7/20/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 (1.5 ONLY - REQUIRES HARMONY):
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 and things like stoves (i.e. things that have consumeFuelOnlyWhenUsed set to true) since those calculate fuel consumption separately.

Comp Removal (NO HARMONY DEPENDENCE):

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

  • is a 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)
  • isn't a turret
  • is not a production building
  • doesn't consume or generate electricity
  • consumeFuelOnlyWhenUsed is set to false

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

Safe to add and remove midgame but changing any settings require a restart.

Whitelisting for modders
This mod is a hammer and for hammers, everything looks like nails. Use this patch to exclude things from comp removal and fuel consumption scaling if they're still falling through the cracks and getting patched when they shouldn't be.

<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.WhitelistDef[defName = "NoRemove"]/thingDefs</xpath> <value> <li MayRequire="Ludeon.RimWorld.Ideology">Autobong</li> </value> </li> <li Class="PatchOperationAdd"> <!--Adding an item that should never have its fuel consumption scaled--> <xpath>Defs/LaglessLamps.WhitelistDef[defName = "NoFuelConsumptionScaling"]/thingDefs</xpath> <value> </value> </li> <li Class="PatchOperationAdd"> <!--Adding an item that should always have its refuelable comp removed, regardless of mod logic--> <xpath>Defs/LaglessLamps.WhitelistDef[defName = "ForceRemove"]/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 (4)
10
2 hours ago
PINNED: Bug Reports
Jsin0
4
9 May @ 1:22am
PINNED: Whitelist Suggestions
Jsin0
0
24 Apr @ 11:23pm
PINNED: General Suggestions
Jsin0
67 Comments
MikeTheDead 2 hours ago 
Posted a report about the issue he mentioned, it includes why they are just standing still, it occurred for me since yesterday
Jsin0  [author] 7 hours ago 
If it continues after this patch, please post a description of your issue and your log in the Bug Reports discussion.
MikeyBrooklyn 15 hours ago 
Since the last update this morning everything is showing as not fueled, even if I deconstruct and rebuild. i.e. can’t do ritual at campfire because it thinks it’s not fueled, even when brand new. Also causing “standing” pawns.
Rincewind 20 hours ago 
love this mod for really cool configuration window.
only 1 problem which is already mentioned - after starting/restarting rimworld you have to load your savegame twice. Because at first load evrything will be turned off and require wood/etc like this mod isn't installed.

Save and load again is fixing it.
SpectreCreepah 19 Jul @ 2:47pm 
Not sure if it's a bug just for me or not. but upon loading into a save. all the torches i placed before are burned out and have to be refueled again, it's not saving it or something.
Tsornin 19 Jul @ 10:37am 
But thank you very much for the 1.6 update and for working to keep this mod going! I like using it a lot.
Tsornin 19 Jul @ 10:36am 
The menu option works very well - I just click and it toggles the item from one list to another, but I'm having the same problem Onyx is. The in-game effect is to turn off refueling, not disable the need. I can turn refueling back on, so my lamps still work, but I'm needing to supply them with wood now.
Onyx 19 Jul @ 9:38am 
Doesn't actually fix the non refuelable part, as all it does is disable me from refueling, then they run out and I'm stuck with a lit out torch
Annabellee 18 Jul @ 2:22am 
And I thank you
Jsin0  [author] 18 Jul @ 12:45am 
@Annabelle I stand corrected, enjoy adding and removing things from the settings