Skip to content

Mappack mappack.cfg

jk-5 edited this page Feb 13, 2014 · 3 revisions

Mappack.cfg is the file that tells the system that your file/directory is a mappack. In this file you can define some mappack-specific options like spawnpoint, teams that should be created, which kind of mobs could be spawned, random spawnpoints and gamerules.

Closures

Every option seperated by . can be replaced with a closure. For example map.name=Example does the same thing as:

map
{
    name=Example
}

An important note on these closures is that a newline after the name, before the opening tag, is required. Also an empty line after the closing bracket of a closure is required!

Spawnpoint

Define the default spawnpoint of your map. Example:

spawnpoint
{
    x=123
    y=64
    z=456
    yaw=180
    pitch=0
}

Of cource, the non-closure way of doing this works too, like for every option. Example:

spawnpoint.x=123
spawnpoint.y=64
spawnpoint.z=456
spawnpoint.yaw=180
spawnpoint.pitch=0

Note: after this, this won't be mentioned again.

Map options

  • map.name - The name of your mappack. This will be displayed ingame (defaults to the name of the directory or file containing the mappack)
  • map.pvp - Is pvp enabled in this mappack (default value is true)
  • map.gamemode - The default gamemode for people joining the map (default value is 2 (adventure))
  • map.spawn-hostile-mobs - Should this map spawn hostile mobs? (defaults to true)
  • map.spawn-friendly-mobs - Should this map spawn friendly mobs? (defaults to true)
  • map.difficulty - The difficulty of the map. (defaults to 2 (normal))
  • map.gametype - The gametype of the mappack. This is not used by nailed itself, but can be used for plugins determining if specific behaviour should be enabled in this mappack (like quakecraft)
  • map.preventBlockBreak - true if players shouldn't be able to break blocks, false otherwise (defaults to false)
  • map.randomSpawnpointOnRespawn - Should respawning players be spawned on a random point in the map? (possible locations can be defined in the randomSpawnpoints closure which will be discussed later)

Gamerules

Gamerules can be defined prefixed with gamerule.. For example, gamerule.keepInventory=true makes players that die not lose their inventory content. (Did i mention closures? ;) )

Random Spawnpoints

You can define random spawnpoints in combination with map.randomSpawnpointOnRespawn=true. Defining these can be done by doing randomSpawnpoints.[name].x=10, or using closures. They use the normal way of defining coordinates, like the default spawnpoint does (x, y, z, yaw, pitch). You need to name the spawnpoints (replace [name] in the example with your own name). These names do not have to mean anything and will not be displayed ingame, but can be used for your own convenience.

Teams

Nailed has a sophisticated team system. Teams are created on mappack creation. For this, you need to define the teams and their options. This can be done in a way like teams.[internalName].[option] Valid team options are:

  • teams.[internalName].name - Team name that will be displayed ingame. Defaults to internalName.

Example configuration file

teams
{
	teamred
	{
		name=Invader
		color=RED
		friendlyfire=false
		friendlyinvisibles=true
	}

	teamblue
	{
		name=Defender
		color=DARK_AQUA
		friendlyfire=false
		friendlyinvisibles=true
	}
}

spawnpoint.x=947
spawnpoint.y=85
spawnpoint.z=740
spawnpoint.yaw=180
map.name=Nail
map.pvp=true
map.gamemode=0
map.difficulty=0
map.spawn-hostile-mobs=true
map.spawn-friendly-mobs=true

Clone this wiki locally