Keen:Planet Modding/Fast Travel: Difference between revisions

From Medieval Engineers Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 3: Line 3:
In this section of the guide we will show you how to mod which sectors are blocked.
In this section of the guide we will show you how to mod which sectors are blocked.
There are 2 ways you can go about it:
There are 2 ways you can go about it:
===Generate automatically based on terrain shape===
==Generate fast travel map automatically based on terrain shape==
Game is capable of creating fast travel map on its own based on height and terrain steepness. It is possible to mod thresholds for both height and steepness.
Game is capable of creating fast travel map on its own based on height and terrain steepness. It is possible to mod thresholds for both height and steepness.
You will find the thresholds in Content\Data\Game\FastTravel.sbc. In a MyObjectBuilder_TerrainReachabilityProviderDefinition.
You will find the thresholds in Content\Data\Game\FastTravel.sbc. In a MyObjectBuilder_TerrainReachabilityProviderDefinition.
Line 27: Line 27:
If there are texture overrides in the definition, you have to erase them in order for the parameters to take effect. Texture overrides are used to override the generated fast travel map. You will learn more about these overrides in the next part of Fast travel modding.
If there are texture overrides in the definition, you have to erase them in order for the parameters to take effect. Texture overrides are used to override the generated fast travel map. You will learn more about these overrides in the next part of Fast travel modding.


===Creating fast travel texture override===
==Creating fast travel texture override==
If you want to have full control over which areas are reachable and which are not regardless of terrain, you can create a simple texture on which you mark unreachable areas.
If you want to have full control over which areas are reachable and which are not regardless of terrain, you can create a simple texture on which you mark unreachable areas.


Line 45: Line 45:
This definition would generate fast travel reachability everywhere, except for front planet face (Fareon kingdom) where fast travel reachability is created based on your texture.
This definition would generate fast travel reachability everywhere, except for front planet face (Fareon kingdom) where fast travel reachability is created based on your texture.


===Development reachability===
==Development reachability==
Claimable area size, border highlight, contested timer modding
Claimable area size, border highlight, contested timer modding
Size of the area and highlight properties are moddable as well.
Size of the area and highlight properties are moddable as well.
Line 59: Line 59:
When players claim area with claimblock, area goes to a “contested” phase for some amount of time, in this phase other players can still attempt to build their own claim block and claim the area. This time is moddable.
When players claim area with claimblock, area goes to a “contested” phase for some amount of time, in this phase other players can still attempt to build their own claim block and claim the area. This time is moddable.
Content\Data\Game\SessionComponents.sbc contains definition called MyObjectBuilder_AreaOwnershipSystemDefinition. To mod this value, add this definition to your mod with changed value of <ContestedTimeInMinutes> parameter.
Content\Data\Game\SessionComponents.sbc contains definition called MyObjectBuilder_AreaOwnershipSystemDefinition. To mod this value, add this definition to your mod with changed value of <ContestedTimeInMinutes> parameter.
Permissions modding - what is/isn’t allowed to do in claimed areas
Have you noticed you cannot mine voxels in claimed areas of your enemies? That is because of how we chose to define permission settings for safe area. And yes, this and much more is also moddable :).
This time there is no need create any textures, we will only need to edit one text file and add it to your mod.
You will find the file with permissions definitions in Data\Permissions.sbc
Descriptions of permission nodes:
<pre>
<Permission Name="Build">
      <Usergroup Groupname="Owner" Allowed="true"/>
      <Usergroup Groupname="Allies" Allowed="true"/>
      <Usergroup Groupname="Neutral" Allowed="false"/>
      <Usergroup Groupname="Enemies" Allowed="false"/>
</Permission>
</pre>
Permission definition sets which groups of players are allowed to perform an action. In this example, it is “Build” action.
<pre><Usergroup Groupname=”Owner” Allowed=”true”></pre>
Groupname refers to group of players, for which we are setting the permission(in this example it is player who owns the area). Allowed parameter allows/disallows the action depending on if it is set to “true” or “false”.
<pre><IsDefault>true</IsDefault></pre>
Parameter sets which area permission set is used for player owned territories.
===Description of available actions to set permissions for:===
#Name=”Build” -> block placement permissions
#Name=”Repair” -> Repairing/building already placed blocks
#Name=”Deconstruct” -> Deconstructing
#Name=”QuickDeconstruct” -> Faster deconstruction
#Name=”VoxelEdit” -> Mining or shoveling
#Name=”Destroy” -> Damage with hand weapons
#Name=”Interaction” -> Chest opening, door opening
#Name=”ClaimBlockInteraction” -> ClaimblockGui
===List of available Groupnames:===
#Groupname: “Owner” -> Player who owns area
#roupname: “Allies” -> Mostly faction members of owner of the area
#Groupname: “Neutral” -> Random players, who are not in an enemy faction (mostly everyone without faction allegiance)
#Groupname: “Enemies” -> Players in factions that are hostile to your faction

