The Templatizer is described here:
http://wiki.spaceempires.net/index.php/Templatizer
Basically it's a formula parser similar to the one found in SE5 (though unlike with SE5, you CAN define custom functions in python

), and it outputs SE4-readable data files when given files which look like SE4 data files but have formulas enclosed in curly braces.
The download link is currently broken because I don't have the templatizer on my machine at the moment - anyone else have it handy? It's just a python script with a readme and some samples, and I don't feel like installing the hard drive that I think it's on just to retrieve it right now, unless you REALLY want to use it
edit: aha! I found it included with the Low Tech Mod on PBW! No readme or examples, but the documentation on the wiki page should be decent enough

I'll put it up now:
http://kolis.dyndns.org/se/templatizer.py.zip