XML tags for the Planetfall Leaders

The AI does seem much more aggressive. They seem to be demanding tribute a lot more. In fact I met Lal and Miriam around the same turn. Having built the unity observation bay they both demanded I share my world map with them. Not a chance. Later on they both DoW'd me on the exact same turn.

Hmm, this seems to imply there is no randomness in AI demands and reactions re map trading.
 
I have now acquired some data regarding AI unit strategies from an BTS game (with an older version of unofficial patch installed, but I don't think this has much impact and if - it's only an optimized version of the AI) The three screenshots show the AI unit distribution in turn 100, 150 and 200.Regarding ongoing wars:

In turn 100: no wars
In turn 150: Mansa Musa vs. Cyrus, Mehmed, Hannibal, Louis
In turn 200: Mansa Musa vs. Cyrus, Mehmed, Hannibal, Louis and Me vs. Sitting Bull

My observation is that the ratios we have in Planetfall are common for peace-time AIs (first table), but not if an AI actually wages war (see secon and especially third table) - so it is no wonder that AIs don't leave the WHEOOHN in my games and declare war. The only thing I don't get is why this seems to be different in games of others, especially with lower difficulty... It would be really interesting to exermine such save with the debug mode, just to see if the unit distribution is different.

So here is my call - if anyone has a save of an "aggressive" game (means a lot of AI declarations vs. the human player or other AIs) with v10 around, please post it! Needs not to be necessarily before a war brokes out. Thanks!

Maybe it's just the expections we have from SMAC, were very early DoWs were common. The BTS AI engine favors AI build-ups and later declarations a lot more, so that might be the reason why we see few early strategic war declarations - playing 200 turns into a BTS or Planetfall game is just a different story. That leaves us with the diplomatic reasons, e.g. declaring after refused tributes...
 

Attachments

  • AIUnitTypes-BTSstandard100.jpg
    AIUnitTypes-BTSstandard100.jpg
    42.9 KB · Views: 99
  • AIUnitTypes-BTSstandard150.jpg
    AIUnitTypes-BTSstandard150.jpg
    44.2 KB · Views: 114
  • AIUnitTypes-BTSstandard200.jpg
    AIUnitTypes-BTSstandard200.jpg
    44.1 KB · Views: 101
Good news! :) DanF5771 has posted his findings regarding the strange AI behaviour and showed how he brought the AIs to declare war in that save (he deserves credit for doing that, IMO) - it is both the unit strategy distribution I suspected (in connection with the fact that I have made total wars more likely, which require serious SoDs) and Dan's first idea of pathfinding troubles with impassable terrain, different movement of units and the water movement of land units:

http://forums.civfanatics.com/showthread.php?p=8167872&posted=1#post8167872
 
Very interesting information indeed! :)

I'll have to think a while what the solutions for these problems could be though. For I still don't have a clue why the AI stresses certain unitAI types more, or how to make the units not walk around in circles between water and land.
 
Kitsune has reported Lal likes you better for having a different religion! Is this a consequence of the leader XMLmodifications?
 
I have found the reason why the AI only spams city defenses. The AI only builds offensive units when the unit costs are under a certain percentage of the total expenses. Because in Planetfall unit costs are a larger part of the expenses, this means the unit costs are always too high, so the AI thinks...

I have modified it so that the AI compares its unit costs with its total commerce production instead. In my AI autoplay game two war declarations happened in the first 110 turns, and those who declared war had a decent number of attack units. I guess that's a good sign.

Who knows further playtesting may show the AI is now *too* agressive. In that case some leaderhead values may have to be re-examined again.
 
Pfeffersack said:
though we might consider to use some unit flavours to further emphasize leader personalities (e.g. some leader going for offensive units in general, other laying emphasize on city raiders or pillagers)

Depends on what you have in mind. I'm wary of making flavour changes if they make the AI play worse. Rather my goal is to make flavourous gameplay at the same be smart gameplay.

The new Spartan promotion probably would make them better pillagers, for instance.
 
I'm experiencing an interesting game with the latest patch!