Revision as of 11:12, 13 March 2017

Introduction

In Medieval Engineers players can only fast travel through reachable terrain, blocked terrain has to be crossed on foot or walked around. In this section of the guide we will show you how to mod which sectors are blocked. There are 2 ways you can go about it:

Generate fast travel map automatically based on terrain shape

Game is capable of creating fast travel map on its own based on height and terrain steepness. It is possible to mod thresholds for both height and steepness. You will find the thresholds in Content\Data\Game\FastTravel.sbc. In a MyObjectBuilder_TerrainReachabilityProviderDefinition.

<Definition xsi:type="MyObjectBuilder_TerrainReachabilityProviderDefinition">
	<Id Type="MyObjectBuilder_TerrainReachabilityProviderDefinition" Subtype="Terra"/>

	<RiseThreshold>.14</RiseThreshold>
	<HeightThreshold>.6</HeightThreshold>
    
	<OverrideForward>Data/PlanetDataFiles/EarthLike/FastTravelOverrides/Front_ForbiddenAreas.png</OverrideForward>
	<OverrideBackward>Data/PlanetDataFiles/EarthLike/FastTravelOverrides/Back_ForbiddenAreas.png</OverrideBackward>
	<OverrideLeft>Data/PlanetDataFiles/EarthLike/FastTravelOverrides/Left_ForbiddenAreas.png</OverrideLeft>
	<OverrideRight>Data/PlanetDataFiles/EarthLike/FastTravelOverrides/Right_ForbiddenAreas.png</OverrideRight>
	<OverrideUp>Data/PlanetDataFiles/EarthLike/FastTravelOverrides/Up_ForbiddenAreas.png</OverrideUp>
	<OverrideDown>Data/PlanetDataFiles/EarthLike/FastTravelOverrides/Down_ForbiddenAreas.png</OverrideDown>
</Definition>

<RiseThreshold> - Sets min. terrain height change which will cause that area is unreachable.

<HeightThreshold> - Sets height of terrain after which area is unreachable, if it goes over this value. Range is 0 - 1.

If there are texture overrides in the definition, you have to erase them in order for the parameters to take effect. Texture overrides are used to override the generated fast travel map. You will learn more about these overrides in the next part of Fast travel modding.

Creating fast travel texture override

If you want to have full control over which areas are reachable and which are not regardless of terrain, you can create a simple texture on which you mark unreachable areas.

The texture is 80x80 pixels, RGB 8 bit. Black pixels forbid entrance.

When you have the texture, select route to it in the definition:

<OverrideForward>Data/PlanetDataFiles/EarthLike/FastTravelOverrides/Front_ForbiddenAreas.png</OverrideForward>

Reachability definition example:

<Definition xsi:type="MyObjectBuilder_TerrainReachabilityProviderDefinition">
<Id Type="MyObjectBuilder_TerrainReachabilityProviderDefinition" Subtype="Terra"/>
<RiseThreshold>.14</RiseThreshold>
	<HeightThreshold>.6</HeightThreshold>
		<OverrideForward>Data/PlanetDataFiles/EarthLike/FastTravelOverrides/Front_ForbiddenAreas.png</OverrideForward>
</Definition>

This definition would generate fast travel reachability everywhere, except for front planet face (Fareon kingdom) where fast travel reachability is created based on your texture.

Development reachability

Claimable area size, border highlight, contested timer modding Size of the area and highlight properties are moddable as well.

Area borders highlight

<NeutralColor R="225" G="32" B="0" A="64" /> - Set color of an unowned territory <SelfColor R="0" G="255" B="0" A="64" /> - Sets color of area border owned by you <AliedColor R="65" G="105" B="225" A="64" /> - Sets color of area border that belongs to allies <EnemyColor R="225" G="32" B="0" A="64" /> - Sets color of area border that is hostile <WallSettings Depth="15" Rise="3" SegmentCount"71" End="115" /> - Changes shape of the border. Depth sets how deep is border submerged. Rise sets how tall is the border. <Fade Start="71" End="115" /> - This sets at which point the border starts to fade. Contested timer When players claim area with claimblock, area goes to a “contested” phase for some amount of time, in this phase other players can still attempt to build their own claim block and claim the area. This time is moddable. Content\Data\Game\SessionComponents.sbc contains definition called MyObjectBuilder_AreaOwnershipSystemDefinition. To mod this value, add this definition to your mod with changed value of <ContestedTimeInMinutes> parameter.