Knighttime
Prince
- Joined
- Sep 20, 2002
- Messages
- 380
I'm trying to track down the details of how the game determines the actual shields required for tribes to build units, improvements, and wonders at any point in the game. The numbers listed for each item in Rules.txt are always multiplied by another number to determine the true cost, and it's the way that other number is determined that interests me.
I'm running Test of Time, with TOTPP, in case that matters. But it seems likely that the formula is the same as in earlier versions.
I know that (a) the base number of shield columns is established by the fifth number in @Cosmic (labeled "# of rows in shield box" although that's misleading since it's really columns, not rows). In Lua this is accessible as civ.cosmic.shieldRows. This is the sole number used to calculate the true cost for you as the human player.
But for AI tribes, (b) this is modified by the difficulty level. I think the following numbers are correct?
Chieftain: 150% of base
Warlord: 130% of base
Prince: 120% of base
King: 100% of base
Emperor: 90% of base
Deity: 80% of base
I don't recall exactly where I found these documented -- and please let me know if these numbers are off.
Side question: does anyone know if it is possible to access a game's current difficulty level programmatically, from within a Lua script? That would be very helpful...
However, I think there is one more factor that is almost never mentioned. (c) In some of my saved games, I noticed that AI cities had 2 fewer columns than they should according to the difficulty level. After a lot of searching online, I came across a comment saying that this additional "-2 column" bonus is given to all AI tribes when your power rating (as the human player) is Supreme. I wish I had noted where I found this information -- I didn't do so and now I can't find it again, unfortunately.
It does seem to be true that in all the cases where I noted this additional AI bonus, I was indeed Supreme. The problem is that I can find other saved games where I am also Supreme, and yet the AI is not receiving the bonus.
So I'm left wondering... what else is required to trigger this? Do you have to be Supreme for X consecutive turns? Does it only apply after turn X in the game? Does it only apply after you've discovered tech X? (or after any tribe has discovered tech X?) Is it looking deeper than simply "are you Supreme" and referencing the actual numeric power rating, perhaps to say your score must be X% higher than anyone else's?
If anyone is aware of existing documentation about this topic, or has information related to any of the above, I'd love to hear about it. Thanks!
I'm running Test of Time, with TOTPP, in case that matters. But it seems likely that the formula is the same as in earlier versions.
I know that (a) the base number of shield columns is established by the fifth number in @Cosmic (labeled "# of rows in shield box" although that's misleading since it's really columns, not rows). In Lua this is accessible as civ.cosmic.shieldRows. This is the sole number used to calculate the true cost for you as the human player.
But for AI tribes, (b) this is modified by the difficulty level. I think the following numbers are correct?
Chieftain: 150% of base
Warlord: 130% of base
Prince: 120% of base
King: 100% of base
Emperor: 90% of base
Deity: 80% of base
I don't recall exactly where I found these documented -- and please let me know if these numbers are off.
Side question: does anyone know if it is possible to access a game's current difficulty level programmatically, from within a Lua script? That would be very helpful...
However, I think there is one more factor that is almost never mentioned. (c) In some of my saved games, I noticed that AI cities had 2 fewer columns than they should according to the difficulty level. After a lot of searching online, I came across a comment saying that this additional "-2 column" bonus is given to all AI tribes when your power rating (as the human player) is Supreme. I wish I had noted where I found this information -- I didn't do so and now I can't find it again, unfortunately.
It does seem to be true that in all the cases where I noted this additional AI bonus, I was indeed Supreme. The problem is that I can find other saved games where I am also Supreme, and yet the AI is not receiving the bonus.
So I'm left wondering... what else is required to trigger this? Do you have to be Supreme for X consecutive turns? Does it only apply after turn X in the game? Does it only apply after you've discovered tech X? (or after any tribe has discovered tech X?) Is it looking deeper than simply "are you Supreme" and referencing the actual numeric power rating, perhaps to say your score must be X% higher than anyone else's?
If anyone is aware of existing documentation about this topic, or has information related to any of the above, I'd love to hear about it. Thanks!