Civ trait that increases religious pressure?

Dr. Aardvark

Chieftain
Joined
Oct 18, 2016
Messages
4
I've been working on a civ, and I intended for one of the unique ability's effects to provide a boosted 10% religious pressure when that civ founds a religion. However, EFFECT_ADJUST_RELIGIOUS_SPREAD_STRENGTH only works when the modifier using it is attached to a religious belief.

I figured that I could just attach a modifier to the Follower beliefs (which is what another user, Magil, did to solve a similar problem).The problem with this approach is that I can't check what civ is applying the belief, since the modifier has to use COLLECTION_OWNER to apply the effect.

Maybe I'm just overlooking something simple, but right now I can't think of a way to accomplish this. Any suggestions or ideas?
 
There's RequirementSet PLAYER_FOUNDED_RELIGION_REQUIREMENTS.
Why do you want to use Belief if you want to create an UA? Shouldn't this be a civ trait?
I did try this. The problem is that when attached to a Trait, the modifier / effect to increase religious pressure simply doesn't work. GameEffects.log spits out an error saying:
Code:
Warning: Object <Player: 0> does not support interface <{5FC363C4-E394-45A4-A43F-ED3D3508A298}>.
It has to be attached to a Belief in order to apply the pressure increase. That's why I attempted a workaround by using Beliefs, but like I said, if I do that then there's no way I can see to check for the correct civ. At this point I'm pretty sure that a Trait to increase religious pressure just isn't possible at the moment.
 
A simple trait to increase religious pressure does seem difficult if not impossible to do, at least to my knowledge. But it'd probably be possible to attach this effect to a particular building using the belief system. Of course, this could cause problems if the city with the building in it changes hands, unless you made it a unique building that replaces another kind of building.

It might even be possible to have it be a "dummy" building attached to the trait that is automatically built in each city for that Civ, and make it a unique replacement for a different kind of dummy building that lacks the effect (so if another Civ takes a city that has the dummy building, it turns into a building that does nothing, and if the Civ with the trait takes it back, it changes back).
 
So far everything I've tested using a dummy building with a modifier permanently attaches the modifier to the city. The effect of the modifier remains in effect even if the dummy building is removed from the city.

Although it might actually work for city capturing since the city actually seems to be destroyed and completely rebuilt when a city is conquered. Just be advised the modifier might get retained anyway in these cases.
 
So far everything I've tested using a dummy building with a modifier permanently attaches the modifier to the city. The effect of the modifier remains in effect even if the dummy building is removed from the city.

Although it might actually work for city capturing since the city actually seems to be destroyed and completely rebuilt when a city is conquered. Just be advised the modifier might get retained anyway in these cases.

Are you referring to modifiers that depend on buildings using REQUIREMENT_CITY_HAS_BUILDING or a modifier attached via the BuildingsModifier table?
 
to those attached to the <BuildingModifiers> table.

So it would look like perhaps it might work out if the Requirement Sets or subject sets or whatever also have REQUIREMENT_CITY_HAS_BUILDING ? I'll have to try adding that in and re-test. (learn something new about the system every day: never thought to look for that sort of additional requirement to add to the Building Modifier)
 
I'm not certain, I was curious (I've noticed some issues with attaching effects to buildings and am always open to collecting more data on it).

However, a quick test using RELIGIOUS_COMMUNITY_SHRINE_HOUSING, which uses REQUIREMENT_CITY_HAS_BUILDING, shows that if I place a Shrine in a city with Firetuner, it gets 1 housing. That 1 housing is lost if I remove the Shrine (again using Firetuner). So that's a good initial result.
 
I accomplished this using
INSERT INTO DynamicModifiers (ModifierType, CollectionType, EffectType)
('MODIFIER_PLAYER_CITIES_RELIGION_PRESSURE', 'COLLECTION_PLAYER_CITIES', 'EFFECT_ADJUST_CITY_RELIGION_PRESSURE');

