albinobigfoot wrote: ↑Mon May 08, 2023 5:43 pm
Sorry if you've answered this question before, but how would I go about adding dynamic lights to mod weapons that don't have them? (e.g. muzzle flashes and projectiles)
That all depends. If you want Relighting to do this, then it generally adds lights to actors with sprites large enough to cast a shadow. This is most dramatic with missiles, since their dynamic light often changes shadow direction. These lights exist for the life of the object, and for very small objects may not last very long if at all. The light color is taken from average GLDEF colors associated with the actor (Relighting reads
all GLDEF lumps, and the order of load can change a color if there are multiple definitions). Default color is white.
A few Settings will affect this. One is Min Sprite Size, which determines how small an object has to be to generate a shadow / light. This is also adjusted in WorldLoaded if there are too many map actors. Next are Missile Lights Size and Other Lights Size. Generally Size determines the size (or intensity) of the dynamic light, and Scale determines the effect on shadows. Defaults highlight missiles, which are both dynamic and dramatic objects. I haven't tried playing around with these to see if tiny objects can emit significant light, although I don't see why it can't be possible.
Muzzle flashes and other player sprites are drawn on the HUD and are not actors per se. These are ignored (at present) by the mod, although missiles etc. spawned by the player follow the above.
As Enjay points out you can write a custom GLDEF lump for your purpose. Since Relighting reads all GLDEF lumps, it's possible to have one lump that enhances multiple mods. I haven't tried that either.
Hope that helps!