[eXML] Dissecting Resources

I am at work with some spare time, so I am dissecting some of the XML and notating it along the way. 

There are some items within that I cannot determine their functionality or purpose.  Please feel free to correct any invalid information or add to the notes.  I will update this accordingly.  Please pardon the excessive carraige returns as this was done for clarity.

Code: xml
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <!-- There are two files that are currently used for resources, CoreResources.xml and CoreWorldResources.xml. 
  3. This document attempts to dissect those files by notating their contents.
  4. In the case of these two resource types, it appears that "world resources" are considered raw, untapped
  5. resources that appearon the map while "resources" are considered accumulated/stored resources. -->
  6.  
  7. <!-- This entry is from CoreWorldResources.xml. -->
  8. <ResourceTypes>
  9. <!-- All resource objects <ResourceType> must belong to the object <ResourceTypes> -->
  10.  
  11.  <DataChecksum NoParse="1">
  12.   <Ignore>DispName</Ignore>
  13.   <Translate>DispName,Description</Translate>
  14.  </DataChecksum>
  15.  <!-- I am not sure of the necessity of this block in mods and how it pertains to the XML creation.
  16.    The NoParse value of 1 would indicate that this block should not be parsed as a resource.
  17.    Considering this is titled "DataChecksum," I assume this is used by Stardock for updates.-->
  18.  
  19.  <ResourceType InternalName="VentriOre">
  20.  <!-- <ResourceType is the object name.  "InternalName" defines the name of the resource for 
  21.    Elemental's internal usage. -->
  22.   
  23.   <DisplayName>Ventri Metal Deposit</DisplayName>
  24.   <!-- The name of the resource as it is displayed to the player. -->
  25.   
  26.   <Type>VentriIronOre</Type>
  27.   <!-- The name of the resource for our (the modders) reference.   For instance, in order to build
  28.     upon this resource, the Ventri Mine improvement must appropriately reference "VentriIronOre." -->
  29.   
  30.   <Description>Build a Mine here to produce Metal.</Description>
  31.   <!-- This is the brief flavor text of the resource. -->
  32.   
  33.   <LongDescription>Ventri Ore was has long thought to be gone from this world. Unlike the relatively more common iron ore, Ventri Ore provides twice as much usable metal.</LongDescription>
  34.   <!-- This is the verbose flavor text of the resource. -->
  35.   
  36.   <PreferredTerrain>Land</PreferredTerrain>
  37.   <!-- The terrain in which the resource is available, although this is not applied with 100% accuracy.
  38.        Available values are defined in TerrainTypes.xml, or with custom terrain types as appropriate.-->
  39.   
  40.   <NeedsToBeUnlocked>0</NeedsToBeUnlocked>
  41.   <!-- Whether the resource needs to be unlocked or not.
  42.        Available values:  0 (No), 1 (Yes) -->
  43.    
  44.   <HarvestType>Mining</HarvestType>
  45.   <!-- The type of harvesting required.  I believe that this is an internal reference for the
  46.     AI to reference.
  47.     Available values:  Mining, Farming, -->
  48.   <!-- Value list incomplete. -->
  49.   
  50.   <IconColor>0,0,0</IconColor>
  51.   <!-- The color that shades the icon. -->
  52.   
  53.   <Icon>Gfx//Icons//Icon_Metal.png</Icon>
  54.   <!-- The file name of the icon and its location.  Custom icons can be located in "mods//". -->
  55.   
  56.   <ClothIcon>gfx\\TacticalIcons\\Res_VentiOre1.png</ClothIcon>
  57.   <!-- The file name of the icon as represented on the cloth map.  Custom icons can be located in "mods//". -->
  58.   
  59.   <TileDesign>R_Venrti_01</TileDesign>
  60.   <!-- The name of the tile, as designed in the Tile editor and/or defined in the tile's XML. -->
  61.   
  62.   <ModelColor>32,0,0</ModelColor>
  63.   <!-- The color that shades the tile -->
  64.   
  65.   <Production>1.0</Production>
  66.   <!-- Undetermined.  The production multiplier.  -->
  67.   
  68.   <Worth>5</Worth>
  69.   <!-- Undetermined. Possibly an internal value used by the AI to determine priority and/or a player's
  70.     relative strength. -->
  71.   
  72.   <Global>0</Global>
  73.   <!-- Is this a global resource or a local resource?
  74.     Available values:  0 (Local), 1 (Global) -->
  75.    
  76.   <Rarity>60</Rarity>
  77.   <!-- Frequency that the resource appears on the map.  Functionality is undetermined at this time.-->
  78.   
  79.   <Stored>0</Stored>
  80.   <!-- Is this resource stored and accumulated?
  81.     Available values:  0 (No), 1 (Yes) -->
  82.    
  83.   <RummagedPerTurn>1.0</RummagedPerTurn>
  84.   <!-- Undetermined.  Potentially obsolete.  Artifact from previous mechanic.-->
  85.   
  86.   <Medallions InternalName="IronOre_Res_Medallions">
  87.    <All>Res_Ores_Plains.png</All>
  88.   </Medallions>
  89.   <!-- The graphical image that represents the resource.  These must be located in
  90.     gfx\\medallions. -->
  91.   
  92.   <OnSelectSFX>Click_IronOre_01</OnSelectSFX>
  93.   <!-- The sound effect that is played when the resource is clicked.  These must be
  94.     located in sfx. -->
  95.   <!-- Note that medallions in other objects do have full directory locations, so it is logical to assume
  96.     that medallions and sound effects can be placed in the mods folder and referenced accordingly. -->
  97. </ResourceTypes>
  98.  
  99. <!-- This entry is from CoreResources.xml. -->
  100. <!-- Only the differences and additional notes are annotated. -->
  101. <ResourceTypes>
  102.  <DataChecksum NoParse="1">
  103.   <Ignore>DispName</Ignore>
  104.   <Translate>DispName,Description</Translate>
  105.  </DataChecksum>
  106.  <ResourceType InternalName="GoldType01">
  107.   <DisplayName>Gildar</DisplayName>
  108.   <Type>Gold</Type>
  109.   <IconColor>0,0,0</IconColor>
  110.   <Icon>Gfx//Icons//Res_Icon_Gold.png</Icon>
  111.   <ClothIcon>gfx\\TacticalIcons\\MetalOre_1.png</ClothIcon>
  112.   
  113.   <ModelColor>0,0,0</ModelColor>
  114.   <!-- Not sure why this is included, as there is no associated tile/model for
  115.     stored resources. -->
  116.   
  117.   <Worth>1</Worth>
  118.   <Global>1</Global>
  119.   
  120.   <Rarity>0.0</Rarity>
  121.   <!-- Stored resources, logically, do not appear on the map, so would have a
  122.     rarity of 0. -->
  123.   
  124.   <Shared>0</Shared>
  125.   <!-- Undetermined. -->
  126.   
  127.   <TradedByCaravans>1</TradedByCaravans>
  128.   <!-- Does this resource get traded via a caravan route?
  129.     Available values:  0 (no), 1 (yes) -->
  130.    
  131.   <ShownInGlobalDisplay>1</ShownInGlobalDisplay>
  132.   <!-- Is this resource displayed in the UI at the top of the screen?
  133.     Available values:  0 (no), 1 (yes) -->
  134.   
  135.   <Medallions InternalName="Gold_Res_Medallions">
  136.    <All>Res_Ores_Plains.png</All>
  137.   </Medallions>
  138.  </ResourceType>
  139. </ResourceTypes>
  140.  
  141. <!-- Additional tags which are not referenced above: -->
  142.  
  143. <EnvironmentType>GrasslandEnvironment</EnvironmentType>
  144. <EnvironmentSpreadIntensity>100.0</EnvironmentSpreadIntensity>
  145. <EnvironmentSpreadRadius>3</EnvironmentSpreadRadius>
  146.  
  147. <!-- Note that these are reportedly not used at this time. -->

 

