by Spike » Fri Oct 30, 2009 4:34 am
Logically, there are two sorts of CSQC mod.
Hud-only (perhaps including in-game menus), and full mods.
Hud only mods need stats builtins, and 2d drawing builtins. String manipulation builtins are a real bonus. Anything else isn't strictly required for them. The 3d builtins can be nooped safely enough tbh.
Avirox has a TF mod using such a csqc progs. If the client supports csqc, they get slightly richer menus and an extended hud. If the client doesn't support it, then they don't get any of that.
Extra info is sent via stats, the csqc doesn't need to do anything about any entities at all. Just pure reading stats and drawing 2d stuff.
With the basic example code that was on the wiki ages ago you get one QC file which is basically a black box. Which calls into the hud code to draw some stuff.
The other sort is more complete, with full ent/scene/property/spawning/traces/etc. There is muuuch more work needed here to get everything working.
The black box that was present in the other sort of csqc mod is opened up, and the modder can start using the draw functions to add entities to the 3d scene.
But yeah, an engine could potentially add partial support and treat the builtins that form the black-box part as a no-op. The mods could use custom huds to provide custom bits and bobs which would not always be dependant upon (even partial) csqc support itself.
But yeah, a partial csqc implementation can still be useful, which would not involve breaking apart the renderer at all. Full and complete support would require that, however, but most mods would never need it, tbh.
You can find an example of models-on-hud in FTE's svn at trunk/quakec/csqctest, as part of my attempt to make a q3 hud.
Even the sample implementation is not complete. :/
.