SPT4 is a growing collection of useful T4 templates that currently allow you to autogenerate field and contenttype ids from an elements.xml file for use with WSS3 Workflow Tools for example.
An autogenerated file is generated for each content type in the Elements.xml (currently only supporting a single elements.xml per project but straightforward to modify as you need) - each content type class containing the fields associated with that
content type definition. A default file contains just the internal field names and also Ids.
Using the excellent Manager.ttinclude file created by Damien Guard @ http://damieng.com/blog/2009/11/06/multiple-outputs-from-t4-made-easy-revisited and inspired by the two related projects t4sharepoint and imtech. I used
the T4 syntax highlighter made available free @ http://t4-editor.tangible-engineering.com/T4-Editor-Visual-T4-Editing.html.
If you have any requests let me know and I'll add them to available templates.