10,622 views 18 replies
Reply #1 Top

Additional notes:

Medallions and sound effects appear to be required to be located in their respective directories, although I have not attempted to override this with the mods directory locations.  I am also not quite sure why medallions require their own internal name.

Reply #2 Top


  
  <Type>VentriIronOre</Type>
  <!-- Undetermined. -->

End of quote

It's the type of a gameplay resource it provides - see Marble/Stone Pit and Old Forest both providing Materials.

   
  <HarvestType>Mining</HarvestType>
  <!-- The type of harvesting required.  I believe that this is an internal reference for the
    AI to reference.
    Available values:  Mining, Farming, -->
  <!-- Value list incomplete. -->

End of quote

 Nope. think Refined Farming and Refined Mining techs.

 
  <Production>1.0</Production>
  <!-- Undetermined.  The production multiplier.  -->
End of quote

That's a guess but I'd say it is a part of <Production> * <HarvestingImprovementOutput> = <ResourceOutputInTheGame> . there was some talk about Pumpkin Patches providing 0.6 output of Fertile Land with a Farm built on them

<Worth>5</Worth>
  <!-- Undetermined. Possibly an internal value used by the AI to determine priority and/or a player's
    relative strength. -->

End of quote

Diplomatic negotiations value?

     
  <Rarity>60</Rarity>
  <!-- Undetermined.  Frequency that the resource appears on the map. -->
 
