RimWorld

RimWorld

Interception Tweaks
Atkana  [developer] 1 Jun, 2024 @ 1:28am
Making patches to prevent this mod handling certain projectiles
Sometimes there will be compatibility problems between this mod and others that use their own custom projectile code (apparently lasers are a common problem). In order to avoid these compatibility problems, you can make patches which tell the mod to not handle particular projectiles with its system.

I'm only a novice modder, so some of these instructions may be a bit lacking/wrong, but...

In order to make a patch, you need:
A) A patch file
B) The name of the mod
C) The ID of the projectile to patch

A - The Patch File
You can copy the already included compatibility patch file. Go to Steam\steamapps\workshop\content\294100\2880136489 to find this mod's files, then open 1.5/Patches/ to find the LaserEyePatch.xml. Copy that, rename it to something fitting, and open it. I'm not sure whether or not it's safe to place it in this mod's files (dunno if steam will remove it), otherwise you'll have to make a separate mod that contains the patch.

B - The Mod's Name
You need to locate the mod you want to patch's About.xml. There's probably an easy way to do this with a mod manager, but without that there's the manual method. Go to the workshop listing for the mod and check the url for a set of numbers just after ?id= and note it down. Navigate to Steam\steamapps\workshop\content\294100\, and find the folder with the numbers you've noted down. Then, open the About folder, and open About.xml. Note down what's in the name section.

C - The Projectile ID
While you're still in the mod's folders, you need to try and find the ThingDefs for the projectile the weapon uses, which is easier to find if you can find the weapon's def itself. You'll need to dig around, because there's no fixed formatting everyone uses for the folder structures. You should be searching in either Common/Defs or [GAME VERSION/Defs[/i], and looking into the xml files contained within. If you know the name of the weapon, you may be able to find the def with ctrl+f. Once you've found the weapon, look for the defaultProjectile value, and note it down.

Putting it Together
  • Open the patch file you made, if you haven't already.
  • Replace Vanilla Factions Expanded - Ancients with the name of the mod you noted down in step B.
  • Replace VFEA_LaserEyeBeam with the projectile id you noted down in step C

I'm unsure what you're supposed to do if you want to patch multiple things, because the wiki isn't clear on that information. I think you need to copy the whole Operation block for each thing you want to patch(?)
< >
Showing 1-1 of 1 comments
Chip56 1 Jun, 2024 @ 6:25am 
Thanks for that manual how to create a patch.

I created a patch for rimlaser: https://www.file-upload.net/download-15339331/rimlasertargetpatch.zip.html

I had to patch multiple bullet types there and to copy the whole operation block for each did work.
All three different tested weapon then stopped hitting the pawn/embrasure directly in front of them.

Regarding point A: saving the patch directly in your folder: I am pretty sure that it would work only as long as you dont update your mod. If you ever update it, steam would throw away all the changes another user would save there. So creating a new mod folder is definatly the way to go.

Regarding point B/C: You could also use a tool like wingrep to search for the mod. Wingrep allows to search in a folder (in this case the workshop folder) for files to contain a specific text. So if you for example only know that the problematic weapon is called "supermegadoomsdaylaser" (or whatever) you could search by that term and find the folder even if you dont know the specific mod that adds it. The addional advantage is that its most likly going to point you at the correct file already where you find the bullet point
< >
Showing 1-1 of 1 comments
Per page: 1530 50