RimWorld

RimWorld

Projectile Bullet Retexture
Nyanko-re 17. juli 2023 kl. 4:49
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.
< >
Viser 1-1 af 1 kommentarer
Nomad D  [udvikler] 14. okt. 2023 kl. 1:23 
Thank you for code // Sorry I didn't reply to you due to not receiving notifications and being very busy with my work
< >
Viser 1-1 af 1 kommentarer
Per side: 1530 50