Adding elementium mines

I  have been tinkering with adding elementium ore as a very rare resource, using existing models and all that.

I get them to show up in map editor, and I am able to place them all over the map, but once I go into a game they disappear.

List of XMLs I have overwritten/added:

CoreWorldResources.xml

R_Elementium_01.xml

R_Elementium_Ore_01.xml

F_Elementium_Mine_01.xml

F_Elementium_Mine_Build_01,xml

K_Elementium_Mine_01.xml

K_Elementium_Mine_Build_01,xml

 

Am I missing some XMLs?

16,187 views 19 replies
Reply #1 Top

Just to be clear, what exactly have you done in CoreWorldResources.xml? The file is not actually supposed to be changed, and if you absolutely have to it requires a procedure to regenerate the data.zip file in the game.

Reply #2 Top

Quoting Heavenfall, reply 1
Just to be clear, what exactly have you done in CoreWorldResources.xml? The file is not actually supposed to be changed, and if you absolutely have to it requires a procedure to regenerate the data.zip file in the game.

 

I had to make it able to spawn by itself, so I added:

Code: xml
  1.     <ResourceType InternalName="ElementiumOre">
  2.         <DisplayName>Elementium Deposit</DisplayName>
  3.         <Type>ElementiumOre</Type>
  4.         <Description>Building a Mine here produces Elementium</Description>
  5.         <LongDescription>Elementium is the rarest of resources, used in all sorts of magical equipment</LongDescription>
  6.         <PreferredTerrain>Land</PreferredTerrain>
  7.         <NeedsToBeUnlocked>0</NeedsToBeUnlocked>
  8.         <HarvestType>Mining</HarvestType>
  9.         <IconColor>0,0,0</IconColor>
  10.         <Icon>Gfx//Icons//Icon_Metal.png</Icon>
  11.         <ClothIcon>gfx\\TacticalIcons\\Res_VentiOre1.png</ClothIcon>
  12.         <TileDesign>R_Elementium_01</TileDesign>
  13.         <ModelColor>32,0,0</ModelColor>
  14.         <Production>1.0</Production>
  15.         <Worth>5</Worth>
  16.         <Global>0</Global>
  17.     <Rarity>25</Rarity>
  18.         <Stored>0</Stored>
  19.         <RummagedPerTurn>1.0</RummagedPerTurn>
  20.         <Medallions InternalName="IronOre_Res_Medallions">
  21.             <All>Res_Ores_Plains.png</All>
  22.         </Medallions>
  23.         <OnSelectSFX>Click_IronOre_01</OnSelectSFX>
  24.     </ResourceType>
  25. </ResourceTypes>

To my coreworldresourcesoveride.xml in the mods directory.

Reply #3 Top

Could you upload your files?

Reply #4 Top

Quoting Heavenfall, reply 3
Could you upload your files?

 

Will do so when I get home.

 

In the mentione, do you know if anyone has succesfully added custom resource nodes?

Reply #5 Top

Btw silly question but never found what is elementium for.

Reply #7 Top

Ah thx for the answer.

Reply #8 Top

I believe there was a video way back by frogboy claiming how easy it would be to add resources to the game

Reply #9 Top

I'd really love to get my hands on this mod, a pity the code function on Stardock forums sucks so epically or I'd just ask for the code and insert it all myself, but Stardock's hard to read color coded numbered mess of un-sized tabled crap makes copy and pasting it useless and reading it a pain.

Reply #10 Top

This is a working worldresourcemod.xml (it WILL add elementium nodes to fresh worlds)

<?xml version="1.0" encoding="utf-8"?>

<ResourceTypes>
    <DataChecksum NoParse="1">
        <Ignore>DispName</Ignore>
        <Translate>DispName,Description</Translate>
    </DataChecksum>

    <!--**********************************************-->
    <!--************** Core Resources ****************-->
    <!--**********************************************-->

    <ResourceType InternalName="ElementiumOre">
        <DisplayName>Elementium Deposit</DisplayName>
        <Type>ElementiumOre</Type>
        <Description>Building a Mine here produces one Elementium every ten turns.</Description>
        <LongDescription>Elementium is the stuff of legends. Even when located, it requires excessive amounts of labour to harvest, due to how little is found in the ground.</LongDescription>
        <PreferredTerrain>Land</PreferredTerrain>
        <NeedsToBeUnlocked>0</NeedsToBeUnlocked>
        <HarvestType>Mining</HarvestType>
        <IconColor>0,0,0</IconColor>
        <Icon>Gfx//Icons//Icon_Metal.png</Icon>
        <ClothIcon>gfx\\TacticalIcons\\Res_VentiOre1.png</ClothIcon>
        <TileDesign>R_Venrti_01</TileDesign>
        <ModelColor>32,0,0</ModelColor>
        <Production>1.0</Production>
        <Worth>5</Worth>
        <Global>0</Global>
    <Rarity>50</Rarity>
        <Stored>0</Stored>
        <RummagedPerTurn>1.0</RummagedPerTurn>
        <Medallions InternalName="IronOre_Res_Medallions">
            <All>Res_Ores_Plains.png</All>
        </Medallions>
        <OnSelectSFX>Click_IronOre_01</OnSelectSFX>
    </ResourceType>
</ResourceTypes>

And this is a working (cross-faction) building to mine it.

