This is an extension of 'maps.txt'

Entity data:

    <u32: Entity count> [Entity]...
    <u32: Entity action count> [Entity action data]...
    <u32: Entity filter count> [Entity filter data]...
    <u32: Entity selector count> [Entity selector data]...

    Entity: <<Server string>: Name> <u8: <Entity type>> <Entity data>

    Entity type:
        { ENT_HEADLESS
        | ENT_GENERIC
        | ENT_BOX
        | ENT_TRIGGER
        | ENT_CHMAP
        | ENT_CHZONE
        | ENT_USE
        | ENT_HOLDUSE
        | ENT_MULTIPLEXER
        | ENT_PARTICLES
        | ENT_TEXPARTICLES
        | ENT_BEAM
        | ENT_GIBS
        | ENT_DOOR
        | ENT_SPAWN
        | ENT_DYNLIGHT
        | ENT_HEALTH
        | ENT_SHIELD
        | ENT_WEAPON
        | ENT_AMMO
        | ENT_HEALTHSTATION
        | ENT_SHIELDSTATION }
    Entity data:
        <u8: Min difficulty level>
        <u16: Gamemodes>
        { <Headless entity data>
        | <Generic entity data>
        | <Box entity data>
        | <Trigger entity data>
        | <Map change entity data>
        | <Zone change entity data>
        | <Press to use entity data>
        | <Hold to use entity data>
        | <Multiplexer entity data>
        | <Particles entity data>
        | <Textured particles entity data>
        | <Beam entity data>
        | <Giblets entity data>
        | <Door entity data>
        | <Spawn entity data>
        | <Dynamic light entity data>
        | <Health entity data>
        | <Shield entity data>
        | <Weapon entity data>
        | <Ammo entity data>
        | <Health station entity data>
        | <Shield station entity data> }

    Entity filter data:
        { <u8: ENTFILT_ANY>
        | <u8: ENTFILT_PLAYER>
        | <u8: ENTFILT_ENTITY>
        | <u8: ENTFILT_ANYTEAM> <Team>
        | <u8: ENTFILT_PLAYERTEAM> <Team>
        | <u8: ENTFILT_ENTITYTEAM> <Team>
        | <u8: ENTFILT_ANYNOTTEAM> <Team>
        | <u8: ENTFILT_PLAYERNOTTEAM> <Team>
        | <u8: ENTFILT_ENTITYNOTTEAM> <Team> }
    Entity selector data:
        { <u8: ENTSEL_SELF>
        | <u8: ENTSEL_TARGET>
        | <u8: ENTSEL_NEAREST>
        | <u8: ENTSEL_NEARESTNOTTARGET>
        | <u8: ENTSEL_ALL>
        | <u8: ENTSEL_PLAYERS>
        | <u8: ENTSEL_ENTITIES>
        | <u8: ENTSEL_ANYBOX> <float[3]: Origin offset> <float[3]: Radius>
        | <u8: ENTSEL_PLAYERBOX> <float[3]: Origin offset> <float[3]: Radius>
        | <u8: ENTSEL_ENTITYBOX> <float[3]: Origin offset> <float[3]: Radius>
        | <u8: ENTSEL_ANYRADIUS> <float[3]: Origin offset> <float: Radius>
        | <u8: ENTSEL_PLAYERRADIUS> <float[3]: Origin offset> <float: Radius>
        | <u8: ENTSEL_ENTITYRADIUS> <float[3]: Origin offset> <float: Radius>
        | <u8: ENTSEL_ANYTEAM> <Team>
        | <u8: ENTSEL_PLAYERTEAM> <Team>
        | <u8: ENTSEL_ENTITYTEAM> <Team>
    Entity action data:
        { <u8: ENTACT_BROADCAST> <Entity signal>
        | <u8: ENTACT_HEALTH> <Entity selector> <float: Duration> <float: Amount>
        | <u8: ENTACT_KILL> <Entity selector>
        | <u8: ENTACT_EXPLODE> <Entity selector>
        | <u8: ENTACT_SHOW> <Entity selector>
        | <u8: ENTACT_HIDE> <Entity selector>
        | <u8: ENTACT_TELEPORT> <Entity selector> <float[3]: Position>
        | <u8: ENTACT_PUSH> <Entity selector> <float[3]: Amount>
        | <u8: ENTACT_SAVE>
        | <u8: ENTACT_PLAYSOUND> <Entity selector> <u8: { ENTSNDORIG_SELF | ENTSNDORIG_TARGET | ENTSNDORIG_FROMTARGET |
          ENTSNDORIG_TOTARGET | ENTSNDORIG_WORLD }> <float[3]: Offset> <Server resource>
        | <u8: ENTACT_CHANGEMUSIC> <Entity selector> <Server resource>
        | <u8: ENTACT_CHANGEAMBIENCE> <Entity selector> <Server resource>
        | <u8: ENTACT_CHANGETEAM> <Entity selector> <Team> }

    Entity signal:
        <<Server string>: Name>
    Entity filter:
        <u32: Byte index in [Entity filter data]...>
    Entity selector:
        <u32: Byte index in [Entity selector data]...>
    Entity actions:
        <u8: # of actions> <u32: Byte index in [Action]...>...

    Headless entity data:
        <<Server resource>: Script>
    Generic entity data:
        <u8:
            <4 bits: 0>
            <1 bit: Physics> <1 bit: Better physics>
            <1 bit: Interactable>
            <1 bit: Selectable>
        >
        <<Server resource>: Script>
        <<Server resource>: Model>
        <float[3]: Position>
        <float[3]: Rotation (X and Z are ignored for now)>
        <float[3]: Scale>
    Box entity data:
        <u8:
            <1 bit: 0>
            <1 bit: Hide +X> <1 bit: Hide +Y> <1 bit: Hide +Z>
            <1 bit: Hide -X> <1 bit: Hide -Y> <1 bit: Hide -Z>
            <1 bit: Start hidden>
        >
        <<Server resource>: Material>
        <u8: { ENT_BOX_EMPTY | ENT_BOX_COLLIDE | ENT_BOX_WATER | ENT_BOX_SOLID }>
        <float[3]: Origin>
        <float[3]: Radius>
        <float[3]: New origin>
        <float[3]: New radius>
        <<Entity signal>: Show>
        <<Entity signal>: Hide>
        <<Entity signal>: Move>
        <<Entity signal>: Move back>
    Trigger entity data:
        <u8:
            <7 bits: 0>
            <1 bit: Start disabled>
        >
        <Entity filter>
        <float[3]: Origin>
        <float[3]: Radius>
        <<Entity signal>: Enable>
        <<Entity signal>: Disable>
        <Entity actions>
    Map change entity data:
        <u8:
            <7 bits: 0>
            <1 bit: Start disabled>
        >
        <Entity filter>
        <float[3]: Origin>
        <float[3]: Radius>
        <<Entity signal>: Enable>
        <<Entity signal>: Disable>
    Zone change entity data:
        <u8:
            <7 bits: 0>
            <1 bit: Start disabled>
        >
        <Entity filter>
        <float[3]: Origin>
        <float[3]: Radius>
        <<Entity signal>: Enable>
        <<Entity signal>: Disable>
    Press to use entity data:
        <u8:
            <7 bits: 0>
            <1 bit: Start usable>
        >
        <float[3]: Origin>
        <float[3]: Radius>
        <<Server resource>: Model>
        <<Server string>: Animation>
        <float: In-use and animation duration>
        <<Entity signal>: Make usable>
        <<Entity signal>: Make unusable>
        <Entity actions>
    Hold to use entity data:
        <u8:
            <7 bits: 0>
            <1 bit: Start usable>
        >
        <float[3]: Origin>
        <float[3]: Radius>
        <<Server resource>: Model>
        <<Server string>: Animation>
        <float: Animation speed>
        <<Entity signal>: Make usable>
        <<Entity signal>: Make unusable>
        <<Entity actions>: Press>
        <<Entity actions>: Release>
    Multiplexer entity data:
        <u16: # of AND signals> <Entity signal>...
        <u16: # of OR signals> <Entity signal>...
        <Entity actions>
    Particles entity data:
        <u8:
            <7 bits: 0>
            <1 bit: Start enabled>
        >
        <float[3]: Position>
        <u32: Pattern>
        <float: Pattern speed>
        <float[4]: Start color>
        <float[4]: Start color randomness (HSVA)>
        <float[4]: End color>
        <float[4]: End color randomness (HSVA)>
        <float: Width>
        <float: Glow width>
        <float: Segment length>
        <float[4]: Trail end color>
        <float[4]: Trail end color randomness (HSVA)>
        <float: Trail length>
        <u16: # of particles>
        <float: Start randomness>
        <float: Duration>
        <float[3]: Rotation>
        <float[3]: Rotation randomness>
        <float: Start speed>
        <float: End speed>
        <float[3]: Gravity>
        <<Entity signal>: Start>
        <<Entity signal>: Stop>
    Textured particles entity data:
        <u8:
            <7 bits: 0>
            <1 bit: Start enabled>
        >
        <float[3]: Position>
        <u32: Pattern>
        <float: Pattern speed>
        <float[4]: Start color>
        <float[4]: Start color randomness (HSVA)>
        <float[4]: End color>
        <float[4]: End color randomness (HSVA)>
        <<Server resource>: Texture>
        <u16: # of particles>
        <float: Start randomness>
        <float: Duration>
        <float[3]: Rotation>
        <float[3]: Rotation randomness>
        <float: Start speed>
        <float: End speed>
        <float[3]: Gravity>
        <<Entity signal>: Start>
        <<Entity signal>: Stop>
    Beam entity data:
        <u8:
            <7 bits: 0>
            <1 bit: Start enabled>
        >
        <float[3]: Start position>
        <float[3]: End position>
        <u32: Pattern>
        <float: Pattern speed>
        <float[4]: Start color>
        <float[4]: Start color randomness (HSVA)>
        <float[4]: End color>
        <float[4]: End color randomness (HSVA)>
        <float: Width>
        <float: Glow width>
        <float: Segment length>
        <float: Segment noise>
        <float[3]: Direction>
        <float: Curve>
        <<Entity signal>: Start>
        <<Entity signal>: Stop>
    Giblets entity data:
        <u8:
            <7 bits: 0>
            <1 bit: Start immediately>
        >
        <<Server resource>: Model>
        <<Server resource>: Overlay texture>
        <<Entity signal>: Start>
    Door entity data:
        <u8:
            <5 bits: 0>
            <1 bit: Start unusable> <1 bit: Start open> <1 bit: Start locked>
        >
        <<Server resource>: Model>
        <float[3]: Closed position>
        <float[3]: Closed rotation>
        <float[3]: Closed scale>
        <float[3]: Open position>
        <float[3]: Open rotation>
        <float[3]: Open scale>
        <float: Toggle duration>
        <<Entity signal>: Open>
        <<Entity signal>: Close>
        <<Entity signal>: Lock>
        <<Entity signal>: Unlock>
        <<Entity signal>: Make usable>
        <<Entity signal>: Make unusable>
    Spawn entity data:
        <Entity filter>
        <float[3]: Origin>
        <float[2]: Radius>
        <i8[2]: Grid size (-1 = random)>
        <<Entity signal>: Enable>
        <<Entity signal>: Disable>
    Dynamic light entity data:
        <u8:
            <7 bits: 0>
            <1 bit: Start enabled>
        >
        <<Entity signal>: Enable>
        <<Entity signal>: Disable>
        <Light reference>
    Health entity data:
        <<Server resource>: Model>
        <float: Respawn delay>
        <float: Amount>
    Shield entity data:
        <<Server resource>: Model>
        <float: Respawn delay>
        <float: Amount>
    Weapon entity data:
        <<Server resource>: Weapon>
        <float: Respawn delay>
        <i16: Ammo amount>
    Ammo entity data:
        <<Server resource>: Weapon>
        <float: Respawn delay>
        <i16: Amount>


