Another Q3A question

Ok, I’m making my own OpenGL game engine and I’ve implemented a shader system that is inspired by (and extends) Q3A’s shader system. All is well except for one nagging script command, alphagen lightingspecular. Does anyone have any idea how one should implement that? I’ve tried many things, the most ambitious being deriving the alpha values for each vertex from the vertex normals in clip space. But the resulting effect was not correct. All suggestions will be heard, thanks!