I'm playing as the Spartans and gave myself a random team mate so I could observe AI behaviour better (turned out to be Lal). So that at least some AIs would be able to compete with my team's tech research, I also created a team of Miriam & Morgan.

I fixed AI attack unit production in this patch, and boy, am I feeling it!

Miriam (and thus Morgan) declared war on me and sent a large stack in my direction. On the same turn the University declared war on me - must have been a dogpile declaration.

I had four bases at that point. The base closest to Miriam had a group of Rover/Armor. Unfortunately Miriam's stack was bigger, so I couldn't hope to keep it. If this were vanilla Civ4, losing that base (my second biggest with many buildings) and all its infrastructure would have been de facto game over. In Planetfall however a base's infrastructure is left 95% intact upon capturing it, which means keeping your army alive is more important to the war outcome than keeping control of all your bases at any cost.

So instead of trying to defend Survival Base at all costs, I evacuated the base defenses and exploited the rover/armor group's mobility to go attack one of Miriam's bases elsewhere.

Meanwhile though Zakharov had sent a single Plasma Thrower to my two other bases which were only defended by a single Flame Thrower or Infantry. So I lost both of those too. I was left only with my Headquarters Sparta Command at one point! Fortunately Sparta Command is a production powerhouse and I was able to build up my military fast. I have been able to recapture two of my bases - one is still under University control though. And that Believer base Great Conclave has now switched hands between me and Miriam several times already. Miriam/Morgan still has a greater quantity of units than I have, and Zakharov has a greater quality (Plasma Thrower), so I have no idea yet how this war will develop.

I love this kind of dynamic and opportunistic warfare, attacking the weakest target instead of turtling inside your bases. This would not be possible with base infrastructure being lost upon base capture, or with the Scattered Landing Pods option.
 
Interesting report and it is kind of what I experience in my current game as well (with SLPs off, but it feelable with that option turned on as well - especially the ideological leaders don't care much about proximity of a target). AIs now frequently execute their war plans - and despite I'm playing Emperor, which made me fear that would be always their target, there is a lot of AI infighting as well. Especially dogpile DoWs (bribery of another AI into the war right from the start) are common (might be a result of the codefix for this in the 3.19 patch).

I currently don't have the impression that there are too many wars, except maybe the ones caused by refusing tribute. I think a right value is one that makes it a gamble, if you get away with not paying tribute - but currently, 4 out of 7 leaders have a 40%+ chance to DoW after a refused war, which almost forces you to pay tribute to stay at peace. I'm inclined to reduce that to max. 25% and only Yang will have that value, the others will range between 10-20%. I'm more a fan of the AI picking its targets strategically, anyway.

But I would love to here some other opinions...

Does the war/peace balance now feel better?
Too many wars overall? Too many after refusing tribute?
If AIs declare (exspecially on you, the human player) - do they do it in a resonable way or do they overetsimate their chances too much?
Does attitude matter enough or do you feel that you get attacjed too often, while having decent relations?

Here is BTW the file I'm currently using...it concentrates on further sharpening the contrast between the leaders, some examples:

- Yang (more isolationistic - major wars only vs. neighbours, cares less for ressource trade/OBs, more suspicious if someone has different religion, easier to appease if you obey his demands)
- Santiago (almost no ideological leaning, values shared wars and DPs more, can be bribed into wars even if relations are bad, does not trust leaders with different religions, also easier to appease)
- Morgan (strong emphasize on keeping peace, OBs and ressouce trading; does not care about religion at all)
- Lal (also into liberty and trade; tolerant if someone has different religion)
- Zhak (religon as ideology)

I also did a lot of changes to the increments in which relations detoriate or improve for a certain situation - it takes e.g. a lot of time to get the full same-religion-boost with Deidre or Miriam.
 

Attachments

Thanks for the update Pfeffersack! I had a look at the Excel file. Some cool changes!

Though there are also a few changes I don't understand the logic of.

First of all, even if the effect is small, I think all leaders should care at least something for all the usual relationhip modifiers: same/different religion, using favourite civic, open borders, resource trades...

One example: I think Santi and Zak should care about people following their favourite civic. I would suggest that Lal cares more and Yang cares less (a fellow dictator is still a rival), but that the other factions should care an equal amount about their favourite civic.

I don't understand why you made Yang and Zak ask more frequently for a religion change. Especially Zakharov, of all the factions it seems he would care least about the five religions/ideologies. His ideology is knowledge and free flow of information. My suggestions would be: Dee and Miriam care most about religion. Zakharov cares least. The others are in the middle group. This counts for both same and different religion. Exception: Lal. He is in the middle group for sharing a religion, but cares just as little as Zak for having a different religion. Again, I do feel they should all care at least something.

I noticed Yang now remembers it longer if you gave him tribute.
Do you know how relationship boni/penalties with a memory limit work? I've never really paid much attention to those. I don't see a way to affect the height of the relationship effect. Am I right you can't currently affect that? Also what happens when you for instance trade tech while you already did the same thing recently? Do you get the relationship bonus twice, or is the period before the bonus expires just extended? If it's the latter, I'd consider making it (in the SDK) so that appeasing Yang gives a higher relationship bonus, not just make the bonus last longer.

The same thing could be done for Zakharov: the relationship bonus for trading techs with him could be much higher.

Someone suggested a while back that Zakharov should be able to ignore tech brokering restrictions. I considered that a bad idea because then the human players would be disinclined to trade techs with him, the opposite of what I'd like to achieve. If trading techs with Zak would lead to a much higher relationship bonus however, then it would be worth still to trade techs with him, even if it carries the chance he will broker one of your techs.

Back to Yang: IIRC the AI only asks human players for tribute. So if the main way to please Yang would be to pay him tribute, then Yang would be unable to get along with other AIs. So I was thinking Yang should also have a better opinion of players weaker than him - they're harmless, they don't form a threat to his power. Yet at the same time he should still be just as willing to attack those weaker than him. (Is this possible?) So if a weak AI faction was close to Yang, the way to continue those 'good relations' with Yang would end up being forced vassalization... ;)

