Keen:Planet Modding/In-game map: Difference between revisions

From Medieval Engineers Wiki
Jump to navigation Jump to search
m (Undo revision 6109 by CptTwinkie (talk))
mNo edit summary
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
==In-game map modding==
<noinclude>{{SEO|image_url=http://www.medievalengineerswiki.com/images/8/8a/AtlasCoordinateUsage.png|description=Maps in Medieval Engineers are generated based on terrain and buildings on it. This means that they will work for any modded planet in their default form.}}
{{Keen:OCH}}
 
 
{{Version <!-- Do not change the version until the entire page is up-to-date -->
|release=0|major=4|minor=X|suppress=true}}
[[Category:Keen_Modding_Guides]]</noinclude>
==[[Keen:Planet Modding/In-game map|In-game map modding]]==
Maps in Medieval Engineers are generated based on terrain and buildings on it. This means that they will work for any modded planet in their default form. That being said, the way map is generated is also fully moddable.
Maps in Medieval Engineers are generated based on terrain and buildings on it. This means that they will work for any modded planet in their default form. That being said, the way map is generated is also fully moddable.


Line 6: Line 13:
In Medieval Engineers there are 2 view modes of map. Kingdom view which is showing entire kingdom and region view which is zoomed part of a kingdom map. Region is 1kmx1km large on 10 km diameter planet. Both views display different elements.
In Medieval Engineers there are 2 view modes of map. Kingdom view which is showing entire kingdom and region view which is zoomed part of a kingdom map. Region is 1kmx1km large on 10 km diameter planet. Both views display different elements.
What is shown in these views depends on what layers it contains
What is shown in these views depends on what layers it contains
<pre>
<syntaxhighlight lang="xml" line>
<Definition xsi:type="MyObjectBuilder_PlanetMapDefinition">
<Definition xsi:type="MyObjectBuilder_PlanetMapDefinition">
   <Id Type="MyObjectBuilder_PlanetMapDefinition" Subtype="Main"/>
   <Id Type="MyObjectBuilder_PlanetMapDefinition" Subtype="Main"/>
Line 17: Line 24:
   </KingdomView>
   </KingdomView>
</Definition>
</Definition>
</pre>
</syntaxhighlight>
BackgroundGenerator refers to a definition of background texture that serves as a background on top of which all the map elements are placed.
BackgroundGenerator refers to a definition of background texture that serves as a background on top of which all the map elements are placed.
<pre style="margin-bottom:0;margin-top:28px;">
<syntaxhighlight lang="xml" line>
   <RegionView>
   <RegionView>
     <Layers>...</Layers>
     <Layers>...</Layers>
   </RegionView>
   </RegionView>
</pre>
</syntaxhighlight>
The three dots in middle represent layers of elements that show in region view. List and description of all layers is in next section of this document.
The three dots in middle represent layers of elements that show in region view. List and description of all layers is in next section of this document.
<pre style="margin-bottom:0;margin-top:28px;">
<syntaxhighlight lang="xml" line>
   <KingdomView>
   <KingdomView>
     <Layers>...</Layers>
     <Layers>...</Layers>
   </KingdomView>
   </KingdomView>
</pre>
</syntaxhighlight>
The three dots in middle represent layers of elements that show in kingdom view.  List and description of all layers is in next  section of this document.
The three dots in middle represent layers of elements that show in kingdom view.  List and description of all layers is in next  section of this document.
(I did not Kingdom view in its expanded form because it would take up too much space.)
(I did not Kingdom view in its expanded form because it would take up too much space.)


==Layers description==
 
<pre style="margin-bottom:0;"><Layer xsi:type="MyObjectBuilder_MapBackgroundLayer" /></pre>
===Layers description===
This layer draws the background. As generated based on chosen background definition.
<syntaxhighlight lang="xml" line>
<pre style="margin-bottom:0;margin-top:28px;">
<Layer xsi:type="MyObjectBuilder_MapBackgroundLayer" /><!-- This layer draws the background. As generated based on chosen background definition. -->
<Layer xsi:type="MyObjectBuilder_AreaDevelopmentLayer">
<Layer xsi:type="MyObjectBuilder_AreaDevelopmentLayer"><!-- This layer displays icons based on amount of blocks there is in an area. You can set the block thresholds, or mod the textures. It is also possible to add more thresholds. 80x80 px, png. -->
   <Threshold BlockCount="10" Sprite="Textures\GUI\Map\SmallGrid.png"/>
   <Threshold BlockCount="10" Sprite="Textures\GUI\Map\SmallGrid.png"/>
   <Threshold BlockCount="30" Sprite="Textures\GUI\Map\MediumGrid.png"/>
   <Threshold BlockCount="30" Sprite="Textures\GUI\Map\MediumGrid.png"/>
   <Threshold BlockCount="60" Sprite="Textures\GUI\Map\LargeGrid.png"/>
   <Threshold BlockCount="60" Sprite="Textures\GUI\Map\LargeGrid.png"/>
</Layer>
</Layer>
</pre>
</syntaxhighlight>
This layer displays icons based on amount of blocks there is in an area. You can set the block thresholds, or mod the textures. It is also possible to add more thresholds. 80x80 px, png.


[[File:Smallest Settlement.png|150px|frameless]]
[[File:Smallest Settlement.png|150px|frameless]]
[[File:Medium Settlement.png|150px|frameless]]
[[File:Medium Settlement.png|150px|frameless]]
[[File:LargestSettlement.png|150px|frameless]]
[[File:LargestSettlement.png|150px|frameless]]
<pre style="margin-bottom:0;">
<syntaxhighlight lang="xml" line>
<Layer xsi:type="MyObjectBuilder_RegionFastTravelLayer" Name="FastTravel" Visible="false">
<Layer xsi:type="MyObjectBuilder_RegionFastTravelLayer" Name="FastTravel" Visible="false"><!-- This layer shows fast travel overlay for region, when fast travel button is pressed. You can define which colors are used for displaying accessibility. -->
   <UnreachableColor R="255" G="255" B="255" A="128"/>
   <UnreachableColor R="255" G="255" B="255" A="128"/>
   <ReachableColor R="100" G="255" B="100" A="0"/>
   <ReachableColor R="100" G="255" B="100" A="0"/>
Line 55: Line 61:
   <BlockedByPlayerColor R="240" G="192" B="0" A="128"/>
   <BlockedByPlayerColor R="240" G="192" B="0" A="128"/>
</Layer>
</Layer>
</pre>
<Layer xsi:type="MyObjectBuilder_AreaOwnershipLayer"><!-- This layer defines color overlay over map areas based on ownership. You can mod which color is used for allies, your own areas or for enemies -->
This layer shows fast travel overlay for region, when fast travel button is pressed. You can define which colors are used for displaying accessibility.
<pre style="margin-bottom:0;margin-top:28px;">
<Layer xsi:type="MyObjectBuilder_AreaOwnershipLayer">
   <AlliedBgColor Hex="#806464FF" />
   <AlliedBgColor Hex="#806464FF" />
   <PlayerBgColor Hex="#8064FF64" />
   <PlayerBgColor Hex="#8064FF64" />
   <EnemyBgColor Hex="#80DC6415" />
   <EnemyBgColor Hex="#80DC6415" />
</Layer>
</Layer>
</pre>
<Layer xsi:type="MyObjectBuilder_AreaUpkeepLayer"><!-- This layer displays tax icon on areas that belong to you and require tax payment soon. Texture is 80x80 pixels, png. -->
This layer defines color overlay over map areas based on ownership. You can mod which color is used for allies, your own areas or for enemies
<pre style="margin-bottom:0;margin-top:28px;">
<Layer xsi:type="MyObjectBuilder_AreaUpkeepLayer">
     <TaxIcon>Textures\GUI\Map\TaxIcon.png</TaxIcon>
     <TaxIcon>Textures\GUI\Map\TaxIcon.png</TaxIcon>
</Layer>
</Layer>
</pre>
</syntaxhighlight>
This layer displays tax icon on areas that belong to you and require tax payment soon. Texture is 80x80 pixels, png.
[[File:Taxes.png|frameless]]
[[File:Taxes.png|frameless]]
<pre style="margin-bottom:0;margin-top:28px;">
<syntaxhighlight lang="xml" line>
<Layer xsi:type="MyObjectBuilder_PlanetMapPositionLayer">
<Layer xsi:type="MyObjectBuilder_PlanetMapPositionLayer"><!-- PlanetMapPositionLayer displays player icon above area where they are. -->
     <LocalPlayerImage>Textures\GUI\Map\PlayerPosition.png</LocalPlayerImage>
     <LocalPlayerImage>Textures\GUI\Map\PlayerPosition.png</LocalPlayerImage>
     <OtherPlayersImage>Textures\GUI\Map\AllyPosition.png</OtherPlayersImage>
     <OtherPlayersImage>Textures\GUI\Map\AllyPosition.png</OtherPlayersImage>
</Layer>
</Layer>
</pre>
</syntaxhighlight>
PlanetMapPositionLayer displays player icon above area where they are.
[[File:Ally.png|frameless]]
[[File:Ally.png|frameless]]
[[File:Player.png|frameless]]
[[File:Player.png|frameless]]
<pre style="margin-bottom:0;">
<syntaxhighlight lang="xml" line>
<Layer xsi:type="MyObjectBuilder_ActionTrackingLayer">
<Layer xsi:type="MyObjectBuilder_ActionTrackingLayer"><!-- Shows icon over an area on map with fighting / destruction. -->
     <ActionImage>Textures\GUI\Map\Action.png</ActionImage>
     <ActionImage>Textures\GUI\Map\Action.png</ActionImage>
</Layer>
</Layer>
</pre>
</syntaxhighlight>
Shows icon over an area on map with fighting / destruction.
[[File:AttackedArea.png|frameless]]
[[File:AttackedArea.png|frameless]]
<pre style="margin-bottom:0;">
<syntaxhighlight lang="xml" line>
<Layer xsi:type="MyObjectBuilder_CurrentMapSelectionLayer">
<Layer xsi:type="MyObjectBuilder_CurrentMapSelectionLayer"><!-- This is highlight of a region, that player selected with his mouse. -->
     <SelectionImage>Textures\GUI\Map\MapSelection.dds</SelectionImage>
     <SelectionImage>Textures\GUI\Map\MapSelection.dds</SelectionImage>
</Layer>
</Layer>
</pre>
<Layer xsi:type="MyObjectBuilder_PlanetMapGridLayer"><!-- This layer sets which color is the grid drawn. -->
This is highlight of a region, that player selected with his mouse.
<pre style="margin-bottom:0;margin-top:28px;">
<Layer xsi:type="MyObjectBuilder_PlanetMapGridLayer">
       <GridColor R="0" G="0" B="0" A="228"/>
       <GridColor R="0" G="0" B="0" A="228"/>
</Layer>
</Layer>
</pre>
<Layer xsi:type="MyObjectBuilder_KingdomFastTravelLayer" Name="FastTravel" Visible="false"><!-- This layer shows fast travel overlay for kingdom, when fast travel button is pressed. You can define which colors are used for displaying accessibility. -->
This layer sets which color is the grid drawn.
<pre style="margin-bottom:0;margin-top:28px;">
<Layer xsi:type="MyObjectBuilder_KingdomFastTravelLayer" Name="FastTravel" Visible="false">
           <UnreachableColor R="255" G="255" B="255" A="128"/>
           <UnreachableColor R="255" G="255" B="255" A="128"/>
           <ReachableColor R="100" G="255" B="100" A="0"/>
           <ReachableColor R="100" G="255" B="100" A="0"/>
Line 107: Line 98:
           <BlockedByPlayerColor R="240" G="192" B="0" A="128"/>
           <BlockedByPlayerColor R="240" G="192" B="0" A="128"/>
</Layer>
</Layer>
</pre>
<Layer xsi:type="MyObjectBuilder_RegionOwnershipLayer"><!-- RegionOwnershipLayer generates textures used to express ownership on regional map. -->
This layer shows fast travel overlay for kingdom, when fast travel button is pressed. You can define which colors are used for displaying accessibility.
<pre style="margin-bottom:0;margin-top:28px;">
<Layer xsi:type="MyObjectBuilder_RegionOwnershipLayer">
   <PlayerIcon>Textures\GUI\Map\PlayerLandIcon.png</PlayerIcon>
   <PlayerIcon>Textures\GUI\Map\PlayerLandIcon.png</PlayerIcon>
   <AllyIcon>Textures\GUI\Map\AllyLandIcon.png</AllyIcon>
   <AllyIcon>Textures\GUI\Map\AllyLandIcon.png</AllyIcon>
Line 119: Line 107:
<PlayerAllyEnemyIcon>Textures\GUI\Map\PlayerAllyEnemyLandIcon.png</PlayerAllyEnemyIcon>
<PlayerAllyEnemyIcon>Textures\GUI\Map\PlayerAllyEnemyLandIcon.png</PlayerAllyEnemyIcon>
</Layer>
</Layer>
</pre>
</syntaxhighlight>
RegionOwnershipLayer generates textures used to express ownership on regional map.
 


==Background generator (trees, mountains, roads,...)==
===Background generator (trees, mountains, roads,...)===
Map background is where all the trees, mountains, hills are drawn. It is also capable of coloring map based on what is in planet’s material map (this is how we make roads for example).
Map background is where all the trees, mountains, hills are drawn. It is also capable of coloring map based on what is in planet’s material map (this is how we make roads for example).
All settings for map background are in MedievalMapBackgroundDefinition. The definition also in Content\Data\Screens\MapDefinition.sbc. I will go through various parts of the definition.
All settings for map background are in MedievalMapBackgroundDefinition. The definition also in Content\Data\Screens\MapDefinition.sbc. I will go through various parts of the definition.


<pre><Id Type="MyObjectBuilder_MedievalMapBackgroundDefinition" Subtype="FundinhoDoMapinha"/>
<syntaxhighlight lang="xml" line>
<Id Type="MyObjectBuilder_MedievalMapBackgroundDefinition" Subtype="FundinhoDoMapinha"/>
Type of the definition says that this map background definition. Subtype is name of this specific background definition. If create your own background with unique subtype
Type of the definition says that this map background definition. Subtype is name of this specific background definition. If create your own background with unique subtype
Make sure you create your own background with unique subtype
Make sure you create your own background with unique subtype
Line 158: Line 147:
     </SpriteSheet>
     </SpriteSheet>
</Definition>
</Definition>
</pre>
</syntaxhighlight>
==Map Coloring==
 
 
===Map Coloring===
You can use colors in material or biome map of a planet to appear on the game map. (roads for example). You define map coloring in a node called ”Features”. The coloring uses colors from planet material texture. You can learn more about material texture in biomes modding and surface material modding.
You can use colors in material or biome map of a planet to appear on the game map. (roads for example). You define map coloring in a node called ”Features”. The coloring uses colors from planet material texture. You can learn more about material texture in biomes modding and surface material modding.
<pre>
<syntaxhighlight lang="xml" line>
     <Feature Material="67">
     <Feature Material="67">
       <Color R="75" G="30" B="0" A="255"/>
       <Color R="75" G="30" B="0" A="255"/>
     </Feature>
     </Feature>
</pre>
</syntaxhighlight>
This specific feature is used for painting roads on map with dark brown color. In Color you define which color will be the in-game map colored. Material=”67” decides where will be the color applied and refers to a red channel value on planet material texture.  
This specific feature is used for painting roads on map with dark brown color. In Color you define which color will be the in-game map colored. Material=”67” decides where will be the color applied and refers to a red channel value on planet material texture.  
<pre>
<syntaxhighlight lang="xml" line>
     <Feature Biome="60">
     <Feature Biome="60">
       <Color R="130" G="100" B="42" A="80"/>
       <Color R="130" G="100" B="42" A="80"/>
     </Feature>
     </Feature>
</pre>
</syntaxhighlight>
This specific feature is used for painting forests on map with opaque brown. In Color you define which color will be the in-game map colored. Biome=”60” decides where will be the color applied and refers to a green channel value on planet material texture.
This specific feature is used for painting forests on map with opaque brown. In Color you define which color will be the in-game map colored. Biome=”60” decides where will be the color applied and refers to a green channel value on planet material texture.


==Sprites==
 
===Sprites===
Medieval Engineers map can also place sprites on map based on terrain shape. All the sprites are on one texture
Medieval Engineers map can also place sprites on map based on terrain shape. All the sprites are on one texture
<pre>
<syntaxhighlight lang="xml" line>
<SpriteSheet Texture="Textures\GUI\Map\BackgroundSprites.png" BaseSize="64">
<SpriteSheet Texture="Textures\GUI\Map\BackgroundSprites.png" BaseSize="64">
       <SpriteCount>100</SpriteCount>
       <SpriteCount>100</SpriteCount>
Line 189: Line 181:
       </BiomeSprite>
       </BiomeSprite>
</SpriteSheet>
</SpriteSheet>
</pre>
</syntaxhighlight>


[[File:AtlasCoordinateUsage.png|512px]]
[[File:AtlasCoordinateUsage.png|512px]]
Line 196: Line 188:
<Sprite Name="HillSmall" X="768" Y="192" Width="127" Height="64" />
<Sprite Name="HillSmall" X="768" Y="192" Width="127" Height="64" />


[[Category:Keen_Modding_Guides]]
 
<noinclude>View the full [[Keen:Planet Modding - Full Guide|Planet Modding Guide]]</noinclude>

Latest revision as of 20:25, 18 July 2022



Version: 0.4

In-game map modding

Maps in Medieval Engineers are generated based on terrain and buildings on it. This means that they will work for any modded planet in their default form. That being said, the way map is generated is also fully moddable.

We definitions for map are located in Content\Data\Screens\MapDefinition.sbc. To mod maps you will have to alter/add definitions in this file, all vanilla textures for maps can be found in Content\Textures\GUI\Map. Feel free to use/alter any of them for creation of mods for Medieval Engineers. Map content modding (Friend/foe display, tax notifications,... In Medieval Engineers there are 2 view modes of map. Kingdom view which is showing entire kingdom and region view which is zoomed part of a kingdom map. Region is 1kmx1km large on 10 km diameter planet. Both views display different elements. What is shown in these views depends on what layers it contains

<Definition xsi:type="MyObjectBuilder_PlanetMapDefinition">
  <Id Type="MyObjectBuilder_PlanetMapDefinition" Subtype="Main"/>
  <BackgroundGenerator Type="MyObjectBuilder_MedievalMapBackgroundDefinition"        Subtype="FundinhoDoMapinha"/>
  <RegionView>
    <Layers>...</Layers>
  </RegionView>
  <KingdomView>
    <Layers>...</Layers>
  </KingdomView>
</Definition>

BackgroundGenerator refers to a definition of background texture that serves as a background on top of which all the map elements are placed.

  <RegionView>
    <Layers>...</Layers>
  </RegionView>

The three dots in middle represent layers of elements that show in region view. List and description of all layers is in next section of this document.

  <KingdomView>
    <Layers>...</Layers>
  </KingdomView>

The three dots in middle represent layers of elements that show in kingdom view. List and description of all layers is in next section of this document. (I did not Kingdom view in its expanded form because it would take up too much space.)


Layers description

<Layer xsi:type="MyObjectBuilder_MapBackgroundLayer" /><!-- This layer draws the background. As generated based on chosen background definition. -->
<Layer xsi:type="MyObjectBuilder_AreaDevelopmentLayer"><!-- This layer displays icons based on amount of blocks there is in an area. You can set the block thresholds, or mod the textures. It is also possible to add more thresholds. 80x80 px, png. -->
  <Threshold BlockCount="10" Sprite="Textures\GUI\Map\SmallGrid.png"/>
  <Threshold BlockCount="30" Sprite="Textures\GUI\Map\MediumGrid.png"/>
  <Threshold BlockCount="60" Sprite="Textures\GUI\Map\LargeGrid.png"/>
</Layer>

<Layer xsi:type="MyObjectBuilder_RegionFastTravelLayer" Name="FastTravel" Visible="false"><!-- This layer shows fast travel overlay for region, when fast travel button is pressed. You can define which colors are used for displaying accessibility. -->
  <UnreachableColor R="255" G="255" B="255" A="128"/>
  <ReachableColor R="100" G="255" B="100" A="0"/>
  <BlockedByTerrainColor R="0" G="0" B="0" A="224"/>
  <BlockedByPlayerColor R="240" G="192" B="0" A="128"/>
</Layer>
<Layer xsi:type="MyObjectBuilder_AreaOwnershipLayer"><!-- This layer defines color overlay over map areas based on ownership. You can mod which color is used for allies, your own areas or for enemies -->
   <AlliedBgColor Hex="#806464FF" />
   <PlayerBgColor Hex="#8064FF64" />
   <EnemyBgColor Hex="#80DC6415" />
</Layer>
<Layer xsi:type="MyObjectBuilder_AreaUpkeepLayer"><!-- This layer displays tax icon on areas that belong to you and require tax payment soon. Texture is 80x80 pixels, png. -->
    <TaxIcon>Textures\GUI\Map\TaxIcon.png</TaxIcon>
</Layer>

<Layer xsi:type="MyObjectBuilder_PlanetMapPositionLayer"><!-- PlanetMapPositionLayer displays player icon above area where they are. -->
    <LocalPlayerImage>Textures\GUI\Map\PlayerPosition.png</LocalPlayerImage>
    <OtherPlayersImage>Textures\GUI\Map\AllyPosition.png</OtherPlayersImage>
</Layer>

<Layer xsi:type="MyObjectBuilder_ActionTrackingLayer"><!-- Shows icon over an area on map with fighting / destruction. -->
     <ActionImage>Textures\GUI\Map\Action.png</ActionImage>
</Layer>

<Layer xsi:type="MyObjectBuilder_CurrentMapSelectionLayer"><!-- This is highlight of a region, that player selected with his mouse. -->
     <SelectionImage>Textures\GUI\Map\MapSelection.dds</SelectionImage>
</Layer>
<Layer xsi:type="MyObjectBuilder_PlanetMapGridLayer"><!-- This layer sets which color is the grid drawn. -->
      <GridColor R="0" G="0" B="0" A="228"/>
</Layer>
<Layer xsi:type="MyObjectBuilder_KingdomFastTravelLayer" Name="FastTravel" Visible="false"><!-- This layer shows fast travel overlay for kingdom, when fast travel button is pressed. You can define which colors are used for displaying accessibility. -->
          <UnreachableColor R="255" G="255" B="255" A="128"/>
          <ReachableColor R="100" G="255" B="100" A="0"/>
          <BlockedByTerrainColor R="0" G="0" B="0" A="224"/>
          <BlockedByPlayerColor R="240" G="192" B="0" A="128"/>
</Layer>
<Layer xsi:type="MyObjectBuilder_RegionOwnershipLayer"><!-- RegionOwnershipLayer generates textures used to express ownership on regional map. -->
  <PlayerIcon>Textures\GUI\Map\PlayerLandIcon.png</PlayerIcon>
  <AllyIcon>Textures\GUI\Map\AllyLandIcon.png</AllyIcon>
  <EnemyIcon>Textures\GUI\Map\EnemyLandIcon.png</EnemyIcon>
  <PlayerAllyIcon>Textures\GUI\Map\PlayerAllyLandIcon.png</PlayerAllyIcon>
  <PlayerEnemyIcon>Textures\GUI\Map\PlayerEnemyLandIcon.png</PlayerEnemyIcon>
  <AllyEnemyIcon>Textures\GUI\Map\AllyEnemyLandIcon.png</AllyEnemyIcon>
<PlayerAllyEnemyIcon>Textures\GUI\Map\PlayerAllyEnemyLandIcon.png</PlayerAllyEnemyIcon>
</Layer>


Background generator (trees, mountains, roads,...)

Map background is where all the trees, mountains, hills are drawn. It is also capable of coloring map based on what is in planet’s material map (this is how we make roads for example). All settings for map background are in MedievalMapBackgroundDefinition. The definition also in Content\Data\Screens\MapDefinition.sbc. I will go through various parts of the definition.

<Id Type="MyObjectBuilder_MedievalMapBackgroundDefinition" Subtype="FundinhoDoMapinha"/>
Type of the definition says that this map background definition. Subtype is name of this specific background definition. If create your own background with unique subtype
Make sure you create your own background with unique subtype


<DrawHeightmap>false</DrawHeightmap>
When set on “true” planet’s heightmap is drawn under the map.
<Resolution>4096</Resolution><
Sets resolution of the generated in-game map. 

    <Features>
      <Feature Material="67">
        <Color R="75" G="30" B="0" A="255"/>
      </Feature>
      <Feature Biome="60">
        <Color R="130" G="100" B="42" A="80"/>
      </Feature>
    </Features>

    <SpriteSheet Texture="Textures\GUI\Map\BackgroundSprites.png" BaseSize="64">
      <SpriteCount>100</SpriteCount>
      <Sprite Name="HillSmall" X="768" Y="192" Width="127" Height="64" />
      <Sprite Name="ForestSparse" X="0" Y="320" Width="64" Height="64" />

      <HeightSprite AltitudeDiff=".09" Altitude=".20" Priority="1">
        <Sprite>HillSmall</Sprite>
      </HeightSprite>
      <BiomeSprite Biome="60" Density=".1" Priority="6">
        <Sprite>ForestSparse</Sprite>
      </BiomeSprite>
    </SpriteSheet>
</Definition>


Map Coloring

You can use colors in material or biome map of a planet to appear on the game map. (roads for example). You define map coloring in a node called ”Features”. The coloring uses colors from planet material texture. You can learn more about material texture in biomes modding and surface material modding.

    <Feature Material="67">
      <Color R="75" G="30" B="0" A="255"/>
    </Feature>

This specific feature is used for painting roads on map with dark brown color. In Color you define which color will be the in-game map colored. Material=”67” decides where will be the color applied and refers to a red channel value on planet material texture.

    <Feature Biome="60">
      <Color R="130" G="100" B="42" A="80"/>
    </Feature>

This specific feature is used for painting forests on map with opaque brown. In Color you define which color will be the in-game map colored. Biome=”60” decides where will be the color applied and refers to a green channel value on planet material texture.


Sprites

Medieval Engineers map can also place sprites on map based on terrain shape. All the sprites are on one texture

<SpriteSheet Texture="Textures\GUI\Map\BackgroundSprites.png" BaseSize="64">
      <SpriteCount>100</SpriteCount>
      <Sprite Name="HillSmall" X="768" Y="192" Width="127" Height="64" />
      <Sprite Name="ForestSparse" X="0" Y="320" Width="64" Height="64" />

      <HeightSprite AltitudeDiff=".09" Altitude=".20" Priority="1">
        <Sprite>HillSmall</Sprite>
      </HeightSprite>
      <BiomeSprite Biome="60" Density=".1" Priority="6">
        <Sprite>ForestSparse</Sprite>
      </BiomeSprite>
</SpriteSheet>

Note: Illustrates how sprite is defined on our spritesheet. Example sprite: <Sprite Name="HillSmall" X="768" Y="192" Width="127" Height="64" />


View the full Planet Modding Guide