I like the idea of state-religion linking with an invisible Civic catagory, it will open up a wide set of options and alow religions to realy have some flavor. The downside is the inevitable "value judgment" on religions. As soon as you way one religions gives +1 of this and not that someone will be offended.
But I think I have a solution, its realy not my own idea I read it someware on these forums but I think I could make it happen with some help from others. The basic premise is that when a religion is founded the founder gets to choose a "gospel" for that religion which is perminently stamped on that religion. Any empire useing that StateReligion will recive the hidden Civic that coresponds with that gospel. It will be possible to have multiple religions each assigned the same gospel, the AI will choose the gospel of religions it founds based on simple flavor tags so the AI will tend to found and adopt religions which complement it. The gospel a religion has should also be able to modify the effects of all that religions buildings when this is combined with another mod I am planning. So for example if one chooses a religion to have a gospel of "learning" then that religions temples could give +5 research. Only temple of that religion would get the bonus.
Not only would this remove the modder from value judgment but it would also add a new wrinkle in the race-to-found-religions. Their is even more reason to be first as you can stear the gospel towards something which will complement your strategy and play style. Infact the whole corse of the game may be significantly altered if most of the religions are leaned towards a particualar gospel.
Lastly the scheem reflects myown view of the interation of religion, culture and state through the corse of history. I have always felt that religious teachings have been molded, shaped and to an extent distorted in their by the cutures that they arise in. Throughout history states have used religions to justify all mannor of horrors. I dont think its unreasonable to suppose that ANY religion could be twisted into meaning anything given enough interpritation.
Aussie: You have access to the CCP forum, yes? I recomend you grab my code off SF CVS, dev branch. I think a general summary of my method would be most helpfull. First I do a lot of research, I start in the XML with the tag for something I want to copy (in this case it was the specialist modifying ability of Angokor Wat) I search the SDK for the tag to find ware the data is going in the Info Class, from their I find ware the data is returned and then what functions are calling it and so on and so on untill I arrive at the Data member in the City/Player/Unit object thats geting modified. Once I have this chain established and understood I find the point inwhich my addition will be inserted, usualy its in the "Process" function such as ProcessTech and ProcessBuilding. I then start creating new data members in the object that will generate the new effect (Tech in this case), I do as much cut and paste from an example as possible. I rebuild the logic chain below the point of insertion untill it is nearly identical to the template I am using, lastly I splice the chain into the pre-existing chain. Once I have that all compiled and have run it to verify it dosn't crash I do the Schema, make some changes to XML and test for the effect to acctualy occur. Once thats debubbuged I move into the TextManager and make some output strings for the Civopedia.