Summarized, this would mean there's a clear and distinct way to please each leader:
Deirdre/Miriam: sharing religion
Lal: sharing his favourite civic
Santiago: sharing wars
Morgan: trading resources
Zak: trading techs
Yang: paying tribute

As a final note, why does the AI seem to sneak-plan wars more often when refusing a demand compared to vanilla Civ, even though the odds for it are lower here? Or am I just paying more attention to it now?
 
First of all, even if the effect is small, I think all leaders should care at least something for all the usual relationhip modifiers: same/different religion, using favourite civic, open borders, resource trades...

No problem to do this, though religions are a special case here - even if the effect (both positive and negative) is set to 0, there will be still a +1 or -1, if the AI has the shrine of its faction religion (this seems to be hard-coded, at least it is not accesible from the leaderhead.xml) - which is quite common for PF, especially after the change regarding religion spread.



One example: I think Santi and Zak should care about people following their favourite civic. I would suggest that Lal cares more and Yang cares less (a fellow dictator is still a rival), but that the other factions should care an equal amount about their favourite civic.
I don't understand why you made Yang and Zak ask more frequently for a religion change. Especially Zakharov, of all the factions it seems he would care least about the five religions/ideologies. His ideology is knowledge and free flow of information. My suggestions would be: Dee and Miriam care most about religion. Zakharov cares least. The others are in the middle group. This counts for both same and different religion. Exception: Lal. He is in the middle group for sharing a religion, but cares just as little as Zak for having a different religion. Again, I do feel they should all care at least
something.

I did those changes because of the recent discussion about "religion=ideology for some leaders?" - that's why I said that point always causes confusion for me ;)

But I understand your logic (though I would seen Morgan as a similar character in this regard - he might care for others running Free Market, but for religion? Except we think of him as seeing religion as a kind of business...)

