Where's that file located?
Here you go.
Where's that file located?
An example on relative values.
Say Civ A wants to buy horses from Civ B.
Civ A has 4 horses and produces 21 gold per turn.
Civ B has 12 horses and produces 14 gold per turn.
Case 1 horse.
Civ A values 1 horse as 1 on 5 horses it will end up with. Since horses is the only strategic resource this far, it means increasing strategics by 20%.
Civ A might be willing to pay a maximum of 20% of its gold production, so it will pay no more than 4.2 gold per turn for 1 horse.
But since the horse is wanted for a horsemen unit, then the cost of maintaining that soon to be unit has to be included. Say it will cost 1 gpt in maintenance.
Then Civ A will pay a maximum of 20% of its spare gold production (20 - 1) * 20%, so 4 gpt.
Civ B values 1 horse as 1 on 12 horses it has connected. Selling one horse means reducing strategics by 8.3%.
Civ B might be wanting to receive a minimum of 1.26 for that horse.
Theoretically, a fair price would be the average, 2.63 gold per turn for 1 horse.
Case 2 horses
Civ A values 2 horses as 2 on 6, so a 33% increase. 2 horsemen will take 2 gpt from budget.
Civ A will pay no more than 6.3 gold per turn.
Civ B values 2 horses on 12 horses it has, as 16% of strategics.
Civ B wants a minimum of 2.78 gold per turn.
x / (14 + x) = 0.166 <==> x = 0.166 * (14 + x) <==> (1 - 0.166) * x = 14 * 0.166 <==> x = 14 * 0.166 / (1 - 0.166) = 2.78
The average is 4.54 gold per turn for 2 horses, so every horse costs 2.27 gpt.
Case 3 horses
Civ A values 3 horses as 3 on 7, so 42.8%. Say 3 horsemen cost 3 gpt in maintenance.
Civ A will pay as much as 7.7 gpt.
Civ B values 3 horses on 12 as 25%
Civ B wants a minimum of 4.6 gpt
Average is 6.15 gpt for 3 horses, so every horse costs 2.05 gpt.
Case 4 horses
Civ A values 4 horses as 4 on 8, so 50%. 4 horsemen is 4 gpt in maintenance, so 17 spare gold per turn.
Civ A will pay as much as 8.5 gpt.
Civ B values 4 horses on 12 horses as 33.3% of its strategics.
Civ B wants a minimum of 7 gpt
Average is 7.75 gpt, 1.93 gpt per horse.
Case 5 horses
Civ A values 5 horses as 5 on 9, so 55.5%. 5 horsemen is 5 gpt in maintenance, so 16 spare gold per turn.
Civ A will pay as much as 8.9 gpt.
Civ B values 5 horses on 12 horses as 41.6 % of its strategics.
Civ B wants a minimum of 10 gpt, making the deal impossible.
I've only considered the cost of the horsemen maintenance, but maybe their purchase/production could be factored in.
Even if civ A is able to purchase 4 horses, it will take a time before it can produce 4 horseman, making this deal less appealing.
No, it is not. The values change from era to era, and from map sizes, and that's a source of weird deal offerings.I think we are getting a little complicated here. I think its fine to define the standard value for strategics (aka the normal "fair" price). And then put in some simple logic that says:
1) IF AI has more than X of certain strategic, they are willing to sell at Y% markdown (Y doesn't have to be complicated, could just be 15% or something whatever makes it enticing).
2) If AI has less than X of certain strategic, willing to but at Y% markup
int iItemValue = 10 + (2 * GC.getGame().getCurrentEra());
If you've built the Apollo Program AI assumes you're going for Science Victory and acts accordingly.
Science victory would otherwise be very "hit next turn" IMO.
I've been buying a lot of votes in my current game. So works for me at least.
Is this with vassals? I am able to trade deals for WC votes with most non-vassal CIVs, but vassals will never accept anything in exchange for their WC vote.
I wonder why vassals in particular have a difficult time with it, then. Hmm. Are they consistently hostile/guarded from mistreatment?
I wonder why vassals in particular have a difficult time with it, then. Hmm. Are they consistently hostile/guarded from mistreatment?
Y, I can't buy any votes from vassals too. If their votes are already sold then it shouldn't appear on the trade screen, just like resources.
If you've built the Apollo Program AI assumes you're going for Science Victory and acts accordingly.
YesSo the item is visible, but it's telling you deal vaue is 'Impossible'?
/// What is the value of trading a vote commitment?
int CvDealAI::GetVoteCommitmentValue(bool bFromMe, PlayerTypes eOtherPlayer, int iProposalID, int iVoteChoice, int iNumVotes, bool bRepeal, bool bUseEvenValue)
{
int iValue = 100;
if(iNumVotes == 0)
return INT_MAX;
//vassals get out!
if (GET_TEAM(GET_PLAYER(eOtherPlayer).getTeam()).IsVassal(GetPlayer()->getTeam()))
return INT_MAX;
if (GET_TEAM(GetPlayer()->getTeam()).IsVassal(GET_PLAYER(eOtherPlayer).getTeam()))
return INT_MAX;
Why? Vassals should never sell votes for a World Leader if it's their master?
Oh, rightAren't they required to vote for their master? If so, they shouldn't be selling their votes.