End of quote

 You're right, it's a chance to spawn on an empty tile. And I don't know how it exactly works either or what the <min,max> range is.


<RummagedPerTurn>1.0</RummagedPerTurn>
<!-- Undetermined. -->

End of quote

There was once talk of a rummaging mechanic. In short if you didn't have a source of an unlocked resource your people were supposed to be able to find small amounts of it. That's a leftover from that. No idea if it works.
  

Reply #3 Top

<PreferredTerrain> the value list is not complete, it can hold any Terrain value. It should also be noted that the value is not "forced", so for example a Warg resource tile with PreferredTerrain Swamp can spawn in other types of terrain.

Since the value is not forced, it is hard to determine if the tag even works, or has a purpose.

ResourceType also have 3 additional tags not included in your example

        <EnvironmentType>GrasslandEnvironment</EnvironmentType>
        <EnvironmentSpreadIntensity>100.0</EnvironmentSpreadIntensity>
        <EnvironmentSpreadRadius>3</EnvironmentSpreadRadius>

But they appear not to function as well

 

Reply #4 Top

Thank you for the updates.  I will notate the original accordingly.

Do you think that these explorations of the XML will be helpful to the general modding community and should I continue along this path?  I don't want to post excessively if the perception is that I am only doing this for myself.  The secondary motivation is for my own learning, but primarily, it is obviously very useful if the objects are mapped thoroughly.

Reply #5 Top

VentriIronOre

It's the type of a gameplay resource it provides - see Marble/Stone Pit and Old Forest both providing Materials.
End of quote

Except that Ventri Iron Ore (and Iron Ore) both produce "Metal."  This is handled with the improvement types.  This appears to be the name which we reference, as modders.

In CoreWorldResources: 

Code: xml
  1. &lt;Type&gt;VentriIronOre&lt;/Type&gt;

In the related (Ventri Mine) improvement type: 

Code: xml
  1. &lt;SupportedResourceType&gt;VentriIronOre&lt;/SupportedResourceType&gt;

Within the same improvement type, Metal is defined as the resource it provides:

Code: xml
  1.   &lt;GameModifier&gt;
  2.    &lt;ModType&gt;Resource&lt;/ModType&gt;
  3.    &lt;Attribute&gt;Metal&lt;/Attribute&gt;
  4.    &lt;Value&gt;3.0&lt;/Value&gt;
  5.    &lt;PerTurn&gt;1&lt;/PerTurn&gt;
  6.    &lt;ResourceShared&gt;1&lt;/ResourceShared&gt;
  7.   &lt;/GameModifier&gt;

 

Reply #6 Top

 
Code: xml
  1. &lt;HarvestType&gt;Mining&lt;/HarvestType&gt;
  2.   &lt;!-- The type of harvesting required.  I believe that this is an internal reference for the
  3.     AI to reference.
  4.     Available values:  Mining, Farming, --&gt;
  5.   &lt;!-- Value list incomplete. --&gt;

 Nope. think Refined Farming and Refined Mining techs.

End of quote

Please feel free to clarify.

Reply #7 Top

This is the correlating improvement to the above resources.