I would suggest an impact of +/- 2 (weak), 5 (middle) and 8 (strong), reduced by one for religion because of the shrine impact. Sadly there is yet no possibilty to give a penalty for running the wrong civic :(



I noticed Yang now remembers it longer if you gave him tribute.
Do you know how relationship boni/penalties with a memory limit work? I've never really paid much attention to those. I don't see a way to affect the height of the relationship effect. Am I right you can't currently affect that?

No, it is already possible to set how strong the impact on relations should be - everything under "MemoryAttitudePercents" deals with that (so my change for Yang just means that you get +2 for each accepted demand or request) The question of "How long does an effect last?" is set under "MemoryDecays" (which I haven't touched yet), though not all factors listed under "MemoryAttitudePercents" appear here - and the missing ones (like -3 for declaring war) are the eternal boni/penalties.

There is one item for which it is reversed, it is "MEMORY_RECEIVED_TECH_FROM_ANY" - I assume it deals with the penalty for trading with the worst enemy, but I don't understand why I can't it strength (maybe it is tied to the postive impact of tech trading with that leader?)

I assume that the "eternal effects" can be turned into decaying ones, if the needed tags are added, but I haven't tried (BTW, I would suggest that for for some things like the war declararation - this should take extremly long to wear of, but it should be possible).
About decaying...I'm pretty sure that the numbers are 1/x chances per turn (and not fixed time periods in turns), though I'm not sure if the chance hitting means the entire boost/penalty is gone or just one modifier point (though I supect the latter). There is info about this on civfanatics, but it is not always 100% clear and reliable...and I have to admit that I haven't tracked this down enough in game yet to say with certainty.



Also what happens when you for instance trade tech while you already did the same thing recently? Do you get the relationship bonus twice, or is the period before the bonus expires just extended? If it's the latter, I'd consider making it (in the SDK) so that appeasing Yang gives a higher relationship bonus, not just make the bonus last longer.

The positive effects of tech trading are a bit complicated because they can effect two modifiers - "You shared your technological discoveries with us", but also eventually "fair trade relations"...but luckily I digged up a source where both are explained:

http://forums.civfanatics.com/showpost.php?p=6801315&postcount=380


You have shared you technological discoveries with us

Depending on leader we get between 0.05 (Asoka (!), Bismarck, Isabella and Toku of those that could be in the game) and 0.2 (Mansa, Peter) per tech traded to that AI. Decays with 1/100.


Fair Trade

A complex calculation depending on three things:
1) the total value of all things given for free to that AI: iGrantValue
2) the total value of all things traded to that AI: iTradeValue
3) the number of turns we have known each other: iTurnsKnown
The total bonus is then (iGrantValue + iTradeValue/3)/((iTurnsKnown +1)*5), but capped at +4. In other words this value will deteriorate over time, unless we add more trades to it. The calculations of the values is very involved, but I can list that too if it becomes necessary.


You have traded with our worst enemies

The calculation is very similar to that above, except the constant factor in the divisor is 10 instead of 5. In other words, we can trade twice as much to a worst enemy before we reach a certain modifier, compared to the Fair Trade. Note that the worst enemy can switch, but things added to iGrantValue and iTradeValue never disappear, they only get diluted by passing time.


So "Fair Trade" is clearly more "hardcoded" and capped at +/-4, while "Shared Technology" stacks theorectically unlimited (and you can easily affect how much each traded tech effects it) - however, both modifiers detoriate over time.

So for your question - I believe in terms of fair trade "overflow" just extends the time before detoriation (if I understand the formula correct), while for shared discoveries yout get the full effect.



The same thing could be done for Zakharov: the relationship bonus for trading techs with him could be much higher. Someone suggested a while back that Zakharov should be able to ignore tech brokering restrictions. I considered that a bad idea because then the human players would be disinclined to trade techs with him, the opposite of what I'd like to achieve.
If trading techs with Zak would lead to a much higher relationship bonus however, then it would be worth still to trade techs with him, even if it carries the chance he will broker one of your techs.

As said above, that can be easily done and makes perfect sense for me.

BTW, I always play with "No Tech Brokering", so this might influence what feels right (also true for "Aggressive AI", another "default" option for me...)



