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...?
<Element>
<consumerName text="Improvements"/>
<relativeArtDefPaths>
<Element text="Improvements.artdef"/>
</relativeArtDefPaths>
<libraryDependencies/>
<loadsLibraries>false</loadsLibraries>
</Element>
My suspicion would be that Modbuddy only has Rise and Fall and Gathering Storm to go off of, so it will try to automatically resolve your artdef and check everything works, except it doesn’t know about the Australia DLC, so it replaces it with a default value. In Asset Editor, when you go File>Cook, do you get an error and it says something is replaced with a default value.Struggling to make custom Unique Improvement work visually.
Made it from sratch and intended to reuse Outback Station 3D model, but it doesn't appear. The Improvement functions, the game knows it's there, the yields change, but the 3D model is not used for it. Never made changes to ArtDefs before so this is new territory for me.
In MOD.Art.xml file I have this
XML:<Element> <consumerName text="Improvements"/> <relativeArtDefPaths> <Element text="Improvements.artdef"/> </relativeArtDefPaths> <libraryDependencies/> <loadsLibraries>false</loadsLibraries> </Element>
Improvements.artdef is in the same folder, its contents are almost copy-paste from Australia Pack's Improvements.artdef, except I removed the needless parts updating Pasture visuals. Those defining Outback Station visuals, there I changed <m_Name text="IMPROVEMENT_DIVINITY_HAMLET"/> so it assigns itself to my custom Improvement.
Just in case, I import both Improvements.artdef and MOD.Art.xml as UpdateArt both in FrontEnd and InGame.
Does it seem to anyone apparent what I'm missing or the issue may be deeper?
Another problem is that icon does not show up in the Loading Screen, Leader Sceen and Tech Tree. Tech Tree does feature the background flag and tooltip of the Improvement, it just has no icon. Leader Showcase in both Loading and Self-Dimplomacy does show among Unique Items this item, correct name, correct notation (A unique improvement phrase), correct description in detailed display. All well except the icon on the left is only blank space. In other places, such as Builder Action, the icon does correctly use Outback Station one.
Since the game generated all this just from the Civ Trait, I assumed I do not need to add this into PlayerItems Table (or whatever its name). Am I wrong?
I do not use Asset Editor, only ModBuddy and text.My suspicion would be that Modbuddy only has Rise and Fall and Gathering Storm to go off of, so it will try to automatically resolve your artdef and check everything works, except it doesn’t know about the Australia DLC, so it replaces it with a default value. In Asset Editor, when you go File>Cook, do you get an error and it says something is replaced with a default value.
As for icons, that’s not handled by artdefs, that’s handled by an icons.xml. What I would do is go to the game files and see what the Australia DLC does. It should have an entry in an IconDefinitions table, that tells the game to use an existing art file (an atlas) for the icon. You can just copy it, but replace ICON_OUTBACK_STATION with your own icon name.