Code: xml
  1. &lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  2. &lt;!-- Improvements are very detailed objects.  For this example, I am simply annotating the Ventri Mine --&gt;
  3. &lt;!-- as it directly reflects the resources examples above.  In time, they will have their own thread. --&gt;
  4. &lt;ImprovementTypes&gt;
  5. &lt;!-- All improvement objects &lt;ImprovementType&gt; must belong to the object &lt;ImprovementTypes&gt; --&gt;
  6.  &lt;DataChecksum NoParse="1"&gt;
  7.   &lt;Ignore&gt;DisplayName&lt;/Ignore&gt;
  8.   &lt;Translate&gt;DisplayName&lt;/Translate&gt;
  9.  &lt;/DataChecksum&gt;
  10.  &lt;ImprovementType InternalName="E_Ventri_Mine"&gt;
  11.  &lt;!-- ImprovementType is the object name.  "InternalName" defines the name of the resource for --&gt;
  12.  &lt;!-- Elemental's usage. --&gt;
  13.  
  14.   &lt;DisplayName&gt;Ventri Mine&lt;/DisplayName&gt;
  15.   &lt;!-- The name of the resource as it is displayed to the player. --&gt;
  16.  
  17.   &lt;Description&gt;Ventri Mines can be built on Ventri Iron Ore to produce 3 Metal.&lt;/Description&gt;
  18.   &lt;!-- This is the flavor text of the improvement. --&gt;
  19.   
  20.   &lt;TileDesign&gt;F_Venrti_Mine_01&lt;/TileDesign&gt;
  21.   &lt;!-- The name of the tile, as designed in the Tile editor and/or defined in the tile's XML. --&gt;
  22.   &lt;ConstructionTileDesign&gt;F_Venrti_Mine_Build_01&lt;/ConstructionTileDesign&gt;
  23.   &lt;!-- The name of the tile during construction, as designed in the Tile editor and/or defined --&gt;
  24.   &lt;!-- in the tile's XML. --&gt;
  25.   
  26.   &lt;SupportedTerrainType&gt;Land&lt;/SupportedTerrainType&gt;
  27.   &lt;SupportedTerrainType&gt;City&lt;/SupportedTerrainType&gt;
  28.   &lt;!-- The terrain where tile can be built. --&gt;
  29.   &lt;!-- I am not certain as to the relevance of this entry for the Ventri Mine, as this can only --&gt;
  30.   &lt;!-- be build on a Ventri Ore resource. --&gt;
  31.   
  32.   &lt;DrawnIcon&gt;Gfx/TacticalIcons/K_VentiMine1.png&lt;/DrawnIcon&gt;
  33.   &lt;!-- The image that appears on the cloth map. --&gt;
  34.   
  35.   &lt;DrawnIconConstruction&gt;Gfx/TacticalIcons/K_VentiMine1_C.png&lt;/DrawnIconConstruction&gt;
  36.   &lt;!-- The image that appears on the cloth map during construction. --&gt;
  37.  
  38.   &lt;Thumbnail&gt;Gfx/Medallions/F_Venrti_Mine_01_Thumb.png&lt;/Thumbnail&gt;
  39.   &lt;!-- The small image that is used to represent the improvement. --&gt;
  40.   
  41.   &lt;IgnoreDuplicateImpLimit&gt;true&lt;/IgnoreDuplicateImpLimit&gt;
  42.   &lt;!-- Undetermined if this is actually used.  Can more than one be constructed? --&gt;
  43.   &lt;!-- Available values:  True, False --&gt;
  44.   
  45.   &lt;Medallions InternalName=""&gt;
  46.    &lt;All&gt;Gfx/Medallions/F_Venrti_Mine_01_Thumb.png&lt;/All&gt;
  47.    &lt;Border_All&gt;&lt;/Border_All&gt;
  48.   &lt;/Medallions&gt;
  49.   &lt;!-- The graphical image that represents the improvement. --&gt;
  50.  
  51.   &lt;!-- Prerequisites --&gt;
  52.   &lt;RequiresCity&gt;True&lt;/RequiresCity&gt;
  53.   &lt;!-- Must this improvement be built within a city's zone of control? --&gt;
  54.   &lt;!-- Available values:  True, False. --&gt;
  55.   
  56.   &lt;RequiresResource&gt;True&lt;/RequiresResource&gt;
  57.   &lt;!-- Must this improvement be built upon a resource? --&gt;
  58.   &lt;!-- Available values:  True, False. --&gt;
  59.   
  60.   &lt;SupportedResourceType&gt;VentriIronOre&lt;/SupportedResourceType&gt;
  61.   &lt;!-- What is the resource that it can be built upon?  This value is the &lt;Type&gt; value which is --&gt;
  62.   &lt;!-- defined in the resource itself.  See above. --&gt;
  63.  
  64.   &lt;Prereq&gt;
  65.    &lt;Type&gt;Allegiance&lt;/Type&gt;
  66.    &lt;Attribute&gt;Empire&lt;/Attribute&gt;
  67.   &lt;/Prereq&gt;
  68.   &lt;!-- In this example, this requires an allegiance to the Empire faction in order to build this --&gt;
  69.   &lt;!-- improvement.  All &lt;Type&gt; tags will be referenced at a later date. --&gt;
  70.  
  71.   &lt;LaborToBuild&gt;5.0&lt;/LaborToBuild&gt;
  72.   &lt;!-- How many turns it takes to build the improvement. --&gt;
  73.  
  74.   &lt;GameModifier&gt;
  75.    &lt;ModType&gt;ConstructionResourceCost&lt;/ModType&gt;
  76.    &lt;Attribute&gt;Gold&lt;/Attribute&gt;
  77.    &lt;Value&gt;-40&lt;/Value&gt;
  78.   &lt;/GameModifier&gt;
  79.   &lt;!-- The cost of constructing the improvement. --&gt;
  80.   &lt;!-- Note that additional &lt;GameModifiers&gt; with the &lt;ModType&gt; of ContructionResourceCost can be --&gt;
  81.   &lt;!-- added as required.  --&gt;
  82.  
  83.   &lt;!-- Benefits --&gt;
  84.   &lt;GameModifier&gt;
  85.    &lt;ModType&gt;Resource&lt;/ModType&gt;
  86.    &lt;Attribute&gt;Metal&lt;/Attribute&gt;
  87.    &lt;Value&gt;3.0&lt;/Value&gt;
  88.    &lt;PerTurn&gt;1&lt;/PerTurn&gt;
  89.    &lt;ResourceShared&gt;1&lt;/ResourceShared&gt;
  90.   &lt;/GameModifier&gt;
  91.   &lt;!-- The benefits of constructing the improvement. --&gt;
  92.   &lt;!-- Note that additional &lt;GameModifiers&gt; with the &lt;ModType&gt; of Resource can be --&gt;
  93.   &lt;!-- added as required.  --&gt;  
  94.   
  95.     &lt;AIData AIPersonality="AI_General"&gt;
  96.       &lt;AITag&gt;Mining&lt;/AITag&gt;
  97.     &lt;/AIData&gt;
  98.  &lt;!-- How the AI references this improvement. --&gt;
  99.  
  100.  &lt;/ImprovementType&gt;
  101. &lt;/ImprovementTypes&gt;

