🗺️ cq_map type Guide

A Simple Guide to Understanding cq_map Type Values

How player rules and server engine switches combine into a single map type database value.

🛠️ Interactive Bitmask Calculator & Decoder

Check/uncheck switches to calculate the final value, or type a value to decode it instantly.

Engine Switches (High Bits)

Player Rules (Low Bits Checklist)

If you look at the type column in your cq_map table, you will see a mix of tiny numbers (like 12) and massive, ten-digit numbers (like 2055864453).

These numbers aren't random. They are a combination of Player Rules and Server Engine Switches packed into a single database value. Here is how it works without the confusing math.


1. The Player Rules (The Small Numbers)

Think of the low numbers as a simple Checklist. Each restriction or permission on a map has a specific value. If you want a map to have multiple rules, you just add their numbers together.

The Rule Checklist:

Constant Name Decimal Hex Description / Effect
MAPTYPE_NORMAL 0 0x0000 Normal Map (No special rules)
MAPTYPE_PKFIELD 1 0x0001 PK Field / Arena
MAPTYPE_CHGMAP_DISABLE 2 0x0002 Magic call team member disabled; Cannot place Guild Waypoints; Cannot use magic to move.
MAPTYPE_RECORD_DISABLE 4 0x0004 Cannot record/save point
MAPTYPE_PK_DISABLE 8 0x0008 PK Disabled
MAPTYPE_BOOTH_ENABLE 16 0x0010 Vending / Stall Setup Enabled
MAPTYPE_TEAM_DISABLE 32 0x0020 Teaming / Grouping Disabled
MAPTYPE_TELEPORT_DISABLE 64 0x0040 Cannot use "chgmap" command or Town Portal Scrolls; PK prohibited.
MAPTYPE_SYN_MAP 128 0x0080 Guild / Syndicate Map
MAPTYPE_PRISON_MAP 256 0x0100 Prison Map
MAPTYPE_WING_DISABLE 512 0x0200 Flying / Bowman fly disabled
MAPTYPE_FAMILY 1024 0x0400 Family Map
MAPTYPE_MINEFIELD 2048 0x0800 Minefield / Mining Area
MAPTYPE_CALLNEWBIE_DISABLE 4096 0x1000 PK Tournament
MAPTYPE_REBORN_NOW_ENABLE 8192 0x2000 Instant Rebirth; No damage; Killing players doesn't add PK points/crime status; No gear drop; No loss of Guild Contribution.
MAPTYPE_NEWBIE_PROTECT 16384 0x4000 Safe Map with Newbie Protection
Logical Calculation Example 1:
If a map is Teaming Disabled (32) AND Vending Enabled (16):
32 + 16 = 48
Logical Calculation Example 2:
If a map is PK Field (1), Cannot place Guild Waypoints (2), AND Recording Disabled (4):
1 + 2 + 4 = 7
Special Value Example (8710):
Supports instant revival, flying disabled, cannot place Guild Waypoints, recording disabled.
8192 + 512 + 2 + 4 = 8710

2. The Engine Switches (The Billion-Tier Baseline)

Why do some maps have numbers in the billions? Because inside the server's C++ source code, the developers created Giant Hidden System Switches to tell the server how to handle the map's memory (RAM), timers, and core scripts.

Here is a simple breakdown of the baseline switches so you know exactly which one to choose for your custom map:

1. 2097152 (Standard Map Switch)

  • When to use: Use this for any permanent, open-world public maps where all players gather, trade, and run around.
  • Best for: Main cities (Cronus, Elven City), standard leveling maps, or training grounds.

2. 16777216 (Dungeon Quest Switch)

  • When to use: Use this for maps dedicated to specific quests, dungeon rooms, or automated scripting areas.
  • Best for: Quest rooms, custom boss arenas, or scripted leveling event areas.

3. 1073741824 (Instance Map Switch)

  • When to use: Use this when you want a private dungeon map that creates an isolated "copy" (instance) for each party/group. When they finish and leave, the server automatically deletes items on the floor, resets bosses, and clears server RAM memory.
  • Best for: Family/guild instance dungeons, team boss arenas, or private quest maps.

4. 3282567168 (Global Event Switch)

  • When to use: Use this for official timed events that are scheduled to run, open, and close automatically at set times of day.
  • Best for: PK tournaments, preparation lobbies, or race course event maps.
💡 Can Engine Switches (High Bits) be combined?

Yes, absolutely! Just like Player Rules, you can add multiple high-bit Engine Switches together if a map requires multiple backend system behaviors. For example, DragonCave combines the Instance Map Switch (1,073,741,824) to keep the map private and the Dungeon Quest Switch (16,777,216) to handle automated boss spawn scripts.


3. Real-World Database Examples Broken Down

When you see a huge number in your database, it is just One (or more) Engine Switches + Your Player Rules. Let's decode the 4 most common big numbers found directly in cq_map:

Example A: DragonCave (Value: 1090519052)

This is a classic private party dungeon. Even though it sits in cq_map, the engine treats it as an isolated room because of the baseline switch:

  • 1073741824 : Instance Map Switch (Keeps the dungeon private for your party)
  • 16777216 : Dungeon Quest Switch (Powers the automated boss reset scripts)
  • 8 : Safe Zone (Keeps the entry room safe from PK)
  • 4 : No Save Point (Stops players from permanently camping inside)
The Recipe: 1,073,741,824 + 16,777,216 + 8 + 4 = 1,090,519,052

Example B: ObstacleCourse (Value: 3282567180)

This is an automated mini-game event map.

  • 3282567168 : Global Event Switch (Tells the server clock when to open/close this event)
  • 8 : Safe Zone (Disables PK so players focus purely on racing)
  • 4 : No Save Point (Kicks players out back to Cronus if they log out mid-game)
The Recipe: 3,282,567,168 + 8 + 4 = 3,282,567,180

Example C: LegionLand (Value: 2055864453)

The main warzone for Guild/Legion wars. It combines massive system switches with aggressive gameplay rules:

  • 2055864288 : Core Legion War System Switch (Handles alliance scoring and war maps)
  • 128 : Guild/Syndicate Flag (Identifies the zone as guild property)
  • 32 : Disable Party (Forces players to fight for their guild, not a private party)
  • 4 : No Save Point (Dead players are sent out back to main cities)
  • 1 : PK Field (Enables free combat for the war)
The Recipe: 2,055,864,288 + 128 + 32 + 4 + 1 = 2,055,864,453

Example D: Special Territory / Housing (Value: 1613299724)

Used for localized shared expansion territories or player housing zones:

  • 1613299712 : Advanced Sub-Zone Switch (Handles underlying database housing layers)
  • 8 : Safe Zone (No fighting allowed on residential property)
  • 4 : No Save Point (Defaults players back to world hubs if they disconnect)
The Recipe: 1,613,299,712 + 8 + 4 = 1,613,299,724

4. Pro-Tip for Developers

You do not need to memorize or calculate these billion-tier numbers from scratch.

Since the massive part of the number belongs to the core server engine, the easiest and safest way to make a new map is to find an existing map that works exactly like the one you want, and copy its type value directly.