Back to Yang: IIRC the AI only asks human players for tribute. So if the main way to please Yang would be to pay him tribute, then Yang would be unable to get along with other AIs. So I was thinking Yang should also have a better opinion of players weaker than him - they're harmless, they don't form a threat to his power. Yet at the same time he should still be just as willing to attack those weaker than him. (Is this possible?) So if a weak AI faction was close to Yang, the way to continue those 'good relations' with Yang would end up being forced vassalization...

Great idea :goodjob: Thats the kind of feedback needed to develop the personalities :) It's definitely possible to do that - though it is important to consider the various parameters which could have an effect on this desired behaviour:

1. As you said for "liking" weak factions: "iWorseRankDifferenceAttitudeChange"
2. The war parameters - chance to declare a certain type of war per turn (I made him already a dogpiler) and the power ratios (maybe restrict a "total war" - the one I think which most likely will lead to capitualation - to weak oppponents?)
3. Good relations and still willing to attack...this is mainly achieved by the "NoWarAttitudeProbs" (for strategically planned wars) - here it can be set that "pleased" or even "friendly" relations don't protect you (completely) from an attack, but also by the "DeclareWarThemRefuseAttitudeThreshold" - here you can set the attitude treshold for wars a leader gets dragged in. So we could even differenciate regarding why Yang attacks a weaker faction, he has good relations with - rather/only because of his own decision or because somone offer him something? Maybe we could use this to make him different to Santiago.



Summarized, this would mean there's a clear and distinct way to please each leader:
Deirdre/Miriam: sharing religion
Lal: sharing his favourite civic
Santiago: sharing wars
Morgan: trading resources
Zak: trading techs
Yang: paying tribute

I will rework the file following that guide.



As a final note, why does the AI seem to sneak-plan wars more often when refusing a demand compared to vanilla Civ, even though the odds for it are lower here? Or am I just paying more attention to it now?

I'm not sure. Is this still your impression after the AI fix regaring war preperations? I suspect that the few declarations which happened before the fix were mainly diplomatic ones. In BtS the chances might be higher, but I guess they just don't have an effect as often - because more strategic declarations happen. Difficulty might have an effect as well...what level do you play? PF on Emperor leads for me nearly always in a state of being weaker and getting frequently extorted, but overall it is the level for me to have a competitive AI til the end game. It could be also just because the extortion chances are generally higher - 5 out of 7 leader are 1/100 or below...and those 5 are always in the game. Standard Civ4 offers more leaders (54), of which only a part gets randomly drawn for most games and 21 of them are 1/1000. Maybe I should tweak those values again?
 
But I understand your logic (though I would seen Morgan as a similar character in this regard - he might care for others running Free Market, but for religion? Except we think of him as seeing religion as a kind of business...)

Perhaps he could appreciate it medium if you shared religions, but only give a low relationship penalty if you have a different religion, similar to Lal?

BTW, I would suggest that for for some things like the war declararation - this should take extremly long to wear of, but it should be possible

Hmm, I disagree. I don't like "once an enemy, always an enemy". It should be possible to get along after all if later the causes of the former animosity disappear, eg you switch to your former enemy's civic and religion.

Re Zak liking tech trading:
As said above, that can be easily done and makes perfect sense for me.

I'd suggest he likes it five times better than the other civs or so.

Great idea :goodjob: Thats the kind of feedback needed to develop the personalities :) It's definitely possible to do that - though it is important to consider the various parameters which could have an effect on this desired behaviour:

The thing I worry about: won't this also cause him to declare war on his powerful friends?

I'm not sure.

Me neither. It's hard to know what's the reason why an AI decides to declare war on you.
Anyway, no need then to change things for now I'd say.

In BtS the chances might be higher, but I guess they just don't have an effect as often - because more strategic declarations happen.

Ah, so AIs only start planning war after a demand refusal if they don't have any other wars planned at that time?

Does iDemandRebukedSneakProb the chance to plan war after refusing tribute, or after refusing any religion/civic/whatever demand btw?
 
Perhaps he could appreciate it medium if you shared religions, but only give a low relationship penalty if you have a different religion, similar to Lal?

Yes, I will do it that way then.



Hmm, I disagree. I don't like "once an enemy, always an enemy". It should be possible to get along after all if later the causes of the former animosity disappear, eg you switch to your former enemy's civic and religion.