Reply #8 Top

Excellent work with this list Jharii, well done here my friend.

 

Quoting Heavenfall, reply 3
<PreferredTerrain> the value list is not complete, it can hold any Terrain value. It should also be noted that the value is not "forced", so for example a Warg resource tile with PreferredTerrain Swamp can spawn in other types of terrain.

Since the value is not forced, it is hard to determine if the tag even works, or has a purpose.

ResourceType also have 3 additional tags not included in your example

        <EnvironmentType>GrasslandEnvironment</EnvironmentType>
        <EnvironmentSpreadIntensity>100.0</EnvironmentSpreadIntensity>
        <EnvironmentSpreadRadius>3</EnvironmentSpreadRadius>

But they appear not to function as well
End of Heavenfall's quote

I noticed this too. In fact there's a Lot of things that just don't seem to be hooked up or just flat out don't work. I'm not sure why either but it doesn't make much sense to me to have settings in the XML that don't change anything (at least not anything noticeable). This makes it a lot harder (for me at least) to know what's worth changing and what isn't. Especially when we try to change something expecting it to have a certain result and then nothing happens.

Dhuran and I also noticed there seems to be a lot of UN-Necessary steps when trying to Mod even simple things. Some things appear to be split up in the XML for no other reason than to have them split up when they could be condensed into one XML file. Some things seem to take way too many steps to accomplish when in other games that support XML editing don't require as many different references or steps to get a job done.

Hopefully some of the upcoming patches address the over complicated steps and narrow things down for us. Also having a list of what works and what doesn't or what isn't hooked up yet would be great. Somehow though I don't see Stardock coming forward with a list and saying "Here's a list of stuff that doesn't work yet so don't worry about changing it" but honestly that would be a Big Help.

 

Reply #9 Top

I noticed this too. In fact there's a Lot of things that just don't seem to be hooked up or just flat out don't work. I'm not sure why either but it doesn't make much sense to me to have settings in the XML that don't change anything (at least not anything noticeable). This makes it a lot harder (for me at least) to know what's worth changing and what isn't. Especially when we try to change something expecting it to have a certain result and then nothing happens.
End of quote

Thanks, Raven.  And this is EXACTLY why I am doing this.  Without Stardock's input, and us chomping at the bit to mod the game, it is very difficult to implement anything without pulling out some hair (fortunately for me, I shave my dome).  Pooling our resources (ugh, sorry) together should help alleviate these struggles.

In time, it would be worthwhile to have nice, clean templates of these objects so we can just plug them in and fill them out as needed.

