• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Nov 26, 2002
521
0
www.neuralhq.com
1.03a ..AI choosing religous education 99% of the time

The AI still seems to be still badly out of balance when it comes to choosing education for its children. In my current game its around 1100 and as a quick check I went around the world and looked at all their children. About 99% of them were religous educations.

Myros
 
Upvote 0
Yes, the AI tends to pick ecclesiastical education too liberally. Especially for its eldest sons, whom it then appoints as bishops, making them unable to marry (=bad). Perhaps the AI chance for it should be reduced somewhat, and some sort of modifier added for reducing it further if it's the eldest son.
 
If you ask me the elsest son (who usually is the heir) ought to get a court education at least 90% of the time as he is supposed to rule some land - and court education makes him better at that ...
 
Did quite a bit of testing on this:

I modiefied the event 1015 - choose education for female and stripped out any modifiers.

Code:
	mean_time_to_happen = {
		days = 1
		
	}

	action_a = {
		ai_chance = 90
		effect = { type = add_trait value = court_education }
		effect = { type = prestige value = 5 }
	}
	action_b = {
		ai_chance = 10
		effect = { type = add_trait value = ecclesiastical_education }
		effect = { type = piety value = 10 }
	}

Trying different ai_chance values everything from 100/0 to 50/50 and even things like 9/1 etc basicly the AI chooses option B 100% of the time totaly ignoring the ai_chance. I checked this using the F12 cheat box and typing charevent 1015 for a female child, checked it over 100 times total and not once did the AI choose anything other than option B.

Considering the readme for 1.03 states:

- AI should now be quite a bit better at selecting the appropriate education for its children.

This is quite obviously false, yet again something listed as fixed that wasnt fixed at all. It also makes me wonder if ANY of the events are being fired with the ai_chance working ... which leaves the game in a pretty sorry state where the ai is choosing the same things over and over. Pretty sad guys, considering we are now at 1.03a.

Myros
 
Well here's a work around fix for it. Seems to be 2 main bugs going on:

1. The AI ignores option 'A' no matter what you set the ai_chance at.
2. The ai_chance value is actualy 0-9 eg 0 = 10% and 9 = 100%

Anyway here's my workaround that gets things working, ideally you should setup 2 seperate education events, one for players (the standard ones that are in now) and one for AI players only with these extra "A" options because it ignores "A".

Female (event 1015):
Code:
	mean_time_to_happen = {
		days = 1
		
	}

	action_a = {
		ai_chance = 1
		effect = { type = add_trait value = court_education }
		effect = { type = prestige value = 5 }
	}
	action_b = {
		ai_chance = 4
		effect = { type = add_trait value = ecclesiastical_education }
		effect = { type = piety value = 10 }
	}
	action_c = {
		ai_chance = 4
		effect = { type = add_trait value = court_education }
		effect = { type = prestige value = 5 }
	}

Male (event 1012):
Code:
	mean_time_to_happen = {
		days = 1

	}
	action_a = {
		ai_chance = 1
		effect = { type = add_trait value = ecclesiastical_education }
		effect = { type = piety value = 10 }
	}
	action_b = {
		ai_chance = 4
		effect = { type = add_trait value = court_education }
		effect = { type = prestige value = 5 }
	}
	action_c = {
		ai_chance = 3
		effect = { type = add_trait value = martial_education }
		effect = { type = prestige value = 15 }
	}
	action_d = {
		ai_chance = 1
		effect = { type = add_trait value = ecclesiastical_education }
		effect = { type = piety value = 10 }
	}


Using F12 and charevent 1012 and charevent 1015 and using the shift/up-arrow to fire an event over and over for the same character I tested this on about 1000 event firings and it seems to balance out just about right.

Myros
 
Then the attempted fix to ai_chance actually made it worse. In 1.02, ai_chance had the same range (ai_chance = 9 gives 100%), but action_a worked.
 
Made a quick working file for those who are tired of nothing but nuns and priests running around the world ;)

EDIT - Link removed as problem is fixed in 1.03b


Right click and save as. Goes in \Crusader Kings\db\events - make sure and backup the original of course as this is just a temp fix till the real issue with the AI is fixed.
I created 2 education events for each sex - 1 for ai and 1 for non-ai. The player one is the regular one and the ai one has the extra option because its ignoring 'a'. Ran it through a handsoff game for about 10 years then checked around the world and there was a real nice spread of education types going on.

I used event IDs 21300 and 21301 - if you happen to be using those for some of your own work then just change.

If I feel real ambitous today I'll go through all the other event types and see if there is any other critical ones that are hurting the AI because of this bug and post some fixed copies.

Cheers,
Myros
 
Last edited:
20600-20699 are assigned to Fireblade, who hasn't actually posted any events, but if you want to be safe, I can assign you a block over on the event scripting forum.

Quite a few ai_chance events in trait_events.txt, with some in other files.
 
Thanks Rich, that'd be great. I plan on doing some events eventualy ...was kinda waiting for the game to be somewhat bug-free first :D

Myros
 
I've assigned you event IDs 21300-21399.
 
Thanks Rich.
Myros
 
Just to confirm I ran all the same checks in 1.03b and the AI is now choosing a spread of education types ...good job guys :)

Myros
 
Have to agree that ai_chance is finally working right - ran a set of test events, and with a=1, b=8 and c=91, got 0 a results, 15 b results, and 174 c results. Rerunning with a = 10, b = 20 and c = 70, got 10 a results, 12 b results and 54 c results in a somewhat shorter run