I don' like it as well ;) I just started out conservative here, because that value is really a critical one - it has a huge impact on strategy, if I can declare a war without facing peristent negative consequences. But there is nothing wrong to start with a faster decay and set it higher again, if we think that it will make offensive warmongering too effective.



I'd suggest he likes it five times better than the other civs or so.

Five times better then the current value of 20 (which is the BTS maximum only reached by Mansa and Peter) would mean 100. If I understand the source I mentioned in my last post coreectly, that would mean +1 per tech...



The thing I worry about: won't this also cause him to declare war on his powerful friends?

Indeed, that a kind of problem, as the NoWarAttitudeProbs setting for the relation levels applies for all kind of wars - though the role for limited (-10) and especially dog-pile wars (-20) are lowered, so that here even 80 or 90 can act as a protection (however, aggressive AI and being a raider in times of financial trouble counters that), while full wars are still possible.

So with some careful choosing of the values here, we could restrict Yang wars vs. "friends" to total ones - and those could be further restricted to total wars vs. adjacent (iMaxWarMinAdjacentLandPercent) and weak neighbours (iMaxWarNearbyPowerRatio).

Other and more fitting solutions are surely possible as well, but that would probably require coding outside the leaderhead XML.



Ah, so AIs only start planning war after a demand refusal if they don't have any other wars planned at that time?

I just wanted to refer to the rule that an AI already at war does not start another, but it seems that even that isn't true in case of wars for refusing tribute (from the thread, in which Dan 5771 explained all the AI and war stuff, post #140):

WHEOOHRN does NOT prevent an AI from switching to WARPLAN_PREPARING_LIMITED after the refusal of one of their demands. Likewise there is nothing that keeps the AI from opening a second front while still being busy in the other war. In a test game I bribed my favorite neighbor Monty (modded to CONTACT_DEMAND_TRIBUTE = 1; iDemandRebukedSneakProb = 100) into a war vs. poor Lizzy. Unsurprisingly, Monty demanded a tech from me in the very next IBT (btw. they never demand monopoly techs). Instead of giving him the tech I provided him with a couple of Modern Armors via WB which promptly entered my cultural borders after some turns of "war preparation" had elapsed. He was still at war with Lizzy at that time!



Does iDemandRebukedSneakProb the chance to plan war after refusing tribute, or after refusing any religion/civic/whatever demand btw?

Only for refusing tribute; Dan said that somewhere in the same thread (and it is also my experience)
 
Five times better then the current value of 20 (which is the BTS maximum only reached by Mansa and Peter) would mean 100. If I understand the source I mentioned in my last post coreectly, that would mean +1 per tech...

I'm not sure myself how it will work out, but keep in mind this modifier should end up in the same order of magnitude as the Gaian/Believer religion bonus, plus serve as a encouragement to trade techs with Zakharov despite (in the future) he being able to broker your techs.

So with some careful choosing of the values here, we could restrict Yang wars vs. "friends" to total ones - and those could be further restricted to total wars vs. adjacent (iMaxWarMinAdjacentLandPercent) and weak neighbours (iMaxWarNearbyPowerRatio).

Let's try it out! :)

Only for refusing tribute; Dan said that somewhere in the same thread (and it is also my experience)

Thanks for the info!
 
I added civic aversion diplomacy penalties.

Any ideas on the exact values for the penalties?

Dee: Hybrid - Free Market
Miriam: Terraformed - Knowledge
Morgan: Free Market - Autarky (I just changed it from Planned)
Hive: Police State - Democratic
Sparta: Power - Wealth
Zak: Knowledge - Fundy
Lal: Democratic - Police State

I'd suggest that factions whose civic aversion is another faction's favourite civic should give a smaller diplo penalty. Too pre-determined diplomacy may not be fun.

So Morgan, Santiago and Zakharov could give a bigger penalty. Perhaps Lal could be the exception to my own suggestion and also give a big penalty? Not sure.
 
Did you already add diplomatic plusses to factions running a favorite civic? Like Spartans running knowledge for instance?
 
Back
Top Bottom