Well, I wanted to not have a stupidly long list on stuff in the code.
Idea runs strangely. Try to follow code or the explanation or both.
Code:
mob
[]Infantry Template
[][]var
[][][]MaxHP = 0
[][][]HP = 0
[][][]Etc? = 0
obj
[]Infantry Placeholder//name goes here amirite?
[][]var
[][][]name = null //this is IMPORTANT
[][]verb
[][][]Spawn() //called when the mob is made
[][][][]var/mob/Infantry Template/J = new (locate(src))
[][][][]J.MaxHP = readline(find(<pathtofiles>\'usr.name()Infantry.txt', 'src.name')) /* you get the idea? It searches the file where the vars are saved for the name, reads the next line, which is the MaxHP, so on and so forth to fill out the template. There's probably a better way, and this is making ♥♥♥♥ up, but I'm just saying that this is the general theory. */