Gifts and Demands: Answers in SDK?

Compromise

Emperor
Joined
Apr 17, 2006
Messages
1,601
You can demand money or techs of civs who are Pleased or Friendly with you. (You can do this with civs that are Cautious or worse, but you get a negative diplo modifier for your demand.)

There seems to be a hidden amount that the civ is willing to give you. For instance, if a civ has 200g available and you ask for it all, you might get denied. But if you had asked for 100g, the civ would have given it to you. But now that you've asked for 200g and been denied, it won't give you the 100g that it otherwise would have. (This can be confirmed by reloading and asking again at a lower level.) In fact, it seems like once you ask for something, you can't get anything at all from that civ for a while.

It seems like there must either be some turn counter that tracks how long it's been since your last request, or there's some ever-increasing amount that a civ is willing to give you...if only you ask for just the right amount.

I've searched through the threads to see if anyone has talked about this before, but I can't find anything. So, I have two questions:

1) Does anyone know more about this than what I've posted above?

2) Is the answer to this buried in the SDK somewhere? (Any hints welcome.)

Thanks.
 
I've often wondered about this. Does it work if you ask for 199 out of 200 gold for example?

I wonder if it also has something to do with giving into a demand/request from an AI, then they'remore likely to give into you.

This might just be me but everytime I've been in a game with Genghis he's come demanding money from me, I've said fine, he changed to pleased, then I ask for my money back, and he gives it to me.
 
That's a good idea $50-bag. I'll have to remember to try to use that.

And I'm assuming that the AI converts techs, world map, gold-per-turn and even cities into a gold amount that it is willing to give or concede. Is that right?
 
There is a 10 turns (I believe) to respect limit between demands if you want to get an agreement.
What influences the answer :
- relation
- power (yes even for pleased or friendlies).
How does it influence (= how many shall I demand?) is a big mystery to me.
 
This hidden thing is really dumb. Why should we be forced to play a stupid guessing game? There should be no effect whatsoever if we had asked for 200 gold the first time, gotten refused, and then asked for the 100 gold that the AI is originally willing to give. The AIs should only refuse to give more once they have given some money. For balance, maybe make it such that they remember your request for a longer period.
 
It seems like there must either be some turn counter that tracks how long it's been since your last request, or there's some ever-increasing amount that a civ is willing to give you...if only you ask for just the right amount.

I've searched through the threads to see if anyone has talked about this before, but I can't find anything. So, I have two questions:

1) Does anyone know more about this than what I've posted above?

2) Is the answer to this buried in the SDK somewhere? (Any hints welcome.)

2) Yes.

OK, almost anything where the behavior of a leader depends on what you have done in the past is associated with Memory; which usually works by adding plusses each time you do something, and rolling a random number every turn to see if that leader forgets a little bit of what you have done.

CvPlayerAI::AI_considerOffer is a useful starting point. That tells you that the memory being checked is MEMORY_MADE_DEMAND_RECENT. If the AI remembers a demand you have made, it won't give in to another one. If you look up that memory in CIV4LeaderHeadInfo.xml, I think you'll find that all the leaders have iMemoryRand=20, which translated to a 1 in 20 chance that the a particular AI leader will forget a previous demand you have made (you can look this up in CvPlayerAI::AI_doCounter().

A 1 in 20 chance means that about half the time, the AI will have forgotten your demand in 14 turns; but it could be forevvvvver.

If you get past that check, its just a matter of whether the goody you are asking for is lower than the threshold of what the AI will give away. The base is 50 + number of turns you have been acquainted, and then a bunch of multipliers (doubled for free, tripled again for land targets, multipliers for relative power ratings), then subtracting away what they've already given you for free....

It looks to me as though it doesn't matter if you ask for the moon at once, or in phases.

I haven't quite managed to entangle the diplo effects though - for human to AI interactions, it looks like the SDK dives back into the game engine (rather than staying in the bits where the source is published) - so for instance I can't quite tell from code inspection if the memory counter gets bumped when you request for a gift is turned down.
 
Ahhh. This is the info I was hoping someone familiar with the SDK could answer. Your answer is very helpful; thank you!

I suspect that the memory counter does get bumped if your request is denied.

(I'm basing that suspicion on the example give above: that you can ask for 200g and be refused then ask for 100g and again be refused. But if you reload, the AI might grant you your 100g request from the same starting point.)

It sounds like this is something that could be modded, whereby both the value of yes/no for whether the AI will give you a gift, and the value of that gift (after all appropriate modifiers) could be revealed. Is this correct?

Thanks again, VoU.

And I agree completely with aelf: Things like this could have a major impact on gameplay, and yet the player is forced to gamble when the rules of the game aren't even remotely clear, let alone documented.
 
Back
Top Bottom