Keen:Planet Modding/Area Permissions

From Medieval Engineers Wiki
Revision as of 13:42, 13 March 2017 by Lukas (talk | contribs) (Lukas moved page Official Content/ Areas Permissions to Official Content/Areas Permissions without leaving a redirect)
Jump to navigation Jump to search

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:

<Permission Name="Build">
      <Usergroup Groupname="Owner" Allowed="true"/>
      <Usergroup Groupname="Allies" Allowed="true"/>
      <Usergroup Groupname="Neutral" Allowed="false"/>
      <Usergroup Groupname="Enemies" Allowed="false"/>
 </Permission>

Permission definition sets which groups of players are allowed to perform an action. In this example, it is “Build” action.

<Usergroup Groupname=”Owner” Allowed=”true”>

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”.

<IsDefault>true</IsDefault>

Parameter sets which area permission set is used for player owned territories.

Description of available actions to set permissions for:

  1. Name=”Build” -> block placement permissions
  2. Name=”Repair” -> Repairing/building already placed blocks
  3. Name=”Deconstruct” -> Deconstructing
  4. Name=”QuickDeconstruct” -> Faster deconstruction
  5. Name=”VoxelEdit” -> Mining or shoveling
  6. Name=”Destroy” -> Damage with hand weapons
  7. Name=”Interaction” -> Chest opening, door opening
  8. Name=”ClaimBlockInteraction” -> ClaimblockGui

List of available Groupnames:

  1. Groupname: “Owner” -> Player who owns area
  2. roupname: “Allies” -> Mostly faction members of owner of the area
  3. Groupname: “Neutral” -> Random players, who are not in an enemy faction (mostly everyone without faction allegiance)
  4. Groupname: “Enemies” -> Players in factions that are hostile to your faction