RimWorld

RimWorld

[FSF] Always Rearm Turrets
36 Comments
FrozenSnowFox  [author] Apr 14 @ 2:46am 
@Farbott
The way the patch is written it should be pretty much compatible with everything without adjustments.
Farbott Apr 14 @ 2:44am 
reinstalling this from my list cleanse and not realizing this was pretty convenient, does the patcher play nice with extra middle and extra mini turrets?
FrozenSnowFox  [author] Apr 13 @ 5:11pm 
@PatoPixelado
I mean it has the 1.5 tag. As far as I'm aware there's no issues with it. If you encounter any let me know.
PatoPixelado Apr 13 @ 5:10pm 
so this mod works well in 1.5?
Lama man Aug 23, 2023 @ 5:40am 
i guess that's true
FrozenSnowFox  [author] Aug 22, 2023 @ 2:54pm 
@Lama man
When I was making the patch the only results that came up were actual turrets and mortars so it obviously doesn't work. If I recall correctly you can change the refuel threshold in the mod options for those.
Lama man Aug 22, 2023 @ 6:43am 
i wonder if it works on Vehicles since they have Turret guns
Ravings1 May 18, 2023 @ 10:40am 
Everything works now! Appreciate the quick fix!
FrozenSnowFox  [author] May 16, 2023 @ 5:14pm 
@Ravings1
Alright I'll take a look at it later. Sounds like the main patch isn't catching it for some reason.
Ravings1 May 16, 2023 @ 5:12pm 
Ancients adds two new turrets, an ancient mini turret and an ancient point defense turret. They both just use steal to refuel, but pawns don't refill the ancient point defense turret until it's below 50%. The only difference between this turret and the other turrets is that this one is capable of shooting down projectiles and drop pods.
FrozenSnowFox  [author] May 16, 2023 @ 4:08pm 
@Ravings1
I don't use that mod. Could you describe what the problem is? Is it not patched to work or is it a turret that uses something expensive like components?
Ravings1 May 16, 2023 @ 4:04pm 
Will there be a patch for VFE Ancients point defense turret?
FrozenSnowFox  [author] Oct 31, 2022 @ 7:26pm 
@NotoriousNix
Looking it up on the workshop despite the name at least one of those mods removes refueling from everything. You might want to ensure the one you're using doesn't go beyond what you intend.
NotoriousNix Oct 31, 2022 @ 7:22pm 
I think I figured it out, I suspect it was lag free lamps as it removes some refueling functions. I didn't realize it extended past lamps.
FrozenSnowFox  [author] Oct 30, 2022 @ 11:23pm 
@NotoriousNix
I'm not sure how that could happen. It's a very vague patch that just goes for anything with the thingClass turret's use then patches the autoRefuelPercent. Are you using any turret mods by any chance?
NotoriousNix Oct 30, 2022 @ 11:04pm 
Got a small stacktrace patch error

[[FSF] Always Rearm Turrets - Start of stack trace]
Verse.PatchOperationReplace(xpath="/Defs/ThingDef[thingClass="Building_TurretGun"]/comps/li[@Class = "CompProperties_Refuelable"]/autoRefuelPercent"): Failed to find a node with the given xpath
Verse.PatchOperationSequence: Error in the operation at position=1
[End of stack trace]
The top operation is the one that failed, the ones below it are the parents
Source file: C:\Program Files (x86)\Steam\steamapps\workshop\content\294100\1848373717\1.4\Patches\Always_Refuel_Turrets_Patch.xml

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)
Techy Jun 16, 2021 @ 4:13pm 
this doesn't seem to work with the more cannons mod :( any chance of a fix for that?
FrozenSnowFox  [author] Feb 8, 2021 @ 1:19pm 
@no
Sorry about that, it looks like the same issue as the autocannon. I added a fix so it should work now. Unsubscribe and resubscribe to ensure steam updates the mod.
Old Kevin Feb 8, 2021 @ 8:08am 
I'm having the same issue with uranium slug turrets -- the autocannon and mini-turrets work fine, but the slug ones aren't being rearmed.
FrozenSnowFox  [author] Jan 26, 2021 @ 5:09am 
@Rumline
Thanks for letting me know. I tested it in my game and it didn't function. Looking at the files the Autocannon does not have the class for the patch but it should inherit it from its parent def. I'm not sure why it's not working as intended. At any rate I added an targeted patch to the files and tested it to make sure it works. So if you unsubscribe and resubscribe to ensure your mod updates properly it should work fine again. Please tell me if you encounter any further issues with this mod or any of my others.
Rumline Jan 26, 2021 @ 4:46am 
@FrozenSnowFox On 1.2.2753 with Royalty and no mods that should effect turrets, the Autocannon isn't being picked up by the "Building_TurretGun" class so isn't auto reloading at 99%. The Mini Turret works just fine. Adding the XML snippet from the 1.0/1.1 version of your XML file to the 1.2 version fixes the issue. Here's the mod list I'm using just in case one of them is causing the problem.

