Decreasing AI number of missionaries

skodkim

Deity
Joined
Jan 16, 2004
Messages
2,497
Location
Denmark
The AI - as you probably know - seem to be spamming missionaries to a point where it is ridiculous.

After a few games (even with the fall patch) I'm so fed up with it that I'm seriously considering making some pretty non.elegant modding to help with it - like removing missionaries from the game all together or increasing min faith to found a panteon to 999999 thereby more or less removing the religion element from the game).

What else could be done with the means we have at our hand, e.g.are there any flavor values that could be adjusted like in Civ5?

\Skodkim
 
I doubled their faith costs, even post patch, which helps but doesn't entirely prevent it. I liked the attrition effect Civ 5 used on them and there is always Dale's mod to lock them out without open borders (but that has issues of its own).

I wonder if there is a way to hard limit the number they have in the game at any time, that would probably work too since my only real complaint is that they block my units (especially builders).
 
Good idea with using a maximum number of units allowed to be active at the same time. However while this was possible in Civ5 it doesn't seem to be in Civ6.

\Skodkim
 
I do agree with the spam but I must admit I did enjoy making a heap of Inquisitors and frying them.
Have not looked into it to know if its possible but what about giving them a ridiculously high maintenance cost?
 
It is definitely possible to limit the number of active units per type a civ can build, I saw that value in a table yesterday. (per )

It's the table Unit_BuildingPrereqs, it is used for archeologists already, and there are already entries for the religious units too, all you need to do there is the set the value in the NumSupported column from -1 (unlimited) to 1 - then 1 shrine will support only 1 missionary at a time, and 1 temple or stave church will only support 1 apostle plus 1 inquisitor.

Code:
UPDATE Unit_BuildingPrereqs SET NumSupported=1 WHERE Unit IN ('UNIT_MISSIONARY','UNIT_APOSTLE','UNIT_INQUISITOR');

edit: ok so I admit you can't limit to 1 per civ but this should be better than nothing.
 
It is definitely possible to limit the number of active units per type a civ can build, I saw that value in a table yesterday.

It's the table Unit_BuildingPrereqs, it is used for archeologists already, and there are already entries for the religious units too, all you need to do there is the set the value in the NumSupported column from -1 (unlimited) to 1 - then 1 shrine will support only 1 missionary at a time, and 1 temple or stave church will only support 1 apostle plus 1 inquisitor.

Code:
UPDATE Unit_BuildingPrereqs SET NumSupported=1 WHERE Unit IN ('UNIT_MISSIONARY','UNIT_APOSTLE','UNIT_INQUISITOR');

That sound like the kind of solution I'm after! I'm going to test it in my next game

Thanks!

\Skodkim
 
It is definitely possible to limit the number of active units per type a civ can build, I saw that value in a table yesterday. (per )

It's the table Unit_BuildingPrereqs, it is used for archeologists already, and there are already entries for the religious units too, all you need to do there is the set the value in the NumSupported column from -1 (unlimited) to 1 - then 1 shrine will support only 1 missionary at a time, and 1 temple or stave church will only support 1 apostle plus 1 inquisitor.

Code:
UPDATE Unit_BuildingPrereqs SET NumSupported=1 WHERE Unit IN ('UNIT_MISSIONARY','UNIT_APOSTLE','UNIT_INQUISITOR');

edit: ok so I admit you can't limit to 1 per civ but this should be better than nothing.
Brilliant! 1 per shrine is an improvement.
Do you know if something similar could be done with settlers?
 
That would definitely make you need to build more shrines which would be cool, but I wonder if the ai would do it
 
It is definitely possible to limit the number of active units per type a civ can build, I saw that value in a table yesterday. (per )

It's the table Unit_BuildingPrereqs, it is used for archeologists already, and there are already entries for the religious units too, all you need to do there is the set the value in the NumSupported column from -1 (unlimited) to 1 - then 1 shrine will support only 1 missionary at a time, and 1 temple or stave church will only support 1 apostle plus 1 inquisitor.

Code:
UPDATE Unit_BuildingPrereqs SET NumSupported=1 WHERE Unit IN ('UNIT_MISSIONARY','UNIT_APOSTLE','UNIT_INQUISITOR');

edit: ok so I admit you can't limit to 1 per civ but this should be better than nothing.

This is sensational news. Think you would mind whipping up a mod based on this?

I am a lil uneducated on how to do it myself and would be willing to learn if instead you'd prefer to teach me how.
 