<?xml version="1.0" encoding="ISO-8859-1"?>
<ImprovementTypes>
    <DataChecksum NoParse="1">
        <Ignore>DisplayName</Ignore>
        <Translate>DisplayName</Translate>
    </DataChecksum>

<!-- ************ -->
    <!-- ** Stable ** -->
    <!-- ************ -->
    <ImprovementType InternalName="ElementiumMine_testmod">
        <!-- Improvement Data -->
        <DisplayName>Elementium Mine</DisplayName>
        <Description>Elementium Mines produce one Elementium every ten turns.</Description>
    <TileDesign>K_Stables_01</TileDesign>
        <ConstructionTileDesign>K_Stables_Build_01</ConstructionTileDesign>
        <SupportedTerrainType>Land</SupportedTerrainType>
        <SupportedTerrainType>City</SupportedTerrainType>
        <DrawnIcon>Gfx/TacticalIcons/K_Stable1.png</DrawnIcon>
        <DrawnIconConstruction>Gfx/TacticalIcons/K_Stable1_C.png</DrawnIconConstruction>
        <Thumbnail>Gfx/Medallions/Resource_Thumb.png</Thumbnail>
    <Medallions InternalName="">
      <All>Gfx/Medallions/Resource_Thumb.png</All>
      <Border_All></Border_All>
    </Medallions>
        <!-- Prerequisites -->
        <RequiresCity>False</RequiresCity>
        <RequiresResource>True</RequiresResource>
        <SupportedResourceType>ElementiumOre</SupportedResourceType>
      <!-- Cost -->
        <LaborToBuild>15.0</LaborToBuild>
        <GameModifier>
            <ModType>ConstructionResourceCost</ModType>
            <Attribute>Gold</Attribute>
            <Value>-500</Value>
            <PerTurn>0</PerTurn>
        </GameModifier>

    <!-- Production -->
    <GameModifier>
      <ModType>Resource</ModType>
      <Attribute>Elementium</Attribute>
      <Value>0.1</Value>
      <PerTurn>1</PerTurn>
    </GameModifier>

    <AIData AIPersonality="AI_General">
      <AITag>Farming</AITag>
    </AIData>
        <!-- Base Improvement Modifiers -->

    </ImprovementType>

Note that I've not updated or changed any of the icons, so it will look like a ventri ore when unbuilt, and like a kingdom stable when built. I ignored those things and just tried to get it working.

Reply #11 Top

I'm getting Can't Build: This resource cannot be used by us errors when I hover over the icon, otherwise it shows up in the game just fine.

 

(Though that may also be because I kept trying to add the "Elementium" resource you add can on the object, seems you could harvest elementium once. O:) )

Reply #12 Top

Yeah, there's an Elementium resource node in the map creator, but that doesn't work. Scroll to the bottom and use Elementium Deposit for the stuff I posted above

Reply #13 Top

Quoting Heavenfall, reply 12
Yeah, there's an Elementium resource node in the map creator, but that doesn't work. Scroll to the bottom and use Elementium Deposit for the stuff I posted above

 

I did, but as I noted earlier I get an error saying I can't use the resource. Tried both with a kingdom and empire faction, and it was the same result.

 

Edit: Do you think the bugged elemental resource node is also <Type>ElementiumOre</Type>? Might just change the type and resource requirement to something random when I get home.

Reply #14 Top

I'm out of ideas

If you've got two files in your /Mods/ folder that look like

http://thedyinggrounds.com/Elemental/testmod_worldresource_elementiumnode.xml

http://thedyinggrounds.com/Elemental/testmod_allfactionimprovementelementiummine.xml

and still can't build anything on them, make sure you move everything you've made out of the folder, Other than that, I can't think of a thing why it would work for me, but not for you. (You've got "Use mods" in options ON, right? some players also had to enable or disable "use localized data" to use mods)

Even if you got ten other resources that give ElementiumOre, that should not matter. The building should be buildable on ANY resource with that type - that's how they did half the farms in the game, using the same type FertileLand for about 5-6 resources.

+1 Loading…
Reply #15 Top

Quoting Heavenfall, reply 14
I'm out of ideas

If you've got two files in your /Mods/ folder that look like

http://thedyinggrounds.com/Elemental/testmod_worldresource_elementiumnode.xml

http://thedyinggrounds.com/Elemental/testmod_allfactionimprovementelementiummine.xml

and still can't build anything on them, make sure you move everything you've made out of the folder, Other than that, I can't think of a thing why it would work for me, but not for you. (You've got "Use mods" in options ON, right? some players also had to enable or disable "use localized data" to use mods)

Even if you got ten other resources that give ElementiumOre, that should not matter. The building should be buildable on ANY resource with that type - that's how they did half the farms in the game, using the same type FertileLand for about 5-6 resources.

 

Went through all the steps, even saw that I had removed the </ImprovementTypes> at the bottom by accident but no relief. Of course the mods work aswell, since I succesfully modded the soverigns to give 5 points per level up, to make them scale with elite companies.

Anyhow, something is definitely amiss. Might try a reinstall.

Reply #16 Top

Is there a function in there that requires you to add a resource type to the counters?  Is there an "elementiumresourcetype" to keep track of how much you have? 

Reply #17 Top

There's already elementium in the game, so there's no need to mod that in.

Reply #18 Top

Seems reinstalling made it work, somehow. Time to go off and make more custom resources.

Reply #19 Top

Now that is seriously odd. Oh well, problem solved eh?