Leyrann
Deity
But what do I replace then, considering I don't want there to be a RegionalRange of any sort?I think you have to replace instead of delete
But what do I replace then, considering I don't want there to be a RegionalRange of any sort?I think you have to replace instead of delete
Have you tried putting in 0?But what do I replace then, considering I don't want there to be a RegionalRange of any sort?
Have you tried putting in 0?
DLC/Expansion2/Data > Expansion2_Civilizations.xmlI'm trying to create a civ Unique Ability which renders units/improvements immune to some weather effects. I'm trying to model this after Russia's "Mother Russia" trait. I can't find anywhere in the base/DLC files where this is actually accomplished!
Can someone please point me towards the file/code location where Mother Russia is granted blizzard immunity for units?
Thanks!
Thank you! I don't know how I missed that!DLC/Expansion2/Data > Expansion2_Civilizations.xml
Search TRAIT_CIVILIZATION_MOTHER_RUSSIA. There's modifier TRAIT_BLIZZARD_PREVENTION_SIGNIFICANT plus 3 more.
Same file contains code to prevent specific random event, you'd have to look elsewhere for all possible keywords other than the Blizzard.
For an improvement to have a type of yield it must be listed under <Improvement_YieldChanges> first. Offshore wind farm normally only produces production.I'm tinkering with starting mod writing and was try to give the seastead an additional adjacency as practice. I wasn't able to, but the other part of the mod works (giving settlers more movement). Can anybody spot the issue, I haven't been able to get any other improvement adjacencies working either, so I think the tables I'm updating might be wrong. Here's a paste bin
EDIT: I got the adjacency to show up in civlopedia and when I go to place the seastead in the tooltip, but it won't show up on the map, and doesn't affect my income. Here is a screenshot of the completed improvement, and here is a screenshot of the improvement placement tooltip.
The issue is that the modifier you are using in modifiers as defined here:Hey everyone, I'm trying to create a Civ Ability that grants resistance to natural disasters, the same as Liang's "Reinforced Materials" promotion but applied to all player cities. I'm struggling to get the modifier to attach to the player cities. (REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE, and no that's not a typo, it's spelled that way in the game files)
Assigning the modifier directly to the Trait for the Civ isn't working, and neither did going through an intermediate MODIFIER_PLAYER_CITIES_ATTACH_MODIFIER modifier. Anybody have any hints?
If it helps, here's what I've tried so far
--Trait I'm creating
INSERT INTO Traits
(TraitType, Name, Description)
VALUES ('TRAIT_CIVILIZATION_NATURAL_STRENGTH', 'LOC_TRAIT_CIVILIZATION_NATURAL_STRENGTH_NAME', 'LOC_TRAIT_CIVILIZATION_NATURAL_STRENGTH_DESC');
-- Attaching modifier to trait
INSERT INTO TraitModifiers
(TraitType, ModifierId)
VALUES ('TRAIT_CIVILIZATION_NATURAL_STRENGTH', 'TRAIT_STRENGTH_PREVENT_STRUCTURAL_DAMAGE_ATTACH');
-- creating attachment modifier
INSERT INTO Modifiers
(ModifierId, ModifierType)
VALUES ('TRAIT_STRENGTH_PREVENT_STRUCTURAL_DAMAGE_ATTACH' ,'MODIFIER_PLAYER_CITIES_ATTACH_MODIFIER');
-- arguments for attachment modifier
INSERT INTO ModifierArguments
(ModifierId, Name, Type, Value)
VALUES ('TRAIT_STRENGTH_PREVENT_STRUCTURAL_DAMAGE_ATTACH', 'ModifierID', 'ARGTYPE_IDENTITY', 'REINFORCED_INFRASTRUCTURE_PREVENET_STRUCTURAL_DAMAGE');
Let me know if this should be asked elsewhere![]()
Thanks so much for this!The issue is that the modifier you are using in modifiers as defined here:
<Row>
<ModifierType>MODIFIER_GOVERNOR_ADJUST_PREVENET_STRUCTURAL_DAMAGE</ModifierType>
<CollectionType>COLLECTION_OWNER</CollectionType>
<EffectType>EFFECT_ADJUST_PREVENT_STRUCTURAL_DAMAGE</EffectType>
</Row>
Is set to Collection Owner. Most modifiers set that way only work when attached to a something else that can "own" the modifier, like a building or unit. In order to apply this effect to all of your cities with just one modifier, you will need to created a new modifier but with CollectionType set to "COLLECTION_PLAYER_CITIES". So that the EffectType is applied to your cities, instead of to a undefined "Owner". Here you go put this in your mod should work.
<DynamicModifiers>
<Row>
<ModifierType>MODIFIER_PLAYER_CITIES_ADJUST_PREVENT_STRUCTURAL_DAMAGE</ModifierType>
<CollectionType>COLLECTION_PLAYER_CITIES</CollectionType>
<EffectType>EFFECT_ADJUST_PREVENT_STRUCTURAL_DAMAGE</EffectType>
</Row>
</DynamicModifiers>
Not sure, been feeling poorly lately so can't really test it. If Player cities doesn't work Idk. You could possibly take the MODIFIER_GOVERNOR_ADJUST_PREVENET_STRUCTURAL_DAMAGE and give it to a city building like a unique monument. That could work though I understand if that's not a option if you have something else in mind for the UI.Thanks so much for this!
For whatever reason I can't get it working, testing it using the soothsayer. However, making a similar modifier for the Reyna promotion that allows you to buy districts works fine with COLLECTION_PLAYER_CITIES - so either there's some other CollectionType that needs to be used for EFFECT_ADJUST_PREVENT_STRUCTURAL_DAMAGE, or that particular EffectType requires the governor at a more fundamental level...?