This is sensational news. Think you would mind whipping up a mod based on this?

I am a lil uneducated on how to do it myself and would be willing to learn if instead you'd prefer to teach me how.

I think this should do it (attached). Stripped all other components out of my private mod and haven't tested since so you should probably test, e.g. go into the civilopedia and see if the description of the shrine says that it can maintain one active unit.

Haven't had time to see how the game evolves with the change yet but I'm getting there...

\Skodkim
 

Attachments

Thank you very much! I will have a look.

Edit* looks good in Civlopedia - will be testing in games.

Thanks again.
 
Last edited:
I've given this a shot, it seems to prevent me from getting any missionaries at all? Not sure of effect on the AI...
 
From the bug report forum, British museum thread
2: You can build two Archaeologists and each has 6 charges if their home city has 6 slots. I thought the intention was 3 charges each? If the museum is filled before the second one can use all his charges, he vanishes. I suppose that is expected, but a huge waste of hammers. Again, if this is by design, its not documented.
By settings supportedunits to 1 I'm probably telling the game to use that same hard-coded crap mechanic that makes archeologists disappear when his museum is full, which also prevents you from building a new one there - which makes sense for the archeologist, but for the missionary it probably means that if there is no free great work slot in the building you can't recruit a missionary, ever.
Could you test if you can at least recruit an apostle? The temple has a great work slot so maybe at least that might work as intended (as long as you don't fill that slot).
 
I'm going to report back even I get so far in the game. Unfortunately my playing time Ida very limited.

\Skodkim
 
From the bug report forum, British museum thread

By settings supportedunits to 1 I'm probably telling the game to use that same hard-coded crap mechanic that makes archeologists disappear when his museum is full, which also prevents you from building a new one there - which makes sense for the archeologist, but for the missionary it probably means that if there is no free great work slot in the building you can't recruit a missionary, ever.
Could you test if you can at least recruit an apostle? The temple has a great work slot so maybe at least that might work as intended (as long as you don't fill that slot).

I have one city with a holy site, as shrine and a temple. I recruited one apostle, used it up and am now able to recruit another one. Does that answer your question?

Only "funny" thing I can see going on in my game with the updated mechanics right now is that the AI seems to value religion very little, e.g. they haven't founded a religion yet (and I did some turns ago). I suppose its a fluke though, as I can't see why the new mechanic should affect this. I'll keep a lookout in the next games I play.

\Skodkim
 
If someone figures how spies work, it could be another way to limit Apostles. Spies are limited globally based on techs/civics. If it's not hard coded it should be possible to make something similar for Apostles so that they are limited globally and some civics like Reformed Church gives you a couple more. Unfortunately i haven't found anything in the database apart from the "Spy" column that makes spies unique so maybe everything is hard coded.
 
I have one city with a holy site, as shrine and a temple. I recruited one apostle, used it up and am now able to recruit another one. Does that answer your question?
If you can recruit apostles but not missionaries, then yes that does answer my question and it matches my expectations. So you need a free great works slot in the building that enables the unit.


Only "funny" thing I can see going on in my game with the updated mechanics right now is that the AI seems to value religion very little, e.g. they haven't founded a religion yet (and I did some turns ago). I suppose its a fluke though, as I can't see why the new mechanic should affect this. I'll keep a lookout in the next games I play.
Maybe the AI actually notices it can recruit missionaries, values faith less because of that, produces less of it, and therefore founds religions much slower. Probably not though, I bet this mod breaks something :p
Next thing to test: Give the shrine a great work slot, and see if that still breaks the AI.

If someone figures how spies work, it could be another way to limit Apostles. Spies are limited globally based on techs/civics. If it's not hard coded it should be possible to make something similar for Apostles so that they are limited globally and some civics like Reformed Church gives you a couple more. Unfortunately i haven't found anything in the database apart from the "Spy" column that makes spies unique so maybe everything is hard coded.
Not just maybe, I bet all of it is hardcoded.
 
If you can recruit apostles but not missionaries, then yes that does answer my question and it matches my expectations. So you need a free great works slot in the building that enables the unit.
This might be why the limit was disabled in the first place. If i recall correctly, before the patch there wasn't even a line for Apostles and Missionaries in the limit/building table, only for Archeologists. Looks like the devs played with this to address the missionaries spam issue but noticed it didn't work because of their hard coded coderap and decided to increase the cost instead. Quick and dirty fix that reduces the power of Mosques and Hagia Sophia but easier than re-code the limit.
 
Back
Top Bottom