https://steamcommunity.com/sharedfiles/filedetails/?id=2277239459

Thanks.
FrozenSnowFox  [author] Jan 19, 2021 @ 9:40pm 
Thanks to Kayedon the patching was updated. Everything classified as a turret should be caught and have its reloading threshold set to 99% unless its specified. Just ensure this mod is loaded after everything else.

If you encounter refueling/reloading issues after this patch let me know. However since the patch checks for class that is exclusive to turrets it shouldn't cause problems.
FrozenSnowFox  [author] Jan 19, 2021 @ 7:51pm 
@Kayedon
That would be great. It might be easiest to discuss it on discord since you can paste code and such. I'm listed as a modder on the normal and official rimworld discord servers. So if you send me a message we can talk more.
Kayedon Jan 19, 2021 @ 7:45pm 
Hey FSF, I can assist you with a far similar patch scheme to support more mods with no additional work on your end besides changing how you perform your patch. Let me know if you're interested.
Gorgious Oct 12, 2019 @ 9:19am 
Thanks for the change to railgun, seems more efficient that way !
FrozenSnowFox  [author] Sep 14, 2019 @ 10:53pm 
@Dr Zhivago
Fixed, thanks for letting me know. I forgot about the turret complex's.
Dr Zhivago Sep 14, 2019 @ 10:40pm 
I believe you accidentally missed the complexs from Vanilla Furniture Expanded Security. Both the VFES_Turret_HMGComplex and the VFES_Turret_ChargeComplex. Unless it was intentional.
FrozenSnowFox  [author] Sep 11, 2019 @ 2:49pm 
@TheFatPuppers
Both of those are already included. It works on all vanilla turrets.
Dr. Ben Carson Sep 6, 2019 @ 3:54am 
ok thanks i will try it
FrozenSnowFox  [author] Sep 5, 2019 @ 7:53pm 
@Dr. Ben Carson
I can't say since I haven't tried it although I think it should be. Its a lightweight xml patch that only changes the when to refuel field. As long as its loaded after combat extended it should work fine. It would still only work on vanilla turrets and those listed under mod support though.
Dr. Ben Carson Sep 5, 2019 @ 7:47pm 
this is combat extended compatible?
FrozenSnowFox  [author] Sep 2, 2019 @ 5:20pm 
@NECEROS
I'm glad you like the mod and its nice to see modders willing to have it on their turrets by default.
NECEROS Sep 2, 2019 @ 5:15pm 
You know, I hadn't thought about this. I'm going to change my turret mod to do this by default. Great mod
pgames-food Aug 31, 2019 @ 6:12pm 
ok cool, thanks very much for the information,
yep - it could be that 1 or 2 extra shot which saves the battle (i mean the defence) :)
FrozenSnowFox  [author] Aug 29, 2019 @ 7:08pm 
@pgames-food
That value is the minimum amount of ammo allowed. So if you set it to .90 then it will only reload the turrets if its 90% or below. If that's how you want it then there's no issue and yes you can change it at will without worry. I set it to 99% because I hate my turrets missing even a single round. I believe the vanilla turrets and many others don't have any loss for reloading obsessively and if they do its probably 1 or 2 units of material at most (1 unit of material may count for 2 shots). The only ones you'll really notice a loss is ones that use something like components because blowing a component for 1 missing round is quite significant.
pgames-food Aug 29, 2019 @ 7:00pm 
hi this sounds like it could certainly be useful in prolonged battles... (maybe even in that Wave Mode mod too) :)

(sometimes a pawn might get locked into combat on the way to refill, or take some time, so by the time they actually do it, many shots might have been fired, so this is useful to reload.)

can i check how this works with the vanilla turrets (which use steel?)
it looks like we could edit the patch file xml value (without rimworld running) to 0.90 if we have some steel, and then change it back again to 0.99 when we have lots of steel, but wasnt sure if that will work or is it just best to leave it at 0.99?