Essentially this is the effect used by the Cardinal Bishop promotion (ModifierId: CARDINAL_BISHOP_PRESSURE, ModifierType: MODIFIER_SINGLE_CITY_RELIGION_PRESSURE), just changed to all player cities instead of single city.

(It's fun to crank the value up to like 500 in testing and watch the entire continent fall under the sway of your religion in a matter of turns).
 
I accomplished this using
INSERT INTO DynamicModifiers (ModifierType, CollectionType, EffectType)
('MODIFIER_PLAYER_CITIES_RELIGION_PRESSURE', 'COLLECTION_PLAYER_CITIES', 'EFFECT_ADJUST_CITY_RELIGION_PRESSURE');

Essentially this is the effect used by the Cardinal Bishop promotion (ModifierId: CARDINAL_BISHOP_PRESSURE, ModifierType: MODIFIER_SINGLE_CITY_RELIGION_PRESSURE), just changed to all player cities instead of single city.

(It's fun to crank the value up to like 500 in testing and watch the entire continent fall under the sway of your religion in a matter of turns).

how would one make this into a mod that increased religious pressure of all civs? Okay i'm pretty sure I just do this.

INSERT INTO DynamicModifiers (ModifierType, CollectionType, EffectType)
MODIFIER_ALL_CITIES_RELIGION_PRESSURE COLLECTION_ALL_CITIES 'EFFECT_ADJUST_CITY_RELIGION_PRESSURE

but where are the numbers? Like how do I then assign a value to the religious pressure?
 
Last edited:
You can use COLLECTION_ALL_CITIES I would think, and create your own new ModifierType:
Code:
NSERT INTO Types (Type, Kind)
('MODIFIER_ALL_CITIES_RELIGION_PRESSURE', 'KIND_MODIFIER');

INSERT INTO DynamicModifiers (ModifierType, CollectionType, EffectType)
('MODIFIER_ALL_CITIES_RELIGION_PRESSURE', 'COLLECTION_ALL_CITIES', 'EFFECT_ADJUST_CITY_RELIGION_PRESSURE');

INSERT INTO Modifiers (ModifierId, ModifierType)
('MODIIFIER_ADD_10_RELIGIOUS_PRESSURE', 'MODIFIER_ALL_CITIES_RELIGION_PRESSURE');

INSERT INTO Modifiers (ModifierId, Name, Value)
('MODIIFIER_ADD_10_RELIGIOUS_PRESSURE', 'Amount', '10');

INSERT INTO GameModifiers (ModifierId)
('MODIIFIER_ADD_10_RELIGIOUS_PRESSURE');
I think table GameModifiers would work, but it might be necessary to use a different Hook-up SomethingModifiers table to enact the effect of the modifier.

With the "ALL CITIES" method, City-States and Free Cities would also be affected by the additional religious pressure effect, and would tend to spread whatever religion they are following.
 
Hi thanks so much for the help. That is the intention to increase religious pressure from all sources. Do I insert into GameModifiers? Sorry if this comes off as trivial. I just don't understand what i'm doing very well.
 
I understand why it's not working. There is no 'EFFECT_ADJUST_CITY_RELIGION_PRESSURE'. In fact from searching the dynamic Modifiers and Modifiers the only Modifier that affects city spread strength is MODIFIER_PLAYER_RELIGION_ADJUST_RELIGIOUS_SPREAD_STRENGTH. Which is used for scripture. Any ideas as to where to go from here?
 
EFFECT_ADJUST_CITY_RELIGION_PRESSURE exists as a Type in table GameEffects. Most of the contents that are valid in table GameEffects can only be viewed using an SQL database viewer program. The implementation of these "hidden" Types in table GameEffects is done from part of the game code or files not accessible to modders other than in the Debug Gameplay database.
Code:
ModifierType					CollectionType		EffectType
MODIFIER_SINGLE_CITY_RELIGION_PRESSURE		COLLECTION_OWNER	EFFECT_ADJUST_CITY_RELIGION_PRESSURE
The ModifierType does not appear to be used anywhere by Firaxis but it does exist, along with the EffectType. The problem then is to determine what arguments are needed in table ModifierArguments, and what if any SubjectRequirementSetId or OwnerRequirementSetId will be needed in table Modifiers. Since there is no example as used by Firaxis it's uncharted territory to a certain extent and all you can do is make reasonable educated guesses as to what the game will want in order to implement the effect.

EFFECT_ADJUST_CITY_RELIGION_PRESSURE does not have a listing in table GameEffectsArguments (another table that only shows anywhere when directly viewing the Debug Gameplay Database) so we cannot garner any clues there.
 
Okay. I have no idea what the arguments are for that effect. However When I searched for Scripture I found 'MODIFIER_ALL_CITIES_RELIGION_PRESSURE'. Which takes an amount. The amount for scripture was 25 so I guessed that this affects religious pressure by adding 25%. However the code below doesn't seem to do anything.

-- Trying to mess with religious pressure
INSERT INTO Types (Type, Kind)
('MODIFIER_ALL_CITIES_RELIGION_PRESSURE', 'KIND_MODIFIER');
INSERT INTO DynamicModifiers (ModifierType, CollectionType, EffectType)
('MODIFIER_ALL_CITIES_RELIGION_PRESSURE', 'COLLECTION_ALL_CITIES', 'EFFECT_ADJUST_RELIGIOUS_SPREAD_STRENGTH');
INSERT INTO Modifiers (ModifierId, ModifierType)
('MODIIFIER_ADD_100_RELIGIOUS_PRESSURE', 'MODIFIER_ALL_CITIES_RELIGION_PRESSURE');
INSERT INTO Modifiers (ModifierId, Name, Value)
('MODIIFIER_ADD_100_RELIGIOUS_PRESSURE', 'Amount', '8900');
INSERT INTO GameModifiers (ModifierId)
('MODIIFIER_ADD_100_RELIGIOUS_PRESSURE')
 
Hi so after taking a break for a bit then reading through Lee's Civ 6 modding guide I tried to make this work again. This time I tried using XML to make debugging easier. I also used Modbuddy. I think I'm fairly close though don't know what is wrong.


Any help would be appreciated.
 
Last edited:
Here is my error log

From what I understand I think the problem is in how I define my type. Though I don't understand what the problem is.
 

Attachments

  • errorlog.PNG
    errorlog.PNG
    87.9 KB · Views: 128
  • Use code blocks to directly post your code rather than taking screenshots or pngs
  • Code blocks are created by typing [.code] at the beginning of the code and [./code] at then end, without the dots because if I try to show the needed text to create an actual code-block on the forum the forum software will make a code-box without showing what you need to type
  • Your problem is the spaces most likely.
    Code:
    <Row Type = "WOLF_RP_CITY" Kind = "KIND_MODIFIER" />
    While XML and SQL generally do not care about spaces, when a row is presented this way you need to not have spaces between the ColumnName, the "=" sign, and the "WOLF_RP_CITY" value. So you need to do as
    Code:
    <Row Type="WOLF_RP_CITY" Kind="KIND_MODIFIER" />
    This will ensure that the game's XML parser can understand what goes with what.
  • This
    Code:
    WOLF_RP_CITY
    does not match to this
    Code:
    Modifier_WOLF_RP_CITY
  • Your basic problem at this point is that EFFECT_ADJUST_RELIGIOUS_SPREAD_STRENGTH only ever appears to be used directly on a player. It does not look like it can be used on a city.
  • But you should be able to use table TraitModifiers and attach the modifier to TRAIT_LEADER_MAJOR_CIV for major players and MINOR_CIV_DEFAULT_TRAIT for Minor civilizations, without the need to use a collection of all cities. You should be able to use Scripture's
    Code:
    <ModifierType>MODIFIER_PLAYER_RELIGION_ADJUST_RELIGIOUS_SPREAD_STRENGTH</ModifierType>
    The game does not care how many different ModifierId's use the same ModifierType.
 
Back
Top Bottom