scotchandcake
Chieftain
- Joined
- Jul 12, 2012
- Messages
- 38
Hey folks,
just a quick question to make my mod work more smoothly:
I added a new improvement, the "Outpost", which uses the Barbarian Camp graphics.
It can be built in forests and jungles, yields +1 Food and also increases defense slightly for units stationed inside.
It all works perfectly well, with one exception: The AI never builds the Outpost at all.
Is there some define, which is used to tell the AI "you want to build this"?
I couldn't find anything that defines a "flavor" for improvements or something like that.
Here is the improvement's xml for reference:
Thanks in advance for help and ideas!
just a quick question to make my mod work more smoothly:
I added a new improvement, the "Outpost", which uses the Barbarian Camp graphics.
It can be built in forests and jungles, yields +1 Food and also increases defense slightly for units stationed inside.
It all works perfectly well, with one exception: The AI never builds the Outpost at all.
Is there some define, which is used to tell the AI "you want to build this"?
I couldn't find anything that defines a "flavor" for improvements or something like that.
Here is the improvement's xml for reference:
Spoiler :
<GameData>
<Improvements>
<Row>
<Type>IMPROVEMENT_OUTPOST</Type>
<Description>Outpost</Description>
<Civilopedia>Outposts have always played a vital role for the growth of civilizations. They are versatile improvements that can be used for various purposes. Usually, Outposts have some kind of Palisade protection and are well hidden inside Forests or Jungles. They provide additional defense and offer a Food storage for military or civilians who are stationed outside of Cities.[NEWLINE][NEWLINE]The Outpost provides 25% extra defense for military units stationed inside it, and increases the Food output of the tile it is constructed on. After the discovery of Archaeology, the Outpost may also be used for research purposes[NEWLINE]The need of nearby building material requires the Outpost to be constructed in Forest or Jungle. You can construct an Outpost within your territory, or directly adjacent to your territory.</Civilopedia>
<ArtDefineTag>ART_DEF_IMPROVEMENT_BARBARIAN_CAMP</ArtDefineTag>
<RequiresFeature>true</RequiresFeature>
<DestroyedWhenPillaged>true</DestroyedWhenPillaged>
<InAdjacentFriendly>true</InAdjacentFriendly>
<DefenseModifier>25</DefenseModifier>
<PortraitIndex>21</PortraitIndex>
<IconAtlas>TERRAIN_ATLAS</IconAtlas>
</Row>
</Improvements>
<Improvement_Yields>
<Row>
<ImprovementType>IMPROVEMENT_OUTPOST</ImprovementType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>1</Yield>
</Row>
</Improvement_Yields>
<Improvement_ValidFeatures>
<Row>
<ImprovementType>IMPROVEMENT_OUTPOST</ImprovementType>
<FeatureType>FEATURE_JUNGLE</FeatureType>
</Row>
<Row>
<ImprovementType>IMPROVEMENT_OUTPOST</ImprovementType>
<FeatureType>FEATURE_FOREST</FeatureType>
</Row>
</Improvement_ValidFeatures>
<Improvement_TechYieldChanges>
<Row>
<ImprovementType>IMPROVEMENT_OUTPOST</ImprovementType>
<TechType>TECH_ARCHAEOLOGY</TechType>
<YieldType>YIELD_SCIENCE</YieldType>
<Yield>1</Yield>
</Row>
</Improvement_TechYieldChanges>
<Builds>
<Row>
<Type>BUILD_OUTPOST</Type>
<PrereqTech>TECH_SCOUTING</PrereqTech>
<Time>700</Time>
<ImprovementType>IMPROVEMENT_OUTPOST</ImprovementType>
<Description>Construct an Outpost</Description>
<Recommendation>It will increase the tile's [ICON_FOOD] Food output, granting increased Growth for your City. It also provides increased defense for units stationed inside.</Recommendation>
<EntityEvent>ENTITY_EVENT_BUILD</EntityEvent>
<OrderPriority>98</OrderPriority>
<IconIndex>11</IconIndex>
<IconAtlas>TECH_ATLAS_PRE</IconAtlas>
</Row>
</Builds>
<Unit_Builds>
<Row>
<UnitType>UNIT_WORKER</UnitType>
<BuildType>BUILD_OUTPOST</BuildType>
</Row>
</Unit_Builds>
</GameData>
<Improvements>
<Row>
<Type>IMPROVEMENT_OUTPOST</Type>
<Description>Outpost</Description>
<Civilopedia>Outposts have always played a vital role for the growth of civilizations. They are versatile improvements that can be used for various purposes. Usually, Outposts have some kind of Palisade protection and are well hidden inside Forests or Jungles. They provide additional defense and offer a Food storage for military or civilians who are stationed outside of Cities.[NEWLINE][NEWLINE]The Outpost provides 25% extra defense for military units stationed inside it, and increases the Food output of the tile it is constructed on. After the discovery of Archaeology, the Outpost may also be used for research purposes[NEWLINE]The need of nearby building material requires the Outpost to be constructed in Forest or Jungle. You can construct an Outpost within your territory, or directly adjacent to your territory.</Civilopedia>
<ArtDefineTag>ART_DEF_IMPROVEMENT_BARBARIAN_CAMP</ArtDefineTag>
<RequiresFeature>true</RequiresFeature>
<DestroyedWhenPillaged>true</DestroyedWhenPillaged>
<InAdjacentFriendly>true</InAdjacentFriendly>
<DefenseModifier>25</DefenseModifier>
<PortraitIndex>21</PortraitIndex>
<IconAtlas>TERRAIN_ATLAS</IconAtlas>
</Row>
</Improvements>
<Improvement_Yields>
<Row>
<ImprovementType>IMPROVEMENT_OUTPOST</ImprovementType>
<YieldType>YIELD_FOOD</YieldType>
<Yield>1</Yield>
</Row>
</Improvement_Yields>
<Improvement_ValidFeatures>
<Row>
<ImprovementType>IMPROVEMENT_OUTPOST</ImprovementType>
<FeatureType>FEATURE_JUNGLE</FeatureType>
</Row>
<Row>
<ImprovementType>IMPROVEMENT_OUTPOST</ImprovementType>
<FeatureType>FEATURE_FOREST</FeatureType>
</Row>
</Improvement_ValidFeatures>
<Improvement_TechYieldChanges>
<Row>
<ImprovementType>IMPROVEMENT_OUTPOST</ImprovementType>
<TechType>TECH_ARCHAEOLOGY</TechType>
<YieldType>YIELD_SCIENCE</YieldType>
<Yield>1</Yield>
</Row>
</Improvement_TechYieldChanges>
<Builds>
<Row>
<Type>BUILD_OUTPOST</Type>
<PrereqTech>TECH_SCOUTING</PrereqTech>
<Time>700</Time>
<ImprovementType>IMPROVEMENT_OUTPOST</ImprovementType>
<Description>Construct an Outpost</Description>
<Recommendation>It will increase the tile's [ICON_FOOD] Food output, granting increased Growth for your City. It also provides increased defense for units stationed inside.</Recommendation>
<EntityEvent>ENTITY_EVENT_BUILD</EntityEvent>
<OrderPriority>98</OrderPriority>
<IconIndex>11</IconIndex>
<IconAtlas>TECH_ATLAS_PRE</IconAtlas>
</Row>
</Builds>
<Unit_Builds>
<Row>
<UnitType>UNIT_WORKER</UnitType>
<BuildType>BUILD_OUTPOST</BuildType>
</Row>
</Unit_Builds>
</GameData>
Thanks in advance for help and ideas!