Sorry for the generic title, but I actually got a heap of different questions on modding RFC. I'm quite experienced in changing the XML files now, but everything concerning Python or C++ are rather a mystery to me (less because of the languages' syntax, but because of lack of knowledge where Rhye implemented his features).
1. Civics
I decided to completely redo the civics, mainly to allow more realistic combinations and to have common RL civic combinations correspond to viable ingame strategy ("western" capitalist democracies for cottage economy, socialism/communism for specialist economy, fascism for wars). Most features of the original civics stayed the same and have only been moved around a bit.
My question is:
First: where did Rhye code his extra features for certain civics (instability from transition to democracy / out of communism and great depressions for free market). They don't seem to be tied to the XML tags, but rather to the position of the civic in the civics screen. I'd like to change that so the effects occur with the right civics again.
Second: The same for civic related stability. It's difficult to see just from the civilopedia, but I fear that this isn't working correctly either.
Third: Is it possible to somehow increase the food or hammer yield for certain specialists? Unlike for wonders, XML seems to offer no possibility do this.
Fourth: Is it possible to forbid certain buildings for a certain civic? I'd like to implement a religious civic that represents "pagan" polytheistic beliefs like the Greek pantheon and has no state religion and cannot build religious buildings, but instead gets +2 happiness from Monuments (which I have renamed Pagan Temples).
2. Dynamic names
Same question again, where can I find the algorithm that makes them? I guess my new civics will cause some inconsistencies there, and I also want to make some other changes there.
3. Replacing civilizations
I know those questions can get annoying, but I also want to get the holy grail of a new civilization.
I plan to replace Germany with the HRE to represent "medieval" Germany (easy with just some XML) and to have Prussia spawn in 1700AD to represent "modern" Germany (difficult
).
I'd also like to make Byzantium take Celtia's slot in both scenarios and be playable (the Celtic cities will spawn as Natives, which works just as well).
I am aware of the fact that I can't add a completely new civ and will have to replace another one for them. I'd like this civ to be the Maya, since I consider them to be most disposable. Will problems arise from Prussia taking their slot (first simply because of the order the civs are listed)?
Of course, I'd also have to tweak the Mayan/Prussian research/happiness/production whatnot penalties ... where can I access them?
Stability/settler/war maps are another problem. To save me some trouble, I thought I could give Byzantium the same maps as Rome and Prussia the same maps as Germany/HRE. Is that possible, and if so, how?
UPs and UHVs are a thing of the future, but Prussia should inherit HRE's goals and power. Where can I access them?
In short: where can I access EVERYTHING?
I know that my plans are ambitious, but hey, you first have to fail before you see what's possible
So I'll be thankful even for an answer to just a single of my questions 
Thanks in advance.
1. Civics
I decided to completely redo the civics, mainly to allow more realistic combinations and to have common RL civic combinations correspond to viable ingame strategy ("western" capitalist democracies for cottage economy, socialism/communism for specialist economy, fascism for wars). Most features of the original civics stayed the same and have only been moved around a bit.
My question is:
First: where did Rhye code his extra features for certain civics (instability from transition to democracy / out of communism and great depressions for free market). They don't seem to be tied to the XML tags, but rather to the position of the civic in the civics screen. I'd like to change that so the effects occur with the right civics again.
Second: The same for civic related stability. It's difficult to see just from the civilopedia, but I fear that this isn't working correctly either.
Third: Is it possible to somehow increase the food or hammer yield for certain specialists? Unlike for wonders, XML seems to offer no possibility do this.
Fourth: Is it possible to forbid certain buildings for a certain civic? I'd like to implement a religious civic that represents "pagan" polytheistic beliefs like the Greek pantheon and has no state religion and cannot build religious buildings, but instead gets +2 happiness from Monuments (which I have renamed Pagan Temples).
2. Dynamic names
Same question again, where can I find the algorithm that makes them? I guess my new civics will cause some inconsistencies there, and I also want to make some other changes there.
3. Replacing civilizations
I know those questions can get annoying, but I also want to get the holy grail of a new civilization.

I plan to replace Germany with the HRE to represent "medieval" Germany (easy with just some XML) and to have Prussia spawn in 1700AD to represent "modern" Germany (difficult

I'd also like to make Byzantium take Celtia's slot in both scenarios and be playable (the Celtic cities will spawn as Natives, which works just as well).
I am aware of the fact that I can't add a completely new civ and will have to replace another one for them. I'd like this civ to be the Maya, since I consider them to be most disposable. Will problems arise from Prussia taking their slot (first simply because of the order the civs are listed)?
Of course, I'd also have to tweak the Mayan/Prussian research/happiness/production whatnot penalties ... where can I access them?
Stability/settler/war maps are another problem. To save me some trouble, I thought I could give Byzantium the same maps as Rome and Prussia the same maps as Germany/HRE. Is that possible, and if so, how?
UPs and UHVs are a thing of the future, but Prussia should inherit HRE's goals and power. Where can I access them?
In short: where can I access EVERYTHING?

I know that my plans are ambitious, but hey, you first have to fail before you see what's possible


Thanks in advance.