Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!

FTE PART NAMESPACES

From Quake Wiki

Revision as of 02:58, 24 October 2018 by 192.168.4.142 (talk) (Created page with "At their most basic, namespaces provide mods with a way to specify which file to read in order to load a desired particle effect. This avoids per-mod user customisation and ot...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

At their most basic, namespaces provide mods with a way to specify which file to read in order to load a desired particle effect. This avoids per-mod user customisation and other mess.

Particles loaded from user-controlled particle configs may use foreign namespaces in order to replace such mod-specific effects with custom ones.

To use, particleeffectnum("mynamespace.myeffect") will favour the use of 'r_part mynamespace.myeffect' if it is defined in any configs named by r_particledesc, and otherwise fall back on using the 'r_part myeffect' effect from eg particles/mynamespace.cfg - loading or downloading the file if necessary. (Note: the exact format+filenames for particles is engine-specific and there may be certain hardcoded namespaces with specific behaviours. The above is described in terms of FTE's particle system.)

Note that eg particleeffectnum("mynamespace.") (with the intentional trailing dot) will force the engine to load the named effect library. Any named effects that do not include any namespace may then match to effects within the 'mynamespace' effect library, if there isn't already some effect defined using that name from another namespace. Its generally recommended to just name the namespace in your particleefefctnum calls, but this is still a useful trick if you want compatibility with engines that do not understand namespace.