Dhuran and I also noticed there seems to be a lot of UN-Necessary steps when trying to Mod even simple things. Some things appear to be split up in the XML for no other reason than to have them split up when they could be condensed into one XML file. Some things seem to take way too many steps to accomplish when in other games that support XML editing don't require as many different references or steps to get a job done.
End of quote

I noticed this as well.  I think I am going to attack this much differently than Stardock.  My intention is to have an XML file for each resource, improvement type, etc.  Essentially, each object "grouping" in the game.  So when I implement my clay and ceramic bits resources, quarry, kiln, and mint improvements, they will be kept in independant files.

  • SL_Resource_Clay.xml
  • SL_Resource_Ceramic_Bits.xml
  • SL_Improvement_Clay_Quarry.xml
  • SL_Improvement_Kiln.xml
  • SL_Improvement_Mint.xml

I (as well as you and everyone else) will know exactly what is contained within and the notes at the top of the file will describe the relationships.  If I ever have to adjust the output of the kiln for each race/faction, I know exactly where to go, and I don't need to open a dozen files to do so.

Reply #10 Top

Great Job.   Definitely interested in this.   I do think that we need some more information from stardock (the .xsd files would be great), so that we know what the valid values are for each field.  I have a feeling that we'll eventually have the full story, but right now they are still in "overdrive" trying to get promised features working.

 

In any case, keep it up, and thanks for sharing.

Reply #11 Top

Annotated Template:

Code: xml
  1. &lt;?xml version="1.0" encoding="utf-8"?&gt;
  2. &lt;!-- Resource Template --&gt;
  3. &lt;!-- There are essentially two types of resources in the game:  those that appear on the map and those --&gt;
  4. &lt;!-- that are generated from other sources, such as improvements.  This is a template for those resources. --&gt;
  5. &lt;ResourceTypes&gt;
  6.  &lt;DataChecksum NoParse="1"&gt;
  7.   &lt;Ignore&gt;DispName&lt;/Ignore&gt;
  8.   &lt;Translate&gt;DispName,Description&lt;/Translate&gt;
  9.  &lt;/DataChecksum&gt;
  10.  &lt;ResourceType InternalName=""&gt;
  11.  &lt;!-- InternalName requires a unique name for Elemental's internal usage. --&gt;
  12.   
  13.   &lt;!-- ************************************************************** --&gt;
  14.   &lt;!-- These are required in both map resources and stored resources. --&gt;
  15.   &lt;!-- ************************************************************** --&gt;
  16.   
  17.   &lt;Type&gt;&lt;/Type&gt;
  18.   &lt;!-- The name of the resource for you (the modder) to reference. --&gt;
  19.   &lt;DisplayName&gt;&lt;/DisplayName&gt;
  20.   &lt;!-- The name of the resource as it is displayed to the player. --&gt;
  21.   &lt;Description&gt;&lt;/Description&gt;
  22.   &lt;!-- This is the brief flavor text of the resource. --&gt;
  23.   &lt;LongDescription&gt;&lt;/LongDescription&gt;
  24.   &lt;!-- This is the verbose flavor text of the resource. --&gt;
  25.   &lt;IconColor&gt;&lt;/IconColor&gt;
  26.   &lt;!-- The color that shades the icon. (R,G,B) --&gt;
  27.   &lt;Icon&gt;//mods//gfx//&lt;/Icon&gt;
  28.   &lt;!-- The file name of the icon and its location.  Custom icons can be located in "mods//". --&gt;
  29.   &lt;Worth&gt;&lt;/Worth&gt;
  30.   &lt;!-- Undetermined. Possibly an internal value used by the AI to determine priority and/or a player's
  31.     relative strength. --&gt;
  32.   &lt;Global&gt;&lt;/Global&gt;
  33.   &lt;!-- Is this a global resource or a local resource? (0,1) --&gt;
  34.   &lt;Rarity&gt;&lt;/Rarity&gt;
  35.   &lt;!-- Unknown implementation.  Frequency that the resource appears on the map. --&gt;
  36.   &lt;Medallions InternalName=""&gt;
  37.    &lt;All&gt;//mods//gfx//&lt;/All&gt;
  38.   &lt;/Medallions&gt;
  39.   &lt;!-- The graphical image that represents the resource. --&gt;
  40.   
  41.   &lt;!-- * End universal resources.       ***************************** --&gt;
  42.   
  43.   &lt;!-- ************************************************************** --&gt;
  44.   &lt;!-- These are required for map resources.  Delete as required.     --&gt;
  45.   &lt;!-- ************************************************************** --&gt;
  46.   
  47.   &lt;PreferredTerrain&gt;&lt;/PreferredTerrain&gt;
  48.   &lt;!-- The terrain type which the resource appears on.  Not currently enforced. --&gt;
  49.   &lt;HarvestType&gt;&lt;/HarvestType&gt;
  50.   &lt;!-- Usage unknown.  Potential AI reference.--&gt;
  51.   &lt;NeedsToBeUnlocked&gt;&lt;/NeedsToBeUnlocked&gt;
  52.   &lt;!-- Usage unknown.  Whether the resource needs to be unlocked or not. (0/1) --&gt;
  53.   
  54.   &lt;ClothIcon&gt;//mods//gfx//&lt;/ClothIcon&gt;
  55.   &lt;!-- The file name of the icon as represented on the cloth map.  Custom icons can be located in "mods//". --&gt;
  56.  
  57.   &lt;TileDesign&gt;&lt;/TileDesign&gt;
  58.   &lt;!-- The name of the tile, as designed in the Tile editor and/or defined in the tile's XML. --&gt;
  59.   &lt;ModelColor&gt;&lt;/ModelColor&gt;
  60.   &lt;!-- The color that shades the tile (R,G,B) --&gt;
  61.   
  62.   &lt;Production&gt;&lt;/Production&gt;
  63.   &lt;!-- Undetermined.  The production multiplier.  --&gt;
  64.   &lt;Stored&gt;&lt;/Stored&gt;
  65.   &lt;!-- Is this resource stored and accumulated? (0,1) --&gt;
  66.   &lt;OnSelectSFX&gt;//mods/sfx//&lt;/OnSelectSFX&gt;
  67.   &lt;!-- The sound effect that is played when the resource is clicked. --&gt;
  68.   
  69.   &lt;!-- * End map resources.             ***************************** --&gt;
  70.   
  71.   &lt;!-- ************************************************************** --&gt;
  72.   &lt;!-- These are required for stored resources. Delete as required.   --&gt;
  73.   &lt;!-- ************************************************************** --&gt;
  74.   &lt;Shared&gt;&lt;/Shared&gt;
  75.   &lt;!-- Undetermined. --&gt;
  76.   &lt;TradedByCaravans&gt;&lt;/TradedByCaravans&gt;
  77.   &lt;!-- Does this resource get traded via a caravan route? (0,1) --&gt;
  78.   &lt;ShownInGlobalDisplay&gt;&lt;/ShownInGlobalDisplay&gt;
  79.   &lt;!-- Is this resource displayed in the UI at the top of the screen? (0,1) --&gt;
  80.   &lt;!-- * End stored resources.          ***************************** --&gt;
  81.   
  82.   &lt;!-- ************************************************************** --&gt;
  83.   &lt;!-- Unknown or obsolete. Delete as required.                       --&gt;
  84.   &lt;!-- ************************************************************** --&gt;
  85.   &lt;RummagedPerTurn&gt;&lt;/RummagedPerTurn&gt;
  86.   &lt;EnvironmentType&gt;&lt;/EnvironmentType&gt;
  87.   &lt;EnvironmentSpreadIntensity&gt;&lt;/EnvironmentSpreadIntensity&gt;
  88.   &lt;EnvironmentSpreadRadius&gt;&lt;/EnvironmentSpreadRadius&gt;
  89.   &lt;!-- * End obsolete tags.             ***************************** --&gt;
  90.   
  91.  &lt;/ResourceType&gt;
  92. &lt;/ResourceTypes&gt;

Reply #12 Top

Barebones template:

Code: xml
  1. &lt;?xml version="1.0" encoding="utf-8"?&gt;
  2. &lt;!-- Resource Template --&gt;
  3. &lt;!-- There are essentially two types of resources in the game:  those that appear on the map and those --&gt;
  4. &lt;!-- that are generated from other sources, such as improvements.  This is a template for those resources. --&gt;
  5. &lt;ResourceTypes&gt;
  6.  &lt;DataChecksum NoParse="1"&gt;
  7.   &lt;Ignore&gt;DispName&lt;/Ignore&gt;
  8.   &lt;Translate&gt;DispName,Description&lt;/Translate&gt;
  9.  &lt;/DataChecksum&gt;
  10.  &lt;ResourceType InternalName=""&gt;
  11.   
  12.   &lt;Type&gt;&lt;/Type&gt;
  13.   &lt;DisplayName&gt;&lt;/DisplayName&gt;
  14.   &lt;Description&gt;&lt;/Description&gt;
  15.   &lt;LongDescription&gt;&lt;/LongDescription&gt;
  16.   &lt;IconColor&gt;&lt;/IconColor&gt;
  17.   &lt;Icon&gt;//mods//gfx//&lt;/Icon&gt;
  18.   &lt;Worth&gt;&lt;/Worth&gt;
  19.   &lt;Global&gt;&lt;/Global&gt;
  20.   &lt;Rarity&gt;&lt;/Rarity&gt;
  21.   &lt;Medallions InternalName=""&gt;
  22.    &lt;All&gt;//mods//gfx//&lt;/All&gt;
  23.   &lt;/Medallions&gt;
  24.   
  25.   &lt;!-- These are required for map resources.  Delete as required.     --&gt;
  26.   
  27.   &lt;PreferredTerrain&gt;&lt;/PreferredTerrain&gt;
  28.   &lt;HarvestType&gt;&lt;/HarvestType&gt;
  29.   &lt;NeedsToBeUnlocked&gt;&lt;/NeedsToBeUnlocked&gt;
  30.   
  31.   &lt;ClothIcon&gt;//mods//gfx//&lt;/ClothIcon&gt;
  32.   &lt;TileDesign&gt;&lt;/TileDesign&gt;
  33.   &lt;ModelColor&gt;&lt;/ModelColor&gt;
  34.   
  35.   &lt;Production&gt;&lt;/Production&gt;
  36.   &lt;Stored&gt;&lt;/Stored&gt;
  37.   &lt;OnSelectSFX&gt;//mods/sfx//&lt;/OnSelectSFX&gt;
  38.   &lt;!-- These are required for stored resources. Delete as required.   --&gt;
  39.   &lt;Shared&gt;&lt;/Shared&gt;
  40.   &lt;TradedByCaravans&gt;&lt;/TradedByCaravans&gt;
  41.   &lt;ShownInGlobalDisplay&gt;&lt;/ShownInGlobalDisplay&gt;
  42.   &lt;!-- Unknown or obsolete. Delete as required.                       --&gt;
  43.   &lt;RummagedPerTurn&gt;&lt;/RummagedPerTurn&gt;
  44.   &lt;EnvironmentType&gt;&lt;/EnvironmentType&gt;
  45.   &lt;EnvironmentSpreadIntensity&gt;&lt;/EnvironmentSpreadIntensity&gt;
  46.   &lt;EnvironmentSpreadRadius&gt;&lt;/EnvironmentSpreadRadius&gt;
  47.  &lt;/ResourceType&gt;
  48. &lt;/ResourceTypes&gt;

Reply #13 Top

Frustratingly, setting a world resource type to <Rarity>0.0</Rarity> does not prevent it from being spawned during world creation.

Code: xml
  1. &lt;ResourceType InternalName="FertileLandType01"&gt;&lt;Rarity&gt;0.0&lt;/Rarity&gt;&lt;/ResourceType&gt;

More research to do...

Reply #14 Top

Only for new types of resources. If you're looking to remove the placing of a resource type, I don't think that's possible at the moment. First, <rarity> doesn't seem to overwrite properly. Second, there will still spawn certain resource nodes around the original starting point.

Reply #15 Top

That absolutely sucks.

Reply #16 Top

Quoting Jharii, reply 1
Additional notes:

Medallions and sound effects appear to be required to be located in their respective directories, although I have not attempted to override this with the mods directory locations.  I am also not quite sure why medallions require their own internal name.
End of Jharii's quote

 

 Here is an example of a medallion that is located in units\icons working in game (Notice the bottom right corner):

 

Jafar

 

I hope that helps!

 

 

Reply #17 Top

Quoting jshores, reply 16

Here is an example of a medallion that is located in units\icons working in game (Notice the bottom right corner):

I hope that helps!
End of jshores's quote

Thanks!  Yeah, I had already gotten the override to work in the mods directory.

Reply #18 Top

Quoting Jharii, reply 7
This is the correlating improvement to the above resources.


  <IgnoreDuplicateImpLimit>true</IgnoreDuplicateImpLimit>
  <!-- Undetermined if this is actually used.  Can more than one be constructed? -->
  <!-- Available values:  True, False -->

End of Jharii's quote

 

Yes, this is used. If you set that to false, and you happened to have two ventri ores in your city's influence, you'd only be able to build upon one of them. I've used this on city buildings, and can say that yes, it does work.