RimWorld

RimWorld

Projectile Bullet Retexture
Nyanko-re Jul 17, 2023 @ 4:49am
Patching most mod-added bullets at once
Since (from what I've seen) most mod-added bullets have BaseBullet as a parent, I think it might be possible to patch most mods with one patch.

A PatchOperationAdd with this code should target every ThingDef that (1) has BaseBullet as a parent and (2) doesn't already have a shaderType node:
<xpath>Defs/ThingDef[@ParentName="BaseBullet"]/graphicData[not(shaderType)]</xpath>
<value><shaderType>MoteGlow</shaderType></value>

One caveat with this method is that if a mod adds arrows or grenades that inherit from BaseBullet, this will make them bright too. Shouldn't be an issue since arrows and grenades usually inherit from BaseProjectileNeolithic or BaseGrenadeProjectile instead of BaseBullet, but in some cases it might be necessary to patch them.
Still, it's a minor issue that's easily ignored or patched out, and patching out these edge cases is probably less effort than finding and patching every bullet.
< >
Showing 1-1 of 1 comments
Nomad D  [developer] Oct 14, 2023 @ 1:23am 
Thank you for code // Sorry I didn't reply to you due to not receiving notifications and being very busy with my work
< >
Showing 1-1 of 1 comments
Per page: 1530 50