Mkentitypatch is a system Valve has used internally to make and parse .pat files, which are an alternative to .lmp which only requires you to include the changes you want instead of the entire entity lump. They do not require you to edit a header as well.