Guaranteeing a leader's hidden agenda?

BlackEmperor

Chieftain
Joined
Jan 7, 2017
Messages
82
Hi,
so I was testing whether it's possible to guarantee that a leader gets a specific hidden agenda. There are a few leaders who have some bias towards certain hidden agendas, such as Ghandi having a 70% chance (I believe) to get the Nuke Lover hidden agenda. I thought that in order to achieve my goal, I'd simply have to add the same code to another leader and just set the chance to 100%, like this (using an SQL file):
Code:
INSERT INTO AgendaPreferredLeaders
    (AgendaType, LeaderType, PercentageChance)
VALUES
    ('AGENDA_CIVILIZED', 'LEADER_TRAJAN', '100');
I tried that for a couple other leaders as well, however, it doesn't really seem to work properly. In fact, while one of the leaders had the correct hidden agenda, the other leaders didn't even have a hidden agenda at all (it only showed their historical agenda in the diplo screen and doing what I intended for them to trigger their supposed hidden agenda, such as taking barb camps for Trajan here, didn't do anything either).
I'm wondering if I was missing something? I've checked for any typos, started a new game (obviously), Database.log doesn't suggest any errors.
 
If I recall correctly, the hidden agendas mechanic works on the principle that they can only appear once in each game. As such, the way to read the 'PercentageChance' field is that a higher number makes it more likely that a particular leader will get that hidden agenda instead of others.

Unfortunately, setting multiple leaders to have a 100% chance of getting the same hidden agenda won't work - in simple terms, you're guaranteeing an item to more than one person when only one of that item exists. Therefore, the guarantee can only materialise for one of them.

The behaviour you are seeing - 'one of the leaders had the correct hidden agenda' - is the expected outcome.

Of course, through duplication you can achieve what you are after - and in the case of wanting a leader to always have a specific hidden agenda, your logic around assigning 100% PercentageChance is correct. I think the hidden agenda mechanic is designed to give leader personalities some randomisation - which can be controlled through a percentage scale - which is why they implemented like this.

Another consideration you might make is to question whether, if you are aiming to grant a 'hidden' agenda 100% of the time, you are not simply better of setting this as a visible agenda. But that's a question for you in the context of your mod - you may have your reasons for using the mechanic without the randomness/unknown it was designed to introduce.
 
Thanks for the reply!
I don't think you're correct on that one though. I've had multiple leaders have the same agenda in a game already (for example, when I entered into a golden age, 3 leaders got angry at me because of that; they all had the Sympathizer hidden agenda).
During my test in which only one of the AIs had a hidden agenda, the other leaders didn't have the same one assigned.
I just ran two test games and assigned the following hidden agendas to leaders using a 100% PercentageChance (I just chose some, no real reasoning behind it):
Ambiorix & Poundmaker: Populous
Matthias Corvinus & Trajan: Civilized
Tomyris & Genghis Khan: Gossip
Philip II & Kristina: Sycophant
Tamar: Industrialist
Mansa Musa & Eleanor: Fun Loving

I met all of the civs and the only one with a hidden agenda was Ambiorix, who correctly had Populous assigned.
During my second test (I somehow assumed that the 100% chance was causing problems), I instead changed the values to 99% and ran another test using the same civs. This time, Ambiorix and Genghis Khan had hidden agendas, Populous and Gossip respectively, which was correct. However, the other leaders were still missing hidden agendas.

So even if the theory that each agenda could only be assigned to one civ was true, it still doesn't explain why so many didn't have one at all (each hidden agenda I've listed above should have appeared once). I checked the Database with SQLite just to be sure and the preferred agendas all showed up correctly in the table, so it's not like they weren't added (even then, the leaders should have been assigned random hidden agendas then).
It just doesn't make sense to me. :/
 
My own experience making changes to hidden agendas for a "more historical agendas" mod has pretty much been the same. It looks like two leaders in a row cannot receive the same agenda, whenever the game is assigning hidden agendas, or else all of the following leaders will fail to receive an agenda. So if you try to force the agendas by maxing out the percentages, sometimes it will work but it randomly fails with enough leaders in the game. I also tried strictly limiting agendas using higher percentages and adding lots of exclusive agendas for each leader, but that also fails eventually and actually causes the game to crash so I don't recommend messing with the exclusive agendas too much.

From what I've found, it's safest to just set three agendas you want for each leader to 25% each. You can also set an early game only agenda to 90% and have two late game agendas at 50% and 40%, or something like that.
 
Thanks!
So from what I gather from both your posts is pretty much that the game has issues with forcing a specific agenda on a leader if there are multiple leaders "competing" for it, but assinging the same agendas randomly seems to be working fine. That's a shame.
Using exclusive agendas would have been the next step I would have tried, so thanks for letting me know it won't really work as well!

I'll try to give all of the above leaders a different hidden agenda and see if that works. If not, then I might just go with your suggestion and use smaller percantages and spread them among a few select agendas.

EDIT: Well, giving everyone a different hidden agenda didn't work either. Still only Ambiorix who has one. Odd.

EDIT2: Test No. 2, giving everyone only 90% chance worked. Everyone had an agenda, only Mansa Musa and Tomyris had something else than I assigned. Test No. 3, this time using 95%, everyone had the assigned hidden agenda. Well, at least that worked.
 
Last edited:
Top Bottom