Skip to content


Intitial FGD library available

I finally managed to tear myself away from the Google AI Challenge and packaged up some stuff for FGDs. Check the Hl2Parse project page for more.

Quick code example:

File src = new File("test.fgd");
FgdSpec spec = new FgdSpec();
// If test.fgd uses an @include statement to 
// get another FGD, the DefaultLoader 
// will automatically handle it.
DefaultLoader.fillSpec(src,spec);
// Now you can pull information from spec
for(String name : spec.getEntClassNames()){
    FgdEntClass eclass = spec.getEntClass(name);
    System.out.println("Class "+name+" found of type "+eclass.getType());
}

This should give you output like:

Class base_prop_thing found of type BaseClass
Class prop_thingy found of type PointClass

Posted in Programming.

Tagged with , .