Resource placement

I have recently started modding the world resources to see if I can get more of them to spawn. <rarity>300<rarity> seems to me to be about a 30% chance of spawning. sometimes I see it written as 30.0. I know mathematically they are both represent 30% for game mechanics but I would like some uniformity, so if someone know what the correct format for the percentage chance is let me know. I would also like to know if there is a file that show what will spawn next to the starting sovereign?  With some starting talents/abilities you end up with a ore mine near you...also at least one shard always appears, and one farm, so that leads me to believe there is a file that states that these items will spawn at the start location <radius>5<radius> or some such. And help locating this file would be helpful. Thanks for your replies.

2,782 views 3 replies
Reply #1 Top

You cannot increase the amount of world resources that spawn, you can only make a specific kind spawn more than others by changing the rarity tag. Resources are competing for spots to spawn on, and the amount of spots is hardcoded.

See more info here: https://forums.elementalgame.com/399857

Reply #2 Top

Cool, Ty Heavenfall. Your conversation helped and I will play around with it some more and if I get an even and constant placement I will post the information for you. 

Reply #3 Top

Resources seem to spawn based on a few factors.  Land Type, Land Sub Type, and map size. ie, Fertile Land is <PreferredTerrain> Land </PreferredTerrain> <EnvrionmentType>GrasslandEnvironment</EnvironmentType> This tries to use Grassland Environment first then checks for other types so you could see fertile land on DesertEnvironment or even BarrenEnvironment. Land is broken down into subcategories, Rugged_Land, DesertTerrain, HillsTerrain, MountainRange, Forest, Beach, and SwampTerrain(seems to be commented out), These are further put into subcategories of: BarrenEnvironment, DeadEnvironment, GrasslandEnvironment, DesertEnvironment, and ArticEnvironment. Now you would think with all these types of land you could get stuff to spawn all over, not so.  Most resources use <Land> and <GrasslandEnvironment> as their spawn points. I have tried to mix it up some to get a more even spread. ie, Iron ore, <PreferredTerrain>HillsTerrain<PreferredTerrain> *Normally it has a preferred terrain of Land which about 80% of the resources do* I left the subcategory type off so it would chose randomly any one. Theoretically I should get iron ore to spawn on hills with anytime of terrain (grassland, barren, rugged, dead, desert, arctic), and lots of them with a spawn rarity of 900, however, this was not the case. It did spawn on that type of terrain but was limited by the number of resources per map size. I am unable to find the location to alter this variable to increase the number of resources available per map size. If anyone knows where it can be found tell me please. If the Devs could refine their tile types and reorganize the resources by tile type a more uniformed spread of resources could be had.  So now to the reason I wanted to alter this stuff to start with. I didn't like the way resources around my starting area where sparse and spread out. The only fix I was able to come up with was to create Sovereign Talents in SovereignTalents.html. I created these:

<!--- **************************** -->
  <!--- ** Starting Resources Loc ** -->
  <!--- **************************** -->


    <!---    ******** Kingdom ********* -->


    <AbilityBonus InternalName="Sovereign_Ability_Starting_Position">

        <AbilityBonusType>Champion_Talent</AbilityBonusType>

        <AbilityBonusOption InternalName = "Sovereign_Ability_Starting_Position_Paradise">
            <DisplayName>Paradise</DisplayName>
            <Description>Spawn resources near the starting player.</Description>
            <Icon>Talent_Naturalist.png</Icon>
            <Cost>0</Cost>


            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>WildHorsesType01</StrVal>
                <Radius>3.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>LostLibraryType01</StrVal>
                <Radius>4.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>AncientTempleType01</StrVal>
                <Radius>4.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>GoldDepositType01</StrVal>
                <Radius>3.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>ScenicViewType01</StrVal>
                <Radius>4.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>R_EnrichedLand_01</StrVal>
                <Radius>3.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>MarblePitType01</StrVal>
                <Radius>3.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>IronOreType01</StrVal>
                <Radius>2.0</Radius>
            </GameModifier>
        </AbilityBonusOption>
            
        </AbilityBonusOption>
    </AbilityBonus>

 

    <!--- ********* Empire *********** -->

 

    <AbilityBonus InternalName="Sovereign_Ability_Starting_Position">

        <AbilityBonusType>>Champion_Talent</AbilityBonusType>

        <AbilityBonusOption InternalName = "Sovereign_Ability_Starting_Position_Power">
            <DisplayName>Power</DisplayName>
            <Description>Spawn resources near the starting player.</Description>
            <Icon>Talent_Naturalist.png</Icon>
            <Cost>0</Cost>


            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>WildWargsType01</StrVal>
                <Radius>3.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>LostLibraryType01</StrVal>
                <Radius>4.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>AncientTempleType01</StrVal>
                <Radius>4.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>GoldDepositType01</StrVal>
                <Radius>3.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>ScenicViewType01</StrVal>
                <Radius>4.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>R_EnrichedLand_01</StrVal>
                <Radius>3.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>MarblePitType01</StrVal>
                <Radius>3.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>IronOreType01</StrVal>
                <Radius>2.0</Radius>
            </GameModifier>
        </AbilityBonusOption>
            
        </AbilityBonusOption>
    </AbilityBonus>


    <!--- ********************************** -->
    <!--- * Small resources for sovereigns * -->
    <!--- ********************************** -->

    <!--- ********* Kingdom **************** -->

 

    <AbilityBonus InternalName="Sovereign_Ability_Starting_Position">

        <AbilityBonusType>Champion_Talent</AbilityBonusType>

        <AbilityBonusOption InternalName = "Sovereign_Ability_Starting_Position_Abundant">
            <DisplayName>Abundant</DisplayName>
            <Description>Spawn resources near the starting player.</Description>
            <Icon>Talent_Naturalist.png</Icon>
            <Cost>0</Cost>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>WildHorsesType01</StrVal>
                <Radius>3.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>LostLibraryType01</StrVal>
                <Radius>4.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>AncientTempleType01</StrVal>
                <Radius>4.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>GoldDepositType01</StrVal>
                <Radius>3.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>IronOreType01</StrVal>
                <Radius>2.0</Radius>
            </GameModifier>
        </AbilityBonusOption>
            
        </AbilityBonusOption>
        
    </AbilityBonus>

 

      <!--- ********** Empire ************ -->


    <AbilityBonus InternalName="Sovereign_Ability_Starting_Position">

        <AbilityBonusType>Champion_Talent</AbilityBonusType>

        <AbilityBonusOption InternalName = "Sovereign_Ability_Starting_Position_Plenty">
            <DisplayName>Plenty</DisplayName>
            <Description>Spawn resources near the starting player.</Description>
            <Icon>Talent_Naturalist.png</Icon>
            <Cost>0</Cost>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>WildWargsType01</StrVal>
                <Radius>3.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>LostLibraryType01</StrVal>
                <Radius>4.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>AncientTempleType01</StrVal>
                <Radius>4.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>GoldDepositType01</StrVal>
                <Radius>3.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>IronOreType01</StrVal>
                <Radius>2.0</Radius>
            </GameModifier>
        </AbilityBonusOption>
            
        </AbilityBonusOption>
    </AbilityBonus>



    <!--- ************************ -->

    <!--- * Small Resource start * -->

    <!--- ************************ -->

    <!--- ******** BOTH / Minor Faction? ******* -->


    <AbilityBonus InternalName="Sovereign_Ability_Starting_Position">

        <AbilityBonusType>Champion_Talent</AbilityBonusType>

        <AbilityBonusOption InternalName = "Sovereign_Ability_Starting_Position_Common">
            <DisplayName>Common</DisplayName>
            <Description>Spawn resources near the starting player.</Description>
            <Icon>Talent_Naturalist.png</Icon>
            <Cost>0</Cost>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>WildWheat01</StrVal>
                <Radius>3.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>StonePitType01</StrVal>
                <Radius>3.0</Radius>
            </GameModifier>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>StartPositionHasResource</Attribute>
                <StrVal>IronOreType01</StrVal>
                <Radius>2.0</Radius>
            </GameModifier>
        </AbilityBonusOption>
            
        </AbilityBonusOption>
    </AbilityBonus>

 

 

This allows me to make sure everyone I want starts with some type of Mount or Resource. You can alter and fit any type you want or how far it spawns from start point. Just remember that some start points are cramped, ie surrounded by water and Mountains and dead Forest.  I will post more when I find out exactly how to increase the number of resources and assignment by tile type.  ****WARNING***** if to many resource are inside your city walls it takes away from your overall tile allotment so move the radius out some and that should make it ok.