coding help

im hoping to learn how to code lua for gmod. But I was wondering, is there a tutorial on how to create a new npc class, sort of how dansnpc pack, ya know with the doom hell knight and the doom imp and such? I looked at the files in his addon, im not sure what I sould be making… does any one know of a tutorial?

The GMOD wiki is a benefit to nerdkind