Game mechanics/code question thread

LukaSlovenia29

Emperor
Joined
Mar 13, 2016
Messages
1,500
Hi. I thought that perhaps we'd benefit a thread for questions about how game mechanics work and game code is set up, and I haven't seen such a thread yet.

My first question is about the game determining where the first great prophet will spawn. In my current game, my pantheon was spirit of the desert. At first, the GP spawned in a city with no desert tiles, far away from my capital. I reloaded to see if it will change, and with the same course of events (I didn't suddenly meet a religious CS or sth like that), it spawned in another city, again far away from the capital. I reloaded again, and this time it spawned in my capital (with 3 improved desert tiles). Seemingly without any basis for different places.

So does anyone know about how the code/mechanics of GP first appearance works?

Thank you!
 
Usually the first Great Prophet appears in the city that produces the msot faith. In case of tie, maybe it's random but between the highest faith-generating citites (not sure about this last part)
 
Answer was on forum. I don't remember actually(but if u have free time u can read last 20 thread in main section).
The last(or the first after GP - just don't remember) city that gives faith to GP spawns GP. Something like that. In most cases it is a city that gives more faith, but not always.
 
Just downloaded source and look at code.
Don't know at which file to look(CvGameCoreDLL_Expansion1 or CvGameCoreDLL_Expansion2). Choose last.
So at CvGameCoreDLL_Expansion2 I found file with religion code and see such strings(and I don't have visual studio on this PC, so don't know with what defines DLL was compiled, so maybe I am wrong):

Code:
                iTempWeight = pLoopCity->GetFaithPerTurn() * 5;
                iTempWeight += theGame.getJonRandNum(15, "Faith rand weight.");

So it is almost always the best city + some small random. Like Myrrdin_Emrys says. If I looked at right place.
 
Last edited:
Hi, again.

Does anyone know how the "To the glory of God" reformation belief works now that non-founders benefit from reformation beliefs?

To the glory of God reformation belief is the one that enables you to buy any type of great person from the industrial era onwards, and you gain faith, science,..., upon expanding a great person, based on how much the religion has spread.

So my question is this: Do non-founders also gain faith, science,..., upon expanding a great person and how much do they get? Are they piggy-back riding on my efforts to spread my religion?

Thanks for the help!
 
Thanks for the reply! So Assyria, when expanding a GP, benefits from me having spread our religion to France in terms of number of cities following the religion? That seems different from all the other reformation beliefs, none of which grant converted Civs benefits for how well the religion has (been) spread (around the world)...?
 
I don't think Glory of God really needed this change. It was really good at just 20 per person, it can now get much higher. I love the change for the founders, but not on this belief.
 
I don't think Glory of God really needed this change. It was really good at just 20 per person, it can now get much higher. I love the change for the founders, but not on this belief.

This belief uses the same code as the founder GP belief, thus the change. If 5 per is too high, could nerf to 3/2.

G
 
This belief uses the same code as the founder GP belief, thus the change. If 5 per is too high, could nerf to 3/2.

G
Is moving them both back to the old version on the table?

I would personally like more options related to not spreading, and they both get really crazy if you spread enough
 
Is moving them both back to the old version on the table?

I would personally like more options related to not spreading, and they both get really crazy if you spread enough

I'm a big fan of consistency, and I like that all founder beliefs scale somewhat. IF this is truly a major balance issue I can create a new table for this reformation belief.

G
 
Oh, right. Then why have a reformation/another belief like that?
To the glory allows you to purchase all types of great people with faith, which is often more important than the yields themselves. You also can align Ceremonial Burial, Sainthood, and To the Glory for a powerful great person combo.
 
How is military might calculated? The number always seems to be a poor comparison to my army (mine is usually bigger in volume despite having a smaller score). Are defense pacts taken into account? Maybe the free promotions AI units get?
 
Are all of the difficulty level differences set in DifficultyMod.xml, or are there some that are set elsewhere? I'm trying to tweak the difficulty for a middle ground between King and Emperor, and I was wondering if the small numerical differences between the two account for the entirety of the steep difficulty spike.
 
Are all of the difficulty level differences set in DifficultyMod.xml, or are there some that are set elsewhere? I'm trying to tweak the difficulty for a middle ground between King and Emperor, and I was wondering if the small numerical differences between the two account for the entirety of the steep difficulty spike.

That's the only place.